This commit is contained in:
shoopea 2020-01-05 17:43:23 +08:00
parent f79e9d5f66
commit 7219be55c3

18
bot.go
View File

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