From b401b6a73ab4a7aacd709dacd31373bfbf930980 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Sat, 12 Feb 2022 14:05:21 -0500 Subject: [PATCH] test --- sopel_SpiceBot_Core_1/SBCore/commands/__init__.py | 2 +- sopel_SpiceBot_Core_Prerun/__init__.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py b/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py index ffa349b..a0212dd 100644 --- a/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py +++ b/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py @@ -47,5 +47,5 @@ class Commands(): bot.nick, ":%s %s %s : %s %s" % (trigger.hostmask, "PRIVMSG", trigger.sender, "/me", trigger_dict["trigger_str"]) ) - pretrigger.intet = "ACTION" + pretrigger.tags["intent"] = "ACTION" bot.dispatch(pretrigger) diff --git a/sopel_SpiceBot_Core_Prerun/__init__.py b/sopel_SpiceBot_Core_Prerun/__init__.py index 2080c18..26afff2 100644 --- a/sopel_SpiceBot_Core_Prerun/__init__.py +++ b/sopel_SpiceBot_Core_Prerun/__init__.py @@ -23,9 +23,15 @@ def get_commands(bot, trigger): first_trigger_type = "nickname_command" first_trigger_prefix = str(first_trigger.split(" ")[0]) first_trigger = str(first_trigger.split(" ")[1:]) + elif "intent" in trigger.tags: + if trigger.tags["intent"] == "ACTION": + first_trigger_type = "action_command" + first_trigger_prefix = "ACTION" else: - first_trigger_type = "action_command" - first_trigger_prefix = "ACTION" + bot.say("what kind of rule command is this") + first_trigger_type = "rule" + first_trigger_prefix = None + first_trigger = first_trigger commands.append({ "trigger_type": first_trigger_type,