Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(GatewayDispatchEvents): add VoiceChannelStatusUpdate #820

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions deno/gateway/v10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
VoiceChannelStatusUpdate = 'VOICE_CHANNEL_STATUS_UPDATE',
EntitlementCreate = 'ENTITLEMENT_CREATE',
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
EntitlementDelete = 'ENTITLEMENT_DELETE',
Expand Down Expand Up @@ -1813,6 +1814,32 @@ export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLog
guild_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-status-update
*/
export type GatewayVoiceChannelStatusUpdateDispatch = DataPayload<
GatewayDispatchEvents.VoiceChannelStatusUpdate,
GatewayVoiceChannelStatusUpdateDispatchDate
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-status-update
*/
export interface GatewayVoiceChannelStatusUpdateDispatchDate {
/**
* The id of the channel
*/
id: Snowflake;
/**
* The id of the guild
*/
guild_id: Snowflake;
/**
* The new voice channel status
*/
status: string | null;
}

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down
27 changes: 27 additions & 0 deletions deno/gateway/v9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
VoiceChannelStatusUpdate = 'VOICE_CHANNEL_STATUS_UPDATE',
EntitlementCreate = 'ENTITLEMENT_CREATE',
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
EntitlementDelete = 'ENTITLEMENT_DELETE',
Expand Down Expand Up @@ -1812,6 +1813,32 @@ export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLog
guild_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-status-update
*/
export type GatewayVoiceChannelStatusUpdateDispatch = DataPayload<
GatewayDispatchEvents.VoiceChannelStatusUpdate,
GatewayVoiceChannelStatusUpdateDispatchDate
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-status-update
*/
export interface GatewayVoiceChannelStatusUpdateDispatchDate {
/**
* The id of the channel
*/
id: Snowflake;
/**
* The id of the guild
*/
guild_id: Snowflake;
/**
* The new voice channel status
*/
status: string | null;
}

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down
6 changes: 6 additions & 0 deletions deno/payloads/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ export const PermissionFlagsBits = {
* Applies to channel types: Text, Voice, Stage
*/
SendVoiceMessages: 1n << 46n,
/**
* Allows setting voice channel status
*
* Applies to channel types: Voice
*/
SetVoiceChannelStatus: 1n << 48n,
} as const;

/**
Expand Down
12 changes: 12 additions & 0 deletions deno/payloads/v10/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ export enum AuditLogEvent {

CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted,

VoiceChannelStatusUpdate = 192,
VoiceChannelStatusDelete,
}

/**
Expand Down Expand Up @@ -257,6 +260,8 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - VOICE_CHANNEL_STATUS_UPDATE
* - VOICE_CHANNEL_STATUS_DELETE
*/
channel_id?: Snowflake;

Expand Down Expand Up @@ -322,6 +327,13 @@ export interface APIAuditLogOptions {
* - MEMBER_ROLE_UPDATE
*/
integration_type?: APIGuildIntegrationType;
/**
* The new voice channel status
*
* Present from:
* - VOICE_CHANNEL_STATUS_UPDATE
*/
status?: string;
}

export enum AuditLogOptionsType {
Expand Down
4 changes: 4 additions & 0 deletions deno/payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelT
* The channel topic (0-1024 characters)
*/
topic?: string | null;
/**
* The voice channel status (0-500 characters)
*/
status?: string | null;
}

export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
Expand Down
12 changes: 12 additions & 0 deletions deno/payloads/v9/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ export enum AuditLogEvent {

CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted,

VoiceChannelStatusUpdate = 192,
VoiceChannelStatusDelete,
}

/**
Expand Down Expand Up @@ -257,6 +260,8 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - VOICE_CHANNEL_STATUS_UPDATE
* - VOICE_CHANNEL_STATUS_DELETE
*/
channel_id?: Snowflake;

Expand Down Expand Up @@ -322,6 +327,13 @@ export interface APIAuditLogOptions {
* - MEMBER_ROLE_UPDATE
*/
integration_type?: APIGuildIntegrationType;
/**
* The new voice channel status
*
* Present from:
* - VOICE_CHANNEL_STATUS_UPDATE
*/
status?: string;
}

export enum AuditLogOptionsType {
Expand Down
4 changes: 4 additions & 0 deletions deno/payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelT
* The channel topic (0-1024 characters)
*/
topic?: string | null;
/**
* The voice channel status (0-500 characters)
*/
status?: string | null;
}

export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
Expand Down
27 changes: 27 additions & 0 deletions gateway/v10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
VoiceChannelStatusUpdate = 'VOICE_CHANNEL_STATUS_UPDATE',
EntitlementCreate = 'ENTITLEMENT_CREATE',
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
EntitlementDelete = 'ENTITLEMENT_DELETE',
Expand Down Expand Up @@ -1813,6 +1814,32 @@ export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLog
guild_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-status-update
*/
export type GatewayVoiceChannelStatusUpdateDispatch = DataPayload<
GatewayDispatchEvents.VoiceChannelStatusUpdate,
GatewayVoiceChannelStatusUpdateDispatchDate
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-status-update
*/
export interface GatewayVoiceChannelStatusUpdateDispatchDate {
/**
* The id of the channel
*/
id: Snowflake;
/**
* The id of the guild
*/
guild_id: Snowflake;
/**
* The new voice channel status
*/
status: string | null;
}

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down
27 changes: 27 additions & 0 deletions gateway/v9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
VoiceChannelStatusUpdate = 'VOICE_CHANNEL_STATUS_UPDATE',
EntitlementCreate = 'ENTITLEMENT_CREATE',
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
EntitlementDelete = 'ENTITLEMENT_DELETE',
Expand Down Expand Up @@ -1812,6 +1813,32 @@ export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLog
guild_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-status-update
*/
export type GatewayVoiceChannelStatusUpdateDispatch = DataPayload<
GatewayDispatchEvents.VoiceChannelStatusUpdate,
GatewayVoiceChannelStatusUpdateDispatchDate
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#voice-channel-status-update
*/
export interface GatewayVoiceChannelStatusUpdateDispatchDate {
/**
* The id of the channel
*/
id: Snowflake;
/**
* The id of the guild
*/
guild_id: Snowflake;
/**
* The new voice channel status
*/
status: string | null;
}

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down
6 changes: 6 additions & 0 deletions payloads/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ export const PermissionFlagsBits = {
* Applies to channel types: Text, Voice, Stage
*/
SendVoiceMessages: 1n << 46n,
/**
* Allows setting voice channel status
*
* Applies to channel types: Voice
*/
SetVoiceChannelStatus: 1n << 48n,
} as const;

/**
Expand Down
12 changes: 12 additions & 0 deletions payloads/v10/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ export enum AuditLogEvent {

CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted,

VoiceChannelStatusUpdate = 192,
VoiceChannelStatusDelete,
}

/**
Expand Down Expand Up @@ -257,6 +260,8 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - VOICE_CHANNEL_STATUS_UPDATE
* - VOICE_CHANNEL_STATUS_DELETE
*/
channel_id?: Snowflake;

Expand Down Expand Up @@ -322,6 +327,13 @@ export interface APIAuditLogOptions {
* - MEMBER_ROLE_UPDATE
*/
integration_type?: APIGuildIntegrationType;
/**
* The new voice channel status
*
* Present from:
* - VOICE_CHANNEL_STATUS_UPDATE
*/
status?: string;
}

export enum AuditLogOptionsType {
Expand Down
4 changes: 4 additions & 0 deletions payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelT
* The channel topic (0-1024 characters)
*/
topic?: string | null;
/**
* The voice channel status (0-500 characters)
*/
status?: string | null;
}

export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
Expand Down
12 changes: 12 additions & 0 deletions payloads/v9/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ export enum AuditLogEvent {

CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted,

VoiceChannelStatusUpdate = 192,
VoiceChannelStatusDelete,
}

/**
Expand Down Expand Up @@ -257,6 +260,8 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - VOICE_CHANNEL_STATUS_UPDATE
* - VOICE_CHANNEL_STATUS_DELETE
*/
channel_id?: Snowflake;

Expand Down Expand Up @@ -322,6 +327,13 @@ export interface APIAuditLogOptions {
* - MEMBER_ROLE_UPDATE
*/
integration_type?: APIGuildIntegrationType;
/**
* The new voice channel status
*
* Present from:
* - VOICE_CHANNEL_STATUS_UPDATE
*/
status?: string;
}

export enum AuditLogOptionsType {
Expand Down
4 changes: 4 additions & 0 deletions payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelT
* The channel topic (0-1024 characters)
*/
topic?: string | null;
/**
* The voice channel status (0-500 characters)
*/
status?: string | null;
}

export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
Expand Down
Loading