fix
This commit is contained in:
parent
912b6ae75e
commit
8614823e7c
4
bot.go
4
bot.go
@ -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),
|
||||||
|
Loading…
Reference in New Issue
Block a user