1
0
Fork 0
mirror of synced 2024-06-28 19:20:34 +12:00

Corrected the command_prefix method

This commit is contained in:
phxntxm 2016-08-31 17:53:33 -05:00
parent 644436f9a1
commit c7e8c5c71c

View file

@ -104,8 +104,11 @@ def command_prefix(bot, message):
# So assume it's in cache, or it doesn't exist
# If the prefix does exist in the database and isn't in our cache; too bad, something has messed up
# But it is not worth a query for every single message the bot detects, to fix
prefix = cache['prefixes'].values.get(message.server.id)
return prefix or default_prefix
try:
prefix = cache['prefixes'].values.get(message.server.id)
return prefix or default_prefix
except KeyError:
return default_prefix
async def save_content(table: str, content):