Compare commits

..

No commits in common. "57bcdbf639ed912a336d6a1ce91edd195d907f6b" and "c6fd6d70be96409ebe65939bff5b8cb1d867c385" have entirely different histories.

2 changed files with 5 additions and 5 deletions

View File

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

View File

@ -31,11 +31,8 @@ def prerun(rulematch=False):
for trigger_dict in commands:
sb.commands.dispatch(trigger_dict)
return
trigger_command = sb.commands.get_command_from_trigger(trigger)
if trigger_command != commands[0]["trigger_command"]:
print("compare time")
print(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"])
# This is where we rebuild trigger