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) {
|
||||
let reward_id = item.id;
|
||||
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}`
|
||||
}
|
||||
res.message = sendMsg;
|
||||
@ -238,12 +240,16 @@ export default class user {
|
||||
if (res?.retcode == 1034) {
|
||||
challenge = await this.bbsGeetest()
|
||||
if (challenge) {
|
||||
forum["headers"] = {
|
||||
"x-rpc-challenge": challenge
|
||||
}
|
||||
await this.getData("bbsSign", forum)
|
||||
let data = {
|
||||
postId,
|
||||
headers: {
|
||||
"x-rpc-challenge": challenge,
|
||||
}
|
||||
}
|
||||
await this.getData("bbsPostFull", data)
|
||||
}
|
||||
}
|
||||
await utils.randomSleepAsync(10);
|
||||
res = await this.getData("bbsVotePost", {
|
||||
postId
|
||||
})
|
||||
@ -253,10 +259,13 @@ export default class user {
|
||||
if (res?.retcode == 1034) {
|
||||
challenge = await this.bbsGeetest()
|
||||
if (challenge) {
|
||||
forum["headers"] = {
|
||||
"x-rpc-challenge": challenge
|
||||
let data = {
|
||||
postId,
|
||||
headers: {
|
||||
"x-rpc-challenge": challenge,
|
||||
}
|
||||
await this.getData("bbsSign", forum)
|
||||
}
|
||||
await this.getData("bbsVotePost", data)
|
||||
}
|
||||
}
|
||||
await utils.randomSleepAsync(2);
|
||||
@ -269,6 +278,7 @@ export default class user {
|
||||
Share++;
|
||||
}
|
||||
message += `共读取帖子记录${20*sumcount}\n浏览成功:${trueDetail}\n点赞成功:${Vote}\n分享成功:${Share}`;
|
||||
Bot.logger.mark(`\n用户${this.e.user_id}:\n${message}`)
|
||||
await utils.randomSleepAsync(3);
|
||||
}
|
||||
} catch (ex) {
|
||||
@ -543,7 +553,6 @@ export default class user {
|
||||
} = await this.getCookie(e);
|
||||
let cookiesDoc = await this.getcookiesDoc();
|
||||
if (!cookie) {
|
||||
e.reply("请先#绑定cookie\n发送【体力帮助】查看配置教程")
|
||||
return false;
|
||||
}
|
||||
let stokens = this.getStoken(e.user_id)
|
||||
@ -551,13 +560,11 @@ export default class user {
|
||||
return true;
|
||||
}
|
||||
if (!cookie.includes("login_ticket") && (isV3 && !skuid?.login_ticket)) {
|
||||
// e.reply("米游社登录cookie不完整,请前往米游社通行证处重新获取cookie~\ncookies必须包含login_ticket【教程】 " + cookiesDoc)
|
||||
return false;
|
||||
}
|
||||
let flot = await this.stoken(cookie, e)
|
||||
await utils.sleepAsync(1000); //延迟加载防止文件未生成
|
||||
if (!flot) {
|
||||
e.reply("登录失效请重新登录获取cookie发送机器人~")
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user