update g_stock

This commit is contained in:
shoopea 2019-12-13 19:37:58 +08:00
parent c7c02661ef
commit cb5a0c1640

12
job.go
View File

@ -712,7 +712,7 @@ func jobGStock(j Job) {
case 0: // send /g_stock_res
p.Progress = 1
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, cfg.Bot.Admin, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_res")
case 1: // send /g_stock_alch
@ -726,7 +726,7 @@ func jobGStock(j Job) {
}
p.Progress = 2
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, cfg.Bot.Admin, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_alch")
case 2: // send /g_stock_misc
@ -740,7 +740,7 @@ func jobGStock(j Job) {
}
p.Progress = 3
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, cfg.Bot.Admin, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_misc")
case 3: // send /g_stock_rec
@ -754,7 +754,7 @@ func jobGStock(j Job) {
}
p.Progress = 4
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, cfg.Bot.Admin, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_rec")
case 4: // send /g_stock_parts
@ -768,7 +768,7 @@ func jobGStock(j Job) {
}
p.Progress = 5
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, cfg.Bot.Admin, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_parts")
case 5: // send /g_stock_other
@ -782,7 +782,7 @@ func jobGStock(j Job) {
}
p.Progress = 6
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, cfg.Bot.Admin, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_other")
case 6: // collate everything and reply