2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-22 19:10:53 +08:00

修正自动签到报错、更改云原神签到日志输出

This commit is contained in:
Ctrlcvs 2022-10-13 11:35:24 +08:00
parent aebd7abc1e
commit c7184dae78
2 changed files with 11 additions and 3 deletions

View File

@ -19,6 +19,7 @@ const pathPlugin=`./plugins/${plugin}/data/`
* 配置文件
* 主要用于处理 stoken以及云原神账号数据
*/
const _path = process.cwd();
class GsCfg {
constructor() {
@ -32,7 +33,7 @@ class GsCfg {
async getMasterQQ(){
let qq;
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]
}else{
qq=BotConfig.masterQQ[0]

View File

@ -169,6 +169,7 @@ export default class user {
}
res.message = sendMsg;
}
Bot.logger.mark(`\n云原神签到用户:${this.e.user_id}:${res.message}\n`)
return res
}
async cloudSeach() {
@ -203,6 +204,12 @@ export default class user {
challenge = '',
res;
try {
res=await this.bbsSeachSign()
if(res?.data?.can_get_points==0){
return {
message:`签到任务已完成,无需重复签到`
}
}
for (let forum of forumData) {
let trueDetail = 0;
let Vote = 0;
@ -396,7 +403,6 @@ export default class user {
logger.mark(`签到用户:${userIdList.length}个,预计需要${this.countTime(time)} ${finishTime} 完成`)
if (mul) {
await this.e.reply(tips)
if (this.e.msg.includes('force')) this.force = true
} else {
await utils.relpyPrivate(await gsCfg.getMasterQQ(), tips)
await utils.sleepAsync(lodash.random(1, 20) * 1000)
@ -420,7 +426,8 @@ export default class user {
utils.relpyPrivate(qq, msg + "\n云原神自动签到成功");
}
};
await this.cloudSign(e);
this.getyunToken(e)
await this.cloudSign();
await utils.sleepAsync(10000);
}
let msg = `云原神签到任务完成`