mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-23 03:20:52 +08:00
修正自动签到报错、更改云原神签到日志输出
This commit is contained in:
parent
aebd7abc1e
commit
c7184dae78
@ -19,6 +19,7 @@ const pathPlugin=`./plugins/${plugin}/data/`
|
|||||||
* 配置文件
|
* 配置文件
|
||||||
* 主要用于处理 stoken以及云原神账号数据
|
* 主要用于处理 stoken以及云原神账号数据
|
||||||
*/
|
*/
|
||||||
|
const _path = process.cwd();
|
||||||
class GsCfg {
|
class GsCfg {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
@ -32,7 +33,7 @@ class GsCfg {
|
|||||||
async getMasterQQ(){
|
async getMasterQQ(){
|
||||||
let qq;
|
let qq;
|
||||||
if(isV3){
|
if(isV3){
|
||||||
let config=(await import(`file://${_path}/plugins/genshin/model/gsCfg.js`)).default
|
let config=(await import(`file://${_path}/lib/config/config.js`)).default
|
||||||
qq=config.masterQQ[0]
|
qq=config.masterQQ[0]
|
||||||
}else{
|
}else{
|
||||||
qq=BotConfig.masterQQ[0]
|
qq=BotConfig.masterQQ[0]
|
||||||
|
@ -169,6 +169,7 @@ export default class user {
|
|||||||
}
|
}
|
||||||
res.message = sendMsg;
|
res.message = sendMsg;
|
||||||
}
|
}
|
||||||
|
Bot.logger.mark(`\n云原神签到用户:${this.e.user_id}:${res.message}\n`)
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
async cloudSeach() {
|
async cloudSeach() {
|
||||||
@ -203,6 +204,12 @@ export default class user {
|
|||||||
challenge = '',
|
challenge = '',
|
||||||
res;
|
res;
|
||||||
try {
|
try {
|
||||||
|
res=await this.bbsSeachSign()
|
||||||
|
if(res?.data?.can_get_points==0){
|
||||||
|
return {
|
||||||
|
message:`签到任务已完成,无需重复签到`
|
||||||
|
}
|
||||||
|
}
|
||||||
for (let forum of forumData) {
|
for (let forum of forumData) {
|
||||||
let trueDetail = 0;
|
let trueDetail = 0;
|
||||||
let Vote = 0;
|
let Vote = 0;
|
||||||
@ -396,7 +403,6 @@ export default class user {
|
|||||||
logger.mark(`签到用户:${userIdList.length}个,预计需要${this.countTime(time)} ${finishTime} 完成`)
|
logger.mark(`签到用户:${userIdList.length}个,预计需要${this.countTime(time)} ${finishTime} 完成`)
|
||||||
if (mul) {
|
if (mul) {
|
||||||
await this.e.reply(tips)
|
await this.e.reply(tips)
|
||||||
if (this.e.msg.includes('force')) this.force = true
|
|
||||||
} else {
|
} else {
|
||||||
await utils.relpyPrivate(await gsCfg.getMasterQQ(), tips)
|
await utils.relpyPrivate(await gsCfg.getMasterQQ(), tips)
|
||||||
await utils.sleepAsync(lodash.random(1, 20) * 1000)
|
await utils.sleepAsync(lodash.random(1, 20) * 1000)
|
||||||
@ -420,7 +426,8 @@ export default class user {
|
|||||||
utils.relpyPrivate(qq, msg + "\n云原神自动签到成功");
|
utils.relpyPrivate(qq, msg + "\n云原神自动签到成功");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
await this.cloudSign(e);
|
this.getyunToken(e)
|
||||||
|
await this.cloudSign();
|
||||||
await utils.sleepAsync(10000);
|
await utils.sleepAsync(10000);
|
||||||
}
|
}
|
||||||
let msg = `云原神签到任务完成`
|
let msg = `云原神签到任务完成`
|
||||||
|
Loading…
Reference in New Issue
Block a user