/
telegram_types.go
34 lines (33 loc) · 935 Bytes
/
telegram_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
type TelegramMessage struct {
UpdateID int `json:"update_id"`
Message Message `json:"message"`
}
type From struct {
ID int `json:"id"`
IsBot bool `json:"is_bot"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Username string `json:"username"`
LanguageCode string `json:"language_code"`
}
type Chat struct {
ID int64 `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Username string `json:"username"`
Type string `json:"type"`
}
type Entities struct {
Offset int `json:"offset"`
Length int `json:"length"`
Type string `json:"type"`
}
type Message struct {
MessageID int `json:"message_id"`
From From `json:"from"`
Chat Chat `json:"chat"`
Date int `json:"date"`
Text string `json:"text"`
Entities []Entities `json:"entities"`
}