mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: V1.5.1 修复miyoushe解析的部分问题
1. 修复部分图片、视频无法解析问题 2. 修复解析的内容出现Object问题
This commit is contained in:
parent
4d1b289597
commit
77bc362ebe
@ -1105,12 +1105,24 @@ export class tools extends plugin {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
realContent = content;
|
realContent = content;
|
||||||
}
|
}
|
||||||
const normalMsg = `识别:米游社,${ subject }\n${ realContent }`;
|
const normalMsg = `识别:米游社,${ subject }\n${ realContent?.describe || "" }`;
|
||||||
const replyMsg = cover ? [segment.image(cover), normalMsg] : normalMsg;
|
const replyMsg = cover ? [segment.image(cover), normalMsg] : normalMsg;
|
||||||
e.reply(replyMsg);
|
e.reply(replyMsg);
|
||||||
|
// 图片
|
||||||
|
if (images && images.length > 1) {
|
||||||
|
const replyImages = images.map(item => {
|
||||||
|
return {
|
||||||
|
message: segment.image(item),
|
||||||
|
nickname: this.e.sender.card || this.e.user_id,
|
||||||
|
user_id: this.e.user_id,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
e.reply(Bot.makeForwardMsg(replyImages));
|
||||||
|
}
|
||||||
// 视频
|
// 视频
|
||||||
if (structured_content) {
|
const sc = JSON.parse(structured_content);
|
||||||
const sc = JSON.parse(structured_content);
|
logger.info(sc.length)
|
||||||
|
if (sc?.[0]?.insert.vod.resolutions) {
|
||||||
// 逐个遍历是否包含url
|
// 逐个遍历是否包含url
|
||||||
for (let i = 0; i < sc.length; i++) {
|
for (let i = 0; i < sc.length; i++) {
|
||||||
const resolutions = sc?.[i]?.insert.vod.resolutions;
|
const resolutions = sc?.[i]?.insert.vod.resolutions;
|
||||||
@ -1124,17 +1136,6 @@ export class tools extends plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 这个判断防止发送重复图片
|
|
||||||
if (images && images.length > 1) {
|
|
||||||
const replyImages = images.map(item => {
|
|
||||||
return {
|
|
||||||
message: segment.image(item),
|
|
||||||
nickname: this.e.sender.card || this.e.user_id,
|
|
||||||
user_id: this.e.user_id,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
e.reply(Bot.makeForwardMsg(replyImages));
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
- {
|
- {
|
||||||
version: 1.5.0,
|
version: 1.5.1,
|
||||||
data:
|
data:
|
||||||
[
|
[
|
||||||
新增<span class="cmd">最右解析</span>功能,
|
新增<span class="cmd">最右解析</span>功能,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user