From f79216cfbae2e3828ba1247eea5356e06e1326d9 Mon Sep 17 00:00:00 2001 From: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Date: Thu, 13 Jul 2023 19:32:23 -0700 Subject: [PATCH 1/5] feat: add audit log action types --- discord/enums.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord/enums.py b/discord/enums.py index 181bb48511..f4b44623b0 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -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: @@ -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] From 5db6ce125f1183f3bb2c2ee4d1f895d7795ca6c9 Mon Sep 17 00:00:00 2001 From: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Date: Thu, 13 Jul 2023 19:35:16 -0700 Subject: [PATCH 2/5] docs: add audit log action types --- docs/api/enums.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/api/enums.rst b/docs/api/enums.rst index f66fa562e9..6745332fc6 100644 --- a/docs/api/enums.rst +++ b/docs/api/enums.rst @@ -1579,6 +1579,18 @@ of :class:`enum.Enum`. A member was timed out by auto moderation. .. 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 From c8c36e7f98a7bb15a3b2f2188d5401e99150619d Mon Sep 17 00:00:00 2001 From: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Date: Thu, 13 Jul 2023 19:38:10 -0700 Subject: [PATCH 3/5] docs: add a changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aadaccc8af..5f3a139711 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,7 @@ 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), [#TBD](https://github.com/Pycord-Development/pycord/pull/TBD)) - `AuditLogDiff` now supports AutoMod related models. ([#2030](https://github.com/Pycord-Development/pycord/pull/2030)) - Added `Interaction.respond` and `Interaction.edit` as shortcut responses. From 9144a3958c6bc419fa01762489225b4e672737d2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 02:43:20 +0000 Subject: [PATCH 4/5] style(pre-commit): auto fixes from pre-commit.com hooks --- CHANGELOG.md | 3 ++- docs/api/enums.rst | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f3a139711..d0f73c4df8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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), [#TBD](https://github.com/Pycord-Development/pycord/pull/TBD)) + ([#2030](https://github.com/Pycord-Development/pycord/pull/2030), + [#TBD](https://github.com/Pycord-Development/pycord/pull/TBD)) - `AuditLogDiff` now supports AutoMod related models. ([#2030](https://github.com/Pycord-Development/pycord/pull/2030)) - Added `Interaction.respond` and `Interaction.edit` as shortcut responses. diff --git a/docs/api/enums.rst b/docs/api/enums.rst index 6745332fc6..e2620ed8e5 100644 --- a/docs/api/enums.rst +++ b/docs/api/enums.rst @@ -1579,7 +1579,7 @@ of :class:`enum.Enum`. A member was timed out by auto moderation. .. versionadded:: 2.5 - + .. attribute:: creator_monetization_request_created A creator monetization request was created. From 9a1661d0ba37836e2d2d3a3bb4016b7153a74e78 Mon Sep 17 00:00:00 2001 From: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Date: Thu, 13 Jul 2023 19:44:06 -0700 Subject: [PATCH 5/5] docs: add changelog PR value --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0f73c4df8..a901a483fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,7 +45,7 @@ These changes are available on the `master` branch, but have not yet been releas ([#2023](https://github.com/Pycord-Development/pycord/pull/2023)) - Added and documented missing `AuditLogAction` enums. ([#2030](https://github.com/Pycord-Development/pycord/pull/2030), - [#TBD](https://github.com/Pycord-Development/pycord/pull/TBD)) + [#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.