Skip to content

Commit 2118d36

Browse files
feat: support new discord models (#1453)
* feat: add audit log 146 * fix: handle optional channel in member auto mod
1 parent 68492e1 commit 2118d36

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

interactions/api/events/processors/auto_mod.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AutoModEvents(EventMixinTemplate):
1414
@Processor.define()
1515
async def _raw_auto_moderation_action_execution(self, event: "RawGatewayEvent") -> None:
1616
action = AutoModerationAction.from_dict(event.data.copy(), self)
17-
channel = self.get_channel(event.data["channel_id"])
17+
channel = self.get_channel(event.data.get("channel_id"))
1818
guild = self.get_guild(event.data["guild_id"])
1919
self.dispatch(events.AutoModExec(action, channel, guild))
2020

interactions/models/discord/enums.py

+1
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,7 @@ class AuditLogEventType(CursedIntEnum):
968968
AUTO_MODERATION_BLOCK_MESSAGE = 143
969969
AUTO_MODERATION_FLAG_TO_CHANNEL = 144
970970
AUTO_MODERATION_USER_COMMUNICATION_DISABLED = 145
971+
AUTO_MODERATION_QUARANTINE = 146
971972
CREATOR_MONETIZATION_REQUEST_CREATED = 150
972973
CREATOR_MONETIZATION_TERMS_ACCEPTED = 151
973974
ROLE_PROMPT_CREATE = 160

0 commit comments

Comments
 (0)