test
This commit is contained in:
parent
9ec3ec7d7d
commit
7d5d5ec4d5
1
bot.go
1
bot.go
@ -272,7 +272,6 @@ func botListParsingRule(m *tb.Message) {
|
||||
func botTimer(m *tb.Message) {
|
||||
r := regexp.MustCompile("^(?P<Duration>([0-9]*(s|m|h))+) \"(?P<Msg>(.*))\"$")
|
||||
if r.MatchString(m.Payload) {
|
||||
h, _ := strconv.ParseInt(r.ReplaceAllString(m.Payload, "${Hour}"), 10, 32)
|
||||
log.Printf("Timer : Duration : %s\n", r.ReplaceAllString(m.Payload, "${Duration}"))
|
||||
log.Printf("Timer : Msg : %s\n", r.ReplaceAllString(m.Payload, "${Msg}"))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user