Skip to content

Commit

Permalink
fix(emojimix): add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed May 2, 2024
1 parent 803c027 commit a4094cc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugin/emojimix/mix.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,27 @@ func init() {
logrus.Warnln("[emojimix] copy err:", err)
return
}
_ = enc.Close()
ctx.SendChain(message.Image(binary.BytesToString(buf.Bytes())))
err = enc.Close()
if err != nil {
logrus.Warnln("[emojimix] close enc err:", err)
return
}
ctx.SendChain(message.Image(binary.BytesToString(buf.Bytes()), ctx.Event.Message.String()))
}
resp, err := http2.Get(u1)
if err == nil {
send(resp)
_ = resp.Body.Close()
return
}
logrus.Warnln("[emojimix] http get u1 err:", err)
resp, err = http2.Get(u2)
if err == nil {
send(resp)
_ = resp.Body.Close()
return
}
logrus.Warnln("[emojimix] http get u2 err:", err)
})
}

Expand Down

0 comments on commit a4094cc

Please sign in to comment.