fix delay

This commit is contained in:
shoopea 2019-08-24 14:00:55 +08:00
parent e6c6543f2f
commit ef1818de55
3 changed files with 4 additions and 1 deletions

3
def.go
View File

@ -58,7 +58,7 @@ type TGCommand struct {
Text string `json:"text"`
Document tb.Document `json:"document"`
ParseMode int64 `json:"parse_mode"`
Delay int64 `json:"delay"`
Delay time.Delay `json:"delay"`
}
type ChatWarsCastle struct {
@ -407,6 +407,7 @@ const (
objSubTypeMessageGStockAnyAck = 362 // result from any /g_stock_xxx (done)
objSubTypeMessageGStockReq = 363 // /g_stock (done)
objSubTypeMessageGStockAck = 364 // result from /g_stock (done)
objSubTypeMessageBusy = 365 // too busy now
objSubTypeJobPillage = 601
objSubTypeJobTribute = 602
objSubTypeJobStatus = 603

View File

@ -191,6 +191,7 @@ func resetMsgParsingRules() {
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockPartReq) + `, "Guild stock parts Req", "^/g_stock_parts$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockOthReq) + `, "Guild stock other Req", "^/g_stock_other$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockAnyAck) + `, "Guild stock any Ack", "^Guild Warehouse:(?P<Stock>(\\n[0-9a-z]+ (.*) x ([0-9]+))+)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageBusy) + `, "Too busy now", "^You are too busy with a different adventure. Try a bit later.$")
;`)
failOnError(err, "resetMsgParsingRules : populate table msg_rules")
}

1
sql.go
View File

@ -487,6 +487,7 @@ func initDB() {
,(` + strconv.Itoa(objSubTypeMessageGStockAnyAck) + `, "gstock_any_ack", "Gstock Any Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageGStockReq) + `, "gstock_req", "GStock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageGStockAck) + `, "gstock_ack", "GStock Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageBusy) + `, "busy", "Busy", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeJobPillage) + `, "job_pillage", "Pillage job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(objSubTypeJobTribute) + `, "job_tribute", "Tribute job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(objSubTypeJobWithdrawal) + `, "job_withdraw", "Withdrawal job", ` + strconv.Itoa(objTypeJob) + `)