mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-23 03:20:52 +08:00
fix: 对于米游币签到增加睡眠间隔
This commit is contained in:
parent
91f1d98176
commit
aebd7abc1e
@ -162,7 +162,9 @@ export default class user {
|
|||||||
for (let item of res?.data?.list) {
|
for (let item of res?.data?.list) {
|
||||||
let reward_id = item.id;
|
let reward_id = item.id;
|
||||||
let reward_msg = item.msg;
|
let reward_msg = item.msg;
|
||||||
res = await this.getData("cloudGamer",{reward_id})
|
res = await this.getData("cloudGamer", {
|
||||||
|
reward_id
|
||||||
|
})
|
||||||
sendMsg += `\n领取奖励,ID:${reward_id},Msg:${reward_msg}`
|
sendMsg += `\n领取奖励,ID:${reward_id},Msg:${reward_msg}`
|
||||||
}
|
}
|
||||||
res.message = sendMsg;
|
res.message = sendMsg;
|
||||||
@ -238,12 +240,16 @@ export default class user {
|
|||||||
if (res?.retcode == 1034) {
|
if (res?.retcode == 1034) {
|
||||||
challenge = await this.bbsGeetest()
|
challenge = await this.bbsGeetest()
|
||||||
if (challenge) {
|
if (challenge) {
|
||||||
forum["headers"] = {
|
let data = {
|
||||||
"x-rpc-challenge": challenge
|
postId,
|
||||||
}
|
headers: {
|
||||||
await this.getData("bbsSign", forum)
|
"x-rpc-challenge": challenge,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
await this.getData("bbsPostFull", data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await utils.randomSleepAsync(10);
|
||||||
res = await this.getData("bbsVotePost", {
|
res = await this.getData("bbsVotePost", {
|
||||||
postId
|
postId
|
||||||
})
|
})
|
||||||
@ -253,10 +259,13 @@ export default class user {
|
|||||||
if (res?.retcode == 1034) {
|
if (res?.retcode == 1034) {
|
||||||
challenge = await this.bbsGeetest()
|
challenge = await this.bbsGeetest()
|
||||||
if (challenge) {
|
if (challenge) {
|
||||||
forum["headers"] = {
|
let data = {
|
||||||
"x-rpc-challenge": challenge
|
postId,
|
||||||
|
headers: {
|
||||||
|
"x-rpc-challenge": challenge,
|
||||||
}
|
}
|
||||||
await this.getData("bbsSign", forum)
|
}
|
||||||
|
await this.getData("bbsVotePost", data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await utils.randomSleepAsync(2);
|
await utils.randomSleepAsync(2);
|
||||||
@ -269,6 +278,7 @@ export default class user {
|
|||||||
Share++;
|
Share++;
|
||||||
}
|
}
|
||||||
message += `共读取帖子记录${20*sumcount}\n浏览成功:${trueDetail}\n点赞成功:${Vote}\n分享成功:${Share}`;
|
message += `共读取帖子记录${20*sumcount}\n浏览成功:${trueDetail}\n点赞成功:${Vote}\n分享成功:${Share}`;
|
||||||
|
Bot.logger.mark(`\n用户${this.e.user_id}:\n${message}`)
|
||||||
await utils.randomSleepAsync(3);
|
await utils.randomSleepAsync(3);
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
@ -543,7 +553,6 @@ export default class user {
|
|||||||
} = await this.getCookie(e);
|
} = await this.getCookie(e);
|
||||||
let cookiesDoc = await this.getcookiesDoc();
|
let cookiesDoc = await this.getcookiesDoc();
|
||||||
if (!cookie) {
|
if (!cookie) {
|
||||||
e.reply("请先#绑定cookie\n发送【体力帮助】查看配置教程")
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let stokens = this.getStoken(e.user_id)
|
let stokens = this.getStoken(e.user_id)
|
||||||
@ -551,13 +560,11 @@ export default class user {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!cookie.includes("login_ticket") && (isV3 && !skuid?.login_ticket)) {
|
if (!cookie.includes("login_ticket") && (isV3 && !skuid?.login_ticket)) {
|
||||||
// e.reply("米游社登录cookie不完整,请前往米游社通行证处重新获取cookie~\ncookies必须包含login_ticket【教程】 " + cookiesDoc)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let flot = await this.stoken(cookie, e)
|
let flot = await this.stoken(cookie, e)
|
||||||
await utils.sleepAsync(1000); //延迟加载防止文件未生成
|
await utils.sleepAsync(1000); //延迟加载防止文件未生成
|
||||||
if (!flot) {
|
if (!flot) {
|
||||||
e.reply("登录失效请重新登录获取cookie发送机器人~")
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user