diff --git a/def.go b/def.go index 7c5757f..58d4777 100644 --- a/def.go +++ b/def.go @@ -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 diff --git a/rules.go b/rules.go index 68d2246..fdaf743 100644 --- a/rules.go +++ b/rules.go @@ -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(\\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") } diff --git a/sql.go b/sql.go index 2e0afe5..869509f 100644 --- a/sql.go +++ b/sql.go @@ -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) + `)