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

@ -26,8 +26,7 @@ export class Calendar extends ZZZPlugin {
)
.then(res => res.json());
if (!activityList?.data) {
await this.reply('获取活动列表失败');
return false;
return this.reply('获取活动列表失败');
}
const t = activityList?.data?.t || new Date().getTime().toString();
const activityContent = await request
@ -42,8 +41,7 @@ export class Calendar extends ZZZPlugin {
const htmlContent = calendarContent?.content || '';
if (!htmlContent) {
await this.reply('未找到活动日历');
return false;
return this.reply('未找到活动日历');
}
const imgReg = /<img.*?src="(.*?)".*?>/g;
const imgSrc = imgReg.exec(htmlContent)?.[1];
@ -52,6 +50,5 @@ export class Calendar extends ZZZPlugin {
} else {
await this.reply('未找到活动日历图片');
}
return false;
}
}