From e67127ae35d9cddd115407f1c3540cef6d3b7338 Mon Sep 17 00:00:00 2001 From: zhiyu1998 <542716863@qq.com> Date: Fri, 23 Aug 2024 13:09:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=B4=B4=E5=90=A7=E8=A7=86=E9=A2=91=E6=97=A0=E6=B3=95=E5=8F=91?= =?UTF-8?q?=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/tools.js b/apps/tools.js index d00cfb5..8a7ceac 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -1914,11 +1914,23 @@ export class tools extends plugin { if (content && content.length > 0) { sendContent = [sendContent] for (let contentElement of content) { + logger.info(contentElement); if (contentElement?.cdn_src !== undefined) { + // 图片 sendContent.unshift(segment.image(contentElement.cdn_src)); - } else if (contentElement?.text !== undefined) { + } + if (contentElement?.text !== undefined) { + // 普通文字 sendContent.push(`\n\n📝 简介:${contentElement.text}`); } + if (contentElement?.link !== undefined) { + // 视频 + this.queue.add(async () => { + await this.downloadVideo(contentElement?.link).then(filePath => { + this.sendVideoToUpload(e, `${filePath}/temp.mp4`); + }); + }) + } } } e.reply(sendContent, true);