From 7df5effbb7f2e65a02e4d353ff7332a18da9d87f Mon Sep 17 00:00:00 2001 From: Josh B Date: Wed, 20 Nov 2019 14:06:09 +1000 Subject: Add new audit log entry types. Fix issue with unknown entry types --- docs/api.rst | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 87 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/api.rst b/docs/api.rst index 88b3c62a..fbb0b4b8 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1254,6 +1254,34 @@ of :class:`enum.Enum`. - :attr:`~AuditLogDiff.roles` + .. attribute:: member_move + + A member's voice channel has been updated. This triggers when a + member is moved to a different voice channel. + + When this is the action, the type of :attr:`~AuditLogEntry.extra` is + set to an unspecified proxy object with two attributes: + + - ``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the members were moved. + - ``count``: An integer specifying how many members were moved. + + .. attribute:: member_disconnect + + A member's voice state has changed. This triggers when a + member is force disconnected from voice. + + When this is the action, the type of :attr:`~AuditLogEntry.extra` is + set to an unspecified proxy object with one attribute: + + - ``count``: An integer specifying how many members were disconnected. + + .. attribute:: bot_add + + A bot was added to the guild. + + When this is the action, the type of :attr:`~AuditLogEntry.target` is + the :class:`Member` or :class:`User` which was added to the guild. + .. attribute:: role_create A new role was created. @@ -1422,8 +1450,7 @@ of :class:`enum.Enum`. .. attribute:: message_delete A message was deleted by a moderator. Note that this - only triggers if the message was deleted by either bulk delete - or deletion by someone other than the author. + only triggers if the message was deleted by someone other than the author. When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Member` or :class:`User` who had their message deleted. @@ -1434,6 +1461,64 @@ of :class:`enum.Enum`. - ``count``: An integer specifying how many messages were deleted. - ``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the message got deleted. + .. attribute:: message_bulk_delete + + Messages were bulk deleted by a moderator. + + When this is the action, the type of :attr:`~AuditLogEntry.target` is + the :class:`TextChannel` or :class:`Object` with the ID of the channel that was purged. + + When this is the action, the type of :attr:`~AuditLogEntry.extra` is + set to an unspecified proxy object with one attribute: + + - ``count``: An integer specifying how many messages were deleted. + + .. attribute:: message_pin + + A message was pinned in a channel. + + When this is the action, the type of :attr:`~AuditLogEntry.target` is + the :class:`Member` or :class:`User` who had their message pinned. + + When this is the action, the type of :attr:`~AuditLogEntry.extra` is + set to an unspecified proxy object with two attributes: + + - ``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the message was pinned. + - ``message_id``: the ID of the message which was pinned. + + .. attribute:: message_unpin + + A message was unpinned in a channel. + + When this is the action, the type of :attr:`~AuditLogEntry.target` is + the :class:`Member` or :class:`User` who had their message unpinned. + + When this is the action, the type of :attr:`~AuditLogEntry.extra` is + set to an unspecified proxy object with two attributes: + + - ``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the message was unpinned. + - ``message_id``: the ID of the message which was unpinned. + + .. attribute:: integration_create + + A guild integration was created. + + When this is the action, the type of :attr:`~AuditLogEntry.target` is + the :class:`Object` with the integration ID of the integration which was created. + + .. attribute:: integration_update + + A guild integration was updated. + + When this is the action, the type of :attr:`~AuditLogEntry.target` is + the :class:`Object` with the integration ID of the integration which was updated. + + .. attribute:: integration_delete + + A guild integration was deleted. + + When this is the action, the type of :attr:`~AuditLogEntry.target` is + the :class:`Object` with the integration ID of the integration which was deleted. .. class:: AuditLogActionCategory -- cgit v1.2.3