feat: 挑战定时提醒

This commit is contained in:
Qian23333 2025-08-15 08:35:04 +08:00
parent 607b85c922
commit 534ef0765e
6 changed files with 340 additions and 0 deletions

29
apps/manage/remind.js Normal file
View file

@ -0,0 +1,29 @@
import settings from '../../lib/settings.js';
import { rulePrefix } from '../../lib/common.js';
import ZZZPlugin from '../../lib/plugin.js';
export class RemindManage extends ZZZPlugin {
constructor() {
super({
name: '[ZZZ-Plugin]RemindManage',
dsc: '提醒功能管理',
event: 'message',
priority: 40, // 管理插件优先级较高
rule: [
{
reg: `${rulePrefix}设置提醒时间\\s*(.+)`,
fnc: 'setCron',
permission: 'master',
},
],
});
}
async setCron() {
const match = this.e.msg.match(/设置提醒时间\s*(.+)/);
if (!match) return;
const cron = match.trim();
settings.setSingleConfig('remind', 'cron', cron);
await this.reply(`式舆防卫战/危局强袭战提醒的定时任务已更新为: ${cron}`);
}
}