mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-12 21:03:13 +08:00
perf: 将易出现频繁的操作提前
This commit is contained in:
parent
42082179af
commit
1dd76fa4d6
@ -205,6 +205,7 @@ lottery_*:
|
||||
- `wait`
|
||||
- 转发间隔时间
|
||||
- 单位毫秒
|
||||
- 上下浮动30s
|
||||
- `minfollower`
|
||||
- up主粉丝数限制
|
||||
- 仅限制没有官方认证的up
|
||||
|
||||
@ -140,24 +140,24 @@ class Monitor extends Public {
|
||||
/**
|
||||
* 关注转发评论
|
||||
* @param {LotteryOptions} option
|
||||
* @returns {Promise<number>} sucess:1 err:0
|
||||
*/
|
||||
async go(option) {
|
||||
const { uid, dyid, type, rid } = option;
|
||||
let ret = '';
|
||||
if (typeof dyid === 'string') {
|
||||
ret += await BiliAPI.autoRelay(GlobalVar.myUID, dyid);
|
||||
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) {
|
||||
ret += await BiliAPI.sendChat(rid, Base.getRandomStr(config.chat), type);
|
||||
if (await BiliAPI.sendChat(rid, Base.getRandomStr(config.chat), type) === 0) return 0;
|
||||
}
|
||||
await Base.delay(Number(config.wait));
|
||||
if (typeof uid === 'number') {
|
||||
if (await BiliAPI.autoAttention(uid) === 0) return 0;
|
||||
await Base.delay(5000);
|
||||
if (await BiliAPI.movePartition(uid, this.tagid) === 0) return 0;
|
||||
}
|
||||
if (await BiliAPI.autoRelay(GlobalVar.myUID, dyid) === 0) return 0;
|
||||
if (await BiliAPI.autolike(dyid) === 0) return 0;
|
||||
await Base.delay(Number(config.wait) + Math.floor(Math.random() * 60000 - 30000));
|
||||
}
|
||||
return (ret === '' || ret.indexOf('0') === -1) ? 1 : 0;
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ module.exports = {
|
||||
model: '11',
|
||||
chatmodel: '01',
|
||||
maxday: '-1',
|
||||
wait: String(Math.floor(Math.random() * 1000) + 60000),
|
||||
wait: '60000',
|
||||
minfollower: '1000',
|
||||
blacklist: '28008897,28272016,140389827,24598781,28008860,28008880,28008743,28008948,28009292,319696958,90138218,28272000,28272047,28271978,8831288,175979009,3177443,486780865,403048135,474325039,455274996,477519424,292671666,448873224,22498938,1770865,444796995,306112375,320193786,606637517,305276429,204487541,404761800,186914127,99439379,457697569,270886929,477519424,401575,201296348,206804212,333584926,34679178,699923691,392689522,178700744,272882445,350977368,487168411,22682842,444949061,523974463,192231907,503908324,383189098,252909207,336467750,264875137,90721742,452299642,677739290,441522918,8766623,698327474,5439672',
|
||||
blockword: ["脚本抽奖", "恭喜", "结果"],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user