This commit is contained in:
deathbybandaid 2022-02-23 15:02:36 -05:00
parent bdfc554312
commit 34ccf2eac0
2 changed files with 0 additions and 25 deletions

View File

@ -1,23 +0,0 @@
from sopel_SpiceBot_Core_1 import sb
def clean_trigger(bot, trigger, trigger_dict):
redispatch = False
print(trigger.group(0))
print(trigger.group(1))
print(trigger.args)
if trigger_dict["trigger_type"] == "command":
pretrigger = sb.commands.generate_pretrigger_command(trigger_dict)
elif trigger_dict["trigger_type"] == "nickname_command":
pretrigger = sb.commands.generate_pretrigger_nickname_command(trigger_dict)
elif trigger_dict["trigger_type"] == "action_command":
pretrigger = sb.commands.generate_pretrigger_action_command(trigger_dict)
matches = bot.rules.get_triggered_rules(bot, pretrigger)
print(matches)
return trigger, redispatch

View File

@ -1,12 +1,10 @@
def rebuild_pipes(commands): def rebuild_pipes(commands):
print(commands)
repipe_trigger_dict = commands[0] repipe_trigger_dict = commands[0]
for trigger_dict in commands[1:]: for trigger_dict in commands[1:]:
print(trigger_dict)
if trigger_dict["trigger_type"] == "command": if trigger_dict["trigger_type"] == "command":
repipe_trigger_dict["trigger_str"] += " | %s%s %s" % (trigger_dict["trigger_prefix"], trigger_dict["trigger_command"], trigger_dict["trigger_str"]) repipe_trigger_dict["trigger_str"] += " | %s%s %s" % (trigger_dict["trigger_prefix"], trigger_dict["trigger_command"], trigger_dict["trigger_str"])
elif trigger_dict["trigger_type"] == "nickname_command": elif trigger_dict["trigger_type"] == "nickname_command":