diff --git a/apps/sign.js b/apps/sign.js index 2efb585..8ac1af2 100644 --- a/apps/sign.js +++ b/apps/sign.js @@ -309,12 +309,11 @@ export async function allMysSign() { if (!isPushSign||ismysbool) { return; } - if (msg.includes("签到成功") && (cookie.isSignPush === true || cookie.isSignPush === undefined)) { + if (msg.includes("OK")) { //签到成功并且不是已签到的才推送 // msg = msg.replace("签到成功", "自动签到成功"); utils.relpyPrivate(user_id, msg + "\n自动签到成功"); } }; - await mysSign(e); await utils.sleepAsync(10000); } @@ -346,13 +345,10 @@ export async function allSign() { e.msg = "全部" Bot.logger.mark(`正在为qq${user_id}米社签到中...`); e.reply = (msg) => { - if (!msg.includes("OK")) { - return; - } if (!isAllSign||isbool) { return; } - if (msg.includes("签到成功") && (cookie.isSignPush === true || cookie.isSignPush === undefined)) { + if (msg.includes("OK")) { utils.relpyPrivate(qq, msg + "\n自动签到成功"); } }; @@ -432,13 +428,10 @@ export async function yunSignlist(e){ Bot.logger.mark(`正在为qq${user_id}云原神签到中...`); e.msg = "全部" e.reply = (msg) => { - if (!msg.includes("OK")) { - return; - } if (!isYunSignMsg||isYun) { return; } - if (msg.includes("签到成功")) { + if (msg.includes("领取奖励")) { utils.relpyPrivate(qq, msg + "\n云原神自动签到成功"); } }; diff --git a/model/mys/mihoyo-api.js b/model/mys/mihoyo-api.js index de70b3c..f237ce1 100644 --- a/model/mys/mihoyo-api.js +++ b/model/mys/mihoyo-api.js @@ -238,7 +238,7 @@ export default class MihoYoApi { let reward_msg = item.msg; url = `https://api-cloudgame.mihoyo.com/hk4e_cg_cn/gamer/api/ackNotification?id=${reward_id}`; res = await superagent.post(url).set(this.getyunHeader()).timeout(10000); - let log_msg=`\n领取奖励,ID:${reward_id},Msg:${reward_msg}`; + let log_msg=`\n领取奖励,ID:${reward_id},Msg:${reward_msg.msg}`; Bot.logger.info(log_msg) sendMSg+=log_msg } diff --git a/model/mys/utils.js b/model/mys/utils.js index 5470b56..a1eccd6 100644 --- a/model/mys/utils.js +++ b/model/mys/utils.js @@ -31,9 +31,9 @@ export async function relpyPrivate (userId, msg) { userId = Number(userId) let friend = Bot.fl.get(userId) if (friend) { - logger.mark(`发送好友消息[${friend.nickname}](${userId})`) + Bot.logger.mark(`发送好友消息[${friend.nickname}](${userId})`) return await Bot.pickUser(userId).sendMsg(msg).catch((err) => { - logger.mark(err) + Bot.logger.mark(err) }) } }