This commit is contained in:
Qian23333 2025-08-16 15:08:03 +08:00
parent 072e02fb03
commit d6f6365146

View file

@ -50,6 +50,7 @@ export class Remind extends ZZZPlugin {
{ {
reg: `${rulePrefix}设置全局提醒时间\\s*(每日\\d+时(?:(\\d+)分)?|每周.\\d+时(?:(\\d+)分)?)`, reg: `${rulePrefix}设置全局提醒时间\\s*(每日\\d+时(?:(\\d+)分)?|每周.\\d+时(?:(\\d+)分)?)`,
fnc: 'setGlobalRemindTime', fnc: 'setGlobalRemindTime',
permission: 'master',
}, },
{ {
reg: `${rulePrefix}全局提醒时间$`, reg: `${rulePrefix}全局提醒时间$`,
@ -363,7 +364,7 @@ export class Remind extends ZZZPlugin {
this.reply('仅限主人设置', false, { at: true, recallMsg: 100 }); this.reply('仅限主人设置', false, { at: true, recallMsg: 100 });
return false; return false;
} }
const match = this.e.msg.match(/设置全局提醒时间\s*(每日\d+时(?:(\d+)分)?)|每周.\d+时(?:(\d+)分)?))/); const match = this.e.msg.match(/设置全局提醒时间\s*(每日\d+时(?:(\d+)分)?|每周.\d+时(?:(\d+)分)?)/);
if (!match) return; if (!match) return;
const globalRemindTime = match[1]; const globalRemindTime = match[1];
const minute = Number(match[2]) || Number(match[3]) || 0; const minute = Number(match[2]) || Number(match[3]) || 0;