mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Fix NameError when making things Object in audit logs.
This commit is contained in:
parent
7916878eb5
commit
2b44876955
@ -167,7 +167,7 @@ class AuditLogChanges:
|
|||||||
role = utils.find(lambda r: r.id == role_id, roles)
|
role = utils.find(lambda r: r.id == role_id, roles)
|
||||||
|
|
||||||
if role is None:
|
if role is None:
|
||||||
role = discord.Object(id=role_id)
|
role = Object(id=role_id)
|
||||||
role.name = e['name']
|
role.name = e['name']
|
||||||
|
|
||||||
data.append(role)
|
data.append(role)
|
||||||
@ -222,7 +222,7 @@ class AuditLogEntry:
|
|||||||
channel_id = int(self.extra['channel_id'])
|
channel_id = int(self.extra['channel_id'])
|
||||||
elems = {
|
elems = {
|
||||||
'count': int(self.extra['count']),
|
'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)()
|
self.extra = type('_AuditLogProxy', (), elems)()
|
||||||
elif self.action.name.startswith('overwrite_'):
|
elif self.action.name.startswith('overwrite_'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user