Skip to content

Commit 2272321

Browse files
SyjaloJiralite
andauthored
feat(GuildAuditLogsEntry#extra): add missing channel property (#9518)
* feat(GuildAuditLogsEntry#extra): add missing `channel` property * types(GuildAuditLogsEntryExtraField): update --------- Co-authored-by: Jiralite <[email protected]>
1 parent 37181ab commit 2272321

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/discord.js/src/structures/GuildAuditLogsEntry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ class GuildAuditLogsEntry {
238238
this.extra = {
239239
autoModerationRuleName: data.options.auto_moderation_rule_name,
240240
autoModerationRuleTriggerType: data.options.auto_moderation_rule_trigger_type,
241+
channel: guild.client.channels.cache.get(data.options?.channel_id) ?? { id: data.options?.channel_id },
241242
};
242243
break;
243244

packages/discord.js/typings/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5340,14 +5340,17 @@ export interface GuildAuditLogsEntryExtraField {
53405340
[AuditLogEvent.AutoModerationBlockMessage]: {
53415341
autoModerationRuleName: string;
53425342
autoModerationRuleTriggerType: AuditLogRuleTriggerType;
5343+
channel: GuildTextBasedChannel | { id: Snowflake };
53435344
};
53445345
[AuditLogEvent.AutoModerationFlagToChannel]: {
53455346
autoModerationRuleName: string;
53465347
autoModerationRuleTriggerType: AuditLogRuleTriggerType;
5348+
channel: GuildTextBasedChannel | { id: Snowflake };
53475349
};
53485350
[AuditLogEvent.AutoModerationUserCommunicationDisabled]: {
53495351
autoModerationRuleName: string;
53505352
autoModerationRuleTriggerType: AuditLogRuleTriggerType;
5353+
channel: GuildTextBasedChannel | { id: Snowflake };
53515354
};
53525355
}
53535356

0 commit comments

Comments
 (0)