feat(GuildAuditLogsEntry): add missing channel property to extra

#9527
This commit is contained in:
Elysia 2023-05-07 10:29:30 +07:00
parent cd37e22b10
commit ae8157302e
2 changed files with 4 additions and 0 deletions

View File

@ -546,6 +546,7 @@ class GuildAuditLogsEntry {
this.extra = { this.extra = {
autoModerationRuleName: data.options.auto_moderation_rule_name, autoModerationRuleName: data.options.auto_moderation_rule_name,
autoModerationRuleTriggerType: AutoModerationRuleTriggerTypes[data.options.auto_moderation_rule_trigger_type], 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; break;

3
typings/index.d.ts vendored
View File

@ -6215,14 +6215,17 @@ export interface GuildAuditLogsEntryExtraField {
AUTO_MODERATION_BLOCK_MESSAGE: { AUTO_MODERATION_BLOCK_MESSAGE: {
autoModerationRuleName: string; autoModerationRuleName: string;
autoModerationRuleTriggerType: AutoModerationRuleTriggerType; autoModerationRuleTriggerType: AutoModerationRuleTriggerType;
channel: GuildTextBasedChannel | { id: Snowflake };
}; };
AUTO_MODERATION_FLAG_TO_CHANNEL: { AUTO_MODERATION_FLAG_TO_CHANNEL: {
autoModerationRuleName: string; autoModerationRuleName: string;
autoModerationRuleTriggerType: AutoModerationRuleTriggerType; autoModerationRuleTriggerType: AutoModerationRuleTriggerType;
channel: GuildTextBasedChannel | { id: Snowflake };
}; };
AUTO_MODERATION_USER_COMMUNICATIONDISABLED: { AUTO_MODERATION_USER_COMMUNICATIONDISABLED: {
autoModerationRuleName: string; autoModerationRuleName: string;
autoModerationRuleTriggerType: AutoModerationRuleTriggerType; autoModerationRuleTriggerType: AutoModerationRuleTriggerType;
channel: GuildTextBasedChannel | { id: Snowflake };
}; };
} }