From 7bfa026679893a49af8af7d1c3b503653d860414 Mon Sep 17 00:00:00 2001 From: shoopea Date: Fri, 10 May 2019 19:04:21 +0800 Subject: [PATCH] tset --- bot.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bot.go b/bot.go index fbd8d2c..4be0e4d 100644 --- a/bot.go +++ b/bot.go @@ -84,7 +84,13 @@ func botMsgRescan(m *tb.Message) (string, error) { fmt.Println("botRescanMsg : !m.Private()") return ``, nil } - fmt.Println("botRescanMsg payload :", m.Payload) // - PrintText(m) + r := regexp.MustCompile("^[0-9]+$") + 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 }