mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
发送文件 URL 加上 file:// (#533)
This commit is contained in:
parent
1d27a4be4d
commit
86cfca8da0
@ -42,7 +42,7 @@ let Avatar = {
|
|||||||
}
|
}
|
||||||
let bg = char.getCardImg(Cfg.get('charPicSe', false))
|
let bg = char.getCardImg(Cfg.get('charPicSe', false))
|
||||||
if (renderType === 'photo') {
|
if (renderType === 'photo') {
|
||||||
e.reply(segment.image(process.cwd() + '/plugins/miao-plugin/resources/' + bg.img))
|
e.reply(segment.image(`file://${process.cwd()}/plugins/miao-plugin/resources/${bg.img}`))
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
let uid = e.uid || (e.targetUser && e.targetUser.uid)
|
let uid = e.uid || (e.targetUser && e.targetUser.uid)
|
||||||
|
@ -234,7 +234,7 @@ export async function profileImgList (e) {
|
|||||||
// 合并转发最多99? 但是我感觉不会有这么多先不做处理
|
// 合并转发最多99? 但是我感觉不会有这么多先不做处理
|
||||||
console.log(`${path}${imgs[i]}`)
|
console.log(`${path}${imgs[i]}`)
|
||||||
msglist.push({
|
msglist.push({
|
||||||
message: [`${i + 1}.`, segment.image(`${path}/${imgs[i]}`)],
|
message: [`${i + 1}.`, segment.image(`file://${path}/${imgs[i]}`)],
|
||||||
nickname: nickname,
|
nickname: nickname,
|
||||||
user_id: Bot.uin
|
user_id: Bot.uin
|
||||||
})
|
})
|
||||||
|
@ -44,7 +44,7 @@ export async function getOriginalPicture (e) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (imgPath && imgPath.img) {
|
if (imgPath && imgPath.img) {
|
||||||
e.reply([segment.image(process.cwd() + '/plugins/miao-plugin/resources/' + decodeURIComponent(imgPath.img))], false, { recallMsg: 30 })
|
e.reply(segment.image(`file://${process.cwd()}/plugins/miao-plugin/resources/${decodeURIComponent(imgPath.img)}`), false, { recallMsg: 30 })
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -52,7 +52,7 @@ export async function getOriginalPicture (e) {
|
|||||||
let time = new Date()
|
let time = new Date()
|
||||||
// 对at错图像的增加嘲讽...
|
// 对at错图像的增加嘲讽...
|
||||||
if (time / 1000 - source.time < 3600) {
|
if (time / 1000 - source.time < 3600) {
|
||||||
e.reply([segment.image(process.cwd() + '/plugins/miao-plugin/resources/common/face/what.jpg')])
|
e.reply(segment.image(`file://${process.cwd()}/plugins/miao-plugin/resources/common/face/what.jpg`))
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ const CharWiki = {
|
|||||||
if (mode === 'pic') {
|
if (mode === 'pic') {
|
||||||
let img = char.getCardImg(Cfg.get('charPicSe', false), false)
|
let img = char.getCardImg(Cfg.get('charPicSe', false), false)
|
||||||
if (img && img.img) {
|
if (img && img.img) {
|
||||||
e.reply(segment.image(process.cwd() + '/plugins/miao-plugin/resources/' + img.img))
|
e.reply(segment.image(`file://${process.cwd()}/plugins/miao-plugin/resources/${img.img}`))
|
||||||
} else {
|
} else {
|
||||||
e.reply('暂无图片')
|
e.reply('暂无图片')
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user