diff --git a/model/gsCfg.js b/model/gsCfg.js index de1a384..202d415 100644 --- a/model/gsCfg.js +++ b/model/gsCfg.js @@ -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] diff --git a/model/user.js b/model/user.js index 23fa6bb..2f3e7ea 100644 --- a/model/user.js +++ b/model/user.js @@ -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 = `云原神签到任务完成`