mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-22 06:58:24 +00:00
parent
cecc16d574
commit
e1a5094232
@ -42,8 +42,22 @@ export async function uploadCharacterImg (e) {
|
||||
imageMessages.push(val)
|
||||
}
|
||||
}
|
||||
let source
|
||||
if (e.isGroup) {// 支持at图片添加,以及支持后发送
|
||||
source = (await e.group.getChatHistory(e.source.seq, 1)).pop()
|
||||
} else {
|
||||
source = (await e.friend.getChatHistory(e.source.time, 1)).pop()
|
||||
}
|
||||
if (source) {
|
||||
for (let val of source.message) {
|
||||
if (val.type === 'image') {
|
||||
imageMessages.push(val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (imageMessages.length <= 0) {
|
||||
// TODO 支持at图片添加,以及支持后发送
|
||||
|
||||
e.reply('消息中未找到图片,请将要发送的图片与消息一同发送..')
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user