fix: version check

This commit is contained in:
手瓜一十雪 2024-05-05 21:41:36 +08:00
parent 9fe1eb3a42
commit 4333ab624e

View File

@ -29,7 +29,7 @@ checkVersion().then((remoteVersion: string) => {
log('[NapCat] 当前版本:', localVersion); log('[NapCat] 当前版本:', localVersion);
for (const k of [0, 1, 2]) { for (const k of [0, 1, 2]) {
if (parseInt(remoteVersionList[k]) > parseInt(localVersionList[k])) { if (parseInt(remoteVersionList[k]) > parseInt(localVersionList[k])) {
console.log('[NapCat] 检测到更新,请前往 https://github.com/NapNeko/NapCatQQ 下载 NapCatQQ V', remoteVersion); console.log(`[NapCat] 检测到更新,请前往 https://github.com/NapNeko/NapCatQQ 下载 NapCatQQ V ${remoteVersion}`);
return; return;
} else if (parseInt(remoteVersionList[k]) < parseInt(localVersionList[k])) { } else if (parseInt(remoteVersionList[k]) < parseInt(localVersionList[k])) {
break; break;