From 538466d122494483146dce2f3ce96578c7f1fd51 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 5 Jun 2019 12:30:05 -0400 Subject: [PATCH] silver text for AI matches --- sopel_modules/SpiceBot/AI.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sopel_modules/SpiceBot/AI.py b/sopel_modules/SpiceBot/AI.py index f935772..2e9b49f 100644 --- a/sopel_modules/SpiceBot/AI.py +++ b/sopel_modules/SpiceBot/AI.py @@ -112,7 +112,8 @@ class SpiceBot_AI(): message = self.bot_message_precipher(bot, trigger, message) aiml_response = self.aiml_kernel.respond(message, nick_id) - aiml_response = self.bot_message_decipher(bot, trigger, aiml_response) + if aiml_response: + aiml_response = self.bot_message_decipher(bot, trigger, aiml_response) self.save_nick_session(nick, nick_id) self.save_brain() @@ -185,6 +186,8 @@ class SpiceBot_AI(): for pronounitem in pronounsdict[triggergendertype].keys(): aiml_response = aiml_response.replace("TRIGGERPRONOUN" + pronounitem, pronounsdict[triggergendertype][pronounitem]) + aiml_response = "\x0315" + aiml_response + "\x03" + return aiml_response def getPredicate(self, predicate, nick, nick_id=None):