mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 06:29:54 -05:00
counts log
This commit is contained in:
parent
f8e75a3e55
commit
411fdfd160
@ -39,12 +39,6 @@ class SpiceBot_AI():
|
|||||||
# Learn responses
|
# Learn responses
|
||||||
self.load_brain()
|
self.load_brain()
|
||||||
|
|
||||||
if self.dict["counts"]:
|
|
||||||
logs.log('SpiceBot_AI', 'Registered %d %s files,' % (self.dict["counts"], 'aiml'))
|
|
||||||
logs.log('SpiceBot_AI', '%d %s files failed to load' % (self.dict["failcounts"], 'aiml'), True)
|
|
||||||
else:
|
|
||||||
logs.log('SpiceBot_AI', "Warning: Couldn't load any %s files" % ('aiml'))
|
|
||||||
|
|
||||||
def load_brain(self):
|
def load_brain(self):
|
||||||
import sopel_modules
|
import sopel_modules
|
||||||
braindirs = []
|
braindirs = []
|
||||||
|
|||||||
19
sopel_modules/SpiceBot_Core_Processing/AI.py
Normal file
19
sopel_modules/SpiceBot_Core_Processing/AI.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# coding=utf8
|
||||||
|
from __future__ import unicode_literals, absolute_import, division, print_function
|
||||||
|
"""
|
||||||
|
This is the SpiceBot AI system.
|
||||||
|
"""
|
||||||
|
import sopel
|
||||||
|
|
||||||
|
import sopel_modules.SpiceBot as SpiceBot
|
||||||
|
|
||||||
|
|
||||||
|
@sopel.module.event(SpiceBot.events.BOT_READY)
|
||||||
|
@sopel.module.rule('.*')
|
||||||
|
def bot_events_complete(bot, trigger):
|
||||||
|
|
||||||
|
if SpiceBot.botai.dict["counts"]:
|
||||||
|
SpiceBot.logs.log('SpiceBot_AI', 'Registered %d %s files,' % (SpiceBot.botai.dict["counts"], 'aiml'))
|
||||||
|
SpiceBot.logs.log('SpiceBot_AI', '%d %s files failed to load' % (SpiceBot.botai.dict["failcounts"], 'aiml'), True)
|
||||||
|
else:
|
||||||
|
SpiceBot.logs.log('SpiceBot_AI', "Warning: Couldn't load any %s files" % ('aiml'))
|
||||||
@ -9,6 +9,7 @@ This module contains references only for other modules to utilize.
|
|||||||
from .Channels import *
|
from .Channels import *
|
||||||
from .Events import *
|
from .Events import *
|
||||||
from .Modules import *
|
from .Modules import *
|
||||||
|
from .AI import *
|
||||||
from .osd import *
|
from .osd import *
|
||||||
from .StartupMonologue import *
|
from .StartupMonologue import *
|
||||||
from .Logs import *
|
from .Logs import *
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user