update craft item
This commit is contained in:
parent
ca052bc10c
commit
f65c61236d
19
bot.go
19
bot.go
@ -721,11 +721,22 @@ func botCraftItem(m *ChatWarsMessage) {
|
||||
clt.Mux.Unlock()
|
||||
|
||||
p := JobPayloadCraftItem{
|
||||
MsgID64: m.ID64,
|
||||
ChatID64: m.ChatID64,
|
||||
ObjItemID64: getCraftItemID(m.Text),
|
||||
Status: 0,
|
||||
MsgID64: m.ID64,
|
||||
ChatID64: m.ChatID64,
|
||||
Status: 0,
|
||||
}
|
||||
p.ObjItemID64, err = getCraftItemID(m.Text)
|
||||
if err != nil {
|
||||
c := TGCommand{
|
||||
Type: commandReplyMsg,
|
||||
Text: fmt.Sprintf("%s", err),
|
||||
FromMsgID64: m.ID64,
|
||||
FromChatID64: m.ChatID64,
|
||||
}
|
||||
TGCmdQueue <- c
|
||||
return
|
||||
}
|
||||
|
||||
b, _ := json.Marshal(p)
|
||||
t := time.Now().UTC().Add(1 * time.Second)
|
||||
_, err = createJob(cacheObjSubType[`job_craft_item`], objJobPriority, userID64, 0, t, b)
|
||||
|
Loading…
Reference in New Issue
Block a user