RF-Tar-Railt / nonebot-plugin-arkgacha

Plugin for Arknights gacha, support multi platform
GNU Affero General Public License v3.0
14 stars 1 forks source link

bug: need_init的检测 #4

Closed LambdaYH closed 1 year ago

LambdaYH commented 1 year ago
def need_init():
    file = Path(__file__) / "resource" / "ops_initialized"
    return not file.exists() or file.open('r', encoding='utf-8').read() != __version__

file应该是file = Path(__file__).parent / "resource" / "ops_initialized"

不然即使下载资源了也会因为need_init()检测没过而出来个critical导致nonebot2shutdown(另外是不是不该用critical