mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 10:10:25 +00:00
✨ 🎨 ⚡️ pixiv 图片缓存集中到 data/pixiv
This commit is contained in:
@@ -164,15 +164,17 @@ func init() {
|
||||
}
|
||||
}
|
||||
m.SetFile(file.BOTPATH + "/" + cachefile)
|
||||
err = m.Push(ctxext.Send(ctx), ctxext.GetMessage(ctx))
|
||||
if err != nil && err.Error() == "send image error" {
|
||||
ctx.SendChain(message.Image("file:///" + file.BOTPATH + "/" + cachefile))
|
||||
hassent, err := m.Push(ctxext.Send(ctx), ctxext.GetMessage(ctx))
|
||||
if err != nil {
|
||||
ctx.SendChain(message.Text("ERROR: ", err))
|
||||
return
|
||||
}
|
||||
if hassent {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 发送图片
|
||||
ctx.SendChain(message.Image(m.String()))
|
||||
}
|
||||
// 发送图片
|
||||
ctx.SendChain(message.Image(m.String()))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user