Corrected how to get custom permission values
This commit is contained in:
parent
f611b37b11
commit
0febc3520f
|
@ -146,7 +146,7 @@ class Links:
|
|||
rand_image = data[random.SystemRandom().randint(0, len(data) - 1)]['file_url']
|
||||
await self.bot.say(rand_image)
|
||||
except (ValueError, KeyError):
|
||||
await self.bot.say("No results with that image {}".format(ctx.message.author.mention))
|
||||
await self.bot.say("No results with that tag {}".format(ctx.message.author.mention))
|
||||
return
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ def custom_perms(**perms):
|
|||
setattr(default_perms, perm, setting)
|
||||
|
||||
try:
|
||||
perm_values = config.cache.get('custom_permissions')
|
||||
perm_values = config.cache.get('custom_permissions').values
|
||||
required_perm_value = perm_values[ctx.message.server.id][ctx.command.qualified_name]
|
||||
required_perm = discord.Permissions(required_perm_value)
|
||||
except (KeyError, TypeError):
|
||||
|
|
Loading…
Reference in a new issue