def run_excalibot():
import json, pkgutil
from . import Excalibot, db, log, config
log.debug('Creating bot')
bot = Excalibot(config.bot_config)
log.debug('Loading extensions')
for _, cog, _ in pkgutil.iter_modules(['excalibot/cogs']):
if cog == 'utils': continue
log.debug('Loading extension %s', cog)
bot.load_extension('excalibot.cogs.' + cog)
db.DatabaseObject.metadata.create_all()
bot.run()
bot.loop.close()
log.shutdown()
评论列表
文章目录