test
This commit is contained in:
parent
54d165ae4e
commit
f9ae21dd39
@ -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(trigger, commands[0])
|
trigger = validate_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, "|")
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import sopel
|
|||||||
from sopel_SpiceBot_Core_1 import sb
|
from sopel_SpiceBot_Core_1 import sb
|
||||||
|
|
||||||
|
|
||||||
def validate_trigger(trigger, trigger_dict):
|
def validate_trigger(bot, trigger, trigger_dict):
|
||||||
|
|
||||||
print(trigger.group(0))
|
print(trigger.group(0))
|
||||||
print(trigger.group(1))
|
print(trigger.group(1))
|
||||||
@ -17,7 +17,7 @@ def validate_trigger(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(sopel, pretrigger)
|
matches = sopel.rules.get_triggered_rules(bot, pretrigger)
|
||||||
print(matches)
|
print(matches)
|
||||||
|
|
||||||
return trigger
|
return trigger
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user