minecraft1024a
ebb575ec53
refactor(config): 移除.env依赖并引入服务器配置模型
将项目配置系统从依赖.env文件和环境变量迁移到使用Pydantic模型进行集中管理。此举通过移除`python-dotenv`库简化了环境设置,并提高了配置的类型安全性和可维护性。
主要变更包括:
- 移除`bot.py`中的.env加载逻辑。
- 新增`ServerConfig`模型来管理服务器的主机和端口。
- 更新`src/common/server.py`和`src/common/message/api.py`以从全局配置对象获取服务器设置,取代了`os.environ`。
- 从配置中移除了已废弃的`MaizoneIntercomConfig`。
- 在`bot_config_template.toml`中添加了新的`[server]`配置部分。
2025-09-12 19:04:27 +08:00
..
2025-09-12 19:04:27 +08:00
2025-09-09 09:25:25 +08:00
2025-08-11 19:34:18 +08:00