test
This commit is contained in:
parent
182818be40
commit
2d250c80ba
@ -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)
|
||||||
@ -64,9 +64,9 @@ def prerun():
|
|||||||
return actual_decorator
|
return actual_decorator
|
||||||
|
|
||||||
|
|
||||||
def rebuild_trigger(comrun, tested_func):
|
def rebuild_trigger(comrun, function):
|
||||||
test_rule = plugins.rules.Command.from_callable(sb.settings, tested_func)
|
rule = plugins.rules.Command.from_callable(sb.settings, function)
|
||||||
parse_results = list(test_rule.parse(""))
|
parse_results = list(rule.parse(""))
|
||||||
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)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user