diff --git a/sopel_modules/SpiceBot_AI/AI.py b/sopel_modules/SpiceBot_AI/AI.py index d1fe128..266e686 100644 --- a/sopel_modules/SpiceBot_AI/AI.py +++ b/sopel_modules/SpiceBot_AI/AI.py @@ -13,8 +13,7 @@ from sopel_modules.SpiceBot_Events.System import bot_events_check, botevents @sopel.module.nickname_commands('(.*)') def bot_command_nick(bot, trigger): - # command must not start with - if str(trigger.args[1])[0] == "?": + if trigger.args[1].lower().startswith(bot.nick.lower() + " ?"): return while not bot_events_check(bot, [botevents.BOT_LOADED, botevents.BOT_COMMANDSQUERY]): diff --git a/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py b/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py index a934b8d..196a9e1 100644 --- a/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py +++ b/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py @@ -12,9 +12,12 @@ from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, similar_list, lett import spicemanip -@sopel.module.nickname_commands('^\?(.*)') +@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