mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-23 11:26:51 +00:00
Add two new audit log event types
This commit is contained in:
parent
b1ff8038c8
commit
00ea67d315
@ -368,6 +368,8 @@ class AuditLogAction(Enum):
|
||||
automod_block_message = 143
|
||||
automod_flag_message = 144
|
||||
automod_timeout_member = 145
|
||||
creator_monetization_request_created = 150
|
||||
creator_monetization_terms_accepted = 151
|
||||
# fmt: on
|
||||
|
||||
@property
|
||||
@ -428,6 +430,8 @@ class AuditLogAction(Enum):
|
||||
AuditLogAction.automod_block_message: None,
|
||||
AuditLogAction.automod_flag_message: None,
|
||||
AuditLogAction.automod_timeout_member: None,
|
||||
AuditLogAction.creator_monetization_request_created: None,
|
||||
AuditLogAction.creator_monetization_terms_accepted: None,
|
||||
}
|
||||
# fmt: on
|
||||
return lookup[self]
|
||||
@ -471,6 +475,8 @@ class AuditLogAction(Enum):
|
||||
return 'auto_moderation'
|
||||
elif v < 146:
|
||||
return 'user'
|
||||
elif v < 152:
|
||||
return 'creator_monetization'
|
||||
|
||||
|
||||
class UserFlags(Enum):
|
||||
|
@ -93,6 +93,8 @@ AuditLogEvent = Literal[
|
||||
143,
|
||||
144,
|
||||
145,
|
||||
150,
|
||||
151,
|
||||
]
|
||||
|
||||
|
||||
|
12
docs/api.rst
12
docs/api.rst
@ -2799,6 +2799,18 @@ of :class:`enum.Enum`.
|
||||
|
||||
.. versionadded:: 2.1
|
||||
|
||||
.. attribute:: creator_monetization_request_created
|
||||
|
||||
A request to monetize the server was created.
|
||||
|
||||
.. versionadded:: 2.4
|
||||
|
||||
.. attribute:: creator_monetization_terms_accepted
|
||||
|
||||
The terms and conditions for creator monetization were accepted.
|
||||
|
||||
.. versionadded:: 2.4
|
||||
|
||||
.. class:: AuditLogActionCategory
|
||||
|
||||
Represents the category that the :class:`AuditLogAction` belongs to.
|
||||
|
Loading…
x
Reference in New Issue
Block a user