From 8457d358d1abaeacde05619995e38b3f7b298b79 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Tue, 4 Jun 2019 09:04:40 -0400 Subject: [PATCH] test --- sopel_modules/SpiceBot/AI.py | 3 +++ .../aiml/nickname_acknowledge.aiml | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/sopel_modules/SpiceBot/AI.py b/sopel_modules/SpiceBot/AI.py index 3165188..ebe7642 100644 --- a/sopel_modules/SpiceBot/AI.py +++ b/sopel_modules/SpiceBot/AI.py @@ -89,6 +89,9 @@ class SpiceBot_AI(): return aiml_response def bot_message_precipher(self, bot, trigger, message): + puct_dict = {"!": "exclamationmark", ".": "period", "?": "questionmark", ",": "comma"} + for puctuation in puct_dict.keys(): + message = message.replace(puctuation, puct_dict[puctuation]) for botitem in ["nick"]: message = message.replace(str(eval("bot." + botitem)), "bot" + botitem) for triggeritem in ["nick", "sender"]: diff --git a/sopel_modules/SpiceBot_Configs/aiml/nickname_acknowledge.aiml b/sopel_modules/SpiceBot_Configs/aiml/nickname_acknowledge.aiml index 427e675..318d059 100644 --- a/sopel_modules/SpiceBot_Configs/aiml/nickname_acknowledge.aiml +++ b/sopel_modules/SpiceBot_Configs/aiml/nickname_acknowledge.aiml @@ -2,18 +2,18 @@ - BOTNICK! + BOTNICKexclamationmark + + BOTNICKquestionmark + + + BOTNICK - +