2020-09-10 09:29:27 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
@Author : yanyongyu
|
|
|
|
@Date : 2020-09-10 17:12:05
|
|
|
|
@LastEditors : yanyongyu
|
2021-03-06 14:33:57 +00:00
|
|
|
@LastEditTime : 2021-03-06 21:55:25
|
2020-09-10 09:29:27 +00:00
|
|
|
@Description : Entry File of the Bot
|
|
|
|
@GitHub : https://github.com/yanyongyu
|
|
|
|
"""
|
|
|
|
__author__ = "yanyongyu"
|
|
|
|
|
|
|
|
import nonebot
|
2021-01-01 10:16:25 +00:00
|
|
|
from nonebot.adapters.cqhttp import Bot as CQHTTPBot
|
2020-09-10 09:29:27 +00:00
|
|
|
|
|
|
|
nonebot.init()
|
|
|
|
app = nonebot.get_asgi()
|
|
|
|
|
2021-01-01 10:16:25 +00:00
|
|
|
driver = nonebot.get_driver()
|
|
|
|
driver.register_adapter("cqhttp", CQHTTPBot)
|
|
|
|
|
2021-03-06 14:33:57 +00:00
|
|
|
config = driver.config
|
|
|
|
nonebot.load_all_plugins(set(config.plugins), set(config.plugin_dirs))
|
2021-01-01 10:16:25 +00:00
|
|
|
|
2020-09-10 09:29:27 +00:00
|
|
|
if __name__ == "__main__":
|
2021-03-06 14:33:57 +00:00
|
|
|
nonebot.run(app="__mp_main__:app")
|