diff --git a/deno/gateway/v10.ts b/deno/gateway/v10.ts index 65dbef562..4d89a9c23 100644 --- a/deno/gateway/v10.ts +++ b/deno/gateway/v10.ts @@ -194,7 +194,11 @@ export enum GatewayIntentBits { * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration} */ GuildBans = GuildModeration, - GuildEmojisAndStickers = 1 << 3, + GuildExpressions = 1 << 3, + /** + * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildExpressions} + */ + GuildEmojisAndStickers = GuildExpressions, GuildIntegrations = 1 << 4, GuildWebhooks = 1 << 5, GuildInvites = 1 << 6, @@ -253,6 +257,7 @@ export enum GatewayDispatchEvents { GuildSoundboardSoundDelete = 'GUILD_SOUNDBOARD_SOUND_DELETE', GuildSoundboardSoundsUpdate = 'GUILD_SOUNDBOARD_SOUNDS_UPDATE', GuildSoundboardSoundUpdate = 'GUILD_SOUNDBOARD_SOUND_UPDATE', + SoundboardSounds = 'SOUNDBOARD_SOUNDS', GuildStickersUpdate = 'GUILD_STICKERS_UPDATE', GuildUpdate = 'GUILD_UPDATE', IntegrationCreate = 'INTEGRATION_CREATE', @@ -362,6 +367,7 @@ export type GatewayDispatchPayload = | GatewayPresenceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch + | GatewaySoundboardSoundsDispatch | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch @@ -903,9 +909,17 @@ export interface GatewayGuildCreateDispatchData extends APIGuild { * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event** * - * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object + * See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object */ guild_scheduled_events: APIGuildScheduledEvent[]; + /** + * The soundboard sounds in the guild + * + * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event** + * + * See https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object + */ + soundboard_sounds: APISoundboardSound[]; } /** @@ -1374,6 +1388,28 @@ export interface GatewayGuildSoundboardSoundsUpdateDispatchData { guild_id: Snowflake; } +/** + * https://discord.com/developers/docs/events/gateway-events#soundboard-sounds + */ +export type GatewaySoundboardSoundsDispatch = DataPayload< + GatewayDispatchEvents.SoundboardSounds, + GatewaySoundboardSoundsDispatchData +>; + +/** + * https://discord.com/developers/docs/events/gateway-events#soundboard-sounds + */ +export interface GatewaySoundboardSoundsDispatchData { + /** + * The guild's soundboard sounds + */ + soundboard_sounds: APISoundboardSound[]; + /** + * The id of the guild + */ + guild_id: Snowflake; +} + /** * https://discord.com/developers/docs/topics/gateway-events#integration-create */ diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index ae8e16cac..c700f3755 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -194,7 +194,11 @@ export enum GatewayIntentBits { * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration} */ GuildBans = GuildModeration, - GuildEmojisAndStickers = 1 << 3, + GuildExpressions = 1 << 3, + /** + * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildExpressions} + */ + GuildEmojisAndStickers = GuildExpressions, GuildIntegrations = 1 << 4, GuildWebhooks = 1 << 5, GuildInvites = 1 << 6, @@ -252,6 +256,7 @@ export enum GatewayDispatchEvents { GuildSoundboardSoundDelete = 'GUILD_SOUNDBOARD_SOUND_DELETE', GuildSoundboardSoundsUpdate = 'GUILD_SOUNDBOARD_SOUNDS_UPDATE', GuildSoundboardSoundUpdate = 'GUILD_SOUNDBOARD_SOUND_UPDATE', + SoundboardSounds = 'SOUNDBOARD_SOUNDS', GuildStickersUpdate = 'GUILD_STICKERS_UPDATE', GuildUpdate = 'GUILD_UPDATE', IntegrationCreate = 'INTEGRATION_CREATE', @@ -361,6 +366,7 @@ export type GatewayDispatchPayload = | GatewayPresenceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch + | GatewaySoundboardSoundsDispatch | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch @@ -902,9 +908,17 @@ export interface GatewayGuildCreateDispatchData extends APIGuild { * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event** * - * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object + * See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object */ guild_scheduled_events: APIGuildScheduledEvent[]; + /** + * The soundboard sounds in the guild + * + * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event** + * + * See https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object + */ + soundboard_sounds: APISoundboardSound[]; } /** @@ -1373,6 +1387,28 @@ export interface GatewayGuildSoundboardSoundsUpdateDispatchData { guild_id: Snowflake; } +/** + * https://discord.com/developers/docs/events/gateway-events#soundboard-sounds + */ +export type GatewaySoundboardSoundsDispatch = DataPayload< + GatewayDispatchEvents.SoundboardSounds, + GatewaySoundboardSoundsDispatchData +>; + +/** + * https://discord.com/developers/docs/events/gateway-events#soundboard-sounds + */ +export interface GatewaySoundboardSoundsDispatchData { + /** + * The guild's soundboard sounds + */ + soundboard_sounds: APISoundboardSound[]; + /** + * The id of the guild + */ + guild_id: Snowflake; +} + /** * https://discord.com/developers/docs/topics/gateway-events#integration-create */ diff --git a/deno/payloads/v10/guild.ts b/deno/payloads/v10/guild.ts index 2a891750a..645657c01 100644 --- a/deno/payloads/v10/guild.ts +++ b/deno/payloads/v10/guild.ts @@ -471,6 +471,10 @@ export enum GuildFeature { * Guild has enabled Membership Screening */ MemberVerificationGateEnabled = 'MEMBER_VERIFICATION_GATE_ENABLED', + /** + * Guild has increased custom soundboard sound slots + */ + MoreSoundboard = 'MORE_SOUNDBOARD', /** * Guild has enabled monetization * @@ -514,6 +518,10 @@ export enum GuildFeature { * Guild has enabled role subscriptions */ RoleSubscriptionsEnabled = 'ROLE_SUBSCRIPTIONS_ENABLED', + /** + * Guild has created soundboard sounds + */ + Soundboard = 'SOUNDBOARD', /** * Guild has enabled ticketed events */ @@ -534,10 +542,6 @@ export enum GuildFeature { * Guild has enabled the welcome screen */ WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED', - /** - * Guild has created soundboard sounds - */ - Soundboard = 'SOUNDBOARD', } /** diff --git a/deno/payloads/v9/guild.ts b/deno/payloads/v9/guild.ts index be0b6d1b8..b8bfe5a2a 100644 --- a/deno/payloads/v9/guild.ts +++ b/deno/payloads/v9/guild.ts @@ -463,6 +463,10 @@ export enum GuildFeature { * Guild has enabled Membership Screening */ MemberVerificationGateEnabled = 'MEMBER_VERIFICATION_GATE_ENABLED', + /** + * Guild has increased custom soundboard sound slots + */ + MoreSoundboard = 'MORE_SOUNDBOARD', /** * Guild has enabled monetization * @@ -506,6 +510,10 @@ export enum GuildFeature { * Guild has enabled role subscriptions */ RoleSubscriptionsEnabled = 'ROLE_SUBSCRIPTIONS_ENABLED', + /** + * Guild has created soundboard sounds + */ + Soundboard = 'SOUNDBOARD', /** * Guild has enabled ticketed events */ @@ -526,10 +534,6 @@ export enum GuildFeature { * Guild has enabled the welcome screen */ WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED', - /** - * Guild has created soundboard sounds - */ - Soundboard = 'SOUNDBOARD', } /** diff --git a/deno/rest/common.ts b/deno/rest/common.ts index df82d48ef..22339bdee 100644 --- a/deno/rest/common.ts +++ b/deno/rest/common.ts @@ -58,6 +58,8 @@ export enum RESTJSONErrorCodes { UnknownTag = 10_087, + UnknownSound = 10_097, + BotsCannotUseThisEndpoint = 20_001, OnlyBotsCanUseThisEndpoint, @@ -116,7 +118,8 @@ export enum RESTJSONErrorCodes { MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached = 30_042, - MaximumNumberOfEditsToMessagesOlderThanOneHourReached = 30_046, + MaximumNumberOfSoundboardSoundsReached = 30_045, + MaximumNumberOfEditsToMessagesOlderThanOneHourReached, MaximumNumberOfPinnedThreadsInForumHasBeenReached, MaximumNumberOfTagsInForumHasBeenReached, @@ -237,7 +240,8 @@ export enum RESTJSONErrorCodes { RequestBodyContainsInvalidJSON = 50_109, ProvidedFileIsInvalid, - ProvidedFileDurationExceedsMaximumLength = 50_124, + ProvidedFileTypeIsInvalid = 50_123, + ProvidedFileDurationExceedsMaximumLength, OwnerCannotBePendingMember = 50_131, OwnershipCannotBeMovedToABotUser, @@ -248,6 +252,8 @@ export enum RESTJSONErrorCodes { CannotConvertBetweenPremiumEmojiAndNormalEmoji, UploadedFileNotFound, + SpecifiedEmojiIsInvalid = 50_151, + VoiceMessagesDoNotSupportAdditionalContent = 50_159, VoiceMessagesMustHaveASingleAudioAttachment, VoiceMessagesMustHaveSupportingMetadata, @@ -258,6 +264,8 @@ export enum RESTJSONErrorCodes { TheUserAccountMustFirstBeVerified = 50_178, + ProvidedFileDoesNotHaveAValidDuration = 50_192, + YouDoNotHavePermissionToSendThisSticker = 50_600, TwoFactorAuthenticationIsRequired = 60_003, diff --git a/gateway/v10.ts b/gateway/v10.ts index aa656ae39..1aab49c52 100644 --- a/gateway/v10.ts +++ b/gateway/v10.ts @@ -194,7 +194,11 @@ export enum GatewayIntentBits { * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration} */ GuildBans = GuildModeration, - GuildEmojisAndStickers = 1 << 3, + GuildExpressions = 1 << 3, + /** + * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildExpressions} + */ + GuildEmojisAndStickers = GuildExpressions, GuildIntegrations = 1 << 4, GuildWebhooks = 1 << 5, GuildInvites = 1 << 6, @@ -253,6 +257,7 @@ export enum GatewayDispatchEvents { GuildSoundboardSoundDelete = 'GUILD_SOUNDBOARD_SOUND_DELETE', GuildSoundboardSoundsUpdate = 'GUILD_SOUNDBOARD_SOUNDS_UPDATE', GuildSoundboardSoundUpdate = 'GUILD_SOUNDBOARD_SOUND_UPDATE', + SoundboardSounds = 'SOUNDBOARD_SOUNDS', GuildStickersUpdate = 'GUILD_STICKERS_UPDATE', GuildUpdate = 'GUILD_UPDATE', IntegrationCreate = 'INTEGRATION_CREATE', @@ -362,6 +367,7 @@ export type GatewayDispatchPayload = | GatewayPresenceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch + | GatewaySoundboardSoundsDispatch | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch @@ -903,9 +909,17 @@ export interface GatewayGuildCreateDispatchData extends APIGuild { * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event** * - * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object + * See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object */ guild_scheduled_events: APIGuildScheduledEvent[]; + /** + * The soundboard sounds in the guild + * + * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event** + * + * See https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object + */ + soundboard_sounds: APISoundboardSound[]; } /** @@ -1374,6 +1388,28 @@ export interface GatewayGuildSoundboardSoundsUpdateDispatchData { guild_id: Snowflake; } +/** + * https://discord.com/developers/docs/events/gateway-events#soundboard-sounds + */ +export type GatewaySoundboardSoundsDispatch = DataPayload< + GatewayDispatchEvents.SoundboardSounds, + GatewaySoundboardSoundsDispatchData +>; + +/** + * https://discord.com/developers/docs/events/gateway-events#soundboard-sounds + */ +export interface GatewaySoundboardSoundsDispatchData { + /** + * The guild's soundboard sounds + */ + soundboard_sounds: APISoundboardSound[]; + /** + * The id of the guild + */ + guild_id: Snowflake; +} + /** * https://discord.com/developers/docs/topics/gateway-events#integration-create */ diff --git a/gateway/v9.ts b/gateway/v9.ts index c25f906e5..d611d455f 100644 --- a/gateway/v9.ts +++ b/gateway/v9.ts @@ -194,7 +194,11 @@ export enum GatewayIntentBits { * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration} */ GuildBans = GuildModeration, - GuildEmojisAndStickers = 1 << 3, + GuildExpressions = 1 << 3, + /** + * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildExpressions} + */ + GuildEmojisAndStickers = GuildExpressions, GuildIntegrations = 1 << 4, GuildWebhooks = 1 << 5, GuildInvites = 1 << 6, @@ -252,6 +256,7 @@ export enum GatewayDispatchEvents { GuildSoundboardSoundDelete = 'GUILD_SOUNDBOARD_SOUND_DELETE', GuildSoundboardSoundsUpdate = 'GUILD_SOUNDBOARD_SOUNDS_UPDATE', GuildSoundboardSoundUpdate = 'GUILD_SOUNDBOARD_SOUND_UPDATE', + SoundboardSounds = 'SOUNDBOARD_SOUNDS', GuildStickersUpdate = 'GUILD_STICKERS_UPDATE', GuildUpdate = 'GUILD_UPDATE', IntegrationCreate = 'INTEGRATION_CREATE', @@ -361,6 +366,7 @@ export type GatewayDispatchPayload = | GatewayPresenceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch + | GatewaySoundboardSoundsDispatch | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch @@ -902,9 +908,17 @@ export interface GatewayGuildCreateDispatchData extends APIGuild { * * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event** * - * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object + * See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object */ guild_scheduled_events: APIGuildScheduledEvent[]; + /** + * The soundboard sounds in the guild + * + * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event** + * + * See https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object + */ + soundboard_sounds: APISoundboardSound[]; } /** @@ -1373,6 +1387,28 @@ export interface GatewayGuildSoundboardSoundsUpdateDispatchData { guild_id: Snowflake; } +/** + * https://discord.com/developers/docs/events/gateway-events#soundboard-sounds + */ +export type GatewaySoundboardSoundsDispatch = DataPayload< + GatewayDispatchEvents.SoundboardSounds, + GatewaySoundboardSoundsDispatchData +>; + +/** + * https://discord.com/developers/docs/events/gateway-events#soundboard-sounds + */ +export interface GatewaySoundboardSoundsDispatchData { + /** + * The guild's soundboard sounds + */ + soundboard_sounds: APISoundboardSound[]; + /** + * The id of the guild + */ + guild_id: Snowflake; +} + /** * https://discord.com/developers/docs/topics/gateway-events#integration-create */ diff --git a/payloads/v10/guild.ts b/payloads/v10/guild.ts index 19cef0475..bdf83dcb4 100644 --- a/payloads/v10/guild.ts +++ b/payloads/v10/guild.ts @@ -471,6 +471,10 @@ export enum GuildFeature { * Guild has enabled Membership Screening */ MemberVerificationGateEnabled = 'MEMBER_VERIFICATION_GATE_ENABLED', + /** + * Guild has increased custom soundboard sound slots + */ + MoreSoundboard = 'MORE_SOUNDBOARD', /** * Guild has enabled monetization * @@ -514,6 +518,10 @@ export enum GuildFeature { * Guild has enabled role subscriptions */ RoleSubscriptionsEnabled = 'ROLE_SUBSCRIPTIONS_ENABLED', + /** + * Guild has created soundboard sounds + */ + Soundboard = 'SOUNDBOARD', /** * Guild has enabled ticketed events */ @@ -534,10 +542,6 @@ export enum GuildFeature { * Guild has enabled the welcome screen */ WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED', - /** - * Guild has created soundboard sounds - */ - Soundboard = 'SOUNDBOARD', } /** diff --git a/payloads/v9/guild.ts b/payloads/v9/guild.ts index 384f4352c..ef083786b 100644 --- a/payloads/v9/guild.ts +++ b/payloads/v9/guild.ts @@ -463,6 +463,10 @@ export enum GuildFeature { * Guild has enabled Membership Screening */ MemberVerificationGateEnabled = 'MEMBER_VERIFICATION_GATE_ENABLED', + /** + * Guild has increased custom soundboard sound slots + */ + MoreSoundboard = 'MORE_SOUNDBOARD', /** * Guild has enabled monetization * @@ -506,6 +510,10 @@ export enum GuildFeature { * Guild has enabled role subscriptions */ RoleSubscriptionsEnabled = 'ROLE_SUBSCRIPTIONS_ENABLED', + /** + * Guild has created soundboard sounds + */ + Soundboard = 'SOUNDBOARD', /** * Guild has enabled ticketed events */ @@ -526,10 +534,6 @@ export enum GuildFeature { * Guild has enabled the welcome screen */ WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED', - /** - * Guild has created soundboard sounds - */ - Soundboard = 'SOUNDBOARD', } /** diff --git a/rest/common.ts b/rest/common.ts index df82d48ef..22339bdee 100644 --- a/rest/common.ts +++ b/rest/common.ts @@ -58,6 +58,8 @@ export enum RESTJSONErrorCodes { UnknownTag = 10_087, + UnknownSound = 10_097, + BotsCannotUseThisEndpoint = 20_001, OnlyBotsCanUseThisEndpoint, @@ -116,7 +118,8 @@ export enum RESTJSONErrorCodes { MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached = 30_042, - MaximumNumberOfEditsToMessagesOlderThanOneHourReached = 30_046, + MaximumNumberOfSoundboardSoundsReached = 30_045, + MaximumNumberOfEditsToMessagesOlderThanOneHourReached, MaximumNumberOfPinnedThreadsInForumHasBeenReached, MaximumNumberOfTagsInForumHasBeenReached, @@ -237,7 +240,8 @@ export enum RESTJSONErrorCodes { RequestBodyContainsInvalidJSON = 50_109, ProvidedFileIsInvalid, - ProvidedFileDurationExceedsMaximumLength = 50_124, + ProvidedFileTypeIsInvalid = 50_123, + ProvidedFileDurationExceedsMaximumLength, OwnerCannotBePendingMember = 50_131, OwnershipCannotBeMovedToABotUser, @@ -248,6 +252,8 @@ export enum RESTJSONErrorCodes { CannotConvertBetweenPremiumEmojiAndNormalEmoji, UploadedFileNotFound, + SpecifiedEmojiIsInvalid = 50_151, + VoiceMessagesDoNotSupportAdditionalContent = 50_159, VoiceMessagesMustHaveASingleAudioAttachment, VoiceMessagesMustHaveSupportingMetadata, @@ -258,6 +264,8 @@ export enum RESTJSONErrorCodes { TheUserAccountMustFirstBeVerified = 50_178, + ProvidedFileDoesNotHaveAValidDuration = 50_192, + YouDoNotHavePermissionToSendThisSticker = 50_600, TwoFactorAuthenticationIsRequired = 60_003,