From 51801a7b9c1a6e61c8bf1ac55a41244af02fad46 Mon Sep 17 00:00:00 2001 From: Qian23333 <119576779+Qian23333@users.noreply.github.com> Date: Fri, 15 Aug 2025 17:14:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=AD=A3=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/manage/remind.js | 6 +++--- apps/remind.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/manage/remind.js b/apps/manage/remind.js index 6dade1c..801c5e6 100644 --- a/apps/manage/remind.js +++ b/apps/manage/remind.js @@ -13,7 +13,7 @@ export class RemindManage extends ZZZPlugin { priority: 40, // 管理插件优先级较高 rule: [ { - reg: `${rulePrefix}设置全局提醒\\s*(每日\\d+时|每周.\\d+时)`, + reg: `${rulePrefix}设置全局提醒时间\\s*(每日\\d+时|每周.\\d+时)`, fnc: 'setGlobalRemind', permission: 'master', }, @@ -45,7 +45,7 @@ export class RemindManage extends ZZZPlugin { async setGlobalRemind() { const match = this.e.msg.match(/(每日\d+时|每周.\d+时)/); if (!match) return; - const remindTime = match.trim(); + const remindTime = match[1]; // 将全局提醒时间写入yaml配置 settings.setConfig('remind.globalRemindTime', remindTime); @@ -55,7 +55,7 @@ export class RemindManage extends ZZZPlugin { async setMyRemindTime() { const match = this.e.msg.match(/(每日\d+时|每周.\d+时)/); if (!match) return; - const remindTime = match.trim(); + const remindTime = match[1]; let userConfig = await this.getUserConfig(this.e.user_id); if (!userConfig) { diff --git a/apps/remind.js b/apps/remind.js index 70f3d49..5dd0d37 100644 --- a/apps/remind.js +++ b/apps/remind.js @@ -126,7 +126,7 @@ export class Remind extends ZZZPlugin { async setMyAbyssThreshold() { const match = this.e.msg.match(/设置式舆阈值\s*(\d+)/); if (!match) return; - const threshold = Number(match); + const threshold = Number(match[1]); if (threshold < 1 || threshold > 7) { await this.reply('阈值必须在1到7之间'); @@ -151,7 +151,7 @@ export class Remind extends ZZZPlugin { async setMyDeadlyThreshold() { const match = this.e.msg.match(/设置危局阈值\s*(\d+)/); if (!match) return; - const threshold = Number(match); + const threshold = Number(match[1]); let userConfig = await this.getUserConfig(this.e.user_id); if (!userConfig) {