diff --git a/sopel_SpiceBot_Core_Prerun/__init__.py b/sopel_SpiceBot_Core_Prerun/__init__.py index 6f6e6b1..8f71c85 100644 --- a/sopel_SpiceBot_Core_Prerun/__init__.py +++ b/sopel_SpiceBot_Core_Prerun/__init__.py @@ -8,7 +8,7 @@ from spicemanip import spicemanip def get_commands(bot, trigger): commands = [] - bot.say(str(sb.config.prefix_list)) + # bot.say(str(sb.config.prefix_list)) # bot.nick # Get && split for multiple commands @@ -20,8 +20,15 @@ def get_commands(bot, trigger): first_trigger = triggers[0] del triggers[0] - bot.say(str(first_trigger)) - bot.say(str(triggers)) + first_trigger_type = None + if first_trigger.startswith(tuple(sb.config.prefix_list)): + bot.say(str(sb.config.prefix_list)) + + commands.append({ + "trigger_str": first_trigger + }) + + bot.say(str(commands)) return @@ -33,17 +40,8 @@ def prerun_command(): @functools.wraps(function) def internal_prerun(bot, trigger, *args, **kwargs): - trigger_command_type = str("command") - get_commands(bot, trigger) - # Primary command used for trigger, and a list of all words - trigger_args, trigger_command, trigger_prefix = make_trigger_args(trigger.args[1], trigger_command_type) - - bot.say(str(trigger_args)) - bot.say(str(trigger_command)) - bot.say(str(trigger_prefix)) - function(bot, trigger, *args, **kwargs) return internal_prerun