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