♻️ refactor(command): 配置系统从 SQLite 迁移至 YAML 并修复白名单失效
- 用 CommandConfig dataclass 单例替代模块级变量,解决 from import 造成的本地绑定不随 global 更新的 bug - 删除 db.py,改用 settings.yaml 存储动态配置,首次启动自动创建并合并 .env 默认值 - 新增文件轮询 watcher(2 秒),检测 YAML 变更自动热重载 - 管理界面 API 改为直接读写 YAML,即时生效 - 依赖 aiosqlite 替换为 pyyaml
This commit is contained in:
@@ -8,5 +8,5 @@ dependencies = [
|
||||
"ncatbot5>=5.5.2.post3",
|
||||
"aiohttp>=3.9",
|
||||
"python-dotenv>=1.0",
|
||||
"aiosqlite>=0.20",
|
||||
"pyyaml>=6.0",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user