diff --git a/apps/tools.js b/apps/tools.js index 92c5caf..eaf1c9c 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -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;