From d398327fc97462e43d0a5b2475237eaa8f1269f4 Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Sat, 13 Aug 2022 06:31:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=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 --- apps/sign.js | 9 +-------- model/mys/mihoyo-api.js | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/apps/sign.js b/apps/sign.js index d650042..0b41d8c 100644 --- a/apps/sign.js +++ b/apps/sign.js @@ -158,7 +158,7 @@ export async function mysSign(e) { return retry(e); }); }, RETRY_OPTIONS); - Bot.logger.info(`${forum.name} 签到结果: [${resObj.message}]`); + Bot.logger.mark(`${e.user_id}:${forum.name} 签到结果: [${resObj.message}]`); resultMessage += `签到: [${resObj.message}]\n`; } catch (e) { Bot.logger.error(`${forum.name} 签到失败 [${e.message}]`); @@ -349,7 +349,6 @@ export async function allMysSign() { //获取需要签到的用户 for (let data of stoken) { let user_id = data.qq; - Bot.logger.mark(`正在为qq${user_id}签到`); let e = { user_id, isTask: true @@ -357,12 +356,6 @@ export async function allMysSign() { e.cookie = `stuid=${data.stuid};stoken=${data.stoken};ltoken=${data.ltoken};`; Bot.logger.mark(`正在为qq${user_id}进行米游币签到中...`); e.msg = "全部" - //已签到不重复执行 - let key = `genshin:mys:signed_bbs:${user_id}`; - if (await redis.get(key)) { - continue; - } - e.reply = (msg) => { //关闭签到消息推送 if (!isPushSign||ismysbool) { diff --git a/model/mys/mihoyo-api.js b/model/mys/mihoyo-api.js index 9c19ec4..21a7d07 100644 --- a/model/mys/mihoyo-api.js +++ b/model/mys/mihoyo-api.js @@ -119,12 +119,12 @@ export default class MihoYoApi { let message = `\n${name}共计${data.list.length}个账号\n`; for (let item of data.list) { let objshuj = await this.isPostSign(kkbody, item.game_uid, item.region) - if(objshuj.data.is_sign){ + if(objshuj?.data?.is_sign){ message+=`游戏id:${item.nickname}-${item.game_uid}:今日已签到~\n`; continue; } objshuj=(await this.postSign(kkbody, item.game_uid, item.region)) - if(objshuj.data.gt){ + if(objshuj?.data?.gt){ message+=`游戏id:${item.nickname}-${item.game_uid}:签到出现验证码~\n请晚点后重试,或者手动上米游社签到`; }else{ message += `游戏id:${item.nickname}-${item.game_uid}:${objshuj.message=="OK"?"签到成功":objshuj.message}\n`