test
This commit is contained in:
parent
cc68ddb0d0
commit
ac9a38ef81
5
bot.go
5
bot.go
@ -727,8 +727,13 @@ func botCraftItem(m *ChatWarsMessage, r *regexp.Regexp) {
|
||||
}
|
||||
p.ObjItemID64, err = getCraftItemID(r.ReplaceAllString(m.Text, "${Cmd}"))
|
||||
logOnError(err, "botCraftItem : getCraftItemID")
|
||||
|
||||
if r.ReplaceAllString(m.Text, "${Quantity}") != nil {
|
||||
p.Quantity, err = strconv.ParseInt(r.ReplaceAllString(m.Text, "${Quantity}"), 10, 64)
|
||||
logOnError(err, "botCraftItem : ParseInt")
|
||||
} else {
|
||||
p.Quantity = 1
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
c := TGCommand{
|
||||
|
Loading…
Reference in New Issue
Block a user