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 = {
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;

3
typings/index.d.ts vendored
View File

@ -6215,14 +6215,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 };
};
}