Fix some commands not being triggered

This commit is contained in:
Giuseppe Guerra 2017-08-11 23:17:33 +02:00
parent ce75f5ee99
commit e40acd335b

View File

@ -41,7 +41,7 @@ def fokabotResponse(fro, chan, message):
""" """
for i in fokabotCommands.commands: for i in fokabotCommands.commands:
# Loop though all commands # Loop though all commands
if message.strip().startswith("{} ".format(i["trigger"])): if re.compile("^{}( (.+)?)?$".format(i["trigger"])).match(message.strip()):
# message has triggered a command # message has triggered a command
# Make sure the user has right permissions # Make sure the user has right permissions