diff options
| author | Rapptz <[email protected]> | 2021-04-11 00:34:34 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-04-11 00:39:13 -0400 |
| commit | 40cf397ce6c361a91bdbae5eeb16652934d7d3e1 (patch) | |
| tree | 86635a9469f6a3b56704a05a3781ab9d5296e252 /discord/audit_logs.py | |
| parent | add reply and application_command types (diff) | |
| download | discord.py-40cf397ce6c361a91bdbae5eeb16652934d7d3e1.tar.xz discord.py-40cf397ce6c361a91bdbae5eeb16652934d7d3e1.zip | |
Permission related fixes for v8
Diffstat (limited to 'discord/audit_logs.py')
| -rw-r--r-- | discord/audit_logs.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/discord/audit_logs.py b/discord/audit_logs.py index fbb0f5a3..dbac7630 100644 --- a/discord/audit_logs.py +++ b/discord/audit_logs.py @@ -57,7 +57,7 @@ def _transform_explicit_content_filter(entry, data): return enums.try_enum(enums.ContentFilter, data) def _transform_permissions(entry, data): - return Permissions(data) + return Permissions(int(data)) def _transform_color(entry, data): return Colour(data) @@ -89,9 +89,10 @@ def _transform_overwrites(entry, data): ow_type = elem['type'] ow_id = int(elem['id']) - if ow_type == 'role': + target = None + if ow_type == '0': target = entry.guild.get_role(ow_id) - else: + elif ow_type == '1': target = entry._get_member(ow_id) if target is None: |