test
This commit is contained in:
parent
ac9a38ef81
commit
dcccf21169
2
bot.go
2
bot.go
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user