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
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue