Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(audit_logs): misc typo/formatting fixes #1105

Merged
merged 6 commits into from Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@ -514,7 +514,8 @@ class _AuditLogProxyKickOrMemberRoleAction:
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 @@ -533,16 +534,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 @@ -936,7 +936,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