aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadir Chowdhury <[email protected]>2020-11-28 08:16:28 +0000
committerGitHub <[email protected]>2020-11-28 03:16:28 -0500
commit0c69c997854e5099dc535cf958bd3a69dd431c35 (patch)
tree71763461284979fe221d39be26172e4bafb23c14
parentChange reply example to use replies (diff)
downloaddiscord.py-0c69c997854e5099dc535cf958bd3a69dd431c35.tar.xz
discord.py-0c69c997854e5099dc535cf958bd3a69dd431c35.zip
Fix `UnboundLocalError` for editing `public_updates_channel`
-rw-r--r--discord/guild.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/guild.py b/discord/guild.py
index 2cab0053..514de733 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):