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

feat: add creator monetization-related audit log action types #2171

Merged
merged 5 commits into from
Jul 14, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ These changes are available on the `master` branch, but have not yet been releas
[Raw Event payloads](https://docs.pycord.dev/en/master/api/models.html#events).
([#2023](https://github.com/Pycord-Development/pycord/pull/2023))
- Added and documented missing `AuditLogAction` enums.
([#2030](https://github.com/Pycord-Development/pycord/pull/2030))
([#2030](https://github.com/Pycord-Development/pycord/pull/2030),
[#2171](https://github.com/Pycord-Development/pycord/pull/2171))
- `AuditLogDiff` now supports AutoMod related models.
([#2030](https://github.com/Pycord-Development/pycord/pull/2030))
- Added `Interaction.respond` and `Interaction.edit` as shortcut responses.
Expand Down
4 changes: 4 additions & 0 deletions discord/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ class AuditLogAction(Enum):
auto_moderation_block_message = 143
auto_moderation_flag_to_channel = 144
auto_moderation_user_communication_disabled = 145
creator_monetization_request_created = 150
creator_monetization_terms_accepted = 151

@property
def category(self) -> AuditLogActionCategory | None:
Expand Down Expand Up @@ -485,6 +487,8 @@ def category(self) -> AuditLogActionCategory | None:
AuditLogAction.auto_moderation_block_message: None,
AuditLogAction.auto_moderation_flag_to_channel: None,
AuditLogAction.auto_moderation_user_communication_disabled: None,
AuditLogAction.creator_monetization_request_created: None,
AuditLogAction.creator_monetization_terms_accepted: None,
}
return lookup[self]

Expand Down
12 changes: 12 additions & 0 deletions docs/api/enums.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,18 @@ of :class:`enum.Enum`.

.. versionadded:: 2.5

.. attribute:: creator_monetization_request_created

A creator monetization request was created.

.. versionadded:: 2.5

.. attribute:: creator_monetization_terms_accepted

The creator monetization terms were accepted.

.. versionadded:: 2.5


.. class:: AuditLogActionCategory

Expand Down