mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
移除apps插件非必要return false,拦截指令向后传递 #138
This commit is contained in:
parent
3273f256fc
commit
9d676fa70a
17 changed files with 82 additions and 173 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue