diff options
| author | Rapptz <[email protected]> | 2019-07-10 14:39:12 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-07-10 14:39:12 -0400 |
| commit | edcd9459e3d04c8379359ff30391afe3cfa5e5ab (patch) | |
| tree | 9781e79051a97be039526c67000a3c954f34ad1d | |
| parent | Use lower level Guild.owner_id for permission resolution. (diff) | |
| download | discord.py-edcd9459e3d04c8379359ff30391afe3cfa5e5ab.tar.xz discord.py-edcd9459e3d04c8379359ff30391afe3cfa5e5ab.zip | |
Use Guild.owner_id in Guild.edit when checking if the bot owns a guild.
| -rw-r--r-- | discord/guild.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/guild.py b/discord/guild.py index 2cf1acad..4c87e9f0 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -1095,7 +1095,7 @@ class Guild(Hashable): fields['system_channel_id'] = system_channel.id if 'owner' in fields: - if self.owner != self.me: + if self.owner_id != self._state.self_id: raise InvalidArgument('To transfer ownership you must be the owner of the guild.') fields['owner_id'] = fields['owner'].id |