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}"))
|
p.ObjItemID64, err = getCraftItemID(r.ReplaceAllString(m.Text, "${Cmd}"))
|
||||||
logOnError(err, "botCraftItem : getCraftItemID")
|
logOnError(err, "botCraftItem : getCraftItemID")
|
||||||
|
|
||||||
|
if r.ReplaceAllString(m.Text, "${Quantity}") != nil {
|
||||||
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 {
|
||||||
|
p.Quantity = 1
|
||||||
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c := TGCommand{
|
c := TGCommand{
|
||||||
|
Loading…
Reference in New Issue
Block a user