mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 15:09:54 -05:00
reincorporate db brain as well
This commit is contained in:
parent
5de87681e8
commit
0d8b89cce6
@ -76,11 +76,11 @@ class SpiceBot_AI():
|
|||||||
|
|
||||||
def load_bot_values(self):
|
def load_bot_values(self):
|
||||||
|
|
||||||
# current_bot_db = botdb.get_bot_value('botai') or None
|
current_bot_db = botdb.get_plugin_value('SpiceBot_AI', 'brain') or None
|
||||||
# if current_bot_db:
|
if current_bot_db:
|
||||||
# for predicate in list(current_bot_db.keys()):
|
for predicate in list(current_bot_db.keys()):
|
||||||
# predval = current_bot_db[predicate]
|
predval = current_bot_db[predicate]
|
||||||
# self.aiml_kernel.setBotPredicate(predicate, predval)
|
self.aiml_kernel.setBotPredicate(predicate, predval)
|
||||||
|
|
||||||
# sopel nick
|
# sopel nick
|
||||||
self.aiml_kernel.setBotPredicate("nick", botconfig.nick)
|
self.aiml_kernel.setBotPredicate("nick", botconfig.nick)
|
||||||
@ -242,8 +242,8 @@ class SpiceBot_AI():
|
|||||||
|
|
||||||
def save_brain(self):
|
def save_brain(self):
|
||||||
self.aiml_kernel.saveBrain(botconfig.config.aibrain)
|
self.aiml_kernel.saveBrain(botconfig.config.aibrain)
|
||||||
# botsessiondata = self.aiml_kernel._botPredicates
|
botsessiondata = self.aiml_kernel._botPredicates
|
||||||
# botdb.set_bot_value('botai', botsessiondata)
|
botdb.set_plugin_value('SpiceBot_AI', 'brain', botsessiondata)
|
||||||
|
|
||||||
|
|
||||||
botai = SpiceBot_AI()
|
botai = SpiceBot_AI()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user