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: PhotoSize | None = None, emoji: str | None = None, set_name: str | None = None, premium_animation: File | None = None, mask_position: MaskPosition | None = None, custom_emoji_id: str | None = None, needs_repainting: bool | None = None, file_size: int | None = 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_animated: bool#

True, if the sticker is animated

is_video: bool#

True, if the sticker is a video sticker

thumbnail: PhotoSize | None#

Optional. Sticker thumbnail in the .WEBP or .JPG format

emoji: str | None#

Optional. Emoji associated with the sticker

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

set_name: str | None#

Optional. Name of the sticker set to which the sticker belongs

premium_animation: File | None#

Optional. For premium regular stickers, premium animation for the sticker

mask_position: MaskPosition | None#

Optional. For mask stickers, the position where the mask should be placed

custom_emoji_id: str | None#

Optional. For custom emoji stickers, unique identifier of the custom emoji

needs_repainting: bool | None#

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: int | None#

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

Параметри:

position – New sticker position in the set, zero-based

Повертає:

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

Повертає:

instance of method aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet