This commit is contained in:
deathbybandaid 2022-02-23 13:55:18 -05:00
parent 9c5b49d737
commit 57bcdbf639
2 changed files with 4 additions and 5 deletions

View File

@ -105,9 +105,7 @@ class Commands():
def get_command_from_trigger(self, trigger): def get_command_from_trigger(self, trigger):
commstring = trigger.args[1] commstring = trigger.args[1]
print(commstring)
if commstring.startswith(tuple(self.config.prefix_list)): if commstring.startswith(tuple(self.config.prefix_list)):
print(commstring[:1])
command = commstring[1:].split(" ")[0] command = commstring[1:].split(" ")[0]
elif commstring.startswith(self.bot.nick): elif commstring.startswith(self.bot.nick):
command = " ".join(commstring.split(" ")[1:]).split(" ")[0] command = " ".join(commstring.split(" ")[1:]).split(" ")[0]
@ -115,7 +113,6 @@ class Commands():
command = commstring.split(" ")[0] command = commstring.split(" ")[0]
else: else:
command = "" command = ""
print(command)
return command return command
def get_commands_split(self, trigger, splitkey): def get_commands_split(self, trigger, splitkey):

View File

@ -31,9 +31,11 @@ def prerun(rulematch=False):
for trigger_dict in commands: for trigger_dict in commands:
sb.commands.dispatch(trigger_dict) sb.commands.dispatch(trigger_dict)
return return
elif sb.commands.get_command_from_trigger(trigger) != commands[0]["trigger_command"]:
trigger_command = sb.commands.get_command_from_trigger(trigger)
if trigger_command != commands[0]["trigger_command"]:
print("compare time") print("compare time")
print(trigger.args[1].split("&&")[0]) print(trigger_command)
print(commands[0]["trigger_command"]) print(commands[0]["trigger_command"])
# This is where we rebuild trigger # This is where we rebuild trigger