Fix UnboundLocalError for editing public_updates_channel

This commit is contained in:
Nadir Chowdhury 2020-11-28 08:16:28 +00:00 committed by GitHub
parent 169b61092a
commit 0c69c99785
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1216,10 +1216,10 @@ class Guild(Hashable):
except KeyError:
pass
else:
if rules_channel is None:
fields['public_updates_channel_id'] = rules_channel
if public_updates_channel is None:
fields['public_updates_channel_id'] = public_updates_channel
else:
fields['public_updates_channel_id'] = rules_channel.id
fields['public_updates_channel_id'] = public_updates_channel.id
await http.edit_guild(self.id, reason=reason, **fields)
async def fetch_channels(self):