diff --git a/lib/net/bili.js b/lib/net/bili.js index 2af493e..7553954 100644 --- a/lib/net/bili.js +++ b/lib/net/bili.js @@ -185,7 +185,7 @@ const bili_client = { }).then(responseText => { let res = strToJson(responseText); if (res.code === 0) { - const { unfollow_unread, follow_unread } = res.data; + const { unfollow_unread = 0, follow_unread = 0 } = res.data; log.info('获取未读私信', `成功 已关注未读数: ${follow_unread}, 未关注未读数 ${unfollow_unread}`); return { unfollow_unread, follow_unread } } else { diff --git a/lib/update.js b/lib/update.js index 1a36003..3614397 100644 --- a/lib/update.js +++ b/lib/update.js @@ -65,6 +65,7 @@ async function update() { await download(proxy_url.href, 'latest_version.zip') + log.info('自动下载', '成功下载到当前目录') log.info('更新说明', '\n' + text + '\n') } catch (error) { log.error('更新脚本', error) diff --git a/package.json b/package.json index cee938f..fa75f1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lottery-auto-script", - "version": "2.1.0", + "version": "2.1.1", "description": "自动参与B站动态抽奖", "main": "main.js", "scripts": {