This commit is contained in:
deathbybandaid 2019-06-02 20:02:00 -04:00
parent a983b7ef2d
commit 3fb5e7f710
2 changed files with 7 additions and 1 deletions

View File

@ -93,6 +93,12 @@ class SpiceBot_AI():
self.check_user_import(nick, nick_id)
aiml_response = self.aiml_kernel.respond(message, nick_id)
self.save_nick_session(nick, nick_id)
aiml_response = self.bot_message_decipher(bot, aiml_response)
return aiml_response
def bot_message_decipher(self, bot, aiml_response):
while "bot.nick" in aiml_response:
aiml_response.replace("bot.nick", bot.nick)
return aiml_response
def check_user_import(self, nick, nick_id=None):

View File

@ -1,6 +1,6 @@
<aiml version="1.0.1" encoding="UTF-8">
<category>
<pattern><bot name="nick"/> is cool</pattern>
<pattern>bot.nick is cool</pattern>
<template>
Thank you!
</template>