mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复贴吧视频无法发送
This commit is contained in:
parent
38b8355330
commit
e67127ae35
@ -1914,11 +1914,23 @@ export class tools extends plugin {
|
|||||||
if (content && content.length > 0) {
|
if (content && content.length > 0) {
|
||||||
sendContent = [sendContent]
|
sendContent = [sendContent]
|
||||||
for (let contentElement of content) {
|
for (let contentElement of content) {
|
||||||
|
logger.info(contentElement);
|
||||||
if (contentElement?.cdn_src !== undefined) {
|
if (contentElement?.cdn_src !== undefined) {
|
||||||
|
// 图片
|
||||||
sendContent.unshift(segment.image(contentElement.cdn_src));
|
sendContent.unshift(segment.image(contentElement.cdn_src));
|
||||||
} else if (contentElement?.text !== undefined) {
|
}
|
||||||
|
if (contentElement?.text !== undefined) {
|
||||||
|
// 普通文字
|
||||||
sendContent.push(`\n\n📝 简介:${contentElement.text}`);
|
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);
|
e.reply(sendContent, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user