diff options
| author | Rapptz <[email protected]> | 2017-05-07 01:06:15 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-05-07 01:06:15 -0400 |
| commit | 2b4487695512183ccf443fec5fda145eed0d5000 (patch) | |
| tree | bc66bf37174c89b5d6ffdf7cdbb2649b857ec814 | |
| parent | Audit log role add and removes are lists, not single item. (diff) | |
| download | discord.py-2b4487695512183ccf443fec5fda145eed0d5000.tar.xz discord.py-2b4487695512183ccf443fec5fda145eed0d5000.zip | |
Fix NameError when making things Object in audit logs.
| -rw-r--r-- | discord/audit_logs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/audit_logs.py b/discord/audit_logs.py index b0fef41a..9c251edd 100644 --- a/discord/audit_logs.py +++ b/discord/audit_logs.py @@ -167,7 +167,7 @@ class AuditLogChanges: role = utils.find(lambda r: r.id == role_id, roles) if role is None: - role = discord.Object(id=role_id) + role = Object(id=role_id) role.name = e['name'] data.append(role) @@ -222,7 +222,7 @@ class AuditLogEntry: channel_id = int(self.extra['channel_id']) elems = { 'count': int(self.extra['count']), - 'channel': self.guild.get_channel(channel_id) or discord.Object(id=channel_id) + 'channel': self.guild.get_channel(channel_id) or Object(id=channel_id) } self.extra = type('_AuditLogProxy', (), elems)() elif self.action.name.startswith('overwrite_'): |