From a56f9b3ab972adf9a11bcecfc92102ec23fbc4ba Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 23 May 2019 09:20:09 -0400 Subject: [PATCH] another test --- sopel_modules/SpiceBot/Prerun.py | 4 ++-- sopel_modules/SpiceBot/Tools.py | 2 +- sopel_modules/SpiceBot_AI/AI.py | 2 +- sopel_modules/SpiceBot_BotPrivs/BotPrivs.py | 2 +- sopel_modules/SpiceBot_Channels_Command/Channels_Command.py | 2 +- sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py | 2 +- sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py | 2 +- sopel_modules/SpiceBot_GifSearch/Gif_API_Commands.py | 2 +- sopel_modules/SpiceBot_GifSearch/Gif_Command.py | 2 +- sopel_modules/SpiceBot_GifSearch/Gif_Search_Commands | 2 +- sopel_modules/SpiceBot_Logs/Logs_Command.py | 2 +- sopel_modules/SpiceBot_Messaging/Messaging.py | 2 +- sopel_modules/SpiceBot_Update/Update.py | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sopel_modules/SpiceBot/Prerun.py b/sopel_modules/SpiceBot/Prerun.py index 311a899..bbb6f3f 100644 --- a/sopel_modules/SpiceBot/Prerun.py +++ b/sopel_modules/SpiceBot/Prerun.py @@ -16,7 +16,7 @@ class BotPrerun(): def actual_decorator(function): @functools.wraps(function) def argsbuilder(bot, trigger, *args, **kwargs): - trigger.argcommand, trigger.arglist = self.sopel_triggerargs(bot, trigger, command_type) + trigger.argcommand, trigger.arglist, trigger.command_type = self.sopel_triggerargs(bot, trigger, command_type) return function(bot, trigger, *args, **kwargs) return argsbuilder return actual_decorator @@ -29,7 +29,7 @@ class BotPrerun(): else: command = spicemanip.main(triggerargs, 1).lower()[1:] triggerargs = spicemanip.main(triggerargs, '2+', 'list') - return triggerargs, command + return triggerargs, command, command_type prerun = BotPrerun() diff --git a/sopel_modules/SpiceBot/Tools.py b/sopel_modules/SpiceBot/Tools.py index c25823b..5286667 100644 --- a/sopel_modules/SpiceBot/Tools.py +++ b/sopel_modules/SpiceBot/Tools.py @@ -52,7 +52,7 @@ def sopel_triggerargs(bot, trigger, command_type='module_command'): command = spicemanip.main(triggerargs, 1).lower()[1:] triggerargs = spicemanip.main(triggerargs, '2+', 'list') - return triggerargs, command + return triggerargs, command, command_type def bot_privs(bot, privtype): diff --git a/sopel_modules/SpiceBot_AI/AI.py b/sopel_modules/SpiceBot_AI/AI.py index 3d2a6ae..7c1b616 100644 --- a/sopel_modules/SpiceBot_AI/AI.py +++ b/sopel_modules/SpiceBot_AI/AI.py @@ -13,7 +13,7 @@ import sopel_modules.SpiceBot as SpiceBot @sopel.module.nickname_commands('(.*)') def bot_command_nick(bot, trigger): - triggerargs, triggercommand = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') + triggerargs, triggercommand, command_type = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') if not triggercommand: return diff --git a/sopel_modules/SpiceBot_BotPrivs/BotPrivs.py b/sopel_modules/SpiceBot_BotPrivs/BotPrivs.py index 95cf09f..c29a5ba 100644 --- a/sopel_modules/SpiceBot_BotPrivs/BotPrivs.py +++ b/sopel_modules/SpiceBot_BotPrivs/BotPrivs.py @@ -20,7 +20,7 @@ def bot_command_admins(bot, trigger): def bot_command_process(bot, trigger): - triggerargs, triggercommand = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') + triggerargs, triggercommand, command_type = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') if triggercommand == 'owner': triggercommand = 'owners' diff --git a/sopel_modules/SpiceBot_Channels_Command/Channels_Command.py b/sopel_modules/SpiceBot_Channels_Command/Channels_Command.py index eafdda9..e4266b2 100644 --- a/sopel_modules/SpiceBot_Channels_Command/Channels_Command.py +++ b/sopel_modules/SpiceBot_Channels_Command/Channels_Command.py @@ -13,7 +13,7 @@ import sopel_modules.SpiceBot as SpiceBot @sopel.module.nickname_commands('channels', 'channel') def nickname_comand_channels(bot, trigger): - triggerargs, triggercommand = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') + triggerargs, triggercommand, command_type = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') if not len(triggerargs): commandused = 'list' diff --git a/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py b/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py index 6e3df6c..5318bcd 100644 --- a/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py +++ b/sopel_modules/SpiceBot_CommandsQuery/NickQueryCommand.py @@ -14,7 +14,7 @@ import spicemanip @sopel.module.nickname_commands('(.*)') def query_detection_nick(bot, trigger): - triggerargs, triggercommand = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') + triggerargs, triggercommand, command_type = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') # command issued, check if valid if not triggercommand or not len(triggercommand): diff --git a/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py b/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py index d4629d3..08a46aa 100644 --- a/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py +++ b/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py @@ -14,7 +14,7 @@ import spicemanip @sopel.module.rule('^\?(.*)') def query_detection(bot, trigger): - triggerargs, triggercommand = SpiceBot.sopel_triggerargs(bot, trigger, 'query_command') + triggerargs, triggercommand, command_type = SpiceBot.sopel_triggerargs(bot, trigger, 'query_command') # command issued, check if valid if not triggercommand or not len(triggercommand): diff --git a/sopel_modules/SpiceBot_GifSearch/Gif_API_Commands.py b/sopel_modules/SpiceBot_GifSearch/Gif_API_Commands.py index dc119cd..ae8f3d1 100644 --- a/sopel_modules/SpiceBot_GifSearch/Gif_API_Commands.py +++ b/sopel_modules/SpiceBot_GifSearch/Gif_API_Commands.py @@ -15,7 +15,7 @@ import sopel_modules.SpiceBot as SpiceBot @sopel.module.commands('(.*)') def gifapi_triggers(bot, trigger): - triggerargs, triggercommand = SpiceBot.sopel_triggerargs(bot, trigger, 'prefix_command') + triggerargs, triggercommand, command_type = SpiceBot.sopel_triggerargs(bot, trigger, 'prefix_command') if triggercommand not in bot.memory["SpiceBot_GifSearch"]['valid_gif_api_dict'].keys(): return diff --git a/sopel_modules/SpiceBot_GifSearch/Gif_Command.py b/sopel_modules/SpiceBot_GifSearch/Gif_Command.py index 518f95d..10d6c3e 100644 --- a/sopel_modules/SpiceBot_GifSearch/Gif_Command.py +++ b/sopel_modules/SpiceBot_GifSearch/Gif_Command.py @@ -15,7 +15,7 @@ import spicemanip @module.commands('gif') def gif_trigger(bot, trigger): - triggerargs, triggercommand = SpiceBot.sopel_triggerargs(bot, trigger) + triggerargs, triggercommand, command_type = SpiceBot.sopel_triggerargs(bot, trigger) if not len(triggerargs): return bot.osd("Please present a query to search.") diff --git a/sopel_modules/SpiceBot_GifSearch/Gif_Search_Commands b/sopel_modules/SpiceBot_GifSearch/Gif_Search_Commands index dc119cd..ae8f3d1 100644 --- a/sopel_modules/SpiceBot_GifSearch/Gif_Search_Commands +++ b/sopel_modules/SpiceBot_GifSearch/Gif_Search_Commands @@ -15,7 +15,7 @@ import sopel_modules.SpiceBot as SpiceBot @sopel.module.commands('(.*)') def gifapi_triggers(bot, trigger): - triggerargs, triggercommand = SpiceBot.sopel_triggerargs(bot, trigger, 'prefix_command') + triggerargs, triggercommand, command_type = SpiceBot.sopel_triggerargs(bot, trigger, 'prefix_command') if triggercommand not in bot.memory["SpiceBot_GifSearch"]['valid_gif_api_dict'].keys(): return diff --git a/sopel_modules/SpiceBot_Logs/Logs_Command.py b/sopel_modules/SpiceBot_Logs/Logs_Command.py index 46f3322..fd2afc2 100644 --- a/sopel_modules/SpiceBot_Logs/Logs_Command.py +++ b/sopel_modules/SpiceBot_Logs/Logs_Command.py @@ -16,7 +16,7 @@ def bot_command_logs(bot, trigger): bot.say("I was unable to process this Bot Nick command due to privilege issues.") return - triggerargs, triggercommand = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') + triggerargs, triggercommand, command_type = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') logtype = spicemanip.main(triggerargs, 1) or None if not logtype: diff --git a/sopel_modules/SpiceBot_Messaging/Messaging.py b/sopel_modules/SpiceBot_Messaging/Messaging.py index 66e81f5..0001948 100644 --- a/sopel_modules/SpiceBot_Messaging/Messaging.py +++ b/sopel_modules/SpiceBot_Messaging/Messaging.py @@ -30,7 +30,7 @@ def bot_command_process(bot, trigger): bot.say("I was unable to process this Bot Nick command due to privilege issues.") return - triggerargs, triggercommand = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') + triggerargs, triggercommand, command_type = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') if triggercommand in ['say', 'msg']: triggercommand = 'privmsg' diff --git a/sopel_modules/SpiceBot_Update/Update.py b/sopel_modules/SpiceBot_Update/Update.py index d0a4efc..511602d 100644 --- a/sopel_modules/SpiceBot_Update/Update.py +++ b/sopel_modules/SpiceBot_Update/Update.py @@ -34,7 +34,7 @@ def nickname_comand_update(bot, trigger): bot.say("I was unable to process this Bot Nick command due to privilege issues.") return - triggerargs, triggercommand = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') + triggerargs, triggercommand, command_type = SpiceBot.sopel_triggerargs(bot, trigger, 'nickname_command') if not len(triggerargs): commandused = 'nodeps'