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),