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
|
2022-01-13 08:10:47 +00:00
|
|
|
@LastEditTime : 2022-01-13 16:10:11
|
2020-09-10 09:29:27 +00:00
|
|
|
@Description : Entry File of the Bot
|
|
|
|
@GitHub : https://github.com/yanyongyu
|
|
|
|
"""
|
|
|
|
__author__ = "yanyongyu"
|
|
|
|
|
|
|
|
import nonebot
|
2022-01-13 08:10:47 +00:00
|
|
|
from nonebot.adapters.onebot.v11 import Adapter as ONEBOT_V11_Adapter
|
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()
|
2022-01-13 08:10:47 +00:00
|
|
|
driver.register_adapter(ONEBOT_V11_Adapter)
|
2021-01-01 10:16:25 +00:00
|
|
|
|
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")
|