1
0
forked from bot/app

🐛 在读取数据库前进行迁移 fix #35

This commit is contained in:
2024-04-23 21:49:16 +08:00
parent 53bc6df30f
commit acfc70ea50
6 changed files with 160 additions and 20 deletions

View File

@ -51,6 +51,7 @@ def init():
"""
# 检测python版本是否高于3.10
auto_migrate()
init_log()
if sys.version_info < (3, 10):
nonebot.logger.error("This project requires Python3.10+ to run, please upgrade your Python Environment.")
@ -59,7 +60,6 @@ def init():
temp_data.data["start_time"] = time.time()
common_db.upsert(temp_data)
auto_migrate()
# 在加载完成语言后再初始化日志
nonebot.logger.info("Liteyuki is initializing...")