Browse Source

Fix NameError when making things Object in audit logs.

pull/572/head
Rapptz 8 years ago
parent
commit
2b44876955
  1. 4
      discord/audit_logs.py

4
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_'):

Loading…
Cancel
Save