This commit is contained in:
shoopea 2019-05-10 22:00:29 +08:00
parent 194474df03
commit 8b63617cfc

5
bot.go
View File

@ -89,9 +89,9 @@ func botMsgRescan(m *tb.Message) (string, error) {
}
r := regexp.MustCompile("^[0-9]+$")
if r.MatchString(m.Payload) {
m, _ := strconv.ParseInt(m.Payload, 10, 64)
msgID64, _ := strconv.ParseInt(m.Payload, 10, 64)
p := JobPayloadRescanMsg{
MsgID64: m,
MsgID64: msgID64,
}
b, _ := json.Marshal(p)
err := createJob(objSubTypeJobRescanMsg, 2, time.Now(), b)
@ -105,7 +105,6 @@ func botMsgRescan(m *tb.Message) (string, error) {
}
r = regexp.MustCompile("^all$")
if r.MatchString(m.Payload) {
m, _ := strconv.ParseInt(m.Payload, 10, 64)
p := JobPayloadRescanAllMsg{}
b, _ := json.Marshal(p)
err := createJob(objSubTypeJobRescanAllMsg, 3, time.Now(), b)