mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-22 06:58:24 +00:00
兼容喵崽合并消息type
喵崽解析的合并消息type是forward,resid也是直接在val.id属性。 Signed-off-by: AFanSKyQs <3141865879@qq.com>
This commit is contained in:
parent
29e1c446a7
commit
1a16ab2ea4
@ -53,8 +53,14 @@ export async function uploadCharacterImg (e) {
|
||||
for (let val of source.message) {
|
||||
if (val.type === 'image') {
|
||||
imageMessages.push(val)
|
||||
} else if (val.type === 'xml') { // 支持合并转发消息内置的图片批量上传,喵喵 喵喵喵? 喵喵喵喵
|
||||
let resid = val.data.match(/m_resid="(\d|\w|\/|\+)*"/)[0].replace(/m_resid=|"/g, '')
|
||||
} else if (val.type === 'xml' || val.type === 'forward') {// 支持合并转发消息内置的图片批量上传,喵喵 喵喵喵? 喵喵喵喵
|
||||
let resid
|
||||
try {
|
||||
resid = val.data.match(/m_resid="(\d|\w|\/|\+)*"/)[0].replace(/m_resid=|"/g, '')
|
||||
} catch (err) {
|
||||
console.log('Miao合并上传:转换id获取')
|
||||
resid = val.id
|
||||
}
|
||||
if (!resid) break
|
||||
let message = await Bot.getForwardMsg(resid)
|
||||
for (const item of message) {
|
||||
|
Loading…
Reference in New Issue
Block a user