Sticker objects¶
Sticker¶
-
class
Sticker
(*, file_id=None, width=None, height=None, is_animated=None, thumb=None, emoji=None, set_name=None, mask_position=None, file_size=None)¶ This class represents a sticker
- Parameters
file_id (str) – Identifier for this file
width (int) – Sticker width
height (int) – Sticker height
is_animated (bool) – True, if the sticker is animated
thumb (PhotoSize) – Optional: Sticker thumbnail in the .webp or .jpg format
emoji (str) – Optional: Emoji associated with the sticker
set_name (str) – Optional: Name of the sticker set to which the sticker belongs
mask_position (MaskPosition) – Optional: For mask stickers, the position where the mask should be placed
file_size (int) – Optional: Size of the file
MaskPosition¶
-
class
MaskPosition
(*, point=None, x_shift=None, y_shift=None, scale=None)¶ This class represents the position on faces, where a mask should be placed by default
- Parameters
point (str) – The part of th face relative to which the mask should be placed. One of “forehead”, “eyes, “mouth” or “chin”
x_shift (float) – Shift by X-axis measured in widths of the mask scaled to the face size, from left to right
y_shift (float) – Sift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom
scale (float) – Mask scaling coefficient