From 15d419c481f745855678999c2c058bb8d5eed8e8 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Fri, 10 May 2019 09:10:25 -0400 Subject: [PATCH] don't apply rules --- .../SpiceBot_CommandsQuery/QueryCommand.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py b/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py index bd3dd48..bf1f735 100644 --- a/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py +++ b/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py @@ -21,12 +21,13 @@ def query_detection(bot, trigger): commands_list = dict() for commandstype in bot.memory['SpiceBot_CommandsQuery']['commands'].keys(): - for com in bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype].keys(): - if com not in commands_list.keys(): - if commandstype == 'nickname': - commands_list[str(bot.nick) + " " + com] = bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype][com] - else: - commands_list[com] = bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype][com] + if commandstype != 'rule': + for com in bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype].keys(): + if com not in commands_list.keys(): + if commandstype == 'nickname': + commands_list[str(bot.nick) + " " + com] = bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype][com] + else: + commands_list[com] = bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype][com] triggerargsarray = spicemanip.main(trigger, 'create')