From 527b505712a28a409c7ef19dfe37b557f9863411 Mon Sep 17 00:00:00 2001 From: KawaiiYusora Date: Sat, 8 Mar 2025 00:23:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?typo:=20template=E6=8B=BC=E5=86=99=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {templete => template}/auto_format.py | 0 {templete => template}/bot_config_template.toml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {templete => template}/auto_format.py (100%) rename {templete => template}/bot_config_template.toml (100%) diff --git a/templete/auto_format.py b/template/auto_format.py similarity index 100% rename from templete/auto_format.py rename to template/auto_format.py diff --git a/templete/bot_config_template.toml b/template/bot_config_template.toml similarity index 100% rename from templete/bot_config_template.toml rename to template/bot_config_template.toml From 5247edc755d224b7cc3439a8d0a44a24546a7839 Mon Sep 17 00:00:00 2001 From: KawaiiYusora Date: Sat, 8 Mar 2025 00:24:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=88=9D=E5=A7=8B=E5=8C=96=E6=97=B6?= =?UTF-8?q?=E6=B2=A1=E6=9C=89config=E6=96=87=E4=BB=B6=E5=A4=B9=E4=BC=9A?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 1bebfe553..715fe9aa7 100644 --- a/bot.py +++ b/bot.py @@ -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