mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-22 16:32:59 +00:00
Add automod types to audit log
This commit is contained in:
31
docs/api.rst
31
docs/api.rst
@@ -2583,7 +2583,8 @@ of :class:`enum.Enum`.
|
||||
An automod rule was created.
|
||||
|
||||
When this is the action, the type of :attr:`~AuditLogEntry.target` is
|
||||
a :class:`Object` with the ID of the automod rule that was created.
|
||||
a :class:`AutoModRule` or :class:`Object` with the ID of the automod
|
||||
rule that was created.
|
||||
|
||||
Possible attributes for :class:`AuditLogDiff`:
|
||||
|
||||
@@ -2591,7 +2592,7 @@ of :class:`enum.Enum`.
|
||||
- :attr:`~AuditLogDiff.enabled`
|
||||
- :attr:`~AuditLogDiff.event_type`
|
||||
- :attr:`~AuditLogDiff.trigger_type`
|
||||
- :attr:`~AuditLogDiff.trigger_metadata`
|
||||
- :attr:`~AuditLogDiff.trigger`
|
||||
- :attr:`~AuditLogDiff.actions`
|
||||
- :attr:`~AuditLogDiff.exempt_roles`
|
||||
- :attr:`~AuditLogDiff.exempt_channels`
|
||||
@@ -2603,7 +2604,8 @@ of :class:`enum.Enum`.
|
||||
An automod rule was updated.
|
||||
|
||||
When this is the action, the type of :attr:`~AuditLogEntry.target` is
|
||||
a :class:`Object` with the ID of the automod rule that was updated.
|
||||
a :class:`AutoModRule` or :class:`Object` with the ID of the automod
|
||||
rule that was created.
|
||||
|
||||
Possible attributes for :class:`AuditLogDiff`:
|
||||
|
||||
@@ -2611,7 +2613,7 @@ of :class:`enum.Enum`.
|
||||
- :attr:`~AuditLogDiff.enabled`
|
||||
- :attr:`~AuditLogDiff.event_type`
|
||||
- :attr:`~AuditLogDiff.trigger_type`
|
||||
- :attr:`~AuditLogDiff.trigger_metadata`
|
||||
- :attr:`~AuditLogDiff.trigger`
|
||||
- :attr:`~AuditLogDiff.actions`
|
||||
- :attr:`~AuditLogDiff.exempt_roles`
|
||||
- :attr:`~AuditLogDiff.exempt_channels`
|
||||
@@ -2623,7 +2625,8 @@ of :class:`enum.Enum`.
|
||||
An automod rule was deleted.
|
||||
|
||||
When this is the action, the type of :attr:`~AuditLogEntry.target` is
|
||||
a :class:`Object` with the ID of the automod rule that was deleted.
|
||||
a :class:`AutoModRule` or :class:`Object` with the ID of the automod
|
||||
rule that was created.
|
||||
|
||||
Possible attributes for :class:`AuditLogDiff`:
|
||||
|
||||
@@ -2631,7 +2634,7 @@ of :class:`enum.Enum`.
|
||||
- :attr:`~AuditLogDiff.enabled`
|
||||
- :attr:`~AuditLogDiff.event_type`
|
||||
- :attr:`~AuditLogDiff.trigger_type`
|
||||
- :attr:`~AuditLogDiff.trigger_metadata`
|
||||
- :attr:`~AuditLogDiff.trigger`
|
||||
- :attr:`~AuditLogDiff.actions`
|
||||
- :attr:`~AuditLogDiff.exempt_roles`
|
||||
- :attr:`~AuditLogDiff.exempt_channels`
|
||||
@@ -3734,7 +3737,7 @@ AuditLogDiff
|
||||
|
||||
The event type for triggering the automod rule.
|
||||
|
||||
:type: :class:`str`
|
||||
:type: :class:`AutoModRuleEventType`
|
||||
|
||||
.. attribute:: trigger_type
|
||||
|
||||
@@ -3742,29 +3745,29 @@ AuditLogDiff
|
||||
|
||||
:type: :class:`AutoModRuleTriggerType`
|
||||
|
||||
.. attribute:: trigger_metadata
|
||||
.. attribute:: trigger
|
||||
|
||||
The trigger metadata for the automod rule.
|
||||
The trigger for the automod rule.
|
||||
|
||||
:type: Dict[:class:`str`, Any]
|
||||
:type: :class:`AutoModTrigger`
|
||||
|
||||
.. attribute:: actions
|
||||
|
||||
The actions to take when an automod rule is triggered.
|
||||
|
||||
:type: List[Dict[:class:`str`, Any]]
|
||||
:type: List[AutoModRuleAction]
|
||||
|
||||
.. attribute:: exempt_roles
|
||||
|
||||
The list of roles that are exempt from the automod rule.
|
||||
|
||||
:type: List[:class:`str`]
|
||||
:type: List[Union[:class:`Role`, :class:`Object`]]
|
||||
|
||||
.. attribute:: exempt_channels
|
||||
|
||||
The list of channels that are exempt from the automod rule.
|
||||
The list of channels or threads that are exempt from the automod rule.
|
||||
|
||||
:type: List[:class:`str`]
|
||||
:type: List[:class:`abc.GuildChannel`, :class:`Thread`, :class:`Object`]
|
||||
|
||||
.. this is currently missing the following keys: reason and application_id
|
||||
I'm not sure how to port these
|
||||
|
Reference in New Issue
Block a user