fix: 缓存池有时无法发出图片

This commit is contained in:
fumiama
2022-02-19 23:41:11 +08:00
parent 7c1ddc6ab1
commit f1c9e2331c
7 changed files with 74 additions and 52 deletions

View File

@@ -173,7 +173,13 @@ func init() {
}
}
// 发送图片
ctx.SendChain(message.Image(m.String()))
id := ctx.SendChain(message.Image(m.String()))
if id.ID() == 0 {
id = ctx.SendChain(message.Image(m.String()).Add("cache", "0"))
if id.ID() == 0 {
ctx.SendChain(message.Text("图片发送失败,可能被风控了~"))
}
}
})
}