From f2dbfc958965e72da287e099e6b76742724cea29 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Mon, 13 May 2019 14:56:57 -0400 Subject: [PATCH] better alias finding --- sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py b/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py index 5e05f93..de0c833 100644 --- a/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py +++ b/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py @@ -25,6 +25,9 @@ def query_detection(bot, trigger): if com not in commands_list.keys(): if commandstype == 'nickname': commands_list[str(bot.nick) + " " + com] = bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype][com] + if "aliasfor" in commands_list[str(bot.nick) + " " + com].keys(): + aliasforcom = commands_list[str(bot.nick) + " " + com]["aliasfor"] + commands_list[str(bot.nick) + " " + com]["aliasfor"] = str(bot.nick) + " " + aliasforcom else: commands_list[com] = bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype][com]