diff --git a/def.go b/def.go index 66afe29..3e15789 100644 --- a/def.go +++ b/def.go @@ -6,6 +6,16 @@ import ( "time" ) +type ChatWarsCommand struct { + Type int64 `json:"type"` + FromChatID64 int64 `json:"from_chat_id"` + FromUserID64 int64 `json:"from_user_id"` + FromMsgID64 int64 `json:"from_msg_id"` + ToChatID64 int64 `json:"to_chat_id"` + ToUserID64 int64 `json:"to_user_id"` + Text string `json:"text"` +} + type ChatWarsMessage struct { UserID64 int64 `json:"user_id"` SenderUserID64 int64 `json:"sender_user_id"` @@ -92,6 +102,12 @@ type JobPayloadSetDone struct { } const ( + commandForwardMsg = 1 + commandReplyMsg = 2 + commandSendMsg = 3 + commandDeleteMsg = 4 + commandRefreshMsg = 5 + objTypeUser = 1 objTypeGuild = 2 objTypeMessage = 3 diff --git a/sql.go b/sql.go index 3e4fc93..e4f56b0 100644 --- a/sql.go +++ b/sql.go @@ -1304,8 +1304,9 @@ func resetMsgParsingRules() { `.*(?P(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)): (?P\\+([0-9]+|NaN))\\n` + `.*(?P(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)): (?P\\+([0-9]+|NaN))\\n` + `(?s:.*)` + - `Battle (?P