From 0d113d230e4b36b11375a85224a8018d274e22c2 Mon Sep 17 00:00:00 2001 From: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Date: Fri, 1 Mar 2024 23:21:35 +0300 Subject: [PATCH 1/3] feat: audit logs for voice channel status --- discord/enums.py | 6 ++++++ discord/types/audit_log.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/discord/enums.py b/discord/enums.py index f2c7c2e60f..98e46e646d 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -439,6 +439,8 @@ class AuditLogAction(Enum): onboarding_update = 167 server_guide_create = 190 server_guide_update = 191 + voice_channel_status_update = 192 + voice_channel_status_delete = 193 @property def category(self) -> AuditLogActionCategory | None: @@ -506,6 +508,8 @@ def category(self) -> AuditLogActionCategory | None: AuditLogAction.onboarding_update: AuditLogActionCategory.update, AuditLogAction.server_guide_create: AuditLogActionCategory.create, AuditLogAction.server_guide_update: AuditLogActionCategory.update, + AuditLogAction.voice_channel_status_update: AuditLogActionCategory.update, + AuditLogAction.voice_channel_status_delete: AuditLogActionCategory.delete, } return lookup[self] @@ -552,6 +556,8 @@ def target_type(self) -> str | None: return "onboarding" elif v < 192: return "server_guide" + elif v < 194: + return "voice_channel_status" class UserFlags(Enum): diff --git a/discord/types/audit_log.py b/discord/types/audit_log.py index c0b1303947..d543f9e3b7 100644 --- a/discord/types/audit_log.py +++ b/discord/types/audit_log.py @@ -112,6 +112,7 @@ class _AuditLogChange_Str(TypedDict): "deny", "permissions", "tags", + "status", ] new_value: str old_value: str @@ -270,6 +271,8 @@ class AuditEntryInfo(TypedDict): application_id: Snowflake auto_moderation_rule_name: str auto_moderation_rule_trigger_type: str + # TODO: add integration_type + status: str class AuditLogEntry(TypedDict): From 5985a1010aa98e8bf2b9dd56b270414df3481841 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sat, 2 Mar 2024 06:09:08 +0100 Subject: [PATCH 2/3] chore: changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b6110790d..ecb9d59932 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,6 +97,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#2368](https://github.com/Pycord-Development/pycord/pull/2368)) - Added `Message.enforce_nonce`. ([#2370](https://github.com/Pycord-Development/pycord/pull/2370)) +- Added audit log support for voice channel status. + ([#2373](https://github.com/Pycord-Development/pycord/pull/2373)) ### Changed From c7ca81679b1b7794cdebdd952b9a7162fe549edc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 2 Mar 2024 05:09:28 +0000 Subject: [PATCH 3/3] style(pre-commit): auto fixes from pre-commit.com hooks --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecb9d59932..423098cfa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,7 +97,7 @@ These changes are available on the `master` branch, but have not yet been releas ([#2368](https://github.com/Pycord-Development/pycord/pull/2368)) - Added `Message.enforce_nonce`. ([#2370](https://github.com/Pycord-Development/pycord/pull/2370)) -- Added audit log support for voice channel status. +- Added audit log support for voice channel status. ([#2373](https://github.com/Pycord-Development/pycord/pull/2373)) ### Changed