From 46d98b64c3e88353adb69846e463e10c4a1843f6 Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Wed, 9 Nov 2022 23:34:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=93=E5=8A=9B=E6=8E=A8?= =?UTF-8?q?=E9=80=81true=20false=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/Note.js | 2 +- model/note.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/Note.js b/apps/Note.js index ea75e7c..6f1fbc2 100644 --- a/apps/Note.js +++ b/apps/Note.js @@ -205,7 +205,7 @@ export async function DailyNoteTask() { let task = await Note(e, { render }); - if (task) { + if (!task) { redis.set(sendkey, "1", { EX: sendCD }); diff --git a/model/note.js b/model/note.js index 7af8d14..1b00742 100644 --- a/model/note.js +++ b/model/note.js @@ -103,12 +103,12 @@ export default class note { } async getNote(cookie, uid, res,{render}){ - if (!res || res.retcode !== 0) return false + if (!res || res.retcode !== 0) return true let data = res.data; //推送任务 if (this.e.isTask && data.current_resin < this.e.sendResin) { - return false; + return true; } if (this.e.isTask) { Bot.logger.mark(`体力推送:${this.e.user_id}`); @@ -294,7 +294,7 @@ export default class note { render, scale: 1.2 }) - return true; + return !this.e?.isTask; } async dateTime_(time) {