Add sticker and sticker set type documentation
parent
b6df6c273a
commit
1f1d97f1e3
103
types.go
103
types.go
|
@ -428,51 +428,96 @@ func (e MessageEntity) IsTextLink() bool {
|
||||||
|
|
||||||
// PhotoSize contains information about photos.
|
// PhotoSize contains information about photos.
|
||||||
type PhotoSize struct {
|
type PhotoSize struct {
|
||||||
FileID string `json:"file_id"`
|
// FileID identifier for this file, which can be used to download or reuse the file
|
||||||
Width int `json:"width"`
|
FileID string `json:"file_id"`
|
||||||
Height int `json:"height"`
|
// Width photo width
|
||||||
FileSize int `json:"file_size"` // optional
|
Width int `json:"width"`
|
||||||
|
// Height photo height
|
||||||
|
Height int `json:"height"`
|
||||||
|
// FileSize file size
|
||||||
|
// optional
|
||||||
|
FileSize int `json:"file_size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Audio contains information about audio.
|
// Audio contains information about audio.
|
||||||
type Audio struct {
|
type Audio struct {
|
||||||
FileID string `json:"file_id"`
|
// FileID is an identifier for this file, which can be used to download or reuse the file
|
||||||
Duration int `json:"duration"`
|
FileID string `json:"file_id"`
|
||||||
Performer string `json:"performer"` // optional
|
// Duration of the audio in seconds as defined by sender
|
||||||
Title string `json:"title"` // optional
|
Duration int `json:"duration"`
|
||||||
MimeType string `json:"mime_type"` // optional
|
// Performer of the audio as defined by sender or by audio tags
|
||||||
FileSize int `json:"file_size"` // optional
|
// optional
|
||||||
|
Performer string `json:"performer"`
|
||||||
|
// Title of the audio as defined by sender or by audio tags
|
||||||
|
// optional
|
||||||
|
Title string `json:"title"`
|
||||||
|
// MimeType of the file as defined by sender
|
||||||
|
// optional
|
||||||
|
MimeType string `json:"mime_type"`
|
||||||
|
// FileSize file size
|
||||||
|
// optional
|
||||||
|
FileSize int `json:"file_size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Document contains information about a document.
|
// Document contains information about a document.
|
||||||
type Document struct {
|
type Document struct {
|
||||||
FileID string `json:"file_id"`
|
// FileID is a identifier for this file, which can be used to download or reuse the file
|
||||||
Thumbnail *PhotoSize `json:"thumb"` // optional
|
FileID string `json:"file_id"`
|
||||||
FileName string `json:"file_name"` // optional
|
// Thumbnail document thumbnail as defined by sender
|
||||||
MimeType string `json:"mime_type"` // optional
|
// optional
|
||||||
FileSize int `json:"file_size"` // optional
|
Thumbnail *PhotoSize `json:"thumb"`
|
||||||
|
// FileName original filename as defined by sender
|
||||||
|
// optional
|
||||||
|
FileName string `json:"file_name"`
|
||||||
|
// MimeType of the file as defined by sender
|
||||||
|
// optional
|
||||||
|
MimeType string `json:"mime_type"`
|
||||||
|
// FileSize file size
|
||||||
|
// optional
|
||||||
|
FileSize int `json:"file_size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sticker contains information about a sticker.
|
// Sticker contains information about a sticker.
|
||||||
type Sticker struct {
|
type Sticker struct {
|
||||||
FileUniqueID string `json:"file_unique_id"`
|
// FileUniqueID is an unique identifier for this file,
|
||||||
FileID string `json:"file_id"`
|
// which is supposed to be the same over time and for different bots.
|
||||||
Width int `json:"width"`
|
// Can't be used to download or reuse the file.
|
||||||
Height int `json:"height"`
|
FileUniqueID string `json:"file_unique_id"`
|
||||||
Thumbnail *PhotoSize `json:"thumb"` // optional
|
// FileID is an identifier for this file, which can be used to download or reuse the file
|
||||||
Emoji string `json:"emoji"` // optional
|
FileID string `json:"file_id"`
|
||||||
FileSize int `json:"file_size"` // optional
|
// Width sticker width
|
||||||
SetName string `json:"set_name"` // optional
|
Width int `json:"width"`
|
||||||
IsAnimated bool `json:"is_animated"` // optional
|
// Height sticker height
|
||||||
|
Height int `json:"height"`
|
||||||
|
// Thumbnail sticker thumbnail in the .WEBP or .JPG format
|
||||||
|
// optional
|
||||||
|
Thumbnail *PhotoSize `json:"thumb"`
|
||||||
|
// Emoji associated with the sticker
|
||||||
|
// optional
|
||||||
|
Emoji string `json:"emoji"`
|
||||||
|
// FileSize
|
||||||
|
// optional
|
||||||
|
FileSize int `json:"file_size"`
|
||||||
|
// SetName of the sticker set to which the sticker belongs
|
||||||
|
// optional
|
||||||
|
SetName string `json:"set_name"`
|
||||||
|
// IsAnimated true, if the sticker is animated
|
||||||
|
// optional
|
||||||
|
IsAnimated bool `json:"is_animated"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// StickerSet contains information about an sticker set.
|
// StickerSet contains information about an sticker set.
|
||||||
type StickerSet struct {
|
type StickerSet struct {
|
||||||
Name string `json:"name"`
|
// Name sticker set name
|
||||||
Title string `json:"title"`
|
Name string `json:"name"`
|
||||||
IsAnimated bool `json:"is_animated"`
|
// Title sticker set title
|
||||||
ContainsMasks bool `json:"contains_masks"`
|
Title string `json:"title"`
|
||||||
Stickers []Sticker `json:"stickers"`
|
// IsAnimated true, if the sticker set contains animated stickers
|
||||||
|
IsAnimated bool `json:"is_animated"`
|
||||||
|
// ContainsMasks true, if the sticker set contains masks
|
||||||
|
ContainsMasks bool `json:"contains_masks"`
|
||||||
|
// Stickers list of all set stickers
|
||||||
|
Stickers []Sticker `json:"stickers"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChatAnimation contains information about an animation.
|
// ChatAnimation contains information about an animation.
|
||||||
|
|
Loading…
Reference in New Issue