diff --git a/bot.go b/bot.go index 9bb16db..52de799 100644 --- a/bot.go +++ b/bot.go @@ -212,7 +212,7 @@ func botListParsingRules(m *tb.Message) { return } - for v, _ := range msgParsingRules { + for _, v := range msgParsingRules { s := fmt.Sprintf("[%d] %s\n", v.ID, v.Descn) } @@ -230,7 +230,7 @@ func botListParsingRule(m *tb.Message) { r := regexp.MustCompile("^[0-9]+$") if r.MatchString(m.Payload) { i, _ := strconv.ParseInt(m.Payload, 10, 64) - for v, _ := range msgParsingRules { + for _, v := range msgParsingRules { if v.ID == i { c := TGCommand{ Type: commandReplyMsg,