This commit is contained in:
deathbybandaid 2019-05-31 20:41:03 -04:00
parent 59f1c694bd
commit 1e76583dbc

View File

@ -19,15 +19,12 @@ class SpiceBot_AI():
self.aiml_kernel._verboseMode = False
# Learn responses
import sopel_modules
initial_dir = os.getcwd()
for plugin_dir in set(sopel_modules.__path__):
configsdir = os.path.join(plugin_dir, "SpiceBot_Configs")
aimldir = os.path.join(configsdir, "aiml")
aimlstarter = os.path.join(aimldir, "std-startup.xml")
os.chdir(configsdir)
self.aiml_kernel.learn(aimlstarter)
self.aiml_kernel.respond("LOAD AIML B")
os.chdir(initial_dir)
def on_message(self, message):
aiml_response = self.aiml_kernel.respond(message)