+64
-26
@@ -18,10 +18,17 @@ const (
|
||||
// Since: Bot API 3.2
|
||||
// See https://core.telegram.org/bots/api#maskposition
|
||||
type MaskPosition struct {
|
||||
Point MaskPositionPoint `json:"point"`
|
||||
XShift float32 `json:"x_shift"`
|
||||
YShift float32 `json:"y_shift"`
|
||||
Scale float32 `json:"scale"`
|
||||
// Point The part of the face relative to which the mask should be placed. One of “forehead”,
|
||||
// “eyes”, “mouth”, or “chin”.
|
||||
Point MaskPositionPoint `json:"point"`
|
||||
// XShift Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For
|
||||
// example, choosing -1.0 will place mask just to the left of the default mask position.
|
||||
XShift float32 `json:"x_shift"`
|
||||
// YShift Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For
|
||||
// example, 1.0 will place the mask just below the default mask position.
|
||||
YShift float32 `json:"y_shift"`
|
||||
// Scale Mask scaling coefficient. For example, 2.0 means double size.
|
||||
Scale float32 `json:"scale"`
|
||||
}
|
||||
|
||||
// StickerType represents the type of a sticker.
|
||||
@@ -40,32 +47,53 @@ const (
|
||||
// Since: Bot API 1.0
|
||||
// See https://core.telegram.org/bots/api#sticker
|
||||
type Sticker struct {
|
||||
FileID string `json:"file_id"`
|
||||
// FileID Identifier for this file, which can be used to download or reuse the file
|
||||
FileID string `json:"file_id"`
|
||||
// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
|
||||
// different bots. Can't be used to download or reuse the file.
|
||||
FileUniqueID string `json:"file_unique_id"`
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
// Width Sticker width
|
||||
Width int `json:"width"`
|
||||
// Height Sticker height
|
||||
Height int `json:"height"`
|
||||
|
||||
Type StickerType `json:"type"` // Since: Bot API 6.2
|
||||
IsAnimated bool `json:"is_animated"` // Since: Bot API 4.4
|
||||
IsVideo bool `json:"is_video"` // Since: Bot API 5.7
|
||||
Thumbnail *PhotoSize `json:"thumbnail,omitempty"` // Since: Bot API 6.6
|
||||
Emoji *string `json:"emoji,omitempty"`
|
||||
SetName *string `json:"set_name,omitempty"` // Since: Bot API 3.2
|
||||
MaskPosition *MaskPosition `json:"mask_position,omitempty"` // Since: Bot API 3.2
|
||||
CustomEmojiID *string `json:"custom_emoji_id,omitempty"` // Since: Bot API 6.2
|
||||
NeedRepainting *bool `json:"need_repainting,omitempty"` // Since: Bot API 6.6
|
||||
FileSize *int64 `json:"file_size,omitempty"`
|
||||
// Type Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the
|
||||
// sticker is independent from its format, which is determined by the fields is_animated and is_video.
|
||||
Type StickerType `json:"type"` // Since: Bot API 6.2
|
||||
// IsAnimated True, if the sticker is animated
|
||||
IsAnimated bool `json:"is_animated"` // Since: Bot API 4.4
|
||||
// IsVideo True, if the sticker is a video sticker
|
||||
IsVideo bool `json:"is_video"` // Since: Bot API 5.7
|
||||
// Thumbnail Optional. Sticker thumbnail in the .WEBP or .JPG format
|
||||
Thumbnail *PhotoSize `json:"thumbnail,omitempty"` // Since: Bot API 6.6
|
||||
// Emoji Optional. Emoji associated with the sticker
|
||||
Emoji *string `json:"emoji,omitempty"`
|
||||
// SetName Optional. Name of the sticker set to which the sticker belongs
|
||||
SetName *string `json:"set_name,omitempty"` // Since: Bot API 3.2
|
||||
// MaskPosition Optional. For mask stickers, the position where the mask should be placed
|
||||
MaskPosition *MaskPosition `json:"mask_position,omitempty"` // Since: Bot API 3.2
|
||||
// CustomEmojiID Optional. For custom emoji stickers, unique identifier of the custom emoji
|
||||
CustomEmojiID *string `json:"custom_emoji_id,omitempty"` // Since: Bot API 6.2
|
||||
// NeedRepainting reports whether Telegram must recolor the custom emoji sticker.
|
||||
NeedRepainting *bool `json:"need_repainting,omitempty"` // Since: Bot API 6.6
|
||||
// FileSize Optional. File size in bytes
|
||||
FileSize *int64 `json:"file_size,omitempty"`
|
||||
}
|
||||
|
||||
// StickerSet represents a sticker set.
|
||||
// Since: Bot API 3.2
|
||||
// See https://core.telegram.org/bots/api#stickerset
|
||||
type StickerSet struct {
|
||||
Name string `json:"name"`
|
||||
Title string `json:"title"`
|
||||
// Name Sticker set name
|
||||
Name string `json:"name"`
|
||||
// Title Sticker set title
|
||||
Title string `json:"title"`
|
||||
// StickerType Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”
|
||||
StickerType StickerType `json:"sticker_type"`
|
||||
Stickers []Sticker `json:"stickers"`
|
||||
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
|
||||
// Stickers List of all set stickers
|
||||
Stickers []Sticker `json:"stickers"`
|
||||
// Thumbnail Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format
|
||||
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
|
||||
}
|
||||
|
||||
// InputStickerFormat represents the format of an input sticker.
|
||||
@@ -84,9 +112,19 @@ const (
|
||||
// Since: Bot API 6.6
|
||||
// See https://core.telegram.org/bots/api#inputsticker
|
||||
type InputSticker struct {
|
||||
Sticker string `json:"sticker"`
|
||||
Format InputStickerFormat `json:"format"`
|
||||
EmojiList []string `json:"emoji_list"`
|
||||
MaskPosition *MaskPosition `json:"mask_position,omitempty"`
|
||||
Keywords []string `json:"keywords,omitempty"`
|
||||
// Sticker The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram
|
||||
// servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass
|
||||
// “attach://<file_attach_name>” to upload a new file using multipart/form-data under <file_attach_name>
|
||||
// name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »
|
||||
Sticker string `json:"sticker"`
|
||||
// Format Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated”
|
||||
// for a .TGS animation, “video” for a .WEBM video
|
||||
Format InputStickerFormat `json:"format"`
|
||||
// EmojiList List of 1-20 emoji associated with the sticker
|
||||
EmojiList []string `json:"emoji_list"`
|
||||
// MaskPosition Optional. Position where the mask should be placed on faces. For “mask” stickers only.
|
||||
MaskPosition *MaskPosition `json:"mask_position,omitempty"`
|
||||
// Keywords Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters.
|
||||
// For “regular” and “custom_emoji” stickers only.
|
||||
Keywords []string `json:"keywords,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user