Use Guild.owner_id in Guild.edit when checking if the bot owns a guild.

This commit is contained in:
Rapptz 2019-07-10 14:39:12 -04:00
parent 562580a07f
commit edcd9459e3

View File

@ -1095,7 +1095,7 @@ class Guild(Hashable):
fields['system_channel_id'] = system_channel.id fields['system_channel_id'] = system_channel.id
if 'owner' in fields: 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.') raise InvalidArgument('To transfer ownership you must be the owner of the guild.')
fields['owner_id'] = fields['owner'].id fields['owner_id'] = fields['owner'].id