From c5a42ed5ec16b5718392781786f7f9b20b0270d4 Mon Sep 17 00:00:00 2001 From: Jaw0r3k Date: Sun, 7 May 2023 02:54:06 +0200 Subject: [PATCH] feat(GuildAuditLogsEntry): add missing channel property to extra (#9527) feat(GuildAuditLogsEntry#extra): add missing `channel` property (#9518) Co-authored-by: Synbulat Biishev --- src/structures/GuildAuditLogs.js | 1 + typings/index.d.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/structures/GuildAuditLogs.js b/src/structures/GuildAuditLogs.js index 9cf82bd4c..bd19feaad 100644 --- a/src/structures/GuildAuditLogs.js +++ b/src/structures/GuildAuditLogs.js @@ -542,6 +542,7 @@ class GuildAuditLogsEntry { this.extra = { autoModerationRuleName: data.options.auto_moderation_rule_name, autoModerationRuleTriggerType: AutoModerationRuleTriggerTypes[data.options.auto_moderation_rule_trigger_type], + channel: guild.client.channels.cache.get(data.options?.channel_id) ?? { id: data.options?.channel_id }, }; break; default: diff --git a/typings/index.d.ts b/typings/index.d.ts index 42630bb85..36ee40293 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -5312,14 +5312,17 @@ export interface GuildAuditLogsEntryExtraField { AUTO_MODERATION_BLOCK_MESSAGE: { autoModerationRuleName: string; autoModerationRuleTriggerType: AutoModerationRuleTriggerType; + channel: GuildTextBasedChannel | { id: Snowflake }; }; AUTO_MODERATION_FLAG_TO_CHANNEL: { autoModerationRuleName: string; autoModerationRuleTriggerType: AutoModerationRuleTriggerType; + channel: GuildTextBasedChannel | { id: Snowflake }; }; AUTO_MODERATION_USER_COMMUNICATIONDISABLED: { autoModerationRuleName: string; autoModerationRuleTriggerType: AutoModerationRuleTriggerType; + channel: GuildTextBasedChannel | { id: Snowflake }; }; }