This commit is contained in:
deathbybandaid 2022-05-05 12:08:03 -04:00
parent a835829c40
commit 6031d823a2

View File

@ -52,7 +52,7 @@ def prerun():
return return
# At this point, we update the re.match for trigger # At this point, we update the re.match for trigger
# comrun.trigger = rebuild_trigger(comrun, function) comrun.trigger = rebuild_trigger(comrun, function)
# Run function # Run function
function(bot, trigger, comrun, *args, **kwargs) function(bot, trigger, comrun, *args, **kwargs)
@ -66,7 +66,7 @@ def prerun():
def rebuild_trigger(comrun, function): def rebuild_trigger(comrun, function):
rule = plugins.rules.Command.from_callable(sb.config.config, function) rule = plugins.rules.Command.from_callable(sb.config.config, function)
parse_results = list(rule.parse("")) parse_results = list(rule.parse(comrun.command))
match = parse_results[0] match = parse_results[0]
pretrigger = sb.commands.get_pretrigger(comrun.command) pretrigger = sb.commands.get_pretrigger(comrun.command)
trigger = Trigger(comrun.bot.config, pretrigger, match) trigger = Trigger(comrun.bot.config, pretrigger, match)