diff options
| author | Rapptz <[email protected]> | 2017-08-15 06:12:57 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-08-15 06:12:57 -0400 |
| commit | d8360411ea22699970c5479179f8fb4c6640f6f1 (patch) | |
| tree | b70a008cc5c9ec0a0664591b397024ec33585a97 /discord/audit_logs.py | |
| parent | [commands] Raise when an invalid prefix is given. (diff) | |
| download | discord.py-d8360411ea22699970c5479179f8fb4c6640f6f1.tar.xz discord.py-d8360411ea22699970c5479179f8fb4c6640f6f1.zip | |
Fix cases where user_id can be None in audit logs.
Diffstat (limited to 'discord/audit_logs.py')
| -rw-r--r-- | discord/audit_logs.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/audit_logs.py b/discord/audit_logs.py index 57807c0e..16c79aad 100644 --- a/discord/audit_logs.py +++ b/discord/audit_logs.py @@ -247,7 +247,7 @@ class AuditLogEntry: # into meaningful data when requested self._changes = data.get('changes', []) - self.user = self._get_member(int(data['user_id'])) + self.user = self._get_member(utils._get_as_snowflake(data, 'user_id')) self._target_id = utils._get_as_snowflake(data, 'target_id') def _get_member(self, user_id): |