Fix a variable 'roles' referenced before assignment error when relying on default fallback.
This commit is contained in:
parent
24182b11ca
commit
9b3a442699
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,7 @@ class Lockdown(Cog):
|
||||||
channel = ctx.channel
|
channel = ctx.channel
|
||||||
log_channel = self.bot.get_channel(config.modlog_channel)
|
log_channel = self.bot.get_channel(config.modlog_channel)
|
||||||
|
|
||||||
|
roles = None
|
||||||
for key, lockdown_conf in config.lockdown_configs.items():
|
for key, lockdown_conf in config.lockdown_configs.items():
|
||||||
if channel.id in lockdown_conf["channels"]:
|
if channel.id in lockdown_conf["channels"]:
|
||||||
roles = lockdown_conf["roles"]
|
roles = lockdown_conf["roles"]
|
||||||
|
@ -76,6 +77,7 @@ class Lockdown(Cog):
|
||||||
channel = ctx.channel
|
channel = ctx.channel
|
||||||
log_channel = self.bot.get_channel(config.modlog_channel)
|
log_channel = self.bot.get_channel(config.modlog_channel)
|
||||||
|
|
||||||
|
roles = None
|
||||||
for key, lockdown_conf in config.lockdown_configs.items():
|
for key, lockdown_conf in config.lockdown_configs.items():
|
||||||
if channel.id in lockdown_conf["channels"]:
|
if channel.id in lockdown_conf["channels"]:
|
||||||
roles = lockdown_conf["roles"]
|
roles = lockdown_conf["roles"]
|
||||||
|
|
Loading…
Reference in a new issue