fix: 获取未读私信接口变化

This commit is contained in:
shanmite 2021-08-21 18:08:13 +08:00
parent b24c32a877
commit 3cc42c0fc5
3 changed files with 3 additions and 2 deletions

View File

@ -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 {

View File

@ -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)

View File

@ -1,6 +1,6 @@
{
"name": "lottery-auto-script",
"version": "2.1.0",
"version": "2.1.1",
"description": "自动参与B站动态抽奖",
"main": "main.js",
"scripts": {