mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-22 19:30:09 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ef182d009 | ||
|
|
86a9f965dd | ||
|
|
b90fddc285 | ||
|
|
f67043b3f4 | ||
|
|
19d2aeb4a8 | ||
|
|
31b3766b19 | ||
|
|
1b1a865efe | ||
|
|
a85521aa8b | ||
|
|
8b00031c51 | ||
|
|
147e459a16 | ||
|
|
fbfbc6b23f | ||
|
|
906dd8e241 |
@@ -37,6 +37,9 @@ const schema = [
|
||||
},
|
||||
] as const;
|
||||
|
||||
const REST_TYPE_NAME_REGEX =
|
||||
/^REST(?:Get|Patch|Post|Put|Delete)[a-zA-Z0-9]+(?:JSONBody|FormDataBody|URLEncodedData|Result|Query)$/;
|
||||
|
||||
export = {
|
||||
rules: {
|
||||
'explicitly-optional-undefined-properties': ESLintUtils.RuleCreator.withoutDocs<Options, 'missingOptional'>({
|
||||
@@ -131,5 +134,54 @@ export = {
|
||||
},
|
||||
defaultOptions: [{ interfaceEndings: [] }],
|
||||
}),
|
||||
'rest-type-naming-convention': ESLintUtils.RuleCreator.withoutDocs<[{ whitelist: string[] }], 'invalidName'>({
|
||||
create: (context) => {
|
||||
const { whitelist } = context.options[0];
|
||||
const whitelistSet = new Set(whitelist);
|
||||
|
||||
return {
|
||||
'TSTypeAliasDeclaration, TSInterfaceDeclaration': (
|
||||
node: TSESTree.TSTypeAliasDeclaration | TSESTree.TSInterfaceDeclaration,
|
||||
) => {
|
||||
if (node.id.type !== AST_NODE_TYPES.Identifier) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { name } = node.id;
|
||||
if (whitelistSet.has(name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!REST_TYPE_NAME_REGEX.test(name)) {
|
||||
context.report({
|
||||
node: node.id,
|
||||
messageId: 'invalidName',
|
||||
data: { name },
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
meta: {
|
||||
messages: {
|
||||
invalidName: `{{ name }} does not match REST type naming convention. Must match ${REST_TYPE_NAME_REGEX.source}.`,
|
||||
},
|
||||
type: 'problem',
|
||||
schema: [
|
||||
{
|
||||
type: 'object',
|
||||
properties: {
|
||||
whitelist: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
] as const,
|
||||
},
|
||||
defaultOptions: [{ whitelist: [] }],
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -17,5 +17,54 @@
|
||||
"typescript-sort-keys/string-enum": "off",
|
||||
"unicorn/prefer-math-trunc": "off",
|
||||
"jsdoc/no-undefined-types": "off"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["rest/v10/*.ts", "rest/v9/*.ts"],
|
||||
"excludedFiles": ["rest/v10/index.ts", "rest/v9/index.ts"],
|
||||
"rules": {
|
||||
"local/rest-type-naming-convention": [
|
||||
"error",
|
||||
{
|
||||
"whitelist": [
|
||||
"RESTAPIAttachment",
|
||||
"RESTAPIChannelPatchOverwrite",
|
||||
"RESTAPIGuildChannelResolvable",
|
||||
"RESTAPIGuildCreateOverwrite",
|
||||
"RESTAPIGuildCreatePartialChannel",
|
||||
"RESTAPIGuildCreateRole",
|
||||
"RESTAPIGuildOnboardingPrompt",
|
||||
"RESTAPIGuildOnboardingPromptOption",
|
||||
"RESTAPIMessageReference",
|
||||
"RESTAPIPartialCurrentUserGuild",
|
||||
"RESTAPIPoll",
|
||||
|
||||
"RESTOAuth2AdvancedBotAuthorizationQuery",
|
||||
"RESTOAuth2AdvancedBotAuthorizationQueryResult",
|
||||
"RESTOAuth2AuthorizationQuery",
|
||||
"RESTOAuth2BotAuthorizationQuery",
|
||||
"RESTOAuth2ImplicitAuthorizationQuery",
|
||||
"RESTOAuth2ImplicitAuthorizationURLFragmentResult",
|
||||
|
||||
// Deprecated types
|
||||
"APIChannelPatchOverwrite",
|
||||
"APIGuildChannelResolvable",
|
||||
"APIGuildCreateOverwrite",
|
||||
"APIGuildCreatePartialChannel",
|
||||
"APIGuildCreateRole",
|
||||
"APIMessageReferenceSend",
|
||||
"GetAPIVoiceRegionsResult",
|
||||
"RESTAPIModifyGuildOnboardingPromptData",
|
||||
"RESTAPIModifyGuildOnboardingPromptOptionData",
|
||||
"RESTAPIPollCreate",
|
||||
"RESTDeleteAPIChannelMessageOwnReaction",
|
||||
"RESTGetAPIStickerPack",
|
||||
"RESTOAuth2AuthorizationQueryResult",
|
||||
"RESTPostAPIEntitlementBody"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
30
CHANGELOG.md
30
CHANGELOG.md
@@ -1,3 +1,33 @@
|
||||
## [0.37.97](https://github.com/discordjs/discord-api-types/compare/0.37.96...0.37.97) (2024-08-22)
|
||||
|
||||
|
||||
|
||||
## [0.37.96](https://github.com/discordjs/discord-api-types/compare/0.37.95...0.37.96) (2024-08-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* nullable `recurrence_rule` on patch ([#1063](https://github.com/discordjs/discord-api-types/issues/1063)) ([19d2aeb](https://github.com/discordjs/discord-api-types/commit/19d2aeb4a82dc781558240a674c36eadce270abf))
|
||||
* nullable fields for scheduled event editing ([#1064](https://github.com/discordjs/discord-api-types/issues/1064)) ([f67043b](https://github.com/discordjs/discord-api-types/commit/f67043b3f46eea7286e959d223b78d140deac318))
|
||||
|
||||
|
||||
|
||||
## [0.37.95](https://github.com/discordjs/discord-api-types/compare/0.37.94...0.37.95) (2024-08-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* interface name ([#1059](https://github.com/discordjs/discord-api-types/issues/1059)) ([147e459](https://github.com/discordjs/discord-api-types/commit/147e459a16c8b0e15a0dd50f75d62c6dd9098815))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* recurring scheduled events ([#1058](https://github.com/discordjs/discord-api-types/issues/1058)) ([fbfbc6b](https://github.com/discordjs/discord-api-types/commit/fbfbc6b23f2696f6db5fad8ea1543327d5b3cf07))
|
||||
* **RESTJSONErrorCodes:** `UnknownStickerPack` ([#1055](https://github.com/discordjs/discord-api-types/issues/1055)) ([906dd8e](https://github.com/discordjs/discord-api-types/commit/906dd8e241be6acdf4d6d7b10ce4e7c139b0fd8b))
|
||||
* **Routes:** voice state endpoint ([#1046](https://github.com/discordjs/discord-api-types/issues/1046)) ([1b1a865](https://github.com/discordjs/discord-api-types/commit/1b1a865efe4d95b34055616ed18dc3613b58f317))
|
||||
|
||||
|
||||
|
||||
## [0.37.94](https://github.com/discordjs/discord-api-types/compare/0.37.93...0.37.94) (2024-08-15)
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
## [0.37.97](https://github.com/discordjs/discord-api-types/compare/0.37.96...0.37.97) (2024-08-22)
|
||||
|
||||
|
||||
|
||||
## [0.37.96](https://github.com/discordjs/discord-api-types/compare/0.37.95...0.37.96) (2024-08-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* nullable `recurrence_rule` on patch ([#1063](https://github.com/discordjs/discord-api-types/issues/1063)) ([19d2aeb](https://github.com/discordjs/discord-api-types/commit/19d2aeb4a82dc781558240a674c36eadce270abf))
|
||||
* nullable fields for scheduled event editing ([#1064](https://github.com/discordjs/discord-api-types/issues/1064)) ([f67043b](https://github.com/discordjs/discord-api-types/commit/f67043b3f46eea7286e959d223b78d140deac318))
|
||||
|
||||
|
||||
|
||||
## [0.37.95](https://github.com/discordjs/discord-api-types/compare/0.37.94...0.37.95) (2024-08-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* interface name ([#1059](https://github.com/discordjs/discord-api-types/issues/1059)) ([147e459](https://github.com/discordjs/discord-api-types/commit/147e459a16c8b0e15a0dd50f75d62c6dd9098815))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* recurring scheduled events ([#1058](https://github.com/discordjs/discord-api-types/issues/1058)) ([fbfbc6b](https://github.com/discordjs/discord-api-types/commit/fbfbc6b23f2696f6db5fad8ea1543327d5b3cf07))
|
||||
* **RESTJSONErrorCodes:** `UnknownStickerPack` ([#1055](https://github.com/discordjs/discord-api-types/issues/1055)) ([906dd8e](https://github.com/discordjs/discord-api-types/commit/906dd8e241be6acdf4d6d7b10ce4e7c139b0fd8b))
|
||||
* **Routes:** voice state endpoint ([#1046](https://github.com/discordjs/discord-api-types/issues/1046)) ([1b1a865](https://github.com/discordjs/discord-api-types/commit/1b1a865efe4d95b34055616ed18dc3613b58f317))
|
||||
|
||||
|
||||
|
||||
## [0.37.94](https://github.com/discordjs/discord-api-types/compare/0.37.93...0.37.94) (2024-08-15)
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import type {
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayThreadListSync as RawGatewayThreadListSync,
|
||||
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
|
||||
GatewayVoiceState,
|
||||
APIVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
@@ -785,7 +785,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
|
||||
voice_states: Omit<APIVoiceState, 'guild_id'>[];
|
||||
/**
|
||||
* Users in the guild
|
||||
*
|
||||
@@ -1748,7 +1748,7 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-state-update
|
||||
*/
|
||||
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
|
||||
export type GatewayVoiceStateUpdateDispatchData = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-server-update
|
||||
|
||||
@@ -28,7 +28,7 @@ import type {
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayThreadListSync as RawGatewayThreadListSync,
|
||||
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
|
||||
GatewayVoiceState,
|
||||
APIVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
@@ -784,7 +784,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
|
||||
voice_states: Omit<APIVoiceState, 'guild_id'>[];
|
||||
/**
|
||||
* Users in the guild
|
||||
*
|
||||
@@ -1747,7 +1747,7 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-state-update
|
||||
*/
|
||||
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
|
||||
export type GatewayVoiceStateUpdateDispatchData = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-server-update
|
||||
|
||||
@@ -67,6 +67,113 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule: APIGuildScheduledEventRecurrenceRule | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
|
||||
*/
|
||||
export interface APIGuildScheduledEventRecurrenceRule {
|
||||
/**
|
||||
* Starting time of the recurrence interval
|
||||
*/
|
||||
start: string;
|
||||
/**
|
||||
* Ending time of the recurrence interval
|
||||
*/
|
||||
end: string | null;
|
||||
/**
|
||||
* How often the event occurs
|
||||
*/
|
||||
frequency: GuildScheduledEventRecurrenceRuleFrequency;
|
||||
/**
|
||||
* The spacing between the events, defined by `frequency`.
|
||||
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
|
||||
* would be "every-other week"
|
||||
*/
|
||||
interval: number;
|
||||
/**
|
||||
* Set of specific days within a week for the event to recur on
|
||||
*/
|
||||
by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null;
|
||||
/**
|
||||
* List of specific days within a specific week (1-5) to recur on
|
||||
*/
|
||||
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
|
||||
/**
|
||||
* Set of specific months to recur on
|
||||
*/
|
||||
by_month: GuildScheduledEventRecurrenceRuleMonth[] | null;
|
||||
/**
|
||||
* Set of specific dates within a month to recur on
|
||||
*/
|
||||
by_month_day: number[] | null;
|
||||
/**
|
||||
* Set of days within a year to recur on (1-364)
|
||||
*/
|
||||
by_year_day: number[] | null;
|
||||
/**
|
||||
* The total amount of times that the event is allowed to recur before stopping
|
||||
*/
|
||||
count: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleFrequency {
|
||||
Yearly,
|
||||
Monthly,
|
||||
Weekly,
|
||||
Daily,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleWeekday {
|
||||
Monday,
|
||||
Tuesday,
|
||||
Wednesday,
|
||||
Thursday,
|
||||
Friday,
|
||||
Saturday,
|
||||
Sunday,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleMonth {
|
||||
January = 1,
|
||||
February,
|
||||
March,
|
||||
April,
|
||||
May,
|
||||
June,
|
||||
July,
|
||||
August,
|
||||
September,
|
||||
October,
|
||||
November,
|
||||
December,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure
|
||||
*/
|
||||
export interface GuildScheduledEventRecurrenceRuleNWeekday {
|
||||
/**
|
||||
* The week to reoccur on.
|
||||
*/
|
||||
n: 1 | 2 | 3 | 4 | 5;
|
||||
/**
|
||||
* The day within the week to reoccur on
|
||||
*/
|
||||
day: GuildScheduledEventRecurrenceRuleWeekday;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -7,8 +7,15 @@ import type { APIGuildMember } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*
|
||||
* @deprecated This is deprecated, use {@apilink APIVoiceState}
|
||||
*/
|
||||
export interface GatewayVoiceState {
|
||||
export type GatewayVoiceState = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
export interface APIVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
|
||||
@@ -67,6 +67,113 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule: APIGuildScheduledEventRecurrenceRule | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
|
||||
*/
|
||||
export interface APIGuildScheduledEventRecurrenceRule {
|
||||
/**
|
||||
* Starting time of the recurrence interval
|
||||
*/
|
||||
start: string;
|
||||
/**
|
||||
* Ending time of the recurrence interval
|
||||
*/
|
||||
end: string | null;
|
||||
/**
|
||||
* How often the event occurs
|
||||
*/
|
||||
frequency: GuildScheduledEventRecurrenceRuleFrequency;
|
||||
/**
|
||||
* The spacing between the events, defined by `frequency`.
|
||||
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
|
||||
* would be "every-other week"
|
||||
*/
|
||||
interval: number;
|
||||
/**
|
||||
* Set of specific days within a week for the event to recur on
|
||||
*/
|
||||
by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null;
|
||||
/**
|
||||
* List of specific days within a specific week (1-5) to recur on
|
||||
*/
|
||||
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
|
||||
/**
|
||||
* Set of specific months to recur on
|
||||
*/
|
||||
by_month: GuildScheduledEventRecurrenceRuleMonth[] | null;
|
||||
/**
|
||||
* Set of specific dates within a month to recur on
|
||||
*/
|
||||
by_month_day: number[] | null;
|
||||
/**
|
||||
* Set of days within a year to recur on (1-364)
|
||||
*/
|
||||
by_year_day: number[] | null;
|
||||
/**
|
||||
* The total amount of times that the event is allowed to recur before stopping
|
||||
*/
|
||||
count: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleFrequency {
|
||||
Yearly,
|
||||
Monthly,
|
||||
Weekly,
|
||||
Daily,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleWeekday {
|
||||
Monday,
|
||||
Tuesday,
|
||||
Wednesday,
|
||||
Thursday,
|
||||
Friday,
|
||||
Saturday,
|
||||
Sunday,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleMonth {
|
||||
January = 1,
|
||||
February,
|
||||
March,
|
||||
April,
|
||||
May,
|
||||
June,
|
||||
July,
|
||||
August,
|
||||
September,
|
||||
October,
|
||||
November,
|
||||
December,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure
|
||||
*/
|
||||
export interface GuildScheduledEventRecurrenceRuleNWeekday {
|
||||
/**
|
||||
* The week to reoccur on.
|
||||
*/
|
||||
n: 1 | 2 | 3 | 4 | 5;
|
||||
/**
|
||||
* The day within the week to reoccur on
|
||||
*/
|
||||
day: GuildScheduledEventRecurrenceRuleWeekday;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -7,8 +7,15 @@ import type { APIGuildMember } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*
|
||||
* @deprecated This is deprecated, use {@apilink APIVoiceState}
|
||||
*/
|
||||
export interface GatewayVoiceState {
|
||||
export type GatewayVoiceState = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
export interface APIVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
|
||||
@@ -43,8 +43,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
UnknownDiscoverableServerCategory = 10_059,
|
||||
UnknownSticker,
|
||||
|
||||
UnknownInteraction = 10_062,
|
||||
UnknownStickerPack,
|
||||
UnknownInteraction,
|
||||
UnknownApplicationCommand,
|
||||
|
||||
UnknownVoiceState = 10_065,
|
||||
|
||||
@@ -26,12 +26,17 @@ import type {
|
||||
ChannelFlags,
|
||||
} from '../../payloads/v10/mod.ts';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
|
||||
import type { RESTAPIPollCreate } from './poll.ts';
|
||||
import type { RESTAPIPoll } from './poll.ts';
|
||||
|
||||
export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
export interface RESTAPIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIChannelPatchOverwrite} instead
|
||||
*/
|
||||
export type APIChannelPatchOverwrite = RESTAPIChannelPatchOverwrite;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#get-channel
|
||||
*/
|
||||
@@ -98,7 +103,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: all excluding newsThread, publicThread, privateThread
|
||||
*/
|
||||
permission_overwrites?: APIChannelPatchOverwrite[] | null | undefined;
|
||||
permission_overwrites?: RESTAPIChannelPatchOverwrite[] | null | undefined;
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
@@ -237,7 +242,7 @@ export type RESTGetAPIChannelMessageResult = APIMessage;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Required<Pick<APIMessageReference, 'message_id'>>
|
||||
> &
|
||||
StrictPartial<APIMessageReference> & {
|
||||
@@ -249,6 +254,11 @@ export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesO
|
||||
fail_if_not_exists?: boolean | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIMessageReference} instead
|
||||
*/
|
||||
export type APIMessageReferenceSend = RESTAPIMessageReference;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
@@ -300,7 +310,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
message_reference?: APIMessageReferenceSend | undefined;
|
||||
message_reference?: RESTAPIMessageReference | undefined;
|
||||
/**
|
||||
* The components to include with the message
|
||||
*
|
||||
@@ -329,7 +339,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
/**
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPollCreate | undefined;
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -362,7 +372,12 @@ export type RESTPutAPIChannelMessageReactionResult = never;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#delete-own-reaction
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessageOwnReaction = never;
|
||||
export type RESTDeleteAPIChannelMessageOwnReactionResult = never;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTDeleteAPIChannelMessageOwnReactionResult} instead
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessageOwnReaction = RESTDeleteAPIChannelMessageOwnReactionResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#delete-user-reaction
|
||||
|
||||
@@ -37,14 +37,25 @@ import type {
|
||||
} from '../../utils/internals.ts';
|
||||
import type { RESTPutAPIChannelPermissionJSONBody } from './channel.ts';
|
||||
|
||||
export interface APIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
export interface RESTAPIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: number | string;
|
||||
}
|
||||
|
||||
export type APIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>;
|
||||
export type APIGuildCreatePartialChannel = StrictPartial<
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreateOverwrite} instead
|
||||
*/
|
||||
export type APIGuildCreateOverwrite = RESTAPIGuildCreateOverwrite;
|
||||
|
||||
export type RESTAPIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildChannelResolvable} instead
|
||||
*/
|
||||
export type APIGuildChannelResolvable = RESTAPIGuildChannelResolvable;
|
||||
|
||||
export type RESTAPIGuildCreatePartialChannel = StrictPartial<
|
||||
DistributivePick<
|
||||
APIGuildChannelResolvable,
|
||||
RESTAPIGuildChannelResolvable,
|
||||
| 'available_tags'
|
||||
| 'bitrate'
|
||||
| 'default_auto_archive_duration'
|
||||
@@ -66,13 +77,23 @@ export type APIGuildCreatePartialChannel = StrictPartial<
|
||||
name: string;
|
||||
id?: number | string | undefined;
|
||||
parent_id?: number | string | null | undefined;
|
||||
permission_overwrites?: APIGuildCreateOverwrite[] | undefined;
|
||||
permission_overwrites?: RESTAPIGuildCreateOverwrite[] | undefined;
|
||||
};
|
||||
|
||||
export interface APIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreatePartialChannel} instead
|
||||
*/
|
||||
export type APIGuildCreatePartialChannel = RESTAPIGuildCreatePartialChannel;
|
||||
|
||||
export interface RESTAPIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
|
||||
id: number | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreateRole} instead
|
||||
*/
|
||||
export type APIGuildCreateRole = RESTAPIGuildCreateRole;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild
|
||||
*/
|
||||
@@ -124,7 +145,7 @@ export interface RESTPostAPIGuildsJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/permissions#role-object
|
||||
*/
|
||||
roles?: APIGuildCreateRole[] | undefined;
|
||||
roles?: RESTAPIGuildCreateRole[] | undefined;
|
||||
/**
|
||||
* New guild's channels
|
||||
*
|
||||
@@ -138,7 +159,7 @@ export interface RESTPostAPIGuildsJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
channels?: APIGuildCreatePartialChannel[] | undefined;
|
||||
channels?: RESTAPIGuildCreatePartialChannel[] | undefined;
|
||||
/**
|
||||
* ID for afk channel
|
||||
*/
|
||||
@@ -333,7 +354,7 @@ export type RESTGetAPIGuildChannelsResult = APIChannel[];
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild-channel
|
||||
*/
|
||||
export type RESTPostAPIGuildChannelJSONBody = DistributiveOmit<APIGuildCreatePartialChannel, 'id'>;
|
||||
export type RESTPostAPIGuildChannelJSONBody = DistributiveOmit<RESTAPIGuildCreatePartialChannel, 'id'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild-channel
|
||||
@@ -896,48 +917,6 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
|
||||
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
|
||||
*/
|
||||
@@ -972,20 +951,25 @@ export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedP
|
||||
/**
|
||||
* Prompts shown during onboarding and in customize community
|
||||
*/
|
||||
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
|
||||
prompts?: RESTAPIGuildOnboardingPrompt[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
export type RESTAPIGuildOnboardingPrompt = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
|
||||
> &
|
||||
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
|
||||
options: RESTAPIGuildOnboardingPromptOption[];
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildOnboardingPrompt} instead.
|
||||
*/
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt;
|
||||
|
||||
export type RESTAPIGuildOnboardingPromptOption = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>
|
||||
> &
|
||||
Pick<APIGuildOnboardingPromptOption, 'title'> & {
|
||||
@@ -1003,6 +987,11 @@ export type RESTAPIModifyGuildOnboardingPromptOptionData = AddUndefinedToPossibl
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildOnboardingPromptOption} instead.
|
||||
*/
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = RESTAPIGuildOnboardingPromptOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { StrictPartial } from '../../utils/internals.ts';
|
||||
import type { Nullable, StrictPartial } from '../../utils/internals.ts';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
APIGuildScheduledEventRecurrenceRule,
|
||||
APIGuildScheduledEventUser,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
@@ -64,6 +65,10 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null | undefined;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule?: APIGuildScheduledEventRecurrenceRule | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,20 +94,17 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
|
||||
*/
|
||||
export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & {
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus | undefined;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
entity_metadata?: APIGuildScheduledEventEntityMetadata | null | undefined;
|
||||
/**
|
||||
* The description of the guild event
|
||||
*/
|
||||
description?: string | null | undefined;
|
||||
};
|
||||
export type RESTPatchAPIGuildScheduledEventJSONBody = Nullable<
|
||||
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
> &
|
||||
StrictPartial<
|
||||
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
> & {
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
|
||||
|
||||
@@ -788,6 +788,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/voice-states/@me`
|
||||
* - GET `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/@me`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@ export type RESTGetAPIEntitlementsResult = APIEntitlement[];
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export interface RESTPostAPIEntitlementBody {
|
||||
export interface RESTPostAPIEntitlementJSONBody {
|
||||
/**
|
||||
* ID of the SKU to grant the entitlement to
|
||||
*/
|
||||
@@ -61,6 +61,11 @@ export interface RESTPostAPIEntitlementBody {
|
||||
owner_type: EntitlementOwnerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTPostAPIEntitlementJSONBody} instead
|
||||
*/
|
||||
export type RESTPostAPIEntitlementBody = RESTPostAPIEntitlementJSONBody;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
|
||||
@@ -51,11 +51,16 @@ export interface RESTPostOAuth2TokenRevocationQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
export interface RESTOAuth2AuthorizationQueryResult {
|
||||
export interface RESTPostOAuth2AuthorizationQueryResult {
|
||||
code: string;
|
||||
state?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTPostOAuth2AuthorizationQueryResult} instead
|
||||
*/
|
||||
export type RESTOAuth2AuthorizationQueryResult = RESTPostOAuth2AuthorizationQueryResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface RESTGetAPIPollAnswerVotersQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
|
||||
*/
|
||||
export interface RESTAPIPollCreate
|
||||
export interface RESTAPIPoll
|
||||
extends Omit<APIPoll, 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results'>,
|
||||
Partial<Pick<APIPoll, 'allow_multiselect' | 'layout_type'>> {
|
||||
/**
|
||||
@@ -35,6 +35,11 @@ export interface RESTAPIPollCreate
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIPoll} instead
|
||||
*/
|
||||
export type RESTAPIPollCreate = RESTAPIPoll;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#get-answer-voters
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,12 @@ export interface RESTGetStickerPacksResult {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#get-sticker-pack
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = APIStickerPack;
|
||||
export type RESTGetAPIStickerPackResult = APIStickerPack;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTGetAPIStickerPackResult} instead
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = RESTGetAPIStickerPackResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIVoiceRegion } from '../../payloads/v10/mod.ts';
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIVoiceRegion, APIVoiceState } from '../../payloads/v10/mod.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#list-voice-regions
|
||||
@@ -9,3 +10,55 @@ export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[];
|
||||
* @deprecated This was exported with the wrong name, use `RESTGetAPIVoiceRegionsResult` instead
|
||||
*/
|
||||
export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-current-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateCurrentMemberResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateUserResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
} from '../../payloads/v10/mod.ts';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals.ts';
|
||||
import type { RESTAPIAttachment } from './channel.ts';
|
||||
import type { RESTAPIPollCreate } from './poll.ts';
|
||||
import type { RESTAPIPoll } from './poll.ts';
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#create-webhook
|
||||
*/
|
||||
@@ -158,7 +158,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
||||
/**
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPollCreate | undefined;
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,12 +26,17 @@ import type {
|
||||
ChannelFlags,
|
||||
} from '../../payloads/v9/mod.ts';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
|
||||
import type { RESTAPIPollCreate } from './poll.ts';
|
||||
import type { RESTAPIPoll } from './poll.ts';
|
||||
|
||||
export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
export interface RESTAPIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIChannelPatchOverwrite} instead
|
||||
*/
|
||||
export type APIChannelPatchOverwrite = RESTAPIChannelPatchOverwrite;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#get-channel
|
||||
*/
|
||||
@@ -237,7 +242,7 @@ export type RESTGetAPIChannelMessageResult = APIMessage;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Required<Pick<APIMessageReference, 'message_id'>>
|
||||
> &
|
||||
StrictPartial<APIMessageReference> & {
|
||||
@@ -249,6 +254,11 @@ export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesO
|
||||
fail_if_not_exists?: boolean | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIMessageReference} instead
|
||||
*/
|
||||
export type APIMessageReferenceSend = RESTAPIMessageReference;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
@@ -308,7 +318,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
message_reference?: APIMessageReferenceSend | undefined;
|
||||
message_reference?: RESTAPIMessageReference | undefined;
|
||||
/**
|
||||
* The components to include with the message
|
||||
*
|
||||
@@ -337,7 +347,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
/**
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPollCreate | undefined;
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -370,7 +380,12 @@ export type RESTPutAPIChannelMessageReactionResult = never;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#delete-own-reaction
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessageOwnReaction = never;
|
||||
export type RESTDeleteAPIChannelMessageOwnReactionResult = never;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTDeleteAPIChannelMessageOwnReactionResult} instead
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessageOwnReaction = RESTDeleteAPIChannelMessageOwnReactionResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#delete-user-reaction
|
||||
|
||||
@@ -37,14 +37,25 @@ import type {
|
||||
} from '../../utils/internals.ts';
|
||||
import type { RESTPutAPIChannelPermissionJSONBody } from './channel.ts';
|
||||
|
||||
export interface APIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
export interface RESTAPIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: number | string;
|
||||
}
|
||||
|
||||
export type APIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>;
|
||||
export type APIGuildCreatePartialChannel = StrictPartial<
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreateOverwrite} instead
|
||||
*/
|
||||
export type APIGuildCreateOverwrite = RESTAPIGuildCreateOverwrite;
|
||||
|
||||
export type RESTAPIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildChannelResolvable} instead
|
||||
*/
|
||||
export type APIGuildChannelResolvable = RESTAPIGuildChannelResolvable;
|
||||
|
||||
export type RESTAPIGuildCreatePartialChannel = StrictPartial<
|
||||
DistributivePick<
|
||||
APIGuildChannelResolvable,
|
||||
RESTAPIGuildChannelResolvable,
|
||||
| 'available_tags'
|
||||
| 'bitrate'
|
||||
| 'default_auto_archive_duration'
|
||||
@@ -66,13 +77,23 @@ export type APIGuildCreatePartialChannel = StrictPartial<
|
||||
name: string;
|
||||
id?: number | string | undefined;
|
||||
parent_id?: number | string | null | undefined;
|
||||
permission_overwrites?: APIGuildCreateOverwrite[] | undefined;
|
||||
permission_overwrites?: RESTAPIGuildCreateOverwrite[] | undefined;
|
||||
};
|
||||
|
||||
export interface APIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreatePartialChannel} instead
|
||||
*/
|
||||
export type APIGuildCreatePartialChannel = RESTAPIGuildCreatePartialChannel;
|
||||
|
||||
export interface RESTAPIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
|
||||
id: number | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreateRole} instead
|
||||
*/
|
||||
export type APIGuildCreateRole = RESTAPIGuildCreateRole;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild
|
||||
*/
|
||||
@@ -124,7 +145,7 @@ export interface RESTPostAPIGuildsJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/permissions#role-object
|
||||
*/
|
||||
roles?: APIGuildCreateRole[] | undefined;
|
||||
roles?: RESTAPIGuildCreateRole[] | undefined;
|
||||
/**
|
||||
* New guild's channels
|
||||
*
|
||||
@@ -138,7 +159,7 @@ export interface RESTPostAPIGuildsJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
channels?: APIGuildCreatePartialChannel[] | undefined;
|
||||
channels?: RESTAPIGuildCreatePartialChannel[] | undefined;
|
||||
/**
|
||||
* ID for afk channel
|
||||
*/
|
||||
@@ -333,7 +354,7 @@ export type RESTGetAPIGuildChannelsResult = APIChannel[];
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild-channel
|
||||
*/
|
||||
export type RESTPostAPIGuildChannelJSONBody = DistributiveOmit<APIGuildCreatePartialChannel, 'id'>;
|
||||
export type RESTPostAPIGuildChannelJSONBody = DistributiveOmit<RESTAPIGuildCreatePartialChannel, 'id'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild-channel
|
||||
@@ -902,48 +923,6 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
|
||||
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
|
||||
*/
|
||||
@@ -978,20 +957,25 @@ export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedP
|
||||
/**
|
||||
* Prompts shown during onboarding and in customize community
|
||||
*/
|
||||
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
|
||||
prompts?: RESTAPIGuildOnboardingPrompt[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
export type RESTAPIGuildOnboardingPrompt = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
|
||||
> &
|
||||
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
|
||||
options: RESTAPIGuildOnboardingPromptOption[];
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildOnboardingPrompt} instead.
|
||||
*/
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt;
|
||||
|
||||
export type RESTAPIGuildOnboardingPromptOption = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>
|
||||
> &
|
||||
Pick<APIGuildOnboardingPromptOption, 'title'> & {
|
||||
@@ -1009,6 +993,11 @@ export type RESTAPIModifyGuildOnboardingPromptOptionData = AddUndefinedToPossibl
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildOnboardingPromptOption} instead.
|
||||
*/
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = RESTAPIGuildOnboardingPromptOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { StrictPartial } from '../../utils/internals.ts';
|
||||
import type { Nullable, StrictPartial } from '../../utils/internals.ts';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
APIGuildScheduledEventRecurrenceRule,
|
||||
APIGuildScheduledEventUser,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
GuildScheduledEventStatus,
|
||||
APIGuildScheduledEventUser,
|
||||
} from '../../v9.ts';
|
||||
|
||||
/**
|
||||
@@ -64,6 +65,10 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null | undefined;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule?: APIGuildScheduledEventRecurrenceRule | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,20 +94,17 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
|
||||
*/
|
||||
export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & {
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus | undefined;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
entity_metadata?: APIGuildScheduledEventEntityMetadata | null | undefined;
|
||||
/**
|
||||
* The description of the guild event
|
||||
*/
|
||||
description?: string | null | undefined;
|
||||
};
|
||||
export type RESTPatchAPIGuildScheduledEventJSONBody = Nullable<
|
||||
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
> &
|
||||
StrictPartial<
|
||||
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
> & {
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
|
||||
|
||||
@@ -797,6 +797,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/voice-states/@me`
|
||||
* - GET `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/@me`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@ export type RESTGetAPIEntitlementsResult = APIEntitlement[];
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export interface RESTPostAPIEntitlementBody {
|
||||
export interface RESTPostAPIEntitlementJSONBody {
|
||||
/**
|
||||
* ID of the SKU to grant the entitlement to
|
||||
*/
|
||||
@@ -61,6 +61,11 @@ export interface RESTPostAPIEntitlementBody {
|
||||
owner_type: EntitlementOwnerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTPostAPIEntitlementJSONBody} instead
|
||||
*/
|
||||
export type RESTPostAPIEntitlementBody = RESTPostAPIEntitlementJSONBody;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
|
||||
@@ -51,11 +51,16 @@ export interface RESTPostOAuth2TokenRevocationQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
export interface RESTOAuth2AuthorizationQueryResult {
|
||||
export interface RESTPostOAuth2AuthorizationQueryResult {
|
||||
code: string;
|
||||
state?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTPostOAuth2AuthorizationQueryResult} instead
|
||||
*/
|
||||
export type RESTOAuth2AuthorizationQueryResult = RESTPostOAuth2AuthorizationQueryResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface RESTGetAPIPollAnswerVotersQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
|
||||
*/
|
||||
export interface RESTAPIPollCreate
|
||||
export interface RESTAPIPoll
|
||||
extends Omit<APIPoll, 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results'>,
|
||||
Partial<Pick<APIPoll, 'allow_multiselect' | 'layout_type'>> {
|
||||
/**
|
||||
@@ -35,6 +35,11 @@ export interface RESTAPIPollCreate
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIPoll} instead
|
||||
*/
|
||||
export type RESTAPIPollCreate = RESTAPIPoll;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#get-answer-voters
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,12 @@ export interface RESTGetStickerPacksResult {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#get-sticker-pack
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = APIStickerPack;
|
||||
export type RESTGetAPIStickerPackResult = APIStickerPack;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTGetAPIStickerPackResult} instead
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = RESTGetAPIStickerPackResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIVoiceRegion } from '../../payloads/v9/mod.ts';
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIVoiceRegion, APIVoiceState } from '../../payloads/v9/mod.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#list-voice-regions
|
||||
@@ -9,3 +10,55 @@ export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[];
|
||||
* @deprecated This was exported with the wrong name, use `RESTGetAPIVoiceRegionsResult` instead
|
||||
*/
|
||||
export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-current-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateCurrentMemberResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateUserResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
} from '../../payloads/v9/mod.ts';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals.ts';
|
||||
import type { RESTAPIAttachment } from './channel.ts';
|
||||
import type { RESTAPIPollCreate } from './poll.ts';
|
||||
import type { RESTAPIPoll } from './poll.ts';
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#create-webhook
|
||||
*/
|
||||
@@ -158,7 +158,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
||||
/**
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPollCreate | undefined;
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@ import type {
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayThreadListSync as RawGatewayThreadListSync,
|
||||
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
|
||||
GatewayVoiceState,
|
||||
APIVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
@@ -785,7 +785,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
|
||||
voice_states: Omit<APIVoiceState, 'guild_id'>[];
|
||||
/**
|
||||
* Users in the guild
|
||||
*
|
||||
@@ -1748,7 +1748,7 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-state-update
|
||||
*/
|
||||
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
|
||||
export type GatewayVoiceStateUpdateDispatchData = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-server-update
|
||||
|
||||
@@ -28,7 +28,7 @@ import type {
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayThreadListSync as RawGatewayThreadListSync,
|
||||
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
|
||||
GatewayVoiceState,
|
||||
APIVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
@@ -784,7 +784,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
|
||||
voice_states: Omit<APIVoiceState, 'guild_id'>[];
|
||||
/**
|
||||
* Users in the guild
|
||||
*
|
||||
@@ -1747,7 +1747,7 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-state-update
|
||||
*/
|
||||
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
|
||||
export type GatewayVoiceStateUpdateDispatchData = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-server-update
|
||||
|
||||
34
package-lock.json
generated
34
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.37.94",
|
||||
"version": "0.37.97",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "discord-api-types",
|
||||
"version": "0.37.94",
|
||||
"version": "0.37.97",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^19.0.3",
|
||||
@@ -2018,9 +2018,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/mdast/node_modules/@types/unist": {
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz",
|
||||
"integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==",
|
||||
"version": "2.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz",
|
||||
"integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -2070,9 +2070,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/unist": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz",
|
||||
"integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==",
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
|
||||
"integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -4575,9 +4575,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.7",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.7.tgz",
|
||||
"integrity": "sha512-6FTNWIWMxMy/ZY6799nBlPtF1DFDQ6VQJ7yyDP27SJNt5lwtQ5ufqVvHylb3fdQefvRcgA3fKcFMJi9OLwBRNw==",
|
||||
"version": "1.5.9",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.9.tgz",
|
||||
"integrity": "sha512-HfkT8ndXR0SEkU8gBQQM3rz035bpE/hxkZ1YIt4KJPEFES68HfIU6LzKukH0H794Lm83WJtkSAMfEToxCs15VA==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
@@ -9236,9 +9236,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-mdx-jsx/node_modules/parse-entities/node_modules/@types/unist": {
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz",
|
||||
"integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==",
|
||||
"version": "2.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz",
|
||||
"integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -14253,9 +14253,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/unist-util-stringify-position/node_modules/@types/unist": {
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz",
|
||||
"integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==",
|
||||
"version": "2.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz",
|
||||
"integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.37.94",
|
||||
"version": "0.37.97",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"homepage": "https://discord-api-types.dev",
|
||||
"exports": {
|
||||
|
||||
@@ -67,6 +67,113 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule: APIGuildScheduledEventRecurrenceRule | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
|
||||
*/
|
||||
export interface APIGuildScheduledEventRecurrenceRule {
|
||||
/**
|
||||
* Starting time of the recurrence interval
|
||||
*/
|
||||
start: string;
|
||||
/**
|
||||
* Ending time of the recurrence interval
|
||||
*/
|
||||
end: string | null;
|
||||
/**
|
||||
* How often the event occurs
|
||||
*/
|
||||
frequency: GuildScheduledEventRecurrenceRuleFrequency;
|
||||
/**
|
||||
* The spacing between the events, defined by `frequency`.
|
||||
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
|
||||
* would be "every-other week"
|
||||
*/
|
||||
interval: number;
|
||||
/**
|
||||
* Set of specific days within a week for the event to recur on
|
||||
*/
|
||||
by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null;
|
||||
/**
|
||||
* List of specific days within a specific week (1-5) to recur on
|
||||
*/
|
||||
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
|
||||
/**
|
||||
* Set of specific months to recur on
|
||||
*/
|
||||
by_month: GuildScheduledEventRecurrenceRuleMonth[] | null;
|
||||
/**
|
||||
* Set of specific dates within a month to recur on
|
||||
*/
|
||||
by_month_day: number[] | null;
|
||||
/**
|
||||
* Set of days within a year to recur on (1-364)
|
||||
*/
|
||||
by_year_day: number[] | null;
|
||||
/**
|
||||
* The total amount of times that the event is allowed to recur before stopping
|
||||
*/
|
||||
count: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleFrequency {
|
||||
Yearly,
|
||||
Monthly,
|
||||
Weekly,
|
||||
Daily,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleWeekday {
|
||||
Monday,
|
||||
Tuesday,
|
||||
Wednesday,
|
||||
Thursday,
|
||||
Friday,
|
||||
Saturday,
|
||||
Sunday,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleMonth {
|
||||
January = 1,
|
||||
February,
|
||||
March,
|
||||
April,
|
||||
May,
|
||||
June,
|
||||
July,
|
||||
August,
|
||||
September,
|
||||
October,
|
||||
November,
|
||||
December,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure
|
||||
*/
|
||||
export interface GuildScheduledEventRecurrenceRuleNWeekday {
|
||||
/**
|
||||
* The week to reoccur on.
|
||||
*/
|
||||
n: 1 | 2 | 3 | 4 | 5;
|
||||
/**
|
||||
* The day within the week to reoccur on
|
||||
*/
|
||||
day: GuildScheduledEventRecurrenceRuleWeekday;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -7,8 +7,15 @@ import type { APIGuildMember } from './guild';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*
|
||||
* @deprecated This is deprecated, use {@apilink APIVoiceState}
|
||||
*/
|
||||
export interface GatewayVoiceState {
|
||||
export type GatewayVoiceState = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
export interface APIVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
|
||||
@@ -67,6 +67,113 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule: APIGuildScheduledEventRecurrenceRule | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
|
||||
*/
|
||||
export interface APIGuildScheduledEventRecurrenceRule {
|
||||
/**
|
||||
* Starting time of the recurrence interval
|
||||
*/
|
||||
start: string;
|
||||
/**
|
||||
* Ending time of the recurrence interval
|
||||
*/
|
||||
end: string | null;
|
||||
/**
|
||||
* How often the event occurs
|
||||
*/
|
||||
frequency: GuildScheduledEventRecurrenceRuleFrequency;
|
||||
/**
|
||||
* The spacing between the events, defined by `frequency`.
|
||||
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
|
||||
* would be "every-other week"
|
||||
*/
|
||||
interval: number;
|
||||
/**
|
||||
* Set of specific days within a week for the event to recur on
|
||||
*/
|
||||
by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null;
|
||||
/**
|
||||
* List of specific days within a specific week (1-5) to recur on
|
||||
*/
|
||||
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
|
||||
/**
|
||||
* Set of specific months to recur on
|
||||
*/
|
||||
by_month: GuildScheduledEventRecurrenceRuleMonth[] | null;
|
||||
/**
|
||||
* Set of specific dates within a month to recur on
|
||||
*/
|
||||
by_month_day: number[] | null;
|
||||
/**
|
||||
* Set of days within a year to recur on (1-364)
|
||||
*/
|
||||
by_year_day: number[] | null;
|
||||
/**
|
||||
* The total amount of times that the event is allowed to recur before stopping
|
||||
*/
|
||||
count: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleFrequency {
|
||||
Yearly,
|
||||
Monthly,
|
||||
Weekly,
|
||||
Daily,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleWeekday {
|
||||
Monday,
|
||||
Tuesday,
|
||||
Wednesday,
|
||||
Thursday,
|
||||
Friday,
|
||||
Saturday,
|
||||
Sunday,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleMonth {
|
||||
January = 1,
|
||||
February,
|
||||
March,
|
||||
April,
|
||||
May,
|
||||
June,
|
||||
July,
|
||||
August,
|
||||
September,
|
||||
October,
|
||||
November,
|
||||
December,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure
|
||||
*/
|
||||
export interface GuildScheduledEventRecurrenceRuleNWeekday {
|
||||
/**
|
||||
* The week to reoccur on.
|
||||
*/
|
||||
n: 1 | 2 | 3 | 4 | 5;
|
||||
/**
|
||||
* The day within the week to reoccur on
|
||||
*/
|
||||
day: GuildScheduledEventRecurrenceRuleWeekday;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -7,8 +7,15 @@ import type { APIGuildMember } from './guild';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*
|
||||
* @deprecated This is deprecated, use {@apilink APIVoiceState}
|
||||
*/
|
||||
export interface GatewayVoiceState {
|
||||
export type GatewayVoiceState = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
export interface APIVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
|
||||
@@ -43,8 +43,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
UnknownDiscoverableServerCategory = 10_059,
|
||||
UnknownSticker,
|
||||
|
||||
UnknownInteraction = 10_062,
|
||||
UnknownStickerPack,
|
||||
UnknownInteraction,
|
||||
UnknownApplicationCommand,
|
||||
|
||||
UnknownVoiceState = 10_065,
|
||||
|
||||
@@ -26,12 +26,17 @@ import type {
|
||||
ChannelFlags,
|
||||
} from '../../payloads/v10/index';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
|
||||
import type { RESTAPIPollCreate } from './poll';
|
||||
import type { RESTAPIPoll } from './poll';
|
||||
|
||||
export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
export interface RESTAPIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIChannelPatchOverwrite} instead
|
||||
*/
|
||||
export type APIChannelPatchOverwrite = RESTAPIChannelPatchOverwrite;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#get-channel
|
||||
*/
|
||||
@@ -98,7 +103,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: all excluding newsThread, publicThread, privateThread
|
||||
*/
|
||||
permission_overwrites?: APIChannelPatchOverwrite[] | null | undefined;
|
||||
permission_overwrites?: RESTAPIChannelPatchOverwrite[] | null | undefined;
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
@@ -237,7 +242,7 @@ export type RESTGetAPIChannelMessageResult = APIMessage;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Required<Pick<APIMessageReference, 'message_id'>>
|
||||
> &
|
||||
StrictPartial<APIMessageReference> & {
|
||||
@@ -249,6 +254,11 @@ export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesO
|
||||
fail_if_not_exists?: boolean | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIMessageReference} instead
|
||||
*/
|
||||
export type APIMessageReferenceSend = RESTAPIMessageReference;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
@@ -300,7 +310,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
message_reference?: APIMessageReferenceSend | undefined;
|
||||
message_reference?: RESTAPIMessageReference | undefined;
|
||||
/**
|
||||
* The components to include with the message
|
||||
*
|
||||
@@ -329,7 +339,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
/**
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPollCreate | undefined;
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -362,7 +372,12 @@ export type RESTPutAPIChannelMessageReactionResult = never;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#delete-own-reaction
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessageOwnReaction = never;
|
||||
export type RESTDeleteAPIChannelMessageOwnReactionResult = never;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTDeleteAPIChannelMessageOwnReactionResult} instead
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessageOwnReaction = RESTDeleteAPIChannelMessageOwnReactionResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#delete-user-reaction
|
||||
|
||||
@@ -37,14 +37,25 @@ import type {
|
||||
} from '../../utils/internals';
|
||||
import type { RESTPutAPIChannelPermissionJSONBody } from './channel';
|
||||
|
||||
export interface APIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
export interface RESTAPIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: number | string;
|
||||
}
|
||||
|
||||
export type APIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>;
|
||||
export type APIGuildCreatePartialChannel = StrictPartial<
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreateOverwrite} instead
|
||||
*/
|
||||
export type APIGuildCreateOverwrite = RESTAPIGuildCreateOverwrite;
|
||||
|
||||
export type RESTAPIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildChannelResolvable} instead
|
||||
*/
|
||||
export type APIGuildChannelResolvable = RESTAPIGuildChannelResolvable;
|
||||
|
||||
export type RESTAPIGuildCreatePartialChannel = StrictPartial<
|
||||
DistributivePick<
|
||||
APIGuildChannelResolvable,
|
||||
RESTAPIGuildChannelResolvable,
|
||||
| 'available_tags'
|
||||
| 'bitrate'
|
||||
| 'default_auto_archive_duration'
|
||||
@@ -66,13 +77,23 @@ export type APIGuildCreatePartialChannel = StrictPartial<
|
||||
name: string;
|
||||
id?: number | string | undefined;
|
||||
parent_id?: number | string | null | undefined;
|
||||
permission_overwrites?: APIGuildCreateOverwrite[] | undefined;
|
||||
permission_overwrites?: RESTAPIGuildCreateOverwrite[] | undefined;
|
||||
};
|
||||
|
||||
export interface APIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreatePartialChannel} instead
|
||||
*/
|
||||
export type APIGuildCreatePartialChannel = RESTAPIGuildCreatePartialChannel;
|
||||
|
||||
export interface RESTAPIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
|
||||
id: number | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreateRole} instead
|
||||
*/
|
||||
export type APIGuildCreateRole = RESTAPIGuildCreateRole;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild
|
||||
*/
|
||||
@@ -124,7 +145,7 @@ export interface RESTPostAPIGuildsJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/permissions#role-object
|
||||
*/
|
||||
roles?: APIGuildCreateRole[] | undefined;
|
||||
roles?: RESTAPIGuildCreateRole[] | undefined;
|
||||
/**
|
||||
* New guild's channels
|
||||
*
|
||||
@@ -138,7 +159,7 @@ export interface RESTPostAPIGuildsJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
channels?: APIGuildCreatePartialChannel[] | undefined;
|
||||
channels?: RESTAPIGuildCreatePartialChannel[] | undefined;
|
||||
/**
|
||||
* ID for afk channel
|
||||
*/
|
||||
@@ -333,7 +354,7 @@ export type RESTGetAPIGuildChannelsResult = APIChannel[];
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild-channel
|
||||
*/
|
||||
export type RESTPostAPIGuildChannelJSONBody = DistributiveOmit<APIGuildCreatePartialChannel, 'id'>;
|
||||
export type RESTPostAPIGuildChannelJSONBody = DistributiveOmit<RESTAPIGuildCreatePartialChannel, 'id'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild-channel
|
||||
@@ -896,48 +917,6 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
|
||||
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
|
||||
*/
|
||||
@@ -972,20 +951,25 @@ export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedP
|
||||
/**
|
||||
* Prompts shown during onboarding and in customize community
|
||||
*/
|
||||
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
|
||||
prompts?: RESTAPIGuildOnboardingPrompt[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
export type RESTAPIGuildOnboardingPrompt = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
|
||||
> &
|
||||
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
|
||||
options: RESTAPIGuildOnboardingPromptOption[];
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildOnboardingPrompt} instead.
|
||||
*/
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt;
|
||||
|
||||
export type RESTAPIGuildOnboardingPromptOption = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>
|
||||
> &
|
||||
Pick<APIGuildOnboardingPromptOption, 'title'> & {
|
||||
@@ -1003,6 +987,11 @@ export type RESTAPIModifyGuildOnboardingPromptOptionData = AddUndefinedToPossibl
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildOnboardingPromptOption} instead.
|
||||
*/
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = RESTAPIGuildOnboardingPromptOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { StrictPartial } from '../../utils/internals';
|
||||
import type { Nullable, StrictPartial } from '../../utils/internals';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
APIGuildScheduledEventRecurrenceRule,
|
||||
APIGuildScheduledEventUser,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
@@ -64,6 +65,10 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null | undefined;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule?: APIGuildScheduledEventRecurrenceRule | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,20 +94,17 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
|
||||
*/
|
||||
export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & {
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus | undefined;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
entity_metadata?: APIGuildScheduledEventEntityMetadata | null | undefined;
|
||||
/**
|
||||
* The description of the guild event
|
||||
*/
|
||||
description?: string | null | undefined;
|
||||
};
|
||||
export type RESTPatchAPIGuildScheduledEventJSONBody = Nullable<
|
||||
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
> &
|
||||
StrictPartial<
|
||||
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
> & {
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
|
||||
|
||||
@@ -788,6 +788,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/voice-states/@me`
|
||||
* - GET `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/@me`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@ export type RESTGetAPIEntitlementsResult = APIEntitlement[];
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export interface RESTPostAPIEntitlementBody {
|
||||
export interface RESTPostAPIEntitlementJSONBody {
|
||||
/**
|
||||
* ID of the SKU to grant the entitlement to
|
||||
*/
|
||||
@@ -61,6 +61,11 @@ export interface RESTPostAPIEntitlementBody {
|
||||
owner_type: EntitlementOwnerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTPostAPIEntitlementJSONBody} instead
|
||||
*/
|
||||
export type RESTPostAPIEntitlementBody = RESTPostAPIEntitlementJSONBody;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
|
||||
@@ -51,11 +51,16 @@ export interface RESTPostOAuth2TokenRevocationQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
export interface RESTOAuth2AuthorizationQueryResult {
|
||||
export interface RESTPostOAuth2AuthorizationQueryResult {
|
||||
code: string;
|
||||
state?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTPostOAuth2AuthorizationQueryResult} instead
|
||||
*/
|
||||
export type RESTOAuth2AuthorizationQueryResult = RESTPostOAuth2AuthorizationQueryResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface RESTGetAPIPollAnswerVotersQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
|
||||
*/
|
||||
export interface RESTAPIPollCreate
|
||||
export interface RESTAPIPoll
|
||||
extends Omit<APIPoll, 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results'>,
|
||||
Partial<Pick<APIPoll, 'allow_multiselect' | 'layout_type'>> {
|
||||
/**
|
||||
@@ -35,6 +35,11 @@ export interface RESTAPIPollCreate
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIPoll} instead
|
||||
*/
|
||||
export type RESTAPIPollCreate = RESTAPIPoll;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#get-answer-voters
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,12 @@ export interface RESTGetStickerPacksResult {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#get-sticker-pack
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = APIStickerPack;
|
||||
export type RESTGetAPIStickerPackResult = APIStickerPack;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTGetAPIStickerPackResult} instead
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = RESTGetAPIStickerPackResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIVoiceRegion } from '../../payloads/v10/index';
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { APIVoiceRegion, APIVoiceState } from '../../payloads/v10/index';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#list-voice-regions
|
||||
@@ -9,3 +10,55 @@ export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[];
|
||||
* @deprecated This was exported with the wrong name, use `RESTGetAPIVoiceRegionsResult` instead
|
||||
*/
|
||||
export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-current-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateCurrentMemberResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateUserResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
} from '../../payloads/v10/index';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals';
|
||||
import type { RESTAPIAttachment } from './channel';
|
||||
import type { RESTAPIPollCreate } from './poll';
|
||||
import type { RESTAPIPoll } from './poll';
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#create-webhook
|
||||
*/
|
||||
@@ -158,7 +158,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
||||
/**
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPollCreate | undefined;
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,12 +26,17 @@ import type {
|
||||
ChannelFlags,
|
||||
} from '../../payloads/v9/index';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
|
||||
import type { RESTAPIPollCreate } from './poll';
|
||||
import type { RESTAPIPoll } from './poll';
|
||||
|
||||
export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
export interface RESTAPIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIChannelPatchOverwrite} instead
|
||||
*/
|
||||
export type APIChannelPatchOverwrite = RESTAPIChannelPatchOverwrite;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#get-channel
|
||||
*/
|
||||
@@ -237,7 +242,7 @@ export type RESTGetAPIChannelMessageResult = APIMessage;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Required<Pick<APIMessageReference, 'message_id'>>
|
||||
> &
|
||||
StrictPartial<APIMessageReference> & {
|
||||
@@ -249,6 +254,11 @@ export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesO
|
||||
fail_if_not_exists?: boolean | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIMessageReference} instead
|
||||
*/
|
||||
export type APIMessageReferenceSend = RESTAPIMessageReference;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
@@ -308,7 +318,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
message_reference?: APIMessageReferenceSend | undefined;
|
||||
message_reference?: RESTAPIMessageReference | undefined;
|
||||
/**
|
||||
* The components to include with the message
|
||||
*
|
||||
@@ -337,7 +347,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
/**
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPollCreate | undefined;
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -370,7 +380,12 @@ export type RESTPutAPIChannelMessageReactionResult = never;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#delete-own-reaction
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessageOwnReaction = never;
|
||||
export type RESTDeleteAPIChannelMessageOwnReactionResult = never;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTDeleteAPIChannelMessageOwnReactionResult} instead
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessageOwnReaction = RESTDeleteAPIChannelMessageOwnReactionResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#delete-user-reaction
|
||||
|
||||
@@ -37,14 +37,25 @@ import type {
|
||||
} from '../../utils/internals';
|
||||
import type { RESTPutAPIChannelPermissionJSONBody } from './channel';
|
||||
|
||||
export interface APIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
export interface RESTAPIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: number | string;
|
||||
}
|
||||
|
||||
export type APIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>;
|
||||
export type APIGuildCreatePartialChannel = StrictPartial<
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreateOverwrite} instead
|
||||
*/
|
||||
export type APIGuildCreateOverwrite = RESTAPIGuildCreateOverwrite;
|
||||
|
||||
export type RESTAPIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildChannelResolvable} instead
|
||||
*/
|
||||
export type APIGuildChannelResolvable = RESTAPIGuildChannelResolvable;
|
||||
|
||||
export type RESTAPIGuildCreatePartialChannel = StrictPartial<
|
||||
DistributivePick<
|
||||
APIGuildChannelResolvable,
|
||||
RESTAPIGuildChannelResolvable,
|
||||
| 'available_tags'
|
||||
| 'bitrate'
|
||||
| 'default_auto_archive_duration'
|
||||
@@ -66,13 +77,23 @@ export type APIGuildCreatePartialChannel = StrictPartial<
|
||||
name: string;
|
||||
id?: number | string | undefined;
|
||||
parent_id?: number | string | null | undefined;
|
||||
permission_overwrites?: APIGuildCreateOverwrite[] | undefined;
|
||||
permission_overwrites?: RESTAPIGuildCreateOverwrite[] | undefined;
|
||||
};
|
||||
|
||||
export interface APIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreatePartialChannel} instead
|
||||
*/
|
||||
export type APIGuildCreatePartialChannel = RESTAPIGuildCreatePartialChannel;
|
||||
|
||||
export interface RESTAPIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
|
||||
id: number | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildCreateRole} instead
|
||||
*/
|
||||
export type APIGuildCreateRole = RESTAPIGuildCreateRole;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild
|
||||
*/
|
||||
@@ -124,7 +145,7 @@ export interface RESTPostAPIGuildsJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/permissions#role-object
|
||||
*/
|
||||
roles?: APIGuildCreateRole[] | undefined;
|
||||
roles?: RESTAPIGuildCreateRole[] | undefined;
|
||||
/**
|
||||
* New guild's channels
|
||||
*
|
||||
@@ -138,7 +159,7 @@ export interface RESTPostAPIGuildsJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
channels?: APIGuildCreatePartialChannel[] | undefined;
|
||||
channels?: RESTAPIGuildCreatePartialChannel[] | undefined;
|
||||
/**
|
||||
* ID for afk channel
|
||||
*/
|
||||
@@ -333,7 +354,7 @@ export type RESTGetAPIGuildChannelsResult = APIChannel[];
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild-channel
|
||||
*/
|
||||
export type RESTPostAPIGuildChannelJSONBody = DistributiveOmit<APIGuildCreatePartialChannel, 'id'>;
|
||||
export type RESTPostAPIGuildChannelJSONBody = DistributiveOmit<RESTAPIGuildCreatePartialChannel, 'id'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild-channel
|
||||
@@ -902,48 +923,6 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
|
||||
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
|
||||
*/
|
||||
@@ -978,20 +957,25 @@ export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedP
|
||||
/**
|
||||
* Prompts shown during onboarding and in customize community
|
||||
*/
|
||||
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
|
||||
prompts?: RESTAPIGuildOnboardingPrompt[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
export type RESTAPIGuildOnboardingPrompt = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
|
||||
> &
|
||||
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
|
||||
options: RESTAPIGuildOnboardingPromptOption[];
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildOnboardingPrompt} instead.
|
||||
*/
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt;
|
||||
|
||||
export type RESTAPIGuildOnboardingPromptOption = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>
|
||||
> &
|
||||
Pick<APIGuildOnboardingPromptOption, 'title'> & {
|
||||
@@ -1009,6 +993,11 @@ export type RESTAPIModifyGuildOnboardingPromptOptionData = AddUndefinedToPossibl
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildOnboardingPromptOption} instead.
|
||||
*/
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = RESTAPIGuildOnboardingPromptOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { StrictPartial } from '../../utils/internals';
|
||||
import type { Nullable, StrictPartial } from '../../utils/internals';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
APIGuildScheduledEventRecurrenceRule,
|
||||
APIGuildScheduledEventUser,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
GuildScheduledEventStatus,
|
||||
APIGuildScheduledEventUser,
|
||||
} from '../../v9';
|
||||
|
||||
/**
|
||||
@@ -64,6 +65,10 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null | undefined;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule?: APIGuildScheduledEventRecurrenceRule | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,20 +94,17 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
|
||||
*/
|
||||
export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & {
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus | undefined;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
entity_metadata?: APIGuildScheduledEventEntityMetadata | null | undefined;
|
||||
/**
|
||||
* The description of the guild event
|
||||
*/
|
||||
description?: string | null | undefined;
|
||||
};
|
||||
export type RESTPatchAPIGuildScheduledEventJSONBody = Nullable<
|
||||
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
> &
|
||||
StrictPartial<
|
||||
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
> & {
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
|
||||
|
||||
@@ -797,6 +797,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/voice-states/@me`
|
||||
* - GET `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/@me`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@ export type RESTGetAPIEntitlementsResult = APIEntitlement[];
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export interface RESTPostAPIEntitlementBody {
|
||||
export interface RESTPostAPIEntitlementJSONBody {
|
||||
/**
|
||||
* ID of the SKU to grant the entitlement to
|
||||
*/
|
||||
@@ -61,6 +61,11 @@ export interface RESTPostAPIEntitlementBody {
|
||||
owner_type: EntitlementOwnerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTPostAPIEntitlementJSONBody} instead
|
||||
*/
|
||||
export type RESTPostAPIEntitlementBody = RESTPostAPIEntitlementJSONBody;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
|
||||
@@ -51,11 +51,16 @@ export interface RESTPostOAuth2TokenRevocationQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
export interface RESTOAuth2AuthorizationQueryResult {
|
||||
export interface RESTPostOAuth2AuthorizationQueryResult {
|
||||
code: string;
|
||||
state?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTPostOAuth2AuthorizationQueryResult} instead
|
||||
*/
|
||||
export type RESTOAuth2AuthorizationQueryResult = RESTPostOAuth2AuthorizationQueryResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface RESTGetAPIPollAnswerVotersQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
|
||||
*/
|
||||
export interface RESTAPIPollCreate
|
||||
export interface RESTAPIPoll
|
||||
extends Omit<APIPoll, 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results'>,
|
||||
Partial<Pick<APIPoll, 'allow_multiselect' | 'layout_type'>> {
|
||||
/**
|
||||
@@ -35,6 +35,11 @@ export interface RESTAPIPollCreate
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIPoll} instead
|
||||
*/
|
||||
export type RESTAPIPollCreate = RESTAPIPoll;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#get-answer-voters
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,12 @@ export interface RESTGetStickerPacksResult {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#get-sticker-pack
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = APIStickerPack;
|
||||
export type RESTGetAPIStickerPackResult = APIStickerPack;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTGetAPIStickerPackResult} instead
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = RESTGetAPIStickerPackResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIVoiceRegion } from '../../payloads/v9/index';
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { APIVoiceRegion, APIVoiceState } from '../../payloads/v9/index';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#list-voice-regions
|
||||
@@ -9,3 +10,55 @@ export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[];
|
||||
* @deprecated This was exported with the wrong name, use `RESTGetAPIVoiceRegionsResult` instead
|
||||
*/
|
||||
export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-current-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateCurrentMemberResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateUserResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
} from '../../payloads/v9/index';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals';
|
||||
import type { RESTAPIAttachment } from './channel';
|
||||
import type { RESTAPIPollCreate } from './poll';
|
||||
import type { RESTAPIPoll } from './poll';
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#create-webhook
|
||||
*/
|
||||
@@ -158,7 +158,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
||||
/**
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPollCreate | undefined;
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.93"}]
|
||||
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.96"}]
|
||||
1
website/versioned_docs/version-0.37.96/api-typedoc.json
Normal file
1
website/versioned_docs/version-0.37.96/api-typedoc.json
Normal file
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
@@ -1 +1 @@
|
||||
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.94"}]
|
||||
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.97"}]
|
||||
1
website/versioned_docs/version-0.37.97/api-typedoc.json
Normal file
1
website/versioned_docs/version-0.37.97/api-typedoc.json
Normal file
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
@@ -1,4 +1,4 @@
|
||||
[
|
||||
"0.37.94",
|
||||
"0.37.93"
|
||||
"0.37.97",
|
||||
"0.37.96"
|
||||
]
|
||||
Reference in New Issue
Block a user