compilation error fix

This commit is contained in:
shoopea 2019-08-12 15:36:28 +08:00
parent c84c29ccc5
commit 2a8cc8feef

13
bot.go
View File

@ -574,8 +574,17 @@ func botGStock(m *tb.Message) {
} }
b, _ := json.Marshal(p) b, _ := json.Marshal(p)
t := time.Now().UTC().Add(1 * time.Second) t := time.Now().UTC().Add(1 * time.Second)
objID64, err := createJob(objSubTypeJobGStock, objJobPriority, int64(m.Chat.ID), t, b) _, err := createJob(objSubTypeJobGStock, objJobPriority, int64(m.Chat.ID), t, b)
if err != nil {
c := TGCommand{
Type: commandReplyMsg,
Text: fmt.Sprintf("%s", err),
FromMsgID64: int64(m.ID),
FromChatID64: m.Chat.ID,
}
TGCmdQueue <- c
} else {
c := TGCommand{ c := TGCommand{
Type: commandReplyMsg, Type: commandReplyMsg,
Text: "Stock requested", Text: "Stock requested",
@ -583,6 +592,8 @@ func botGStock(m *tb.Message) {
FromChatID64: m.Chat.ID, FromChatID64: m.Chat.ID,
} }
TGCmdQueue <- c TGCmdQueue <- c
}
return return
} }