test
This commit is contained in:
parent
dda78aa2b6
commit
4f652091b3
@ -3,7 +3,7 @@ import functools
|
|||||||
from sopel_SpiceBot_Core_1 import sb
|
from sopel_SpiceBot_Core_1 import sb
|
||||||
|
|
||||||
from .comrun import ComRun
|
from .comrun import ComRun
|
||||||
from .validate_trigger import validate_trigger
|
from .clean_trigger import clean_trigger
|
||||||
# from .validate_command import validate_command
|
# from .validate_command import validate_command
|
||||||
# from .dispatch_multi import dispatch_multi
|
# from .dispatch_multi import dispatch_multi
|
||||||
# from .pipe_split import pipe_split
|
# from .pipe_split import pipe_split
|
||||||
@ -34,7 +34,7 @@ def prerun(rulematch=False):
|
|||||||
|
|
||||||
# This is where we rebuild trigger
|
# This is where we rebuild trigger
|
||||||
# we validate a few things here
|
# we validate a few things here
|
||||||
trigger = validate_trigger(bot, trigger, commands[0])
|
trigger = clean_trigger(bot, trigger, commands[0])
|
||||||
|
|
||||||
# Get list of trigger command(s) by | split
|
# Get list of trigger command(s) by | split
|
||||||
commands = sb.commands.get_commands_split(trigger, "|")
|
commands = sb.commands.get_commands_split(trigger, "|")
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
import sopel
|
|
||||||
|
|
||||||
from sopel_SpiceBot_Core_1 import sb
|
from sopel_SpiceBot_Core_1 import sb
|
||||||
|
|
||||||
|
|
||||||
def validate_trigger(bot, trigger, trigger_dict):
|
def clean_trigger(bot, trigger, trigger_dict):
|
||||||
|
redispatch = False
|
||||||
|
|
||||||
print(trigger.group(0))
|
print(trigger.group(0))
|
||||||
print(trigger.group(1))
|
print(trigger.group(1))
|
||||||
@ -17,7 +17,7 @@ def validate_trigger(bot, trigger, trigger_dict):
|
|||||||
elif trigger_dict["trigger_type"] == "action_command":
|
elif trigger_dict["trigger_type"] == "action_command":
|
||||||
pretrigger = sb.commands.generate_pretrigger_action_command(trigger_dict)
|
pretrigger = sb.commands.generate_pretrigger_action_command(trigger_dict)
|
||||||
|
|
||||||
matches = sopel.rules.get_triggered_rules(bot, pretrigger)
|
matches = bot.rules.get_triggered_rules(bot, pretrigger)
|
||||||
print(matches)
|
print(matches)
|
||||||
|
|
||||||
return trigger
|
return trigger, redispatch
|
||||||
Loading…
Reference in New Issue
Block a user