Skip to content

Commit

Permalink
feat: add VoiceChannelEffectSend event (#739)
Browse files Browse the repository at this point in the history
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: almeidx <github@almeidx.dev>
  • Loading branch information
3 people committed Sep 23, 2024
1 parent 57ee8db commit 240226f
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 0 deletions.
62 changes: 62 additions & 0 deletions deno/gateway/v10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -359,6 +360,7 @@ export type GatewayDispatchPayload =
| GatewayThreadUpdateDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceChannelEffectSendDispatch
| GatewayVoiceServerUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayWebhooksUpdateDispatch;
Expand Down Expand Up @@ -1833,6 +1835,66 @@ export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUp
*/
export type GatewayUserUpdateDispatchData = APIUser;

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send
*/
export type GatewayVoiceChannelEffectSendDispatch = DataPayload<
GatewayDispatchEvents.VoiceChannelEffectSend,
GatewayVoiceChannelEffectSendDispatchData
>;

/**
* 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
*/
Expand Down
62 changes: 62 additions & 0 deletions deno/gateway/v9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -358,6 +359,7 @@ export type GatewayDispatchPayload =
| GatewayThreadUpdateDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceChannelEffectSendDispatch
| GatewayVoiceServerUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayWebhooksUpdateDispatch;
Expand Down Expand Up @@ -1832,6 +1834,66 @@ export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUp
*/
export type GatewayUserUpdateDispatchData = APIUser;

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send
*/
export type GatewayVoiceChannelEffectSendDispatch = DataPayload<
GatewayDispatchEvents.VoiceChannelEffectSend,
GatewayVoiceChannelEffectSendDispatchData
>;

/**
* 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
*/
Expand Down
62 changes: 62 additions & 0 deletions gateway/v10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -359,6 +360,7 @@ export type GatewayDispatchPayload =
| GatewayThreadUpdateDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceChannelEffectSendDispatch
| GatewayVoiceServerUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayWebhooksUpdateDispatch;
Expand Down Expand Up @@ -1833,6 +1835,66 @@ export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUp
*/
export type GatewayUserUpdateDispatchData = APIUser;

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send
*/
export type GatewayVoiceChannelEffectSendDispatch = DataPayload<
GatewayDispatchEvents.VoiceChannelEffectSend,
GatewayVoiceChannelEffectSendDispatchData
>;

/**
* 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
*/
Expand Down
62 changes: 62 additions & 0 deletions gateway/v9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -358,6 +359,7 @@ export type GatewayDispatchPayload =
| GatewayThreadUpdateDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceChannelEffectSendDispatch
| GatewayVoiceServerUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayWebhooksUpdateDispatch;
Expand Down Expand Up @@ -1832,6 +1834,66 @@ export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUp
*/
export type GatewayUserUpdateDispatchData = APIUser;

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send
*/
export type GatewayVoiceChannelEffectSendDispatch = DataPayload<
GatewayDispatchEvents.VoiceChannelEffectSend,
GatewayVoiceChannelEffectSendDispatchData
>;

/**
* 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
*/
Expand Down

0 comments on commit 240226f

Please sign in to comment.