update commandsquery

This commit is contained in:
deathbybandaid 2019-05-05 22:33:22 -04:00
parent b0d4f7005b
commit 1695bef55b

View File

@ -170,11 +170,10 @@ def commandsquery_register(bot, command_type, validcoms, aliasfor=None):
if not isinstance(validcoms, list): if not isinstance(validcoms, list):
validcoms = [validcoms] validcoms = [validcoms]
if command_type not in bot.memory['SpiceBot_CommandsQuery'].keys(): if command_type not in bot.memory['SpiceBot_CommandsQuery']['counts'].keys():
if command_type not in bot.memory['SpiceBot_CommandsQuery']['counts'].keys(): bot.memory['SpiceBot_CommandsQuery']['counts'][command_type] = 0
bot.memory['SpiceBot_CommandsQuery']['counts'][command_type] = 0 if command_type not in bot.memory['SpiceBot_CommandsQuery']['commands'].keys():
if command_type not in bot.memory['SpiceBot_CommandsQuery']['commands'].keys(): bot.memory['SpiceBot_CommandsQuery']['commands'][command_type] = dict()
bot.memory['SpiceBot_CommandsQuery']['commands'][command_type] = dict()
bot.memory['SpiceBot_CommandsQuery']['counts'][command_type] += 1 bot.memory['SpiceBot_CommandsQuery']['counts'][command_type] += 1
dict_from_file = dict() dict_from_file = dict()