From 1695bef55bc49d58d7eef0e5c5cdf4d8920ff816 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Sun, 5 May 2019 22:33:22 -0400 Subject: [PATCH] update commandsquery --- sopel_modules/SpiceBot_CommandsQuery/CommandsQuery.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sopel_modules/SpiceBot_CommandsQuery/CommandsQuery.py b/sopel_modules/SpiceBot_CommandsQuery/CommandsQuery.py index b52098a..a956ff0 100644 --- a/sopel_modules/SpiceBot_CommandsQuery/CommandsQuery.py +++ b/sopel_modules/SpiceBot_CommandsQuery/CommandsQuery.py @@ -170,11 +170,10 @@ def commandsquery_register(bot, command_type, validcoms, aliasfor=None): if not isinstance(validcoms, list): validcoms = [validcoms] - if command_type not in bot.memory['SpiceBot_CommandsQuery'].keys(): - if command_type not in bot.memory['SpiceBot_CommandsQuery']['counts'].keys(): - bot.memory['SpiceBot_CommandsQuery']['counts'][command_type] = 0 - if command_type not in bot.memory['SpiceBot_CommandsQuery']['commands'].keys(): - bot.memory['SpiceBot_CommandsQuery']['commands'][command_type] = dict() + if command_type not in bot.memory['SpiceBot_CommandsQuery']['counts'].keys(): + bot.memory['SpiceBot_CommandsQuery']['counts'][command_type] = 0 + if command_type not in bot.memory['SpiceBot_CommandsQuery']['commands'].keys(): + bot.memory['SpiceBot_CommandsQuery']['commands'][command_type] = dict() bot.memory['SpiceBot_CommandsQuery']['counts'][command_type] += 1 dict_from_file = dict()