From c6d6661204637ded4b57e1e76271c0ae65501a02 Mon Sep 17 00:00:00 2001 From: phxntxm Date: Wed, 8 Mar 2017 00:20:23 -0600 Subject: [PATCH] Added a possible exception to catch --- cogs/utils/checks.py | 2 +- cogs/utils/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/utils/checks.py b/cogs/utils/checks.py index 90339b8..85eaa86 100644 --- a/cogs/utils/checks.py +++ b/cogs/utils/checks.py @@ -84,7 +84,7 @@ def custom_perms(**perms): try: required_perm_value = server_settings['permissions'][ctx.command.qualified_name] required_perm = discord.Permissions(required_perm_value) - except (TypeError, IndexError, ValueError): + except (TypeError, IndexError, KeyError): pass # Now just check if the person running the command has these permissions diff --git a/cogs/utils/config.py b/cogs/utils/config.py index 1c08de5..14f345e 100644 --- a/cogs/utils/config.py +++ b/cogs/utils/config.py @@ -121,7 +121,7 @@ def command_prefix(bot, message): try: prefix = cache['server_settings'].values[message.guild.id]['prefix'] return prefix or default_prefix - except (KeyError, TypeError, IndexError, AttributeError, ValueError): + except (KeyError, TypeError, IndexError, AttributeError, KeyError): return default_prefix