mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-06 15:20:22 +00:00
⬆️ update deps
This commit is contained in:
@@ -51,7 +51,7 @@ func init() {
|
||||
url = strings.ReplaceAll(url, "i.pixiv.cat", "i.pixiv.re")
|
||||
name := url[strings.LastIndex(url, "/")+1 : len(url)-4]
|
||||
m, err := pool.GetImage(name)
|
||||
if err != nil && err != pool.ErrImgFileAsync {
|
||||
if err != nil {
|
||||
m.SetFile(url)
|
||||
_, err = m.Push(ctxext.SendToSelf(ctx), ctxext.GetMessage(ctx))
|
||||
process.SleepAbout1sTo2s()
|
||||
|
||||
@@ -54,7 +54,7 @@ func init() { // 插件主体
|
||||
}
|
||||
logrus.Debugln("[sausenao]开始下载", n)
|
||||
err1 := illust.DownloadToCache(i)
|
||||
if err != pool.ErrImgFileAsync && err1 == nil {
|
||||
if err1 == nil {
|
||||
m.SetFile(f)
|
||||
_, _ = m.Push(ctxext.SendToSelf(ctx), ctxext.GetMessage(ctx))
|
||||
}
|
||||
|
||||
@@ -163,10 +163,8 @@ func (p *imgpool) push(ctx *zero.Ctx, imgtype string, illust *pixiv.Illust) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if err != imagepool.ErrImgFileAsync {
|
||||
m.SetFile(f)
|
||||
_, _ = m.Push(ctxext.SendToSelf(ctx), ctxext.GetMessage(ctx))
|
||||
}
|
||||
m.SetFile(f)
|
||||
_, _ = m.Push(ctxext.SendToSelf(ctx), ctxext.GetMessage(ctx))
|
||||
msg = message.Image("file:///" + f)
|
||||
} else {
|
||||
msg = message.Image(m.String())
|
||||
|
||||
Reference in New Issue
Block a user