mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 06:00:59 -05:00
test loading
This commit is contained in:
parent
c48fb7755d
commit
8bbddf2bf3
@ -18,13 +18,11 @@ class SpiceBot_AI():
|
||||
# Learn responses
|
||||
import sopel_modules
|
||||
for plugin_dir in set(sopel_modules.__path__):
|
||||
if plugin_dir in ["SpiceBot_Configs"]:
|
||||
for pathname in os.listdir(plugin_dir):
|
||||
if pathname in ["aiml"]:
|
||||
pathpath = os.path.join(plugin_dir, pathname)
|
||||
for aimlfile in os.listdir(pathpath):
|
||||
aiml_filename = os.path.join(pathpath, pathname)
|
||||
self.aiml_kernel.learn(aiml_filename)
|
||||
configsdir = os.path.join(plugin_dir, "SpiceBot_Configs")
|
||||
aimldir = os.path.join(configsdir, "aiml")
|
||||
for aimlfile in os.listdir(aimldir):
|
||||
aiml_filename = os.path.join(aimldir, aimlfile)
|
||||
self.aiml_kernel.learn(aiml_filename)
|
||||
|
||||
def on_message(self, message):
|
||||
return self.aiml_kernel.respond(message.content)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user