This commit is contained in:
deathbybandaid 2022-02-22 12:49:33 -05:00
parent 4dd78b6755
commit 0945181dbe
3 changed files with 8 additions and 5 deletions

View File

@ -5,6 +5,7 @@ class ComRun():
def __init__(self): def __init__(self):
self.continuerun = True self.continuerun = True
self.say = ""
def comrun_create(): def comrun_create():

View File

@ -16,10 +16,12 @@ def dispatch_multi():
# Get list of trigger command(s) # Get list of trigger command(s)
commands = sb.commands.get_commands_split(trigger, "&&") commands = sb.commands.get_commands_split(trigger, "&&")
if len(commands) == 1: comrun.trigger_dict = commands[0]
function(bot, trigger, comrun, *args, **kwargs) del commands[0]
comrun.trigger_dict = commands[0]
else: function(bot, trigger, comrun, *args, **kwargs)
if len(commands):
for trigger_dict in commands: for trigger_dict in commands:
sb.commands.dispatch(trigger_dict) sb.commands.dispatch(trigger_dict)
comrun.continuerun = False comrun.continuerun = False

View File

@ -25,7 +25,7 @@ def pipe_split():
function(bot, trigger, comrun, *args, **kwargs) function(bot, trigger, comrun, *args, **kwargs)
if len(pipes) > 1: if len(pipes):
repipe_trigger_dict = reassemble_pipes(pipes, comrun.say) repipe_trigger_dict = reassemble_pipes(pipes, comrun.say)
sb.commands.dispatch(repipe_trigger_dict) sb.commands.dispatch(repipe_trigger_dict)
return return