Compare commits

...

23 Commits

Author SHA1 Message Date
github-actions[bot]
557c534b67 chore(release): 0.37.99 🎉 (#1088)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-02 15:25:08 +03:00
renovate[bot]
8054f50230 chore(deps): update patch/minor dependencies (#1081)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-31 04:00:52 +03:00
renovate[bot]
74d80b1e77 chore(deps): lock file maintenance (#1082)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-31 04:00:40 +03:00
Danial Raza
a9c6985d63 docs: mark APIApplication#summary and APISticker#asset as unstable (#1080) 2024-08-31 04:00:22 +03:00
Almeida
4b64f84ddf feat: remove unstable from stable fields (#1086) 2024-08-31 03:59:52 +03:00
Almeida
2803e8df2f feat(GuildMemberFlags): IsGuest and DmSettingsUpsellAcknowledged (#1079) 2024-08-29 22:50:15 +03:00
github-actions[bot]
58848bed54 chore(release): 0.37.98 🎉 (#1076)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-26 15:23:06 +03:00
Almeida
f019f0fe97 feat(RESTAPIAttachment): add more properties (#1073) 2024-08-23 12:09:08 +03:00
renovate[bot]
e09ded64b3 chore(deps): lock file maintenance (#1072)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-23 12:08:21 +03:00
renovate[bot]
3aee5c4a0d chore(deps): lock file maintenance (#1071)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-23 11:46:22 +03:00
renovate[bot]
3455ed4cce chore(deps): update patch/minor dependencies (#1070)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-23 03:58:15 +03:00
github-actions[bot]
4ef182d009 chore(release): 0.37.97 🎉 (#1068)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-22 15:22:57 +03:00
Almeida
86a9f965dd refactor(rest): ensure types follow naming pattern (#1065)
Co-authored-by: Synbulat Biishev <signin@syjalo.dev>
2024-08-22 14:41:56 +03:00
github-actions[bot]
b90fddc285 chore(release): 0.37.96 🎉 (#1066)
Build ran for f67043b3f4

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-20 11:22:06 +03:00
Almeida
f67043b3f4 fix: nullable fields for scheduled event editing (#1064) 2024-08-19 17:48:33 +03:00
Almeida
19d2aeb4a8 fix: nullable recurrence_rule on patch (#1063) 2024-08-19 17:39:07 +03:00
github-actions[bot]
31b3766b19 chore(release): 0.37.95 🎉 (#1062)
Build ran for 1b1a865efe

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-19 15:23:04 +03:00
Naiyar
1b1a865efe feat(Routes): voice state endpoint (#1046) 2024-08-16 15:33:15 +03:00
renovate[bot]
a85521aa8b chore(deps): lock file maintenance (#1061)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-16 15:30:44 +03:00
renovate[bot]
8b00031c51 chore(deps): lock file maintenance (#1060)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-16 03:34:11 +03:00
Almeida
147e459a16 fix: interface name (#1059) 2024-08-15 21:16:59 +03:00
Almeida
fbfbc6b23f feat: recurring scheduled events (#1058) 2024-08-15 20:43:55 +03:00
Almeida
906dd8e241 feat(RESTJSONErrorCodes): UnknownStickerPack (#1055) 2024-08-15 20:02:28 +03:00
95 changed files with 1656 additions and 689 deletions

View File

@@ -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: [] }],
}),
},
};

View File

@@ -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"
]
}
]
}
}
]
}

View File

@@ -1,3 +1,52 @@
## [0.37.99](https://github.com/discordjs/discord-api-types/compare/0.37.98...0.37.99) (2024-09-02)
### Features
* **GuildMemberFlags:** `IsGuest` and `DmSettingsUpsellAcknowledged` ([#1079](https://github.com/discordjs/discord-api-types/issues/1079)) ([2803e8d](https://github.com/discordjs/discord-api-types/commit/2803e8df2f2105099a1dc6e04193355a926718b9))
* remove unstable from stable fields ([#1086](https://github.com/discordjs/discord-api-types/issues/1086)) ([4b64f84](https://github.com/discordjs/discord-api-types/commit/4b64f84ddf0390f0a8979f57623c5f8c9051484d))
## [0.37.98](https://github.com/discordjs/discord-api-types/compare/0.37.97...0.37.98) (2024-08-26)
### Features
* **RESTAPIAttachment:** add more properties ([#1073](https://github.com/discordjs/discord-api-types/issues/1073)) ([f019f0f](https://github.com/discordjs/discord-api-types/commit/f019f0fe97ad47471dd6656e5fb148dc5761e1e0))
## [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)

View File

@@ -1,3 +1,52 @@
## [0.37.99](https://github.com/discordjs/discord-api-types/compare/0.37.98...0.37.99) (2024-09-02)
### Features
* **GuildMemberFlags:** `IsGuest` and `DmSettingsUpsellAcknowledged` ([#1079](https://github.com/discordjs/discord-api-types/issues/1079)) ([2803e8d](https://github.com/discordjs/discord-api-types/commit/2803e8df2f2105099a1dc6e04193355a926718b9))
* remove unstable from stable fields ([#1086](https://github.com/discordjs/discord-api-types/issues/1086)) ([4b64f84](https://github.com/discordjs/discord-api-types/commit/4b64f84ddf0390f0a8979f57623c5f8c9051484d))
## [0.37.98](https://github.com/discordjs/discord-api-types/compare/0.37.97...0.37.98) (2024-08-26)
### Features
* **RESTAPIAttachment:** add more properties ([#1073](https://github.com/discordjs/discord-api-types/issues/1073)) ([f019f0f](https://github.com/discordjs/discord-api-types/commit/f019f0fe97ad47471dd6656e5fb148dc5761e1e0))
## [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)

View File

@@ -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

View File

@@ -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

View File

@@ -92,14 +92,10 @@ export interface APIApplicationCommand {
nsfw?: boolean;
/**
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
*
* @unstable
*/
integration_types?: ApplicationIntegrationType[];
/**
* Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands `[0,1,2]`.
*
* @unstable
*/
contexts?: InteractionContextType[] | null;
/**
@@ -124,11 +120,11 @@ export enum ApplicationIntegrationType {
/**
* App is installable to servers
*/
GuildInstall = 0,
GuildInstall,
/**
* App is installable to users
*/
UserInstall = 1,
UserInstall,
}
/**
@@ -138,15 +134,15 @@ export enum InteractionContextType {
/**
* Interaction can be used within servers
*/
Guild = 0,
Guild,
/**
* Interaction can be used within DMs with the app's bot user
*/
BotDM = 1,
BotDM,
/**
* Interaction can be used within Group DMs and DMs other than the app's bot user
*/
PrivateChannel = 2,
PrivateChannel,
}
/**

View File

@@ -64,6 +64,7 @@ export interface APIApplication {
* An empty string
*
* @deprecated This field will be removed in v11
* @unstable This field is no longer documented by Discord and will be removed in v11
*/
summary: '';
/**
@@ -135,8 +136,6 @@ export interface APIApplication {
install_params?: APIApplicationInstallParams;
/**
* Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object
*
* @unstable
*/
integration_types_config?: APIApplicationIntegrationTypesConfigMap;
/**

View File

@@ -573,7 +573,7 @@ export interface APIMessage {
/**
* Any attached files
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
*
@@ -669,8 +669,6 @@ export interface APIMessage {
referenced_message?: APIMessage | null;
/**
* Sent if the message is sent as a result of an interaction
*
* @unstable
*/
interaction_metadata?: APIMessageInteractionMetadata;
/**
@@ -849,11 +847,11 @@ export enum MessageReferenceType {
/**
* A standard reference used by replies
*/
Default = 0,
Default,
/**
* Reference used to point to a message at a point in time
*/
Forward = 1,
Forward,
}
/**
@@ -1415,7 +1413,7 @@ export interface APIEmbedField {
}
/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface APIAttachment {
/**

View File

@@ -689,7 +689,7 @@ export enum GuildMemberFlags {
*/
CompletedOnboarding = 1 << 1,
/**
* Member bypasses guild verification requirements
* Member is exempt from guild verification requirements
*/
BypassesVerification = 1 << 2,
/**
@@ -697,21 +697,29 @@ export enum GuildMemberFlags {
*/
StartedOnboarding = 1 << 3,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member is a guest and can only access the voice channel they were invited to
*/
IsGuest = 1 << 4,
/**
* Member has started Server Guide new member actions
*/
StartedHomeActions = 1 << 5,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member has completed Server Guide new member actions
*/
CompletedHomeActions = 1 << 6,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member's username, display name, or nickname is blocked by AutoMod
*/
AutomodQuarantinedUsernameOrGuildNickname = 1 << 7,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @deprecated
*/
AutomodQuarantinedBio = 1 << 8,
/**
* Member has dismissed the DM settings upsell
*/
DmSettingsUpsellAcknowledged = 1 << 9,
}
/**

View File

@@ -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

View File

@@ -33,6 +33,7 @@ export interface APISticker {
* Previously the sticker asset hash, now an empty string
*
* @deprecated
* @unstable This field is no longer documented by Discord and will be removed in v11
*/
asset?: '';
/**

View File

@@ -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
*/

View File

@@ -92,14 +92,10 @@ export interface APIApplicationCommand {
nsfw?: boolean;
/**
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
*
* @unstable
*/
integration_types?: ApplicationIntegrationType[];
/**
* Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands `[0,1,2]`.
*
* @unstable
*/
contexts?: InteractionContextType[] | null;
/**
@@ -124,11 +120,11 @@ export enum ApplicationIntegrationType {
/**
* App is installable to servers
*/
GuildInstall = 0,
GuildInstall,
/**
* App is installable to users
*/
UserInstall = 1,
UserInstall,
}
/**
@@ -138,15 +134,15 @@ export enum InteractionContextType {
/**
* Interaction can be used within servers
*/
Guild = 0,
Guild,
/**
* Interaction can be used within DMs with the app's bot user
*/
BotDM = 1,
BotDM,
/**
* Interaction can be used within Group DMs and DMs other than the app's bot user
*/
PrivateChannel = 2,
PrivateChannel,
}
/**

View File

@@ -64,6 +64,7 @@ export interface APIApplication {
* An empty string
*
* @deprecated This field will be removed in v11
* @unstable This field is no longer documented by Discord and will be removed in v11
*/
summary: '';
/**
@@ -135,8 +136,6 @@ export interface APIApplication {
install_params?: APIApplicationInstallParams;
/**
* Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object
*
* @unstable
*/
integration_types_config?: APIApplicationIntegrationTypesConfigMap;
/**

View File

@@ -567,7 +567,7 @@ export interface APIMessage {
/**
* Any attached files
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
*
@@ -661,8 +661,6 @@ export interface APIMessage {
referenced_message?: APIMessage | null;
/**
* Sent if the message is sent as a result of an interaction
*
* @unstable
*/
interaction_metadata?: APIMessageInteractionMetadata;
/**
@@ -834,11 +832,11 @@ export enum MessageReferenceType {
/**
* A standard reference used by replies
*/
Default = 0,
Default,
/**
* Reference used to point to a message at a point in time
*/
Forward = 1,
Forward,
}
/**
@@ -1382,7 +1380,7 @@ export interface APIEmbedField {
}
/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface APIAttachment {
/**

View File

@@ -681,7 +681,7 @@ export enum GuildMemberFlags {
*/
CompletedOnboarding = 1 << 1,
/**
* Member bypasses guild verification requirements
* Member is exempt from guild verification requirements
*/
BypassesVerification = 1 << 2,
/**
@@ -689,21 +689,29 @@ export enum GuildMemberFlags {
*/
StartedOnboarding = 1 << 3,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member is a guest and can only access the voice channel they were invited to
*/
IsGuest = 1 << 4,
/**
* Member has started Server Guide new member actions
*/
StartedHomeActions = 1 << 5,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member has completed Server Guide new member actions
*/
CompletedHomeActions = 1 << 6,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member's username, display name, or nickname is blocked by AutoMod
*/
AutomodQuarantinedUsernameOrGuildNickname = 1 << 7,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @deprecated
*/
AutomodQuarantinedBio = 1 << 8,
/**
* Member has dismissed the DM settings upsell
*/
DmSettingsUpsellAcknowledged = 1 << 9,
}
/**

View File

@@ -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

View File

@@ -33,6 +33,7 @@ export interface APISticker {
* Previously the sticker asset hash, now an empty string
*
* @deprecated
* @unstable This field is no longer documented by Discord and will be removed in v11
*/
asset?: '';
/**

View File

@@ -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
*/

View File

@@ -43,8 +43,8 @@ export enum RESTJSONErrorCodes {
UnknownDiscoverableServerCategory = 10_059,
UnknownSticker,
UnknownInteraction = 10_062,
UnknownStickerPack,
UnknownInteraction,
UnknownApplicationCommand,
UnknownVoiceState = 10_065,

View File

@@ -24,14 +24,20 @@ import type {
SortOrderType,
ForumLayoutType,
ChannelFlags,
APIAttachment,
} 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 +104,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 +243,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> & {
@@ -250,22 +256,21 @@ export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesO
};
/**
* https://discord.com/developers/docs/resources/channel#attachment-object
* @deprecated Use {@link RESTAPIMessageReference} instead
*/
export interface RESTAPIAttachment {
export type APIMessageReferenceSend = RESTAPIMessageReference;
/**
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export type RESTAPIAttachment = Partial<
Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>
> & {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
};
/**
* https://discord.com/developers/docs/resources/channel#create-message
@@ -300,7 +305,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 +334,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
/**
* A poll!
*/
poll?: RESTAPIPollCreate | undefined;
poll?: RESTAPIPoll | undefined;
}
/**
@@ -362,7 +367,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
@@ -446,7 +456,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
/**

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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}`
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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;

View File

@@ -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;
}
/**
@@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
};

View File

@@ -24,14 +24,20 @@ import type {
SortOrderType,
ForumLayoutType,
ChannelFlags,
APIAttachment,
} 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 +243,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> & {
@@ -250,22 +256,21 @@ export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesO
};
/**
* https://discord.com/developers/docs/resources/channel#attachment-object
* @deprecated Use {@link RESTAPIMessageReference} instead
*/
export interface RESTAPIAttachment {
export type APIMessageReferenceSend = RESTAPIMessageReference;
/**
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export type RESTAPIAttachment = Partial<
Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>
> & {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
};
/**
* https://discord.com/developers/docs/resources/channel#create-message
@@ -308,7 +313,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 +342,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
/**
* A poll!
*/
poll?: RESTAPIPollCreate | undefined;
poll?: RESTAPIPoll | undefined;
}
/**
@@ -370,7 +375,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
@@ -462,7 +472,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
/**

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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}`
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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;

View File

@@ -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;
}
/**
@@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
};

View File

@@ -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

View File

@@ -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

366
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "discord-api-types",
"version": "0.37.94",
"version": "0.37.99",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "discord-api-types",
"version": "0.37.94",
"version": "0.37.99",
"license": "MIT",
"devDependencies": {
"@commitlint/cli": "^19.0.3",
@@ -454,13 +454,13 @@
}
},
"node_modules/@babel/generator": {
"version": "7.25.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.0.tgz",
"integrity": "sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==",
"version": "7.25.6",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.6.tgz",
"integrity": "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/types": "^7.25.0",
"@babel/types": "^7.25.6",
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.25",
"jsesc": "^2.5.1"
@@ -580,13 +580,13 @@
}
},
"node_modules/@babel/parser": {
"version": "7.25.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.3.tgz",
"integrity": "sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==",
"version": "7.25.6",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz",
"integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/types": "^7.25.2"
"@babel/types": "^7.25.6"
},
"bin": {
"parser": "bin/babel-parser.js"
@@ -611,17 +611,17 @@
}
},
"node_modules/@babel/traverse": {
"version": "7.25.3",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.3.tgz",
"integrity": "sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==",
"version": "7.25.6",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz",
"integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.24.7",
"@babel/generator": "^7.25.0",
"@babel/parser": "^7.25.3",
"@babel/generator": "^7.25.6",
"@babel/parser": "^7.25.6",
"@babel/template": "^7.25.0",
"@babel/types": "^7.25.2",
"@babel/types": "^7.25.6",
"debug": "^4.3.1",
"globals": "^11.1.0"
},
@@ -640,9 +640,9 @@
}
},
"node_modules/@babel/types": {
"version": "7.25.2",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.2.tgz",
"integrity": "sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==",
"version": "7.25.6",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz",
"integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -655,14 +655,14 @@
}
},
"node_modules/@commitlint/cli": {
"version": "19.4.0",
"resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.4.0.tgz",
"integrity": "sha512-sJX4J9UioVwZHq7JWM9tjT5bgWYaIN3rC4FP7YwfEwBYiIO+wMyRttRvQLNkow0vCdM0D67r9NEWU0Ui03I4Eg==",
"version": "19.4.1",
"resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.4.1.tgz",
"integrity": "sha512-EerFVII3ZcnhXsDT9VePyIdCJoh3jEzygN1L37MjQXgPfGS6fJTWL/KHClVMod1d8w94lFC3l4Vh/y5ysVAz2A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@commitlint/format": "^19.3.0",
"@commitlint/lint": "^19.2.2",
"@commitlint/lint": "^19.4.1",
"@commitlint/load": "^19.4.0",
"@commitlint/read": "^19.4.0",
"@commitlint/types": "^19.0.3",
@@ -677,9 +677,9 @@
}
},
"node_modules/@commitlint/config-angular": {
"version": "19.3.0",
"resolved": "https://registry.npmjs.org/@commitlint/config-angular/-/config-angular-19.3.0.tgz",
"integrity": "sha512-D8ue6s7f/A/ph/4vSEj32zxg/WHRF21vguOigAymUJ7SfUPF/BD+C/UGt7I1aEEhdgoq7MIS8bNAJroYvSzMwQ==",
"version": "19.4.1",
"resolved": "https://registry.npmjs.org/@commitlint/config-angular/-/config-angular-19.4.1.tgz",
"integrity": "sha512-428f4bCmt/kxfdB4OPuCE7UViRyCx7HyJwrGgzrwjkewmhg/fgZ7b+WtV3G5yVB7aK3vMQCbwUZVTXzASlh7Kg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -770,15 +770,15 @@
}
},
"node_modules/@commitlint/lint": {
"version": "19.2.2",
"resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.2.2.tgz",
"integrity": "sha512-xrzMmz4JqwGyKQKTpFzlN0dx0TAiT7Ran1fqEBgEmEj+PU98crOFtysJgY+QdeSagx6EDRigQIXJVnfrI0ratA==",
"version": "19.4.1",
"resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.4.1.tgz",
"integrity": "sha512-Ws4YVAZ0jACTv6VThumITC1I5AG0UyXMGua3qcf55JmXIXm/ejfaVKykrqx7RyZOACKVAs8uDRIsEsi87JZ3+Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"@commitlint/is-ignored": "^19.2.2",
"@commitlint/parse": "^19.0.3",
"@commitlint/rules": "^19.0.3",
"@commitlint/rules": "^19.4.1",
"@commitlint/types": "^19.0.3"
},
"engines": {
@@ -868,9 +868,9 @@
}
},
"node_modules/@commitlint/rules": {
"version": "19.0.3",
"resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.0.3.tgz",
"integrity": "sha512-TspKb9VB6svklxNCKKwxhELn7qhtY1rFF8ls58DcFd0F97XoG07xugPjjbVnLqmMkRjZDbDIwBKt9bddOfLaPw==",
"version": "19.4.1",
"resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.4.1.tgz",
"integrity": "sha512-AgctfzAONoVxmxOXRyxXIq7xEPrd7lK/60h2egp9bgGUMZK9v0+YqLOA+TH+KqCa63ZoCr8owP2YxoSSu7IgnQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1312,9 +1312,9 @@
}
},
"node_modules/@next/eslint-plugin-next": {
"version": "14.2.5",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.5.tgz",
"integrity": "sha512-LY3btOpPh+OTIpviNojDpUdIbHW9j0JBYBjsIp8IxtDFfYFyORvw3yNq6N231FVqQA7n7lwaf7xHbVJlA1ED7g==",
"version": "14.2.7",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.7.tgz",
"integrity": "sha512-+7xh142AdhZGjY9/L0iFo7mqRBMJHe+q+uOL+hto1Lfo9DeWCGcR6no4StlFbVSVcA6fQLKEX6y6qhMsSKbgNQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1359,6 +1359,16 @@
"node": ">= 8"
}
},
"node_modules/@nolyfill/is-core-module": {
"version": "1.0.39",
"resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz",
"integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12.4.0"
}
},
"node_modules/@npmcli/config": {
"version": "8.3.4",
"resolved": "https://registry.npmjs.org/@npmcli/config/-/config-8.3.4.tgz",
@@ -2018,9 +2028,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"
},
@@ -2039,13 +2049,13 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "20.14.15",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.15.tgz",
"integrity": "sha512-Fz1xDMCF/B00/tYSVMlmK7hVeLh7jE5f3B7X1/hmV0MJBwE27KlS7EvD/Yp+z1lm8mVhwV5w+n8jOZG8AfTlKw==",
"version": "20.16.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.2.tgz",
"integrity": "sha512-91s/n4qUPV/wg8eE9KHYW1kouTfDk2FPGjXbBMfRWP/2vg1rCXNQL1OCabwGs0XSdukuK+MwCDXE30QpSeMUhQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/@types/normalize-package-data": {
@@ -2070,9 +2080,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"
},
@@ -2515,14 +2525,14 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.1.0.tgz",
"integrity": "sha512-DsuOZQji687sQUjm4N6c9xABJa7fjvfIdjqpSIIVOgaENf2jFXiM9hIBZOL3hb6DHK9Nvd2d7zZnoMLf9e0OtQ==",
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.3.0.tgz",
"integrity": "sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.1.0",
"@typescript-eslint/visitor-keys": "8.1.0"
"@typescript-eslint/types": "8.3.0",
"@typescript-eslint/visitor-keys": "8.3.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2663,9 +2673,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.1.0.tgz",
"integrity": "sha512-q2/Bxa0gMOu/2/AKALI0tCKbG2zppccnRIRCW6BaaTlRVaPKft4oVYPp7WOPpcnsgbr0qROAVCVKCvIQ0tbWog==",
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.3.0.tgz",
"integrity": "sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2677,16 +2687,16 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.1.0.tgz",
"integrity": "sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg==",
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.3.0.tgz",
"integrity": "sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"@typescript-eslint/types": "8.1.0",
"@typescript-eslint/visitor-keys": "8.1.0",
"@typescript-eslint/types": "8.3.0",
"@typescript-eslint/visitor-keys": "8.3.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
"minimatch": "^9.0.4",
"semver": "^7.6.0",
@@ -2706,16 +2716,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.1.0.tgz",
"integrity": "sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA==",
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.3.0.tgz",
"integrity": "sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@typescript-eslint/scope-manager": "8.1.0",
"@typescript-eslint/types": "8.1.0",
"@typescript-eslint/typescript-estree": "8.1.0"
"@typescript-eslint/scope-manager": "8.3.0",
"@typescript-eslint/types": "8.3.0",
"@typescript-eslint/typescript-estree": "8.3.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2729,13 +2739,13 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.1.0.tgz",
"integrity": "sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag==",
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.3.0.tgz",
"integrity": "sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.1.0",
"@typescript-eslint/types": "8.3.0",
"eslint-visitor-keys": "^3.4.3"
},
"engines": {
@@ -3470,9 +3480,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001651",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz",
"integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==",
"version": "1.0.30001653",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz",
"integrity": "sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw==",
"dev": true,
"funding": [
{
@@ -3671,9 +3681,9 @@
}
},
"node_modules/cli-truncate/node_modules/emoji-regex": {
"version": "10.3.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz",
"integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==",
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
"integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
"dev": true,
"license": "MIT"
},
@@ -4145,9 +4155,9 @@
}
},
"node_modules/core-js-compat": {
"version": "3.38.0",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.0.tgz",
"integrity": "sha512-75LAicdLa4OJVwFxFbQR3NdnZjNgX6ILpVcVzcC4T2smerB5lELMrJQQQoWV6TiuC/vlaFqgU2tKQx9w5s0e0A==",
"version": "3.38.1",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.1.tgz",
"integrity": "sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4575,9 +4585,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.13",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz",
"integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==",
"dev": true,
"license": "ISC"
},
@@ -4861,9 +4871,9 @@
}
},
"node_modules/escalade": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
"integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5201,18 +5211,19 @@
}
},
"node_modules/eslint-import-resolver-typescript": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz",
"integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==",
"version": "3.6.3",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.3.tgz",
"integrity": "sha512-ud9aw4szY9cCT1EWWdGv1L1XR6hh2PaRWif0j2QjQ0pgTY/69iw+W0Z4qZv5wHahOl8isEr+k/JnyAqNQkLkIA==",
"dev": true,
"license": "ISC",
"dependencies": {
"debug": "^4.3.4",
"enhanced-resolve": "^5.12.0",
"eslint-module-utils": "^2.7.4",
"fast-glob": "^3.3.1",
"get-tsconfig": "^4.5.0",
"is-core-module": "^2.11.0",
"@nolyfill/is-core-module": "1.0.39",
"debug": "^4.3.5",
"enhanced-resolve": "^5.15.0",
"eslint-module-utils": "^2.8.1",
"fast-glob": "^3.3.2",
"get-tsconfig": "^4.7.5",
"is-bun-module": "^1.0.2",
"is-glob": "^4.0.3"
},
"engines": {
@@ -5223,7 +5234,16 @@
},
"peerDependencies": {
"eslint": "*",
"eslint-plugin-import": "*"
"eslint-plugin-import": "*",
"eslint-plugin-import-x": "*"
},
"peerDependenciesMeta": {
"eslint-plugin-import": {
"optional": true
},
"eslint-plugin-import-x": {
"optional": true
}
}
},
"node_modules/eslint-mdx": {
@@ -5260,9 +5280,9 @@
}
},
"node_modules/eslint-module-utils": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz",
"integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==",
"version": "2.8.2",
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.2.tgz",
"integrity": "sha512-3XnC5fDyc8M4J2E8pt8pmSVRX2M+5yWMCfI/kDZwauQeFgzQOuhcRBFKjTeJagqgk4sFKxe1mvNVnaWwImx/Tg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5549,6 +5569,7 @@
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-local/-/eslint-plugin-local-6.0.0.tgz",
"integrity": "sha512-pvy/pTTyanEKAqpYqy/SLfd4TdiAQ/yFO+GRXDGvGQa2vEUGtmlEjmWQXBDGSk790j4nrAB/7ipqPQY3nLduDg==",
"deprecated": "Since the coming of ESLint flat config file, you can specify local rules without the need of this package. For running ESLint rule unit tests, use eslint-rule-tester instead",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6865,9 +6886,9 @@
}
},
"node_modules/get-tsconfig": {
"version": "4.7.6",
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.6.tgz",
"integrity": "sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==",
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.0.tgz",
"integrity": "sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7235,9 +7256,9 @@
}
},
"node_modules/husky": {
"version": "9.1.4",
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.4.tgz",
"integrity": "sha512-bho94YyReb4JV7LYWRWxZ/xr6TtOTt8cMfmQ39MQYJ7f/YE268s3GdghGwi+y4zAeqewE5zYLvuhV0M0ijsDEA==",
"version": "9.1.5",
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.5.tgz",
"integrity": "sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==",
"dev": true,
"license": "MIT",
"bin": {
@@ -7529,6 +7550,16 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-bun-module": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-1.1.0.tgz",
"integrity": "sha512-4mTAVPlrXpaN3jtF0lsnPCMGnq4+qZjVIKq0HCpfcqf8OC1SM5oATCIAPM5V5FN05qp2NNnFndphmdZS9CV3hA==",
"dev": true,
"license": "MIT",
"dependencies": {
"semver": "^7.6.3"
}
},
"node_modules/is-callable": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
@@ -7572,9 +7603,9 @@
}
},
"node_modules/is-core-module": {
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz",
"integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==",
"version": "2.15.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz",
"integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8423,9 +8454,9 @@
}
},
"node_modules/listr2/node_modules/emoji-regex": {
"version": "10.3.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz",
"integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==",
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
"integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
"dev": true,
"license": "MIT"
},
@@ -8686,9 +8717,9 @@
}
},
"node_modules/log-update/node_modules/emoji-regex": {
"version": "10.3.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz",
"integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==",
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
"integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
"dev": true,
"license": "MIT"
},
@@ -9023,9 +9054,9 @@
}
},
"node_modules/mdast-util-mdx-jsx": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.1.2.tgz",
"integrity": "sha512-eKMQDeywY2wlHc97k5eD8VC+9ASMjN8ItEZQNGwJ6E0XWKiW/Z0V5/H8pvoXUf+y+Mj0VIgeRRbujBmFn4FTyA==",
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.1.3.tgz",
"integrity": "sha512-bfOjvNt+1AcbPLTFMFWY149nJz0OjmewJs3LQQ5pIyVGxP4CdOqNVJL6kTaM5c68p8q82Xv3nCyFfUnuEcH3UQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -9039,7 +9070,6 @@
"mdast-util-to-markdown": "^2.0.0",
"parse-entities": "^4.0.0",
"stringify-entities": "^4.0.0",
"unist-util-remove-position": "^5.0.0",
"unist-util-stringify-position": "^4.0.0",
"vfile-message": "^4.0.0"
},
@@ -9236,9 +9266,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"
},
@@ -10203,9 +10233,9 @@
"license": "MIT"
},
"node_modules/micromatch": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz",
"integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==",
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -11784,9 +11814,9 @@
}
},
"node_modules/read-pkg-up/node_modules/type-fest": {
"version": "4.24.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.24.0.tgz",
"integrity": "sha512-spAaHzc6qre0TlZQQ2aA/nGMe+2Z/wyGk5Z+Ru2VUfdNwT6kWO6TjevOlpebsATEG1EIQ2sOiDszud3lO5mt/Q==",
"version": "4.26.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.26.0.tgz",
"integrity": "sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==",
"dev": true,
"license": "(MIT OR CC0-1.0)",
"engines": {
@@ -11850,9 +11880,9 @@
}
},
"node_modules/read-pkg/node_modules/type-fest": {
"version": "4.24.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.24.0.tgz",
"integrity": "sha512-spAaHzc6qre0TlZQQ2aA/nGMe+2Z/wyGk5Z+Ru2VUfdNwT6kWO6TjevOlpebsATEG1EIQ2sOiDszud3lO5mt/Q==",
"version": "4.26.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.26.0.tgz",
"integrity": "sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==",
"dev": true,
"license": "(MIT OR CC0-1.0)",
"engines": {
@@ -12832,9 +12862,9 @@
}
},
"node_modules/spdx-license-ids": {
"version": "3.0.18",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz",
"integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==",
"version": "3.0.20",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz",
"integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==",
"dev": true,
"license": "CC0-1.0"
},
@@ -13687,9 +13717,9 @@
}
},
"node_modules/tslib": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
"integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==",
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz",
"integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==",
"dev": true,
"license": "0BSD"
},
@@ -13989,9 +14019,9 @@
}
},
"node_modules/uglify-js": {
"version": "3.19.2",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.2.tgz",
"integrity": "sha512-S8KA6DDI47nQXJSi2ctQ629YzwOVs+bQML6DAtvy0wgNdpi+0ySpQK0g2pxBq2xfF2z3YCscu7NNA8nXT9PlIQ==",
"version": "3.19.3",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz",
"integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==",
"dev": true,
"license": "BSD-2-Clause",
"optional": true,
@@ -14019,9 +14049,9 @@
}
},
"node_modules/undici": {
"version": "6.19.7",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.19.7.tgz",
"integrity": "sha512-HR3W/bMGPSr90i8AAp2C4DM3wChFdJPLrWYpIS++LxS8K+W535qftjt+4MyjNYHeWabMj1nvtmLIi7l++iq91A==",
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz",
"integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -14029,9 +14059,9 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
@@ -14223,21 +14253,6 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/unist-util-remove-position": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-5.0.0.tgz",
"integrity": "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/unist": "^3.0.0",
"unist-util-visit": "^5.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/unist-util-stringify-position": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz",
@@ -14253,9 +14268,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"
},
@@ -14424,14 +14439,13 @@
}
},
"node_modules/vfile": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz",
"integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==",
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz",
"integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/unist": "^3.0.0",
"unist-util-stringify-position": "^4.0.0",
"vfile-message": "^4.0.0"
},
"funding": {
@@ -14503,9 +14517,9 @@
}
},
"node_modules/vfile-reporter/node_modules/emoji-regex": {
"version": "10.3.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz",
"integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==",
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
"integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
"dev": true,
"license": "MIT"
},
@@ -14600,20 +14614,6 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/vfile/node_modules/unist-util-stringify-position": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz",
"integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/unist": "^3.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/vue-eslint-parser": {
"version": "9.4.3",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz",

View File

@@ -1,6 +1,6 @@
{
"name": "discord-api-types",
"version": "0.37.94",
"version": "0.37.99",
"description": "Discord API typings that are kept up to date for use in bot library creation.",
"homepage": "https://discord-api-types.dev",
"exports": {

View File

@@ -92,14 +92,10 @@ export interface APIApplicationCommand {
nsfw?: boolean;
/**
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
*
* @unstable
*/
integration_types?: ApplicationIntegrationType[];
/**
* Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands `[0,1,2]`.
*
* @unstable
*/
contexts?: InteractionContextType[] | null;
/**
@@ -124,11 +120,11 @@ export enum ApplicationIntegrationType {
/**
* App is installable to servers
*/
GuildInstall = 0,
GuildInstall,
/**
* App is installable to users
*/
UserInstall = 1,
UserInstall,
}
/**
@@ -138,15 +134,15 @@ export enum InteractionContextType {
/**
* Interaction can be used within servers
*/
Guild = 0,
Guild,
/**
* Interaction can be used within DMs with the app's bot user
*/
BotDM = 1,
BotDM,
/**
* Interaction can be used within Group DMs and DMs other than the app's bot user
*/
PrivateChannel = 2,
PrivateChannel,
}
/**

View File

@@ -64,6 +64,7 @@ export interface APIApplication {
* An empty string
*
* @deprecated This field will be removed in v11
* @unstable This field is no longer documented by Discord and will be removed in v11
*/
summary: '';
/**
@@ -135,8 +136,6 @@ export interface APIApplication {
install_params?: APIApplicationInstallParams;
/**
* Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object
*
* @unstable
*/
integration_types_config?: APIApplicationIntegrationTypesConfigMap;
/**

View File

@@ -573,7 +573,7 @@ export interface APIMessage {
/**
* Any attached files
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
*
@@ -669,8 +669,6 @@ export interface APIMessage {
referenced_message?: APIMessage | null;
/**
* Sent if the message is sent as a result of an interaction
*
* @unstable
*/
interaction_metadata?: APIMessageInteractionMetadata;
/**
@@ -849,11 +847,11 @@ export enum MessageReferenceType {
/**
* A standard reference used by replies
*/
Default = 0,
Default,
/**
* Reference used to point to a message at a point in time
*/
Forward = 1,
Forward,
}
/**
@@ -1415,7 +1413,7 @@ export interface APIEmbedField {
}
/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface APIAttachment {
/**

View File

@@ -689,7 +689,7 @@ export enum GuildMemberFlags {
*/
CompletedOnboarding = 1 << 1,
/**
* Member bypasses guild verification requirements
* Member is exempt from guild verification requirements
*/
BypassesVerification = 1 << 2,
/**
@@ -697,21 +697,29 @@ export enum GuildMemberFlags {
*/
StartedOnboarding = 1 << 3,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member is a guest and can only access the voice channel they were invited to
*/
IsGuest = 1 << 4,
/**
* Member has started Server Guide new member actions
*/
StartedHomeActions = 1 << 5,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member has completed Server Guide new member actions
*/
CompletedHomeActions = 1 << 6,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member's username, display name, or nickname is blocked by AutoMod
*/
AutomodQuarantinedUsernameOrGuildNickname = 1 << 7,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @deprecated
*/
AutomodQuarantinedBio = 1 << 8,
/**
* Member has dismissed the DM settings upsell
*/
DmSettingsUpsellAcknowledged = 1 << 9,
}
/**

View File

@@ -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

View File

@@ -33,6 +33,7 @@ export interface APISticker {
* Previously the sticker asset hash, now an empty string
*
* @deprecated
* @unstable This field is no longer documented by Discord and will be removed in v11
*/
asset?: '';
/**

View File

@@ -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
*/

View File

@@ -92,14 +92,10 @@ export interface APIApplicationCommand {
nsfw?: boolean;
/**
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
*
* @unstable
*/
integration_types?: ApplicationIntegrationType[];
/**
* Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands `[0,1,2]`.
*
* @unstable
*/
contexts?: InteractionContextType[] | null;
/**
@@ -124,11 +120,11 @@ export enum ApplicationIntegrationType {
/**
* App is installable to servers
*/
GuildInstall = 0,
GuildInstall,
/**
* App is installable to users
*/
UserInstall = 1,
UserInstall,
}
/**
@@ -138,15 +134,15 @@ export enum InteractionContextType {
/**
* Interaction can be used within servers
*/
Guild = 0,
Guild,
/**
* Interaction can be used within DMs with the app's bot user
*/
BotDM = 1,
BotDM,
/**
* Interaction can be used within Group DMs and DMs other than the app's bot user
*/
PrivateChannel = 2,
PrivateChannel,
}
/**

View File

@@ -64,6 +64,7 @@ export interface APIApplication {
* An empty string
*
* @deprecated This field will be removed in v11
* @unstable This field is no longer documented by Discord and will be removed in v11
*/
summary: '';
/**
@@ -135,8 +136,6 @@ export interface APIApplication {
install_params?: APIApplicationInstallParams;
/**
* Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object
*
* @unstable
*/
integration_types_config?: APIApplicationIntegrationTypesConfigMap;
/**

View File

@@ -567,7 +567,7 @@ export interface APIMessage {
/**
* Any attached files
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
*
@@ -661,8 +661,6 @@ export interface APIMessage {
referenced_message?: APIMessage | null;
/**
* Sent if the message is sent as a result of an interaction
*
* @unstable
*/
interaction_metadata?: APIMessageInteractionMetadata;
/**
@@ -834,11 +832,11 @@ export enum MessageReferenceType {
/**
* A standard reference used by replies
*/
Default = 0,
Default,
/**
* Reference used to point to a message at a point in time
*/
Forward = 1,
Forward,
}
/**
@@ -1382,7 +1380,7 @@ export interface APIEmbedField {
}
/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface APIAttachment {
/**

View File

@@ -681,7 +681,7 @@ export enum GuildMemberFlags {
*/
CompletedOnboarding = 1 << 1,
/**
* Member bypasses guild verification requirements
* Member is exempt from guild verification requirements
*/
BypassesVerification = 1 << 2,
/**
@@ -689,21 +689,29 @@ export enum GuildMemberFlags {
*/
StartedOnboarding = 1 << 3,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member is a guest and can only access the voice channel they were invited to
*/
IsGuest = 1 << 4,
/**
* Member has started Server Guide new member actions
*/
StartedHomeActions = 1 << 5,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member has completed Server Guide new member actions
*/
CompletedHomeActions = 1 << 6,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member's username, display name, or nickname is blocked by AutoMod
*/
AutomodQuarantinedUsernameOrGuildNickname = 1 << 7,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @deprecated
*/
AutomodQuarantinedBio = 1 << 8,
/**
* Member has dismissed the DM settings upsell
*/
DmSettingsUpsellAcknowledged = 1 << 9,
}
/**

View File

@@ -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

View File

@@ -33,6 +33,7 @@ export interface APISticker {
* Previously the sticker asset hash, now an empty string
*
* @deprecated
* @unstable This field is no longer documented by Discord and will be removed in v11
*/
asset?: '';
/**

View File

@@ -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
*/

View File

@@ -43,8 +43,8 @@ export enum RESTJSONErrorCodes {
UnknownDiscoverableServerCategory = 10_059,
UnknownSticker,
UnknownInteraction = 10_062,
UnknownStickerPack,
UnknownInteraction,
UnknownApplicationCommand,
UnknownVoiceState = 10_065,

View File

@@ -24,14 +24,20 @@ import type {
SortOrderType,
ForumLayoutType,
ChannelFlags,
APIAttachment,
} 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 +104,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 +243,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> & {
@@ -250,22 +256,21 @@ export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesO
};
/**
* https://discord.com/developers/docs/resources/channel#attachment-object
* @deprecated Use {@link RESTAPIMessageReference} instead
*/
export interface RESTAPIAttachment {
export type APIMessageReferenceSend = RESTAPIMessageReference;
/**
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export type RESTAPIAttachment = Partial<
Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>
> & {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
};
/**
* https://discord.com/developers/docs/resources/channel#create-message
@@ -300,7 +305,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 +334,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
/**
* A poll!
*/
poll?: RESTAPIPollCreate | undefined;
poll?: RESTAPIPoll | undefined;
}
/**
@@ -362,7 +367,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
@@ -446,7 +456,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
/**

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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}`
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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;

View File

@@ -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;
}
/**
@@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
};

View File

@@ -24,14 +24,20 @@ import type {
SortOrderType,
ForumLayoutType,
ChannelFlags,
APIAttachment,
} 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 +243,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> & {
@@ -250,22 +256,21 @@ export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesO
};
/**
* https://discord.com/developers/docs/resources/channel#attachment-object
* @deprecated Use {@link RESTAPIMessageReference} instead
*/
export interface RESTAPIAttachment {
export type APIMessageReferenceSend = RESTAPIMessageReference;
/**
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export type RESTAPIAttachment = Partial<
Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>
> & {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
};
/**
* https://discord.com/developers/docs/resources/channel#create-message
@@ -308,7 +313,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 +342,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
/**
* A poll!
*/
poll?: RESTAPIPollCreate | undefined;
poll?: RESTAPIPoll | undefined;
}
/**
@@ -370,7 +375,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
@@ -462,7 +472,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
/**

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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}`
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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;

View File

@@ -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;
}
/**
@@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -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.98"}]

File diff suppressed because one or more lines are too long

View File

@@ -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.99"}]

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
[
"0.37.94",
"0.37.93"
"0.37.99",
"0.37.98"
]