64 lines
1.7 KiB
Go
64 lines
1.7 KiB
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
tb "gopkg.in/tucnak/telebot.v2"
|
|
)
|
|
|
|
type TGCommand 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"`
|
|
Document tb.Document `json:"document"`
|
|
ParseMode int64 `json:"parse_mode"`
|
|
Delay time.Duration `json:"delay"`
|
|
CallbackName string `json:"callback_name"`
|
|
CallbackData []byte `json:"callback_data"`
|
|
}
|
|
|
|
type ChatWarsCallback struct {
|
|
Name string `json:"name"`
|
|
Data []byte `json:"data"`
|
|
}
|
|
|
|
type ChatWarsMessage struct {
|
|
ObjID64 int64 `json:"obj_id"`
|
|
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"`
|
|
IsForwarded bool `json:"is_forwarded"`
|
|
Callbacks []ChatWarsCallback `json:"callbacks"`
|
|
}
|
|
|
|
type MQKeepAlive struct {
|
|
TGUserID64 int64 `json:"tg_user_id"`
|
|
Nickname string `json:"nick"`
|
|
Queue string `json:"queue"`
|
|
Date time.Time `json:"date"`
|
|
Build string `json:"build"`
|
|
}
|
|
|
|
const (
|
|
commandForwardMsg = 1
|
|
commandReplyMsg = 2
|
|
commandSendMsg = 3
|
|
commandDeleteMsg = 4
|
|
commandRefreshMsg = 5
|
|
commandSendDocument = 6
|
|
commandCallback = 7
|
|
|
|
cmdParseModePlain = 1
|
|
cmdParseModeMarkDown = 2
|
|
cmdParseModeHTML = 3
|
|
|
|
KeepAliveHeartBeatSeconds = 5
|
|
)
|