pub struct Sticker {Show 15 fields
pub file_id: String,
pub file_unique_id: String,
pub type_: StickerType,
pub width: i64,
pub height: i64,
pub is_animated: bool,
pub is_video: bool,
pub thumbnail: Option<PhotoSize>,
pub emoji: Option<String>,
pub set_name: Option<String>,
pub premium_animation: Option<File>,
pub mask_position: Option<MaskPosition>,
pub custom_emoji_id: Option<String>,
pub needs_repainting: bool,
pub file_size: Option<i64>,
}Expand description
This object represents a sticker.
API Reference: link
Fields§
§file_id: StringIdentifier for this file, which can be used to download or reuse the file
file_unique_id: StringUnique 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.
type_: StickerTypeType 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.
width: i64Sticker width
height: i64Sticker height
is_animated: boolTrue, if the sticker is animated
is_video: boolTrue, if the sticker is a video sticker
thumbnail: Option<PhotoSize>Optional. Sticker thumbnail in the .WEBP or .JPG format
emoji: Option<String>Optional. Emoji associated with the sticker
set_name: Option<String>Optional. Name of the sticker set to which the sticker belongs
Optional. For premium regular stickers, premium animation for the sticker
mask_position: Option<MaskPosition>Optional. For mask stickers, the position where the mask should be placed
custom_emoji_id: Option<String>Optional. For custom emoji stickers, unique identifier of the custom emoji
needs_repainting: boolOptional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places
file_size: Option<i64>Optional. File size in bytes
Implementations§
Source§impl Sticker
impl Sticker
Sourcepub fn get_sticker_set<'a>(
&self,
api: &'a API,
) -> Option<GetStickerSetRequest<'a>>
pub fn get_sticker_set<'a>( &self, api: &'a API, ) -> Option<GetStickerSetRequest<'a>>
Returns a GetStickerSetRequest if the sticker has a set, e.g. (Sticker.set_name is Some)