__main__.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:Excalibot 作者: endreman0 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号