Sticker#
- class aiogram.types.sticker.Sticker(*, file_id: str, file_unique_id: str, type: str, width: int, height: int, is_animated: bool, is_video: bool, thumbnail: Optional[PhotoSize] = None, emoji: Optional[str] = None, set_name: Optional[str] = None, premium_animation: Optional[File] = None, mask_position: Optional[MaskPosition] = None, custom_emoji_id: Optional[str] = None, needs_repainting: Optional[bool] = None, file_size: Optional[int] = None, **extra_data: Any)[source]#
This object represents a sticker.
Source: https://core.telegram.org/bots/api#sticker
- file_id: str#
Identifier for this file, which can be used to download or reuse the file
- file_unique_id: str#
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.
- type: str#
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.
- width: int#
Sticker width
- height: int#
Sticker height
- is_video: bool#
True
, if the sticker is a video sticker
- emoji: Optional[str]#
Optional. Emoji associated with the sticker
- set_name: Optional[str]#
Optional. Name of the sticker set to which the sticker belongs
Optional. For premium regular stickers, premium animation for the sticker
- mask_position: Optional[MaskPosition]#
Optional. For mask stickers, the position where the mask should be placed
- custom_emoji_id: Optional[str]#
Optional. For custom emoji stickers, unique identifier of the custom emoji
- needs_repainting: Optional[bool]#
Optional.
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: Optional[int]#
Optional. File size in bytes
- set_position_in_set(position: int, **kwargs: Any) SetStickerPositionInSet [source]#
Shortcut for method
aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet
will automatically fill method attributes:sticker
Use this method to move a sticker in a set created by the bot to a specific position. Returns
True
on success.Source: https://core.telegram.org/bots/api#setstickerpositioninset
- Parameters:
position – New sticker position in the set, zero-based
- Returns:
instance of method
aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet
- delete_from_set(**kwargs: Any) DeleteStickerFromSet [source]#
Shortcut for method
aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet
will automatically fill method attributes:sticker
Use this method to delete a sticker from a set created by the bot. Returns
True
on success.Source: https://core.telegram.org/bots/api#deletestickerfromset
- Returns:
instance of method
aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet