From a31485c18624a201a18c40cfbfd0842cecc40166 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Tue, 14 May 2019 22:09:49 -0400 Subject: [PATCH] adjusts for logic --- sopel_modules/SpiceBot_AI/AI.py | 6 +++--- sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sopel_modules/SpiceBot_AI/AI.py b/sopel_modules/SpiceBot_AI/AI.py index 266e686..7ae029b 100644 --- a/sopel_modules/SpiceBot_AI/AI.py +++ b/sopel_modules/SpiceBot_AI/AI.py @@ -13,9 +13,6 @@ from sopel_modules.SpiceBot_Events.System import bot_events_check, botevents @sopel.module.nickname_commands('(.*)') def bot_command_nick(bot, trigger): - if trigger.args[1].lower().startswith(bot.nick.lower() + " ?"): - return - while not bot_events_check(bot, [botevents.BOT_LOADED, botevents.BOT_COMMANDSQUERY]): pass @@ -24,6 +21,9 @@ def bot_command_nick(bot, trigger): if not triggercommand: return + if triggercommand[0] == "?": + return + if triggercommand in bot.memory['SpiceBot_CommandsQuery']['commands']["nickname"].keys(): return triggerargs.insert(0, triggercommand) diff --git a/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py b/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py index d567352..f590d24 100644 --- a/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py +++ b/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py @@ -15,9 +15,6 @@ import spicemanip @sopel.module.nickname_commands('(.*)') def query_detection_nick(bot, trigger): - if not trigger.args[0].lower().startswith(bot.nick.lower() + " ?"): - return - while not bot_events_check(bot, botevents.BOT_COMMANDSQUERY): pass @@ -28,6 +25,9 @@ def query_detection_nick(bot, trigger): if not triggercommand or not len(triggercommand): return + if not triggercommand[0] == "?": + return + if not letters_in_string(triggercommand): return