mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
test detection of bot.nick
This commit is contained in:
parent
7be0c868e7
commit
a983b7ef2d
@ -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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
8
sopel_modules/SpiceBot_Configs/aiml/bottest.aiml
Normal file
8
sopel_modules/SpiceBot_Configs/aiml/bottest.aiml
Normal 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>
|
||||
Loading…
Reference in New Issue
Block a user