compilation error fix

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

25
bot.go
View File

@ -574,15 +574,26 @@ func botGStock(m *tb.Message) {
}
b, _ := json.Marshal(p)
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)
c := TGCommand{
Type: commandReplyMsg,
Text: "Stock requested",
FromMsgID64: int64(m.ID),
FromChatID64: m.Chat.ID,
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{
Type: commandReplyMsg,
Text: "Stock requested",
FromMsgID64: int64(m.ID),
FromChatID64: m.Chat.ID,
}
TGCmdQueue <- c
}
TGCmdQueue <- c
return
}