This commit is contained in:
shoopea 2019-05-10 19:04:21 +08:00
parent 6d93169aee
commit 7bfa026679

10
bot.go
View File

@ -84,7 +84,13 @@ func botMsgRescan(m *tb.Message) (string, error) {
fmt.Println("botRescanMsg : !m.Private()") fmt.Println("botRescanMsg : !m.Private()")
return ``, nil return ``, nil
} }
fmt.Println("botRescanMsg payload :", m.Payload) // <PAYLOAD> r := regexp.MustCompile("^[0-9]+$")
PrintText(m) if r.MatchString(m.Payload) {
return "Rescaning msg #" + m.Payload, nil
}
r := regexp.MustCompile("^all$")
if r.MatchString(m.Payload) {
return "Rescaning all msg", nil
}
return `rescaning`, nil return `rescaning`, nil
} }