Skip to content

Commit be87ae7

Browse files
DorukyumLulalabypre-commit-ci[bot]
authored
feat: audit logs for voice channel status (#2373)
Co-authored-by: Lala Sabathil <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 752a38c commit be87ae7

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ These changes are available on the `master` branch, but have not yet been releas
9797
([#2368](https://github.com/Pycord-Development/pycord/pull/2368))
9898
- Added `Message.enforce_nonce`.
9999
([#2370](https://github.com/Pycord-Development/pycord/pull/2370))
100+
- Added audit log support for voice channel status.
101+
([#2373](https://github.com/Pycord-Development/pycord/pull/2373))
100102

101103
### Changed
102104

discord/enums.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ class AuditLogAction(Enum):
439439
onboarding_update = 167
440440
server_guide_create = 190
441441
server_guide_update = 191
442+
voice_channel_status_update = 192
443+
voice_channel_status_delete = 193
442444

443445
@property
444446
def category(self) -> AuditLogActionCategory | None:
@@ -506,6 +508,8 @@ def category(self) -> AuditLogActionCategory | None:
506508
AuditLogAction.onboarding_update: AuditLogActionCategory.update,
507509
AuditLogAction.server_guide_create: AuditLogActionCategory.create,
508510
AuditLogAction.server_guide_update: AuditLogActionCategory.update,
511+
AuditLogAction.voice_channel_status_update: AuditLogActionCategory.update,
512+
AuditLogAction.voice_channel_status_delete: AuditLogActionCategory.delete,
509513
}
510514
return lookup[self]
511515

@@ -552,6 +556,8 @@ def target_type(self) -> str | None:
552556
return "onboarding"
553557
elif v < 192:
554558
return "server_guide"
559+
elif v < 194:
560+
return "voice_channel_status"
555561

556562

557563
class UserFlags(Enum):

discord/types/audit_log.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ class _AuditLogChange_Str(TypedDict):
112112
"deny",
113113
"permissions",
114114
"tags",
115+
"status",
115116
]
116117
new_value: str
117118
old_value: str
@@ -270,6 +271,8 @@ class AuditEntryInfo(TypedDict):
270271
application_id: Snowflake
271272
auto_moderation_rule_name: str
272273
auto_moderation_rule_trigger_type: str
274+
# TODO: add integration_type
275+
status: str
273276

274277

275278
class AuditLogEntry(TypedDict):

0 commit comments

Comments
 (0)