!10 兼容喵崽合并消息type

Merge pull request !10 from AFanSKyQs/N/A
This commit is contained in:
Yoimiya 2023-03-08 12:53:37 +00:00 committed by Gitee
commit 822f619bf2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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) {