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