换了文档推荐的工作方式,并且,为了使用热重载而将一些功能外挂为插件。这些功能并不一定要以插件形式存在。若有必要,可以合并进启动程序。

This commit is contained in:
Pyhtagodzilla
2025-07-25 21:22:55 +08:00
parent d456805d46
commit 758fe4b1f0
5 changed files with 153 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import time
import os
from dotenv import load_dotenv
from ncatbot.core import BotClient
load_dotenv(dotenv_path=r"../.env")
bot = BotClient()
bot.run(
bt_uin=os.getenv("BOT_ACCOUNT"),
root=os.getenv("ROOT_ACCOUNT"),
ws_uri=os.getenv("WS_URI"),
ws_token=os.getenv("WS_TOKEN"),
webui_uri=os.getenv("WEBUI_URI"),
webui_token=os.getenv("WEBUI_TOKEN")
)