2021-05-20 18:37:51 +08:00
|
|
|
|
2021-05-20 18:23:54 +08:00
|
|
|
import nonebot
|
|
|
|
|
from nonebot.adapters.cqhttp import Bot as CQHTTPBot
|
|
|
|
|
from services.db_context import init, disconnect
|
|
|
|
|
nonebot.init()
|
|
|
|
|
driver = nonebot.get_driver()
|
|
|
|
|
driver.register_adapter("cqhttp", CQHTTPBot)
|
|
|
|
|
config = driver.config
|
|
|
|
|
driver.on_startup(init)
|
|
|
|
|
driver.on_shutdown(disconnect)
|
|
|
|
|
nonebot.load_builtin_plugins()
|
|
|
|
|
nonebot.load_plugins("plugins")
|
|
|
|
|
nonebot.load_plugins("plugins/shop")
|
|
|
|
|
nonebot.load_plugins("plugins/genshin")
|
2021-06-24 15:32:06 +08:00
|
|
|
nonebot.load_plugins("plugins/alapi")
|
2021-05-20 18:23:54 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
nonebot.run()
|
|
|
|
|
|