aiogram/aiogram/methods/set_sticker_mask_position.py
Alex Root Junior 6570d0bab1
Bot API 6.6 (#1139)
* Added basic support of Bot API 6.6

* Update descriptions

* Added StickerFormat enum

* Bump version

* Refresh from docs

* Fixed CommandStart

* Fixed files uploading

* Cover new functionality

* Added changelog

* Update texts
2023-03-11 02:17:47 +02:00

29 lines
1,021 B
Python

from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional
from ..types import MaskPosition
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot
class SetStickerMaskPosition(TelegramMethod[bool]):
"""
Use this method to change the `mask position <https://core.telegram.org/bots/api#maskposition>`_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickermaskposition
"""
__returning__ = bool
sticker: str
"""File identifier of the sticker"""
mask_position: Optional[MaskPosition] = None
"""A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position."""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="setStickerMaskPosition", data=data)