2019-05-14 11:34:15 +02:00
|
|
|
package main
|
2019-05-15 08:43:17 +02:00
|
|
|
|
2019-05-15 08:43:53 +02:00
|
|
|
import (
|
|
|
|
"time"
|
2019-06-11 04:01:36 +02:00
|
|
|
|
|
|
|
tb "gopkg.in/tucnak/telebot.v2"
|
2019-05-15 08:43:53 +02:00
|
|
|
)
|
|
|
|
|
2019-05-16 04:05:27 +02:00
|
|
|
type TGCommand struct {
|
2019-06-11 03:49:16 +02:00
|
|
|
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"`
|
|
|
|
Document tb.Document `json:"document"`
|
|
|
|
ParseMode int64 `json:"parse_mode"`
|
2019-08-23 07:50:58 +02:00
|
|
|
Delay int64 `json:"delay"`
|
2019-05-15 08:48:11 +02:00
|
|
|
}
|
|
|
|
|
2019-05-15 08:43:17 +02:00
|
|
|
type ChatWarsMessage struct {
|
2019-07-31 08:46:01 +02:00
|
|
|
TGUserID64 int64 `json:"tg_user_id"`
|
|
|
|
TGSenderUserID64 int64 `json:"tg_sender_user_id"`
|
|
|
|
Date time.Time `json:"date"`
|
|
|
|
ID64 int64 `json:"id"`
|
|
|
|
ChatID64 int64 `json:"chat_id"`
|
|
|
|
Text string `json:"text"`
|
2019-05-15 08:43:17 +02:00
|
|
|
}
|
|
|
|
|
2019-05-17 08:22:34 +02:00
|
|
|
type MQKeepAlive struct {
|
2019-07-31 08:46:01 +02:00
|
|
|
TGUserID64 int64 `json:"tg_user_id"`
|
|
|
|
Nickname string `json:"nick"`
|
|
|
|
Queue string `json:"queue"`
|
|
|
|
Date time.Time `json:"date"`
|
2019-05-17 08:22:34 +02:00
|
|
|
}
|
|
|
|
|
2019-05-15 08:43:17 +02:00
|
|
|
const (
|
2019-06-11 03:49:16 +02:00
|
|
|
commandForwardMsg = 1
|
|
|
|
commandReplyMsg = 2
|
|
|
|
commandSendMsg = 3
|
|
|
|
commandDeleteMsg = 4
|
|
|
|
commandRefreshMsg = 5
|
|
|
|
commandSendDocument = 6
|
|
|
|
|
|
|
|
cmdParseModePlain = 1
|
|
|
|
cmdParseModeMarkDown = 2
|
|
|
|
cmdParseModeHTML = 3
|
2019-06-14 05:32:42 +02:00
|
|
|
|
|
|
|
KeepAliveHeartBeatSeconds = 5
|
2019-05-15 08:43:17 +02:00
|
|
|
)
|