From c7184dae781172cf602d5fbe6cb36ad22af50115 Mon Sep 17 00:00:00 2001
From: Ctrlcvs <1509167646@qq.com>
Date: Thu, 13 Oct 2022 11:35:24 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=87=AA=E5=8A=A8=E7=AD=BE?=
 =?UTF-8?q?=E5=88=B0=E6=8A=A5=E9=94=99=E3=80=81=E6=9B=B4=E6=94=B9=E4=BA=91?=
 =?UTF-8?q?=E5=8E=9F=E7=A5=9E=E7=AD=BE=E5=88=B0=E6=97=A5=E5=BF=97=E8=BE=93?=
 =?UTF-8?q?=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 model/gsCfg.js |  3 ++-
 model/user.js  | 11 +++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

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 = `云原神签到任务完成`