From e40acd335b8ea7e45806df7f8dc44588862afda0 Mon Sep 17 00:00:00 2001 From: Giuseppe Guerra Date: Fri, 11 Aug 2017 23:17:33 +0200 Subject: [PATCH] Fix some commands not being triggered --- objects/fokabot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objects/fokabot.py b/objects/fokabot.py index 7b7dbc5..d45a43c 100644 --- a/objects/fokabot.py +++ b/objects/fokabot.py @@ -41,7 +41,7 @@ def fokabotResponse(fro, chan, message): """ for i in fokabotCommands.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 # Make sure the user has right permissions