upd
This commit is contained in:
parent
d568ef94cd
commit
01a786d015
9
main.go
9
main.go
@ -13,11 +13,11 @@ import (
|
||||
"github.com/streadway/amqp"
|
||||
)
|
||||
|
||||
type MsgDirection int
|
||||
type MsgDirection string
|
||||
|
||||
const (
|
||||
Incoming MsgDirection = 1
|
||||
Outgoing MsgDirection = 2
|
||||
Incoming MsgDirection = `incoming`
|
||||
Outgoing MsgDirection = `outgoing`
|
||||
)
|
||||
|
||||
type ChatWarsMessage struct {
|
||||
@ -25,6 +25,7 @@ type ChatWarsMessage struct {
|
||||
UserID64 int64 `json:"user_id"`
|
||||
Direction MsgDirection `json:"direction"`
|
||||
MsgText string `json:"msg"`
|
||||
MsgDate int32 `json:"date"`
|
||||
}
|
||||
|
||||
const user_chtwrsbot = 408101137
|
||||
@ -174,6 +175,7 @@ func ListenCW(c *tdlib.Client) {
|
||||
|
||||
m := ChatWarsMessage{
|
||||
UserID64: ownUserID64,
|
||||
MsgDate: updateMsg.Message.Date,
|
||||
MsgText: string(txt),
|
||||
MsgID64: updateMsg.Message.ID,
|
||||
}
|
||||
@ -200,6 +202,7 @@ func ListenCW(c *tdlib.Client) {
|
||||
fmt.Println(txt, "\n")
|
||||
fmt.Println("************ DETAILS ************")
|
||||
fmt.Println("ID : ", updateMsg.Message.ID)
|
||||
fmt.Println("Date : ", updateMsg.Message.Date)
|
||||
fmt.Println("SenderUserID : ", updateMsg.Message.SenderUserID)
|
||||
fmt.Println("ChatID : ", updateMsg.Message.ChatID)
|
||||
fmt.Println("SendingState : ", updateMsg.Message.SendingState)
|
||||
|
Loading…
Reference in New Issue
Block a user