mirror of
https://github.com/Ryujinx/ryuko-ng.git
synced 2024-12-23 01:25:29 +00:00
Merge pull request #77 from noirscape/roles-accessed-too-early
Fix a variable 'roles' referenced before assignment error when relying on default fallback.
This commit is contained in:
commit
586c6239b2
|
@ -37,6 +37,7 @@ class Lockdown(Cog):
|
|||
channel = ctx.channel
|
||||
log_channel = self.bot.get_channel(config.modlog_channel)
|
||||
|
||||
roles = None
|
||||
for key, lockdown_conf in config.lockdown_configs.items():
|
||||
if channel.id in lockdown_conf["channels"]:
|
||||
roles = lockdown_conf["roles"]
|
||||
|
@ -76,6 +77,7 @@ class Lockdown(Cog):
|
|||
channel = ctx.channel
|
||||
log_channel = self.bot.get_channel(config.modlog_channel)
|
||||
|
||||
roles = None
|
||||
for key, lockdown_conf in config.lockdown_configs.items():
|
||||
if channel.id in lockdown_conf["channels"]:
|
||||
roles = lockdown_conf["roles"]
|
||||
|
|
Loading…
Reference in a new issue