This commit is contained in:
shoopea 2020-01-05 17:46:50 +08:00
parent 40f54ad73a
commit 0557b9d53c

4
bot.go
View File

@ -940,8 +940,8 @@ func botGWithdraw(m *tb.Message) {
items := []ChatWarsItems{}
for _, l := range rx.FindAllStringSubmatch(m.Payload, -1) {
log.Printf("botGWithdraw : %s / %s / %s\n", l[0], l[1], l[2])
i := r.ReplaceAllString(l[0], "${Item}")
q, _ := strconv.ParseInt(r.ReplaceAllString(l[0], "${Quantity}"), 10, 64)
i := l[1]
q, _ := strconv.ParseInt(l[2], 10, 64)
item := ChatWarsItems{
Item: i,
Quantity: q,