fix query command

This commit is contained in:
deathbybandaid 2019-05-14 21:45:50 -04:00
parent 09b174843e
commit b283fa4912
2 changed files with 5 additions and 3 deletions

View File

@ -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]):

View File

@ -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