mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 02:00:24 +00:00
✨ 🎨 ⚡️ pixiv 图片缓存集中到 data/pixiv
This commit is contained in:
@@ -77,9 +77,9 @@ func init() {
|
||||
rannum := randintn(len(soutujson.Illusts))
|
||||
pom2 := soutujson.Illusts[rannum].ImageUrls.Medium[19:]
|
||||
u := pom1 + pom2
|
||||
_, err := imgpool.NewImage(ctxext.Send(ctx), ctxext.GetMessage(ctx), u[strings.LastIndex(u, "/")+1:], u)
|
||||
if err != nil && err.Error() == "send image error" {
|
||||
ctx.SendChain(message.Image(u))
|
||||
m, hassent, err := imgpool.NewImage(ctxext.Send(ctx), ctxext.GetMessage(ctx), u[strings.LastIndex(u, "/")+1:], u)
|
||||
if err == nil && !hassent {
|
||||
ctx.SendChain(message.Image(m.String()))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user