From 33aa4ea6dc78751359ad30699de7a8fc5ebfc682 Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 15 May 2019 16:58:25 +0800 Subject: [PATCH] test --- def.go | 16 ++++++++++++++++ sql.go | 6 ++++-- workers.go | 13 +++---------- 3 files changed, 23 insertions(+), 12 deletions(-) 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