fix(config): 添加对 identity_detail 字段的非空校验

- 在配置文件加载过程中,增加了对 [identity] 部分的 identity_detail 字段的非空检查
- 如果 identity_detail 为空字符串,将抛出 ValueError 异常
pull/727/head
infinitycat 2025-04-12 02:09:08 +08:00
parent 30ede5612b
commit 327dff6028
1 changed files with 1 additions and 0 deletions

View File

@ -719,6 +719,7 @@ class BotConfig:
# identity_detail字段非空检查
if not config.identity_detail:
logger.error("配置文件错误:[identity] 部分的 identity_detail 不能为空字符串")
raise ValueError("配置文件错误:[identity] 部分的 identity_detail 不能为空字符串")
logger.success(f"成功加载配置文件: {config_path}")