This commit is contained in:
shoopea 2020-02-03 14:32:51 +08:00
parent 1d044301ab
commit 428bfe102c

2
msg.go
View File

@ -278,7 +278,7 @@ func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha
func parseSubTypeMessageTributesStatsAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageTributesStatsAck, error) {
cwm := ChatWarsMessageTributesStatsAck{}
cwm.Msg = m
cwm.Tributes = make([]ChatWarsTribute{}, 0)
cwm.Tributes = new([]ChatWarsTribute{}, 0)
re := regexp.MustCompile(`(\n(?P<Date>[1-9]{2} [a-zA-Z]+ [0-9]{4} [0-9]{2}:[0-9]{2}) - (?P<Item>[a-zA-Z]+) x (?P<Quantity>[0-9]+), (?P<Exp>[0-9]+)🔥)`)
for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Tributes}"), -1) {