Fix getting all guides when some of them don't exist

This commit is contained in:
ZM.J 2024-07-27 16:58:33 +08:00
parent 075a6d4fd0
commit 541709453b

View file

@ -126,7 +126,9 @@ export class Guide extends ZZZPlugin {
for (let i = 1; i <= this.maxNum; i++) {
const guidePath = await this.getGuidePath(i, name, !!isUpdate);
// msg.push(segment.image(`file://${guidePath}`));
msg.push(segment.image(guidePath));
if (guidePath) {
msg.push(segment.image(guidePath));
}
}
if (msg.length) {
await this.reply(await common.makeForwardMsg(this.e, [msg]));