移除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

@ -30,8 +30,7 @@ export class monthly extends ZZZPlugin {
);
const match = this.e.msg.match(reg);
if (!match) {
await this.reply('参数错误,请检查输入');
return false;
return this.reply('参数错误,请检查输入');
}
let year = match[3];
let month = match[5];
@ -46,12 +45,10 @@ export class monthly extends ZZZPlugin {
throw e;
});
if (!monthlyResponse) {
await this.reply('获取月报数据失败,请检查日期是否正确');
return false;
return this.reply('获取月报数据失败,请检查日期是否正确');
}
if (!monthlyResponse?.month_data) {
await this.reply('月报数据为空');
return false;
return this.reply('月报数据为空');
}
const monthlyData = new Monthly(monthlyResponse);
const finalData = {
@ -72,8 +69,7 @@ export class monthly extends ZZZPlugin {
});
if (!collect) {
await this.reply('获取月报数据失败');
return false;
return this.reply('获取月报数据失败');
}
const collectData = collect.map(item => new Monthly(item));