mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 06:20:08 +08:00
🐛 fix fortune
This commit is contained in:
parent
4baead3490
commit
80f49c47c6
@ -144,6 +144,7 @@ func init() {
|
||||
|
||||
m, err := imgpool.NewImage(ctx, cachefile, cachefile)
|
||||
if err != nil {
|
||||
logrus.Debugln("[fortune]", err)
|
||||
if file.IsNotExist(cachefile) {
|
||||
f, err := os.Create(cachefile)
|
||||
if err != nil {
|
||||
@ -156,9 +157,8 @@ func init() {
|
||||
ctx.SendChain(message.Text("ERROR: ", err))
|
||||
return
|
||||
}
|
||||
} else {
|
||||
m, err = imgpool.NewImage(ctx, cachefile, cachefile)
|
||||
}
|
||||
m, err = imgpool.NewImage(ctx, cachefile, cachefile)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user