fix: add missing soundboard types (#1134)

This commit is contained in:
Danial Raza
2024-11-05 22:38:00 +01:00
committed by GitHub
parent 736479cab3
commit 88d8bed1ca
10 changed files with 204 additions and 28 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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