From 4e37de7f72ad6b9502d3e3db97b10910d9970a92 Mon Sep 17 00:00:00 2001 From: Fifty Date: Thu, 25 Apr 2024 18:33:38 +0200 Subject: [PATCH] feat(APIAuditLogChange): add missing keys (#964) --- deno/payloads/v10/auditLog.ts | 33 ++++++++++++++++++++++++++++++++- deno/payloads/v9/auditLog.ts | 33 ++++++++++++++++++++++++++++++++- payloads/v10/auditLog.ts | 33 ++++++++++++++++++++++++++++++++- payloads/v9/auditLog.ts | 33 ++++++++++++++++++++++++++++++++- 4 files changed, 128 insertions(+), 4 deletions(-) diff --git a/deno/payloads/v10/auditLog.ts b/deno/payloads/v10/auditLog.ts index 01082f62..88f48d20 100644 --- a/deno/payloads/v10/auditLog.ts +++ b/deno/payloads/v10/auditLog.ts @@ -10,7 +10,7 @@ import type { AutoModerationRuleEventType, AutoModerationRuleTriggerType, } from './autoModeration.ts'; -import type { APIChannel, APIOverwrite } from './channel.ts'; +import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts'; import type { APIGuildIntegration, APIGuildIntegrationType, @@ -353,6 +353,7 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAutoArchiveDuration | APIAuditLogChangeKeyAvailable + | APIAuditLogChangeKeyAvailableTags | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyBitrate @@ -363,6 +364,8 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyDefaultAutoArchiveDuration | APIAuditLogChangeKeyDefaultMessageNotifications + | APIAuditLogChangeKeyDefaultReactionEmoji + | APIAuditLogChangeKeyDefaultThreadRateLimitPerUser | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyDiscoverySplashHash @@ -375,6 +378,7 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyExplicitContentFilter + | APIAuditLogChangeKeyFlags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyHoist @@ -832,6 +836,33 @@ export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', */ export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>; +/** + * Returned when a guild forum's available tags gets changed + */ +export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>; + +/** + * Returned when a guild forum's default reaction emoji gets changed + */ +export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData< + 'default_reaction_emoji', + APIGuildForumDefaultReactionEmoji +>; + +/** + * Returned when a channel flag gets changed + */ +export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>; + +/** + * Returned when a thread's amount of seconds a user has to wait before creating another thread + * gets changed + */ +export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData< + 'default_thread_rate_limit_per_user', + number +>; + interface AuditLogChangeData { key: K; /** diff --git a/deno/payloads/v9/auditLog.ts b/deno/payloads/v9/auditLog.ts index 01082f62..88f48d20 100644 --- a/deno/payloads/v9/auditLog.ts +++ b/deno/payloads/v9/auditLog.ts @@ -10,7 +10,7 @@ import type { AutoModerationRuleEventType, AutoModerationRuleTriggerType, } from './autoModeration.ts'; -import type { APIChannel, APIOverwrite } from './channel.ts'; +import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts'; import type { APIGuildIntegration, APIGuildIntegrationType, @@ -353,6 +353,7 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAutoArchiveDuration | APIAuditLogChangeKeyAvailable + | APIAuditLogChangeKeyAvailableTags | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyBitrate @@ -363,6 +364,8 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyDefaultAutoArchiveDuration | APIAuditLogChangeKeyDefaultMessageNotifications + | APIAuditLogChangeKeyDefaultReactionEmoji + | APIAuditLogChangeKeyDefaultThreadRateLimitPerUser | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyDiscoverySplashHash @@ -375,6 +378,7 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyExplicitContentFilter + | APIAuditLogChangeKeyFlags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyHoist @@ -832,6 +836,33 @@ export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', */ export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>; +/** + * Returned when a guild forum's available tags gets changed + */ +export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>; + +/** + * Returned when a guild forum's default reaction emoji gets changed + */ +export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData< + 'default_reaction_emoji', + APIGuildForumDefaultReactionEmoji +>; + +/** + * Returned when a channel flag gets changed + */ +export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>; + +/** + * Returned when a thread's amount of seconds a user has to wait before creating another thread + * gets changed + */ +export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData< + 'default_thread_rate_limit_per_user', + number +>; + interface AuditLogChangeData { key: K; /** diff --git a/payloads/v10/auditLog.ts b/payloads/v10/auditLog.ts index 22d8a3c0..532a73d6 100644 --- a/payloads/v10/auditLog.ts +++ b/payloads/v10/auditLog.ts @@ -10,7 +10,7 @@ import type { AutoModerationRuleEventType, AutoModerationRuleTriggerType, } from './autoModeration'; -import type { APIChannel, APIOverwrite } from './channel'; +import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel'; import type { APIGuildIntegration, APIGuildIntegrationType, @@ -353,6 +353,7 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAutoArchiveDuration | APIAuditLogChangeKeyAvailable + | APIAuditLogChangeKeyAvailableTags | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyBitrate @@ -363,6 +364,8 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyDefaultAutoArchiveDuration | APIAuditLogChangeKeyDefaultMessageNotifications + | APIAuditLogChangeKeyDefaultReactionEmoji + | APIAuditLogChangeKeyDefaultThreadRateLimitPerUser | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyDiscoverySplashHash @@ -375,6 +378,7 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyExplicitContentFilter + | APIAuditLogChangeKeyFlags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyHoist @@ -832,6 +836,33 @@ export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', */ export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>; +/** + * Returned when a guild forum's available tags gets changed + */ +export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>; + +/** + * Returned when a guild forum's default reaction emoji gets changed + */ +export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData< + 'default_reaction_emoji', + APIGuildForumDefaultReactionEmoji +>; + +/** + * Returned when a channel flag gets changed + */ +export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>; + +/** + * Returned when a thread's amount of seconds a user has to wait before creating another thread + * gets changed + */ +export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData< + 'default_thread_rate_limit_per_user', + number +>; + interface AuditLogChangeData { key: K; /** diff --git a/payloads/v9/auditLog.ts b/payloads/v9/auditLog.ts index 22d8a3c0..532a73d6 100644 --- a/payloads/v9/auditLog.ts +++ b/payloads/v9/auditLog.ts @@ -10,7 +10,7 @@ import type { AutoModerationRuleEventType, AutoModerationRuleTriggerType, } from './autoModeration'; -import type { APIChannel, APIOverwrite } from './channel'; +import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel'; import type { APIGuildIntegration, APIGuildIntegrationType, @@ -353,6 +353,7 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAutoArchiveDuration | APIAuditLogChangeKeyAvailable + | APIAuditLogChangeKeyAvailableTags | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyBitrate @@ -363,6 +364,8 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyDefaultAutoArchiveDuration | APIAuditLogChangeKeyDefaultMessageNotifications + | APIAuditLogChangeKeyDefaultReactionEmoji + | APIAuditLogChangeKeyDefaultThreadRateLimitPerUser | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyDiscoverySplashHash @@ -375,6 +378,7 @@ export type APIAuditLogChange = | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyExplicitContentFilter + | APIAuditLogChangeKeyFlags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyHoist @@ -832,6 +836,33 @@ export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', */ export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>; +/** + * Returned when a guild forum's available tags gets changed + */ +export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>; + +/** + * Returned when a guild forum's default reaction emoji gets changed + */ +export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData< + 'default_reaction_emoji', + APIGuildForumDefaultReactionEmoji +>; + +/** + * Returned when a channel flag gets changed + */ +export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>; + +/** + * Returned when a thread's amount of seconds a user has to wait before creating another thread + * gets changed + */ +export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData< + 'default_thread_rate_limit_per_user', + number +>; + interface AuditLogChangeData { key: K; /**