diff --git a/deno/gateway/v10.ts b/deno/gateway/v10.ts index 5016c8a8..2d8f8fa0 100644 --- a/deno/gateway/v10.ts +++ b/deno/gateway/v10.ts @@ -32,6 +32,7 @@ import type { InviteTargetType, PresenceUpdateStatus, AutoModerationRuleTriggerType, + APIAuditLogEntry, } from '../payloads/v10/mod.ts'; import type { Nullable } from '../utils/internals.ts'; @@ -179,7 +180,11 @@ export enum GatewayCloseCodes { export enum GatewayIntentBits { Guilds = 1 << 0, GuildMembers = 1 << 1, - GuildBans = 1 << 2, + GuildModeration = 1 << 2, + /** + * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration} + */ + GuildBans = GuildModeration, GuildEmojisAndStickers = 1 << 3, GuildIntegrations = 1 << 4, GuildWebhooks = 1 << 5, @@ -262,6 +267,7 @@ export enum GatewayDispatchEvents { AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE', AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE', AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION', + GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE', } export type GatewaySendPayload = @@ -1691,6 +1697,24 @@ export interface GatewayWebhooksUpdateDispatchData { channel_id: Snowflake; } +/** + * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create + */ +export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload< + GatewayDispatchEvents.GuildAuditLogEntryCreate, + GatewayGuildAuditLogEntryCreateDispatchData +>; + +/** + * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create + */ +export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry { + /** + * ID of the guild + */ + guild_id: Snowflake; +} + // #endregion Dispatch Payloads // #region Sendable Payloads diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index 16482cba..665320e4 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -32,6 +32,7 @@ import type { InviteTargetType, PresenceUpdateStatus, AutoModerationRuleTriggerType, + APIAuditLogEntry, } from '../payloads/v9/mod.ts'; import type { Nullable } from '../utils/internals.ts'; @@ -179,7 +180,11 @@ export enum GatewayCloseCodes { export enum GatewayIntentBits { Guilds = 1 << 0, GuildMembers = 1 << 1, - GuildBans = 1 << 2, + GuildModeration = 1 << 2, + /** + * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration} + */ + GuildBans = GuildModeration, GuildEmojisAndStickers = 1 << 3, GuildIntegrations = 1 << 4, GuildWebhooks = 1 << 5, @@ -261,6 +266,7 @@ export enum GatewayDispatchEvents { AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE', AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE', AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION', + GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE', } export type GatewaySendPayload = @@ -1690,6 +1696,24 @@ export interface GatewayWebhooksUpdateDispatchData { channel_id: Snowflake; } +/** + * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create + */ +export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload< + GatewayDispatchEvents.GuildAuditLogEntryCreate, + GatewayGuildAuditLogEntryCreateDispatchData +>; + +/** + * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create + */ +export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry { + /** + * ID of the guild + */ + guild_id: Snowflake; +} + // #endregion Dispatch Payloads // #region Sendable Payloads diff --git a/gateway/v10.ts b/gateway/v10.ts index 5dc41a94..4cc5dc6b 100644 --- a/gateway/v10.ts +++ b/gateway/v10.ts @@ -32,6 +32,7 @@ import type { InviteTargetType, PresenceUpdateStatus, AutoModerationRuleTriggerType, + APIAuditLogEntry, } from '../payloads/v10/index'; import type { Nullable } from '../utils/internals'; @@ -179,7 +180,11 @@ export enum GatewayCloseCodes { export enum GatewayIntentBits { Guilds = 1 << 0, GuildMembers = 1 << 1, - GuildBans = 1 << 2, + GuildModeration = 1 << 2, + /** + * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration} + */ + GuildBans = GuildModeration, GuildEmojisAndStickers = 1 << 3, GuildIntegrations = 1 << 4, GuildWebhooks = 1 << 5, @@ -262,6 +267,7 @@ export enum GatewayDispatchEvents { AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE', AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE', AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION', + GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE', } export type GatewaySendPayload = @@ -1691,6 +1697,24 @@ export interface GatewayWebhooksUpdateDispatchData { channel_id: Snowflake; } +/** + * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create + */ +export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload< + GatewayDispatchEvents.GuildAuditLogEntryCreate, + GatewayGuildAuditLogEntryCreateDispatchData +>; + +/** + * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create + */ +export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry { + /** + * ID of the guild + */ + guild_id: Snowflake; +} + // #endregion Dispatch Payloads // #region Sendable Payloads diff --git a/gateway/v9.ts b/gateway/v9.ts index f03193e9..a405e5d1 100644 --- a/gateway/v9.ts +++ b/gateway/v9.ts @@ -32,6 +32,7 @@ import type { InviteTargetType, PresenceUpdateStatus, AutoModerationRuleTriggerType, + APIAuditLogEntry, } from '../payloads/v9/index'; import type { Nullable } from '../utils/internals'; @@ -179,7 +180,11 @@ export enum GatewayCloseCodes { export enum GatewayIntentBits { Guilds = 1 << 0, GuildMembers = 1 << 1, - GuildBans = 1 << 2, + GuildModeration = 1 << 2, + /** + * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration} + */ + GuildBans = GuildModeration, GuildEmojisAndStickers = 1 << 3, GuildIntegrations = 1 << 4, GuildWebhooks = 1 << 5, @@ -261,6 +266,7 @@ export enum GatewayDispatchEvents { AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE', AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE', AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION', + GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE', } export type GatewaySendPayload = @@ -1690,6 +1696,24 @@ export interface GatewayWebhooksUpdateDispatchData { channel_id: Snowflake; } +/** + * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create + */ +export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload< + GatewayDispatchEvents.GuildAuditLogEntryCreate, + GatewayGuildAuditLogEntryCreateDispatchData +>; + +/** + * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create + */ +export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry { + /** + * ID of the guild + */ + guild_id: Snowflake; +} + // #endregion Dispatch Payloads // #region Sendable Payloads