This commit is contained in:
shoopea 2020-01-27 12:42:21 +08:00
parent ac9a38ef81
commit dcccf21169

2
bot.go
View File

@ -728,7 +728,7 @@ func botCraftItem(m *ChatWarsMessage, r *regexp.Regexp) {
p.ObjItemID64, err = getCraftItemID(r.ReplaceAllString(m.Text, "${Cmd}")) p.ObjItemID64, err = getCraftItemID(r.ReplaceAllString(m.Text, "${Cmd}"))
logOnError(err, "botCraftItem : getCraftItemID") logOnError(err, "botCraftItem : getCraftItemID")
if r.ReplaceAllString(m.Text, "${Quantity}") != nil { if len(r.ReplaceAllString(m.Text, "${Quantity}")) > 0 {
p.Quantity, err = strconv.ParseInt(r.ReplaceAllString(m.Text, "${Quantity}"), 10, 64) p.Quantity, err = strconv.ParseInt(r.ReplaceAllString(m.Text, "${Quantity}"), 10, 64)
logOnError(err, "botCraftItem : ParseInt") logOnError(err, "botCraftItem : ParseInt")
} else { } else {