mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 15:09:54 -05:00
bot.nick
This commit is contained in:
parent
a983b7ef2d
commit
3fb5e7f710
@ -93,6 +93,12 @@ class SpiceBot_AI():
|
|||||||
self.check_user_import(nick, nick_id)
|
self.check_user_import(nick, nick_id)
|
||||||
aiml_response = self.aiml_kernel.respond(message, nick_id)
|
aiml_response = self.aiml_kernel.respond(message, nick_id)
|
||||||
self.save_nick_session(nick, 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
|
return aiml_response
|
||||||
|
|
||||||
def check_user_import(self, nick, nick_id=None):
|
def check_user_import(self, nick, nick_id=None):
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<aiml version="1.0.1" encoding="UTF-8">
|
<aiml version="1.0.1" encoding="UTF-8">
|
||||||
<category>
|
<category>
|
||||||
<pattern><bot name="nick"/> is cool</pattern>
|
<pattern>bot.nick is cool</pattern>
|
||||||
<template>
|
<template>
|
||||||
Thank you!
|
Thank you!
|
||||||
</template>
|
</template>
|
||||||
Loading…
Reference in New Issue
Block a user