Skip to content

Commit

Permalink
Update fish.go
Browse files Browse the repository at this point in the history
  • Loading branch information
fangliuyu authored Sep 3, 2023
1 parent 8f29c2a commit d0eaa2a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugin/mcfish/fish.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,20 +302,22 @@ func init() {
}
if len(thingNameList) == 1 {
thingName := ""
numberOfFish := 0
for name := range thingNameList {
thingName = name
numberOfFish = number
}
if picName != "" {
pic, err := engine.GetLazyData(picName+".png", false)
if err != nil {
logrus.Warnln("[mcfish]error:", err)
ctx.SendChain(message.At(uid), message.Text("恭喜你钓到了", thingName, "\n", msg))
ctx.SendChain(message.At(uid), message.Text("恭喜你钓到了", numberOfFish,thingName, "\n", msg))
return
}
ctx.SendChain(message.At(uid), message.Text("恭喜你钓到了", thingName, "\n", msg), message.ImageBytes(pic))
ctx.SendChain(message.At(uid), message.Text("恭喜你钓到了",numberOfFish, thingName, "\n", msg), message.ImageBytes(pic))
return
}
ctx.SendChain(message.At(uid), message.Text("恭喜你钓到了", thingName, "\n", msg))
ctx.SendChain(message.At(uid), message.Text("恭喜你钓到了",numberOfFish, thingName, "\n", msg))
return
}
msgInfo := make(message.Message, 0, 3+len(thingNameList))
Expand Down

0 comments on commit d0eaa2a

Please sign in to comment.