This commit is contained in:
shoopea 2019-05-25 22:36:48 +08:00
parent 5c7da6e1d2
commit 546f9bcdfe

4
bot.go
View File

@ -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,