test
This commit is contained in:
parent
bd7649aaba
commit
56abecef95
@ -103,6 +103,18 @@ class Commands():
|
||||
)
|
||||
return pretrigger
|
||||
|
||||
def get_command_from_trigger(self, trigger):
|
||||
commstring = trigger.args[1]
|
||||
if commstring.startswith(tuple(self.config.prefix_list)):
|
||||
command = commstring[1:].split(" ")[0]
|
||||
elif commstring.startswith(self.bot.nick):
|
||||
command = " ".join(commstring.split(" ")[1:]).split(" ")[0]
|
||||
elif "intent" in trigger.tags and trigger.tags["intent"] == "ACTION":
|
||||
command = commstring.split(" ")[0]
|
||||
else:
|
||||
command = ""
|
||||
return command
|
||||
|
||||
def get_commands_split(self, trigger, splitkey):
|
||||
commands = []
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ def prerun(rulematch=False):
|
||||
for trigger_dict in commands:
|
||||
sb.commands.dispatch(trigger_dict)
|
||||
return
|
||||
elif trigger.args[1][1:].split("&&")[0] != commands[0]["trigger_command"]:
|
||||
elif sb.commands.get_command_from_trigger(trigger) != commands[0]["trigger_command"]:
|
||||
print(trigger.args[1].split("&&")[0])
|
||||
print(commands[0]["trigger_command"])
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user