mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-17 21:57:44 +00:00
fix: 修复消息正则
This commit is contained in:
parent
9b88b14353
commit
51801a7b9c
2 changed files with 5 additions and 5 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue