1
0
Fork 0
mirror of synced 2024-06-12 15:44:32 +12:00

Corrected how to get custom permission values

This commit is contained in:
Phxntxm 2016-09-23 16:28:33 -05:00
parent f611b37b11
commit 0febc3520f
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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):