From 0eaecc1c7d636339db07826f53d2ecb7ada8ee36 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 5 May 2022 12:24:09 -0400 Subject: [PATCH] test --- sopel_SpiceBot_Core_1/SBCore/commands/__init__.py | 8 -------- sopel_SpiceBot_Core_Prerun/__init__.py | 8 +++----- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py b/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py index 3a254da..bbe9e76 100644 --- a/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py +++ b/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py @@ -168,14 +168,6 @@ class Commands(): command_aliases = function.action_commands return command_aliases - def get_new_trigger(self, test_rule, trigger_dict): - test_rule = plugins.rules.Command.from_callable(settings, tested_func) - parse_results = list(test_rule.parse(msg)) - match = parse_results[0] - pretrigger = self.get_pretrigger(trigger_dict) - trigger = Trigger(self.bot.config, pretrigger, match) - return trigger - def get_commands_nosplit(self, trigger): commands = [] first_full_trigger_str = trigger.args[1] diff --git a/sopel_SpiceBot_Core_Prerun/__init__.py b/sopel_SpiceBot_Core_Prerun/__init__.py index 691f528..2a9e84a 100644 --- a/sopel_SpiceBot_Core_Prerun/__init__.py +++ b/sopel_SpiceBot_Core_Prerun/__init__.py @@ -1,6 +1,6 @@ import functools +import re -from sopel import plugins from sopel.trigger import Trigger from sopel_SpiceBot_Core_1 import sb @@ -66,11 +66,9 @@ def prerun(): def rebuild_trigger(comrun, function): - # rule = plugins.rules.Command.from_callable(sb.config.config, function) - # parse_results = list(rule.parse(comrun.command)) - # match = parse_results[0] + fakematch = re.match('.*', comrun.command["trigger_str"]) pretrigger = sb.commands.get_pretrigger(comrun.command) - trigger = Trigger(comrun.bot.config, pretrigger, match="") + trigger = Trigger(comrun.bot.config, pretrigger, fakematch) return trigger