Add support for automod_quarantined_guild_tag member flag

This commit is contained in:
Sacul
2025-07-28 01:07:19 +08:00
committed by GitHub
parent 5f4a822c2e
commit e715ad6419
5 changed files with 43 additions and 1 deletions

View File

@ -614,6 +614,11 @@ class _AuditLogProxyAutoModAction(_AuditLogProxy):
channel: Optional[Union[abc.GuildChannel, Thread]]
class _AuditLogProxyAutoModActionQuarantineUser(_AuditLogProxy):
automod_rule_name: str
automod_rule_trigger_type: str
class _AuditLogProxyMemberKickOrMemberRoleUpdate(_AuditLogProxy):
integration_type: Optional[str]
@ -704,6 +709,7 @@ class AuditLogEntry(Hashable):
_AuditLogProxyStageInstanceAction,
_AuditLogProxyMessageBulkDelete,
_AuditLogProxyAutoModAction,
_AuditLogProxyAutoModActionQuarantineUser,
_AuditLogProxyMemberKickOrMemberRoleUpdate,
Member, User, None, PartialIntegration,
Role, Object
@ -759,6 +765,13 @@ class AuditLogEntry(Hashable):
),
channel=channel,
)
elif self.action is enums.AuditLogAction.automod_quarantine_user:
self.extra = _AuditLogProxyAutoModActionQuarantineUser(
automod_rule_name=extra['auto_moderation_rule_name'],
automod_rule_trigger_type=enums.try_enum(
enums.AutoModRuleTriggerType, extra['auto_moderation_rule_trigger_type']
),
)
elif self.action.name.startswith('overwrite_'):
# the overwrite_ actions have a dict with some information