mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-14 21:52:56 +08:00
20 lines
474 B
Python
20 lines
474 B
Python
|
|
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")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
nonebot.run()
|
|
|