🎈 perf: 更新小红书逻辑

This commit is contained in:
zhiyu1998 2023-03-06 23:44:27 +08:00
parent 527ed23612
commit 1e3ecd5efc

View File

@ -535,8 +535,10 @@ export class tools extends plugin {
});
})
})
let path = []
const images = await Promise.all(imagesPath).then(paths => {
return paths.map(item => {
path.push(item)
return {
message: segment.image(fs.readFileSync(item)),
nickname: e.sender.card || e.user_id,
@ -545,6 +547,10 @@ export class tools extends plugin {
})
})
await this.reply(await Bot.makeForwardMsg(images));
// 清理文件
path.forEach(item => {
fs.fs.unlinkSync(item);
})
});
return true;