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