From 8614823e7c0c99f16986873f183fdb90a6ae905a Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 19 Jul 2020 16:57:39 +0200 Subject: [PATCH] fix --- bot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.go b/bot.go index 8b3187b..355e41f 100644 --- a/bot.go +++ b/bot.go @@ -1592,7 +1592,7 @@ func botTimer(m *tb.Message) { } - r := regexp.MustCompile("^(?P([0-9]+)(?P([0-9]*(s|m|h))+) \"(?P(.*))\"$") + r = regexp.MustCompile("^(?P([0-9]+)(?P([0-9]*(s|m|h))+) \"(?P(.*))\"$") if r.MatchString(m.Payload) { if clt.TGUserID64 != cfg.Bot.Admin { c := TGCommand{ @@ -1614,7 +1614,7 @@ func botTimer(m *tb.Message) { } TGCmdQueue <- c } else { - userID, _ = strconv.ParseInt(r.ReplaceAllString(m.Text, "${User}"), 10, 64) + userID, _ := strconv.ParseInt(r.ReplaceAllString(m.Text, "${User}"), 10, 64) p := JobPayloadMsgClient{ Text: r.ReplaceAllString(m.Payload, "${Msg}"), MsgID64: int64(m.ID),