pub struct Sticker {Show 15 fields
pub file_id: String,
pub file_unique_id: String,
pub height: Integer,
pub is_animated: bool,
pub is_video: bool,
pub sticker_type: StickerType,
pub width: Integer,
pub custom_emoji_id: Option<String>,
pub emoji: Option<String>,
pub file_size: Option<Integer>,
pub mask_position: Option<MaskPosition>,
pub needs_repainting: Option<bool>,
pub premium_animation: Option<File>,
pub set_name: Option<String>,
pub thumbnail: Option<PhotoSize>,
}Expand description
Represents a sticker.
Fields§
§file_id: StringIdentifier of the file.
Can be used to download or reuse the file.
file_unique_id: StringUnique identifier of the file.
It is supposed to be the same over time and for different bots. Can’t be used to download or reuse the file.
height: IntegerSticker height.
is_animated: boolIndicates whether the sticker is animated.
is_video: boolIndicates whether the sticker is a video sticker.
sticker_type: StickerTypeType of the sticker.
The type of the sticker is independent from its format,
which is determined by the fields is_animated and is_video.
width: IntegerSticker width.
custom_emoji_id: Option<String>For custom emoji stickers, unique identifier of the custom emoji.
emoji: Option<String>Emoji associated with the sticker.
file_size: Option<Integer>File size in bytes.
mask_position: Option<MaskPosition>For mask stickers, the position where the mask should be placed.
needs_repainting: Option<bool>Indicates whether 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.
For premium regular stickers, premium animation for the sticker.
set_name: Option<String>Name of the sticker set to which the sticker belongs.
thumbnail: Option<PhotoSize>Sticker thumbnail in the WEBP or JPEG format.
Implementations§
Source§impl Sticker
impl Sticker
Sourcepub fn new<A, B>(
file_id: A,
file_unique_id: B,
sticker_type: StickerType,
height: Integer,
width: Integer,
) -> Self
pub fn new<A, B>( file_id: A, file_unique_id: B, sticker_type: StickerType, height: Integer, width: Integer, ) -> Self
Creates a new Sticker.
§Arguments
file_id- Identifier for the file.file_unique_id- Unique identifier for the file.sticker_type- Type of the sticker.height- Sticker height.width- Sticker width.
Sourcepub fn with_is_animated(self, value: bool) -> Self
pub fn with_is_animated(self, value: bool) -> Self
Sets a new value for the is_animated flag.
§Arguments
value- Indicates whether the sticker is animated.
Sourcepub fn with_is_video(self, value: bool) -> Self
pub fn with_is_video(self, value: bool) -> Self
Sets a new value for the is_video flag.
§Arguments
value- Indicates whether the sticker is a video sticker.