移除apps插件非必要return false,拦截指令向后传递 #138

This commit is contained in:
UCPr 2025-09-09 03:30:27 +08:00
parent 3273f256fc
commit 9d676fa70a
17 changed files with 82 additions and 173 deletions

View file

@ -3,8 +3,7 @@ import settings from '../../lib/settings.js';
export async function addAlias() {
if (!this.e.isMaster) {
this.reply('仅限主人设置', false, { at: true, recallMsg: 100 });
return false;
return this.reply('仅限主人设置', false, { at: true, recallMsg: 100 });
}
const match = /添加(\S+)别名(\S+)$/g.exec(this.e.msg);
const key = match[1];
@ -34,8 +33,7 @@ export async function addAlias() {
export async function deleteAlias() {
if (!this.e.isMaster) {
this.reply('仅限主人设置', false, { at: true, recallMsg: 100 });
return false;
return this.reply('仅限主人设置', false, { at: true, recallMsg: 100 });
}
const match = /删除别名(\S+)$/g.exec(this.e.msg);
const key = match[1];