diff --git a/sopel_SpiceBot_Core_Prerun/__init__.py b/sopel_SpiceBot_Core_Prerun/__init__.py index 29bfcf9..d763724 100644 --- a/sopel_SpiceBot_Core_Prerun/__init__.py +++ b/sopel_SpiceBot_Core_Prerun/__init__.py @@ -4,6 +4,9 @@ from sopel_SpiceBot_Core_1 import sb def dispatch(): + """ + This splits the given command by `&&` and re-dispatches it internally to the bot. + """ def actual_decorator(function): @@ -28,6 +31,7 @@ def dispatch(): def command_args(): + """This Detects --arguments to commands.""" def actual_decorator(function): @@ -43,6 +47,7 @@ def command_args(): def prerun(): + """This decorator is the hub of handling for all SpiceBot Commands""" def actual_decorator(function): @@ -52,8 +57,9 @@ def prerun(): def internal_prerun(bot, trigger, *args, **kwargs): bot.say("prerun") + comrun = "test comrun" - function(bot, trigger, *args, **kwargs) + function(bot, trigger, comrun, *args, **kwargs) return internal_prerun return actual_decorator diff --git a/sopel_SpiceBot_Runtime_Action_Commands/__init__.py b/sopel_SpiceBot_Runtime_Action_Commands/__init__.py index 5f848d7..ea957b1 100644 --- a/sopel_SpiceBot_Runtime_Action_Commands/__init__.py +++ b/sopel_SpiceBot_Runtime_Action_Commands/__init__.py @@ -9,5 +9,5 @@ from sopel_SpiceBot_Core_Prerun import prerun @prerun() @plugin.action_command('test') -def sb_test_commands(bot, trigger): +def sb_test_commands(bot, trigger, comrun): bot.say("%s" % trigger.raw) diff --git a/sopel_SpiceBot_Runtime_Commands/__init__.py b/sopel_SpiceBot_Runtime_Commands/__init__.py index f7c100f..773c918 100644 --- a/sopel_SpiceBot_Runtime_Commands/__init__.py +++ b/sopel_SpiceBot_Runtime_Commands/__init__.py @@ -9,13 +9,14 @@ from sopel_SpiceBot_Core_Prerun import prerun @prerun() @plugin.command('test', "testnew") -def commands_test(bot, trigger): +def commands_test(bot, trigger, comrun): bot.say("%s" % trigger.raw) + bot.say(comrun) @prerun() @plugin.command('testa') -def commands_test_a(bot, trigger): +def commands_test_a(bot, trigger, comrun): bot.say("test a") bot.say("%s" % trigger.hostmask) @@ -25,7 +26,7 @@ def commands_test_a(bot, trigger): @prerun() @plugin.command('testb') -def commands_test_b(bot, trigger): +def commands_test_b(bot, trigger, comrun): bot.say("test b") @@ -33,7 +34,7 @@ def commands_test_b(bot, trigger): @plugin.command('testc') -def commands_test_c(bot, trigger): +def commands_test_c(bot, trigger, comrun): bot.say("test c") bot.say("test c: %s" % trigger.raw) diff --git a/sopel_SpiceBot_Runtime_Nickname_Commands/__init__.py b/sopel_SpiceBot_Runtime_Nickname_Commands/__init__.py index 5854cf6..7a1a7c8 100644 --- a/sopel_SpiceBot_Runtime_Nickname_Commands/__init__.py +++ b/sopel_SpiceBot_Runtime_Nickname_Commands/__init__.py @@ -8,19 +8,19 @@ from sopel_SpiceBot_Core_Prerun import prerun @prerun() @plugin.nickname_command('test') -def sb_test_commands(bot, trigger): +def sb_test_commands(bot, trigger, comrun): bot.say("%s" % trigger.raw) @plugin.nickname_command('plugins') -def sb_test_command_groups(bot, trigger): +def sb_test_command_groups(bot, trigger, comrun): for bplugin in list(bot._plugins.keys()): sb.osd(str(bot._plugins[bplugin].get_meta_description()), trigger.sender) @prerun() @plugin.nickname_command('commands') -def sopel_commands(bot, trigger): +def sopel_commands(bot, trigger, comrun): bot.say("testing commands") @@ -29,7 +29,7 @@ def sopel_commands(bot, trigger): @prerun() @plugin.nickname_command('nickname_commands') -def sopel_nickname_commands(bot, trigger): +def sopel_nickname_commands(bot, trigger, comrun): bot.say("testing nickname_commands") sb.osd("%s" % sb.commands.sopel_nickname_commands, trigger.sender) @@ -37,7 +37,7 @@ def sopel_nickname_commands(bot, trigger): @prerun() @plugin.nickname_command('action_commands') -def sopel_action_commands(bot, trigger): +def sopel_action_commands(bot, trigger, comrun): bot.say("testing action_commands")