Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFileIDFromMessage ¶
GetFileIDFromMessage finds file_id in message attachments.
Types ¶
type Animation ¶
type Animation struct {
FileID string `json:"file_id"`
FileUniqueID string `json:"file_unique_id"`
Width int `json:"width"`
Height int `json:"height"`
Duration int `json:"duration"`
Thumb PhotoSize `json:"thumb"`
FileName string `json:"file_name"`
MimeType string `json:"mime_type"`
FileSize int `json:"file_size"`
}
type Audio ¶
type Audio struct {
FileID string `json:"file_id"`
FileUniqueID string `json:"file_unique_id"`
Duration int `json:"duration"`
Performer string `json:"performer"`
Title string `json:"title"`
Thumb PhotoSize `json:"thumb"`
FileName string `json:"file_name"`
MimeType string `json:"mime_type"`
FileSize int `json:"file_size"`
}
type Chat ¶
type Chat struct {
ID int `json:"id"`
Type string `json:"type"`
Title string `json:"title"`
Username string `json:"username"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Bio string `json:"bio"`
Description string `json:"description"`
InviteLink string `json:"invite_link"`
PinnedMessage *Message `json:"pinned_message"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is simplified Telegram BotAPI client.
func (*Client) GetBotAPIMessage ¶
GetBotAPIMessage sends getUpdates request to BotAPI and finds message by msg_id.
NB: it can find only recently received messages.
type MaskPosition ¶
type Message ¶
type Message struct {
MessageID int `json:"message_id"`
Chat Chat `json:"chat"`
Animation Animation `json:"animation"`
Audio Audio `json:"audio"`
Document Document `json:"document"`
Photo []PhotoSize `json:"photo"`
Sticker Sticker `json:"sticker"`
Video Video `json:"video"`
VideoNote VideoNote `json:"video_note"`
Voice Voice `json:"voice"`
}
type Sticker ¶
type Sticker struct {
FileID string `json:"file_id"`
FileUniqueID string `json:"file_unique_id"`
Width int `json:"width"`
Height int `json:"height"`
IsAnimated bool `json:"is_animated"`
Thumb PhotoSize `json:"thumb"`
Emoji string `json:"emoji"`
SetName string `json:"set_name"`
MaskPosition MaskPosition `json:"mask_position"`
FileSize int `json:"file_size"`
}
type Video ¶
type Video struct {
FileID string `json:"file_id"`
FileUniqueID string `json:"file_unique_id"`
Width int `json:"width"`
Height int `json:"height"`
Duration int `json:"duration"`
Thumb PhotoSize `json:"thumb"`
FileName string `json:"file_name"`
MimeType string `json:"mime_type"`
FileSize int `json:"file_size"`
}
Click to show internal directories.
Click to hide internal directories.