41 lines
1.5 KiB
Go
41 lines
1.5 KiB
Go
package laniakea
|
|
|
|
type Update struct {
|
|
UpdateID int `json:"update_id"`
|
|
Message *Message `json:"message"`
|
|
}
|
|
|
|
type User struct {
|
|
ID int `json:"id"`
|
|
IsBot bool `json:"is_bot"`
|
|
FirstName string `json:"first_name"`
|
|
LastName string `json:"last_name,omitempty"`
|
|
Username string `json:"username,omitempty"`
|
|
LanguageCode string `json:"language_code,omitempty"`
|
|
IsPremium bool `json:"is_premium,omitempty"`
|
|
AddedToAttachmentMenu bool `json:"added_to_attachment_menu,omitempty"`
|
|
CanJoinGroups bool `json:"can_join_groups,omitempty"`
|
|
CanReadAllGroupMessages bool `json:"can_read_all_group_messages,omitempty"`
|
|
SupportsInlineQueries bool `json:"supports_inline_queries,omitempty"`
|
|
CanConnectToBusiness bool `json:"can_connect_to_business,omitempty"`
|
|
HasMainWebApp bool `json:"has_main_web_app,omitempty"`
|
|
}
|
|
|
|
type Chat struct {
|
|
ID int `json:"id"`
|
|
Type string `json:"type"`
|
|
Title string `json:"title,omitempty"`
|
|
Username string `json:"username,omitempty"`
|
|
FirstName string `json:"first_name,omitempty"`
|
|
LastName string `json:"last_name,omitempty"`
|
|
IsForum bool `json:"is_forum,omitempty"`
|
|
}
|
|
|
|
type Message struct {
|
|
MessageID int `json:"message_id"`
|
|
MessageThreadID int `json:"message_thread_id,omitempty"`
|
|
From *User `json:"from,omitempty"`
|
|
Chat *Chat `json:"chat,omitempty"`
|
|
Text string `json:"text"`
|
|
}
|