test detection of bot.nick

This commit is contained in:
deathbybandaid 2019-06-02 19:48:50 -04:00
parent 7be0c868e7
commit a983b7ef2d
3 changed files with 12 additions and 1 deletions

View File

@ -52,8 +52,10 @@ class SpiceBot_AI():
# learn directories
self.learn(braindirs)
def load_bot_values(self, bot):
self.aiml_kernel.setBotPredicate("nick", bot.nick)
def load_extras(self, bot):
return
if len(bot.config.SpiceBot_AI.extra):
self.learn(self, bot.config.SpiceBot_AI.extra)

View File

@ -80,3 +80,4 @@ def setup(bot):
logs.log('SpiceBot_AI', "Setting Up Configuration")
bot.config.define_section("SpiceBot_AI", SpiceBot_AI_MainSection, validate=False)
botai.load_extras(bot)
botai.load_bot_values(bot)

View File

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