mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 17:36:15 +00:00
Add support for automod_quarantined_guild_tag member flag
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user