优化 ctx ERROR

This commit is contained in:
源文雨
2023-03-25 20:23:56 +08:00
parent 1aa11879dc
commit 0c8dfb3f9c
3 changed files with 11 additions and 11 deletions

View File

@@ -25,12 +25,12 @@ func init() {
func(ctx *zero.Ctx) bool {
data, err := engine.GetLazyData("wife.json", true)
if err != nil {
ctx.SendChain(message.Text("ERROR:", err))
ctx.SendChain(message.Text("ERROR: ", err))
return false
}
err = json.Unmarshal(data, &cards)
if err != nil {
ctx.SendChain(message.Text("ERROR:", err))
ctx.SendChain(message.Text("ERROR: ", err))
return false
}
logrus.Infof("[wife]加载%d个老婆", len(cards))