Merge branch 'main-fix' of https://github.com/MaiM-with-u/MaiBot into main-fix

This commit is contained in:
SengokuCola
2025-03-21 17:59:22 +08:00

View File

@@ -98,10 +98,14 @@ def parse_env_config(config_file):
# 逐行处理配置
for line in lines:
line = line.strip()
# 忽略空行和注释
# 忽略空行和注释
if not line or line.startswith("#"):
continue
# 处理行尾注释
if "#" in line:
line = line.split("#")[0].strip()
# 拆分键值对
key, value = line.split("=", 1)