1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Looked at the right key...

This commit is contained in:
phxntxm 2017-03-08 02:40:55 -06:00
parent 1800c9ab5c
commit 286af4e356

View file

@ -120,7 +120,7 @@ def command_prefix(bot, message):
# But it is not worth a query for every single message the bot detects, to fix
try:
prefixes = cache['server_settings'].values
prefix = [x for x in prefixes if x['prefix'] == str(message.guild.id)][0]['prefix']
prefix = [x for x in prefixes if x['server_id'] == str(message.guild.id)][0]['prefix']
return prefix or default_prefix
except (KeyError, TypeError, IndexError, AttributeError, KeyError):
return default_prefix