Merge pull request #88 from SaigyoujiYusora/debug

fix: 找不到config文件夹
This commit is contained in:
KawaiiYusora
2025-03-08 00:33:55 +08:00
committed by GitHub
3 changed files with 5 additions and 1 deletions

6
bot.py
View File

@@ -20,8 +20,12 @@ print(rainbow_text)
if not os.path.exists("config/bot_config.toml"):
logger.warning("检测到bot_config.toml不存在正在从模板复制")
import shutil
# 检查config目录是否存在
if not os.path.exists("config"):
os.makedirs("config")
logger.info("创建config目录")
shutil.copy("templete/bot_config_template.toml", "config/bot_config.toml")
shutil.copy("template/bot_config_template.toml", "config/bot_config.toml")
logger.info("复制完成请修改config/bot_config.toml和.env.prod中的配置后重新启动")
# 初始化.env 默认ENVIRONMENT=prod