test
This commit is contained in:
parent
9ae3c17cbd
commit
4ec1eb5f9b
7
def.go
7
def.go
@ -12,6 +12,8 @@ type TGCommand struct {
|
|||||||
ToChatID64 int64 `json:"to_chat_id"`
|
ToChatID64 int64 `json:"to_chat_id"`
|
||||||
ToUserID64 int64 `json:"to_user_id"`
|
ToUserID64 int64 `json:"to_user_id"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
|
Document tb.Document `json:"document"`
|
||||||
|
ParseMode int64 `json:"parse_mode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ChatWarsMessage struct {
|
type ChatWarsMessage struct {
|
||||||
@ -36,4 +38,9 @@ const (
|
|||||||
commandSendMsg = 3
|
commandSendMsg = 3
|
||||||
commandDeleteMsg = 4
|
commandDeleteMsg = 4
|
||||||
commandRefreshMsg = 5
|
commandRefreshMsg = 5
|
||||||
|
commandSendDocument = 6
|
||||||
|
|
||||||
|
cmdParseModePlain = 1
|
||||||
|
cmdParseModeMarkDown = 2
|
||||||
|
cmdParseModeHTML = 3
|
||||||
)
|
)
|
||||||
|
1
td.go
1
td.go
@ -48,6 +48,7 @@ func ListenMQ(c *tdlib.Client, msgs <-chan TGCommand) {
|
|||||||
case commandRefreshMsg:
|
case commandRefreshMsg:
|
||||||
u, err := c.GetMessage(m.FromChatID64, m.FromMsgID64)
|
u, err := c.GetMessage(m.FromChatID64, m.FromMsgID64)
|
||||||
logOnError(err, "ListenMQ : commandRefreshMsg")
|
logOnError(err, "ListenMQ : commandRefreshMsg")
|
||||||
|
log.Printf("ListenMQ : commandRefreshMsg (%d - %d)\n", m.FromChatID64, m.FromMsgID64)
|
||||||
if err != nil && u.Content.GetMessageContentEnum() == tdlib.MessageTextType {
|
if err != nil && u.Content.GetMessageContentEnum() == tdlib.MessageTextType {
|
||||||
txt := u.Content.(*tdlib.MessageText).Text.Text
|
txt := u.Content.(*tdlib.MessageText).Text.Text
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user