mirror of https://github.com/Mai-with-u/MaiBot.git
fix:使用工作路径使mmc在启动器运行时读取文件无误
parent
f9a4935774
commit
15ec8394d7
5
bot.py
5
bot.py
|
|
@ -17,6 +17,11 @@ from rich.traceback import install
|
||||||
|
|
||||||
install(extra_lines=3)
|
install(extra_lines=3)
|
||||||
|
|
||||||
|
# 设置工作目录为脚本所在目录
|
||||||
|
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
os.chdir(script_dir)
|
||||||
|
print(f"已设置工作目录为: {script_dir}")
|
||||||
|
|
||||||
|
|
||||||
logger = get_logger("main")
|
logger = get_logger("main")
|
||||||
confirm_logger = get_logger("confirm")
|
confirm_logger = get_logger("confirm")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue