mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 00:07:51 +00:00
Fix audit log bulk message delete not exposing count
This commit is contained in:
parent
573bb32a1e
commit
b7e25645dc
@ -421,6 +421,10 @@ class _AuditLogProxyStageInstanceAction(_AuditLogProxy):
|
||||
channel: abc.GuildChannel
|
||||
|
||||
|
||||
class _AuditLogProxyMessageBulkDelete(_AuditLogProxy):
|
||||
count: int
|
||||
|
||||
|
||||
class AuditLogEntry(Hashable):
|
||||
r"""Represents an Audit Log entry.
|
||||
|
||||
@ -495,6 +499,7 @@ class AuditLogEntry(Hashable):
|
||||
_AuditLogProxyMemberDisconnect,
|
||||
_AuditLogProxyPinAction,
|
||||
_AuditLogProxyStageInstanceAction,
|
||||
_AuditLogProxyMessageBulkDelete,
|
||||
Member, User, None, PartialIntegration,
|
||||
Role, Object
|
||||
] = None
|
||||
@ -516,6 +521,9 @@ class AuditLogEntry(Hashable):
|
||||
elif self.action is enums.AuditLogAction.member_disconnect:
|
||||
# The member disconnect action has a dict with some information
|
||||
self.extra = _AuditLogProxyMemberDisconnect(count=int(extra['count']))
|
||||
elif self.action is enums.AuditLogAction.message_bulk_delete:
|
||||
# The bulk message delete action has the number of messages deleted
|
||||
self.extra = _AuditLogProxyMessageBulkDelete(count=int(extra['count']))
|
||||
elif self.action.name.endswith('pin'):
|
||||
# the pin actions have a dict with some information
|
||||
channel_id = int(extra['channel_id'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user