This commit is contained in:
shoopea 2020-07-19 16:57:39 +02:00
parent 912b6ae75e
commit 8614823e7c

4
bot.go
View File

@ -1592,7 +1592,7 @@ func botTimer(m *tb.Message) {
} }
r := regexp.MustCompile("^(?P<User>([0-9]+)(?P<Duration>([0-9]*(s|m|h))+) \"(?P<Msg>(.*))\"$") r = regexp.MustCompile("^(?P<User>([0-9]+)(?P<Duration>([0-9]*(s|m|h))+) \"(?P<Msg>(.*))\"$")
if r.MatchString(m.Payload) { if r.MatchString(m.Payload) {
if clt.TGUserID64 != cfg.Bot.Admin { if clt.TGUserID64 != cfg.Bot.Admin {
c := TGCommand{ c := TGCommand{
@ -1614,7 +1614,7 @@ func botTimer(m *tb.Message) {
} }
TGCmdQueue <- c TGCmdQueue <- c
} else { } else {
userID, _ = strconv.ParseInt(r.ReplaceAllString(m.Text, "${User}"), 10, 64) userID, _ := strconv.ParseInt(r.ReplaceAllString(m.Text, "${User}"), 10, 64)
p := JobPayloadMsgClient{ p := JobPayloadMsgClient{
Text: r.ReplaceAllString(m.Payload, "${Msg}"), Text: r.ReplaceAllString(m.Payload, "${Msg}"),
MsgID64: int64(m.ID), MsgID64: int64(m.ID),