From 0c69c997854e5099dc535cf958bd3a69dd431c35 Mon Sep 17 00:00:00 2001 From: Nadir Chowdhury Date: Sat, 28 Nov 2020 08:16:28 +0000 Subject: [PATCH] Fix `UnboundLocalError` for editing `public_updates_channel` --- discord/guild.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/discord/guild.py b/discord/guild.py index 2cab0053a..514de733f 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -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):