This commit is contained in:
shoopea 2020-01-06 12:20:00 +08:00
parent 9277d273a9
commit b387d812f4
3 changed files with 42 additions and 8 deletions

View File

@ -134,19 +134,27 @@ func clientFwdCWMsg(userID64 int64, fromMsgID64 int64, fromChatID64 int64, toCha
} }
func clientSendTGMsgDelay(userID64 int64, chatID64 int64, s string, d time.Duration) {
c := TGCommand{
Type: commandSendMsg,
Text: s,
FromUserID64: userID64,
ToChatID64: chatID64,
Delay: d,
}
MQTGCmdQueue <- c
}
func clientSendTGMsg(userID64 int64, chatID64 int64, s string) {
clientSendCWMsgDelay(userID64, chatID64, s, 0)
}
func clientSendCWMsg(userID64 int64, s string) { func clientSendCWMsg(userID64 int64, s string) {
clientSendCWMsgDelay(userID64, s, 0) clientSendCWMsgDelay(userID64, s, 0)
} }
func clientSendCWMsgDelay(userID64 int64, s string, d time.Duration) { func clientSendCWMsgDelay(userID64 int64, s string, d time.Duration) {
c := TGCommand{ clientSendTGMsgDelay(userID64, userID64ChtWrsBot, s, d)
Type: commandSendMsg,
Text: s,
FromUserID64: userID64,
ToChatID64: userID64ChtWrsBot,
Delay: d,
}
MQTGCmdQueue <- c
} }
func clientRefreshCWMsg(userID64 int64, chatID64 int64, msgID64 int64) { func clientRefreshCWMsg(userID64 int64, chatID64 int64, msgID64 int64) {

View File

@ -519,6 +519,16 @@
"name": "Level Up Ack", "name": "Level Up Ack",
"obj_type": "msg" "obj_type": "msg"
}, },
{
"intl_id": "msg_ny2020_max_capacity",
"name": "NY 2020 Event Tile to max capacity",
"obj_type": "msg"
},
{
"intl_id": "msg_ny2020_user_tile_set",
"name": "NY 2020 Event Tile Set for User",
"obj_type": "msg"
},
{ {
"intl_id": "job_pillage", "intl_id": "job_pillage",
"name": "Pillage job", "name": "Pillage job",

View File

@ -1742,5 +1742,21 @@
"msg_type": "msg_level_up_ack", "msg_type": "msg_level_up_ack",
"chat_id": 0, "chat_id": 0,
"user_id": 0 "user_id": 0
},
{
"prio": 5000,
"descn": "NY2020 Event Max capacity",
"rule": "^Tile Already At Its Max Capacity, (?P<User>.*)$",
"msg_type": "msg_ny2020_max_capacity",
"chat_id": -1001198527605,
"user_id": 841616455
},
{
"prio": 5000,
"descn": "NY2020 Event User Tile",
"rule": "^(?P<User>.*) is now at (?P<Tile>[a-z][0-9])$",
"msg_type": "msg_ny2020_user_tile_set",
"chat_id": -1001198527605,
"user_id": 841616455
} }
] ]