fix: 关注后等5秒再移动分区

This commit is contained in:
shanmite 2021-01-14 18:32:22 +08:00
parent fcd8456152
commit 299da8425a
2 changed files with 8 additions and 8 deletions

View File

@ -37,7 +37,7 @@ class Monitor extends Public {
if (typeof oneDynamicObj.origin_dynamic_id === 'string')
newdyid += oneDynamicObj.origin_dynamic_id + ',';
}
await MyStorage.updateDyid((Array.from(new Set([...newdyid.split(','),...alldyid.split(',')]))).toString());
await MyStorage.updateDyid((Array.from(new Set([...newdyid.split(','), ...alldyid.split(',')]))).toString());
this.AllMyLotteryInfo = newdyid;
this.startLottery();
}
@ -117,17 +117,17 @@ class Monitor extends Public {
isSendChat = chatmodel[1] === '1';
}
if (isLottery) {
const reg1 = new RegExp(uid);
const reg2 = new RegExp(dyid);
if (reg1.test(blacklist) || reg2.test(blacklist)) continue;
/* 判断是否关注过 */
reg1.test(self.attentionList) ? void 0 : onelotteryinfo.uid = uid;
const isFollowed = (new RegExp(uid)).test(self.attentionList);
/* 判断是否转发过 */
reg2.test(self.AllMyLotteryInfo) ? void 0 : onelotteryinfo.dyid = dyid;
const isRelay = (new RegExp(dyid)).test(self.AllMyLotteryInfo);
if ((new RegExp(dyid + '|' + uid)).test(blacklist)) continue;
if (!isFollowed) onelotteryinfo.uid = uid;
if (!isRelay) onelotteryinfo.dyid = dyid;
/* 根据动态的类型决定评论的类型 */
onelotteryinfo.type = (type === 2) ? 11 : (type === 4) ? 17 : 0;
/* 是否评论 */
isSendChat ? onelotteryinfo.rid = rid : void 0;
if(isSendChat) onelotteryinfo.rid = rid;
if (typeof onelotteryinfo.uid === 'undefined' && typeof onelotteryinfo.dyid === 'undefined') continue;
alllotteryinfo.push(onelotteryinfo);
}
@ -146,6 +146,7 @@ class Monitor extends Public {
ret += await BiliAPI.autolike(dyid);
if (typeof uid === 'number') {
ret += await BiliAPI.autoAttention(uid);
await Base.delay(5000);
ret += await BiliAPI.movePartition(uid, this.tagid);
}
if (typeof rid === 'string' && type !== 0) {

View File

@ -27,7 +27,6 @@ COOKIE_ARR.forEach(async (cookie, num) => {
} else {
console.log('开始参与抽奖');
await start();
console.log('参与抽奖结束');
}
}
});