From 240226f3d2d32df378400671a6bf31ceb2468a3c Mon Sep 17 00:00:00 2001 From: advaith Date: Mon, 23 Sep 2024 04:15:59 -0700 Subject: [PATCH] feat: add `VoiceChannelEffectSend` event (#739) Co-authored-by: Almeida Co-authored-by: almeidx --- deno/gateway/v10.ts | 62 +++++++++++++++++++++++++++++++++++++++++++++ deno/gateway/v9.ts | 62 +++++++++++++++++++++++++++++++++++++++++++++ gateway/v10.ts | 62 +++++++++++++++++++++++++++++++++++++++++++++ gateway/v9.ts | 62 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 248 insertions(+) diff --git a/deno/gateway/v10.ts b/deno/gateway/v10.ts index 561f85286..a0a982ade 100644 --- a/deno/gateway/v10.ts +++ b/deno/gateway/v10.ts @@ -261,6 +261,7 @@ export enum GatewayDispatchEvents { ThreadUpdate = 'THREAD_UPDATE', TypingStart = 'TYPING_START', UserUpdate = 'USER_UPDATE', + VoiceChannelEffectSend = 'VOICE_CHANNEL_EFFECT_SEND', VoiceServerUpdate = 'VOICE_SERVER_UPDATE', VoiceStateUpdate = 'VOICE_STATE_UPDATE', WebhooksUpdate = 'WEBHOOKS_UPDATE', @@ -359,6 +360,7 @@ export type GatewayDispatchPayload = | GatewayThreadUpdateDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch + | GatewayVoiceChannelEffectSendDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch; @@ -1833,6 +1835,66 @@ export type GatewayUserUpdateDispatch = DataPayload; + +/** + * https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send + */ +export interface GatewayVoiceChannelEffectSendDispatchData { + /** + * ID of the channel the effect was sent in + */ + channel_id: Snowflake; + /** + * ID of the guild the effect was sent in + */ + guild_id: Snowflake; + /** + * ID of the user who sent the effect + */ + user_id: Snowflake; + /** + * The emoji sent, for emoji reaction and soundboard effects + */ + emoji?: APIEmoji | null; + /** + * The type of emoji animation, for emoji reaction and soundboard effects + */ + animation_type?: VoiceChannelEffectSendAnimationType | null; + /** + * The ID of the emoji animation, for emoji reaction and soundboard effects + */ + animation_id?: number; + /** + * The ID of the soundboard sound, for soundboard effects + */ + sound_id?: Snowflake | number; + /** + * The volume of the soundboard sound, from 0 to 1, for soundboard effects + */ + sound_volume?: number; +} + +/** + * https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types + */ +export enum VoiceChannelEffectSendAnimationType { + /** + * A fun animation, sent by a Nitro subscriber + */ + Premium, + /** + * The standard animation + */ + Basic, +} + /** * https://discord.com/developers/docs/topics/gateway-events#voice-state-update */ diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index 1ad31422a..ad6bb2796 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -260,6 +260,7 @@ export enum GatewayDispatchEvents { ThreadUpdate = 'THREAD_UPDATE', TypingStart = 'TYPING_START', UserUpdate = 'USER_UPDATE', + VoiceChannelEffectSend = 'VOICE_CHANNEL_EFFECT_SEND', VoiceServerUpdate = 'VOICE_SERVER_UPDATE', VoiceStateUpdate = 'VOICE_STATE_UPDATE', WebhooksUpdate = 'WEBHOOKS_UPDATE', @@ -358,6 +359,7 @@ export type GatewayDispatchPayload = | GatewayThreadUpdateDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch + | GatewayVoiceChannelEffectSendDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch; @@ -1832,6 +1834,66 @@ export type GatewayUserUpdateDispatch = DataPayload; + +/** + * https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send + */ +export interface GatewayVoiceChannelEffectSendDispatchData { + /** + * ID of the channel the effect was sent in + */ + channel_id: Snowflake; + /** + * ID of the guild the effect was sent in + */ + guild_id: Snowflake; + /** + * ID of the user who sent the effect + */ + user_id: Snowflake; + /** + * The emoji sent, for emoji reaction and soundboard effects + */ + emoji?: APIEmoji | null; + /** + * The type of emoji animation, for emoji reaction and soundboard effects + */ + animation_type?: VoiceChannelEffectSendAnimationType | null; + /** + * The ID of the emoji animation, for emoji reaction and soundboard effects + */ + animation_id?: number; + /** + * The ID of the soundboard sound, for soundboard effects + */ + sound_id?: Snowflake | number; + /** + * The volume of the soundboard sound, from 0 to 1, for soundboard effects + */ + sound_volume?: number; +} + +/** + * https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types + */ +export enum VoiceChannelEffectSendAnimationType { + /** + * A fun animation, sent by a Nitro subscriber + */ + Premium, + /** + * The standard animation + */ + Basic, +} + /** * https://discord.com/developers/docs/topics/gateway-events#voice-state-update */ diff --git a/gateway/v10.ts b/gateway/v10.ts index 26463297d..a8f7b3ad0 100644 --- a/gateway/v10.ts +++ b/gateway/v10.ts @@ -261,6 +261,7 @@ export enum GatewayDispatchEvents { ThreadUpdate = 'THREAD_UPDATE', TypingStart = 'TYPING_START', UserUpdate = 'USER_UPDATE', + VoiceChannelEffectSend = 'VOICE_CHANNEL_EFFECT_SEND', VoiceServerUpdate = 'VOICE_SERVER_UPDATE', VoiceStateUpdate = 'VOICE_STATE_UPDATE', WebhooksUpdate = 'WEBHOOKS_UPDATE', @@ -359,6 +360,7 @@ export type GatewayDispatchPayload = | GatewayThreadUpdateDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch + | GatewayVoiceChannelEffectSendDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch; @@ -1833,6 +1835,66 @@ export type GatewayUserUpdateDispatch = DataPayload; + +/** + * https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send + */ +export interface GatewayVoiceChannelEffectSendDispatchData { + /** + * ID of the channel the effect was sent in + */ + channel_id: Snowflake; + /** + * ID of the guild the effect was sent in + */ + guild_id: Snowflake; + /** + * ID of the user who sent the effect + */ + user_id: Snowflake; + /** + * The emoji sent, for emoji reaction and soundboard effects + */ + emoji?: APIEmoji | null; + /** + * The type of emoji animation, for emoji reaction and soundboard effects + */ + animation_type?: VoiceChannelEffectSendAnimationType | null; + /** + * The ID of the emoji animation, for emoji reaction and soundboard effects + */ + animation_id?: number; + /** + * The ID of the soundboard sound, for soundboard effects + */ + sound_id?: Snowflake | number; + /** + * The volume of the soundboard sound, from 0 to 1, for soundboard effects + */ + sound_volume?: number; +} + +/** + * https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types + */ +export enum VoiceChannelEffectSendAnimationType { + /** + * A fun animation, sent by a Nitro subscriber + */ + Premium, + /** + * The standard animation + */ + Basic, +} + /** * https://discord.com/developers/docs/topics/gateway-events#voice-state-update */ diff --git a/gateway/v9.ts b/gateway/v9.ts index 9fdbab783..8b7b4b945 100644 --- a/gateway/v9.ts +++ b/gateway/v9.ts @@ -260,6 +260,7 @@ export enum GatewayDispatchEvents { ThreadUpdate = 'THREAD_UPDATE', TypingStart = 'TYPING_START', UserUpdate = 'USER_UPDATE', + VoiceChannelEffectSend = 'VOICE_CHANNEL_EFFECT_SEND', VoiceServerUpdate = 'VOICE_SERVER_UPDATE', VoiceStateUpdate = 'VOICE_STATE_UPDATE', WebhooksUpdate = 'WEBHOOKS_UPDATE', @@ -358,6 +359,7 @@ export type GatewayDispatchPayload = | GatewayThreadUpdateDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch + | GatewayVoiceChannelEffectSendDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch; @@ -1832,6 +1834,66 @@ export type GatewayUserUpdateDispatch = DataPayload; + +/** + * https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send + */ +export interface GatewayVoiceChannelEffectSendDispatchData { + /** + * ID of the channel the effect was sent in + */ + channel_id: Snowflake; + /** + * ID of the guild the effect was sent in + */ + guild_id: Snowflake; + /** + * ID of the user who sent the effect + */ + user_id: Snowflake; + /** + * The emoji sent, for emoji reaction and soundboard effects + */ + emoji?: APIEmoji | null; + /** + * The type of emoji animation, for emoji reaction and soundboard effects + */ + animation_type?: VoiceChannelEffectSendAnimationType | null; + /** + * The ID of the emoji animation, for emoji reaction and soundboard effects + */ + animation_id?: number; + /** + * The ID of the soundboard sound, for soundboard effects + */ + sound_id?: Snowflake | number; + /** + * The volume of the soundboard sound, from 0 to 1, for soundboard effects + */ + sound_volume?: number; +} + +/** + * https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types + */ +export enum VoiceChannelEffectSendAnimationType { + /** + * A fun animation, sent by a Nitro subscriber + */ + Premium, + /** + * The standard animation + */ + Basic, +} + /** * https://discord.com/developers/docs/topics/gateway-events#voice-state-update */