Skip to content

Commit

Permalink
feat(GuildAuditLogsEntry#extra): add missing channel property (#9518)
Browse files Browse the repository at this point in the history
* feat(GuildAuditLogsEntry#extra): add missing `channel` property

* types(GuildAuditLogsEntryExtraField): update

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
  • Loading branch information
Syjalo and Jiralite committed May 7, 2023
1 parent 37181ab commit 2272321
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/discord.js/src/structures/GuildAuditLogsEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ class GuildAuditLogsEntry {
this.extra = {
autoModerationRuleName: data.options.auto_moderation_rule_name,
autoModerationRuleTriggerType: data.options.auto_moderation_rule_trigger_type,
channel: guild.client.channels.cache.get(data.options?.channel_id) ?? { id: data.options?.channel_id },
};
break;

Expand Down
3 changes: 3 additions & 0 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5340,14 +5340,17 @@ export interface GuildAuditLogsEntryExtraField {
[AuditLogEvent.AutoModerationBlockMessage]: {
autoModerationRuleName: string;
autoModerationRuleTriggerType: AuditLogRuleTriggerType;
channel: GuildTextBasedChannel | { id: Snowflake };
};
[AuditLogEvent.AutoModerationFlagToChannel]: {
autoModerationRuleName: string;
autoModerationRuleTriggerType: AuditLogRuleTriggerType;
channel: GuildTextBasedChannel | { id: Snowflake };
};
[AuditLogEvent.AutoModerationUserCommunicationDisabled]: {
autoModerationRuleName: string;
autoModerationRuleTriggerType: AuditLogRuleTriggerType;
channel: GuildTextBasedChannel | { id: Snowflake };
};
}

Expand Down

0 comments on commit 2272321

Please sign in to comment.