From 4e00e303f87c4d700fb347aecb0a2d9447f13956 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 27 Jun 2019 12:18:19 -0400 Subject: [PATCH] test return --- sopel_modules/SpiceBot/Prerun.py | 5 ++--- sopel_modules/SpiceBot_Core_Commands/CommandsQuery.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sopel_modules/SpiceBot/Prerun.py b/sopel_modules/SpiceBot/Prerun.py index aefd5ed..625124d 100644 --- a/sopel_modules/SpiceBot/Prerun.py +++ b/sopel_modules/SpiceBot/Prerun.py @@ -95,9 +95,8 @@ def prerun_query(t_command_type='module', t_command_subtype=None): @functools.wraps(function) def internal_prerun(bot, trigger, *args, **kwargs): - if t_command_subtype: - if t_command_subtype != 'query': - return + if t_command_subtype != t_command_type: + return trigger_command_type = str(t_command_type) diff --git a/sopel_modules/SpiceBot_Core_Commands/CommandsQuery.py b/sopel_modules/SpiceBot_Core_Commands/CommandsQuery.py index a286d56..c335c64 100644 --- a/sopel_modules/SpiceBot_Core_Commands/CommandsQuery.py +++ b/sopel_modules/SpiceBot_Core_Commands/CommandsQuery.py @@ -19,7 +19,7 @@ def query_trigger(bot, trigger): @SpiceBot.events.check_ready([SpiceBot.events.BOT_COMMANDS]) -@SpiceBot.prerun_query('nickname', 'query') +@SpiceBot.prerun_query('nickname', 'nickname') @sopel.module.nickname_commands('(.*)') def query_detection_nick(bot, trigger): @@ -85,7 +85,7 @@ def query_detection_nick(bot, trigger): @SpiceBot.events.check_ready([SpiceBot.events.BOT_COMMANDS]) -@SpiceBot.prerun_query('module', 'query') +@SpiceBot.prerun_query('module', 'module') @sopel.module.rule('^\?(.*)') def query_detection(bot, trigger):