Skip to content

Commit

Permalink
docs(audit_logs): misc typo/formatting fixes (#1105)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftinv committed Oct 30, 2023
1 parent a8da5e4 commit 0391f2e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 28 deletions.
1 change: 1 addition & 0 deletions changelog/1105.doc.rst
@@ -0,0 +1 @@
Miscellaneous grammar/typo fixes for :doc:`api/audit_logs`.
9 changes: 5 additions & 4 deletions disnake/audit_logs.py
Expand Up @@ -510,7 +510,8 @@ class _AuditLogProxyAutoModAction:
class AuditLogEntry(Hashable):
"""Represents an Audit Log entry.
You retrieve these via :meth:`Guild.audit_logs`.
You can retrieve these via :meth:`Guild.audit_logs`,
or via the :func:`on_audit_log_entry_create` event.
.. container:: operations
Expand All @@ -529,16 +530,16 @@ class AuditLogEntry(Hashable):
.. versionchanged:: 1.7
Audit log entries are now comparable and hashable.
.. versionchanged:: 2.8
:attr:`user` can return :class:`Object` if the user is not found.
Attributes
----------
action: :class:`AuditLogAction`
The action that was done.
user: Optional[Union[:class:`Member`, :class:`User`, :class:`Object`]]
The user who initiated this action. Usually :class:`Member`\\, unless gone
then it's a :class:`User`.
.. versionchanged:: 2.8
May now be an :class:`Object` if the user could not be found.
id: :class:`int`
The entry ID.
target: Any
Expand Down
48 changes: 24 additions & 24 deletions docs/api/audit_logs.rst
Expand Up @@ -42,17 +42,17 @@ AuditLogChanges
:attr:`~AuditLogEntry.category`\, the data retrieved by this
attribute differs:

+----------------------------------------+---------------------------------------------------+
| Category | Description |
+----------------------------------------+---------------------------------------------------+
| :attr:`~AuditLogActionCategory.create` | All attributes are set to ``None``. |
+----------------------------------------+---------------------------------------------------+
| :attr:`~AuditLogActionCategory.delete` | All attributes are set the value before deletion. |
+----------------------------------------+---------------------------------------------------+
| :attr:`~AuditLogActionCategory.update` | All attributes are set the value before updating. |
+----------------------------------------+---------------------------------------------------+
| ``None`` | No attributes are set. |
+----------------------------------------+---------------------------------------------------+
+----------------------------------------+------------------------------------------------------+
| Category | Description |
+----------------------------------------+------------------------------------------------------+
| :attr:`~AuditLogActionCategory.create` | All attributes are set to ``None``. |
+----------------------------------------+------------------------------------------------------+
| :attr:`~AuditLogActionCategory.delete` | All attributes are set to the value before deletion. |
+----------------------------------------+------------------------------------------------------+
| :attr:`~AuditLogActionCategory.update` | All attributes are set to the value before updating. |
+----------------------------------------+------------------------------------------------------+
| ``None`` | No attributes are set. |
+----------------------------------------+------------------------------------------------------+

.. attribute:: after

Expand All @@ -62,17 +62,17 @@ AuditLogChanges
:attr:`~AuditLogEntry.category`\, the data retrieved by this
attribute differs:

+----------------------------------------+--------------------------------------------------+
| Category | Description |
+----------------------------------------+--------------------------------------------------+
| :attr:`~AuditLogActionCategory.create` | All attributes are set to the created value |
+----------------------------------------+--------------------------------------------------+
| :attr:`~AuditLogActionCategory.delete` | All attributes are set to ``None`` |
+----------------------------------------+--------------------------------------------------+
| :attr:`~AuditLogActionCategory.update` | All attributes are set the value after updating. |
+----------------------------------------+--------------------------------------------------+
| ``None`` | No attributes are set. |
+----------------------------------------+--------------------------------------------------+
+----------------------------------------+-----------------------------------------------------+
| Category | Description |
+----------------------------------------+-----------------------------------------------------+
| :attr:`~AuditLogActionCategory.create` | All attributes are set to the created value. |
+----------------------------------------+-----------------------------------------------------+
| :attr:`~AuditLogActionCategory.delete` | All attributes are set to ``None``. |
+----------------------------------------+-----------------------------------------------------+
| :attr:`~AuditLogActionCategory.update` | All attributes are set to the value after updating. |
+----------------------------------------+-----------------------------------------------------+
| ``None`` | No attributes are set. |
+----------------------------------------+-----------------------------------------------------+

AuditLogDiff
~~~~~~~~~~~~
Expand All @@ -97,7 +97,7 @@ AuditLogDiff

.. describe:: iter(diff)

Returns an iterator over (attribute, value) tuple of this diff.
Returns an iterator over ``(attribute, value)`` tuples of this diff.

.. attribute:: name

Expand Down Expand Up @@ -931,7 +931,7 @@ AuditLogAction
When this is the action, the type of :attr:`~AuditLogEntry.extra` is
set to an unspecified proxy object with two attributes:

- ``delete_members_days``: An integer specifying how far the prune was.
- ``delete_member_days``: An integer specifying how far the prune was.
- ``members_removed``: An integer specifying how many members were removed.

When this is the action, :attr:`~AuditLogEntry.changes` is empty.
Expand Down

0 comments on commit 0391f2e

Please sign in to comment.