mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
fix: 关注后等5秒再移动分区
This commit is contained in:
parent
fcd8456152
commit
299da8425a
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user