test
This commit is contained in:
parent
a075f17a85
commit
0eaecc1c7d
@ -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]
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user