mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Replaced the parameters png_sticker, tgs_sticker, webm_sticker, emojis and mask_position in the method addStickerToSet with the parameter sticker of the type InputSticker.
This commit is contained in:
@@ -5518,11 +5518,12 @@ class AsyncTeleBot:
|
||||
|
||||
|
||||
async def add_sticker_to_set(
|
||||
self, user_id: int, name: str, emojis: str,
|
||||
self, user_id: int, name: str, emojis: List[str]=None,
|
||||
png_sticker: Optional[Union[Any, str]]=None,
|
||||
tgs_sticker: Optional[Union[Any, str]]=None,
|
||||
webm_sticker: Optional[Union[Any, str]]=None,
|
||||
mask_position: Optional[types.MaskPosition]=None) -> bool:
|
||||
mask_position: Optional[types.MaskPosition]=None,
|
||||
sticker: Optional[List[types.InputSticker]]=None) -> bool:
|
||||
"""
|
||||
Use this method to add a new sticker to a set created by the bot.
|
||||
It's required to pass `png_sticker` or `tgs_sticker`.
|
||||
@@ -5553,11 +5554,19 @@ class AsyncTeleBot:
|
||||
:param mask_position: A JSON-serialized object for position where the mask should be placed on faces
|
||||
:type mask_position: :class:`telebot.types.MaskPosition`
|
||||
|
||||
:param sticker: A JSON-serialized list of 1-50 initial stickers to be added to the sticker set
|
||||
:type sticker: :class:`telebot.types.InputSticker`
|
||||
|
||||
:return: On success, True is returned.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
# Replaced the parameters png_sticker, tgs_sticker, webm_sticker, emojis and mask_position
|
||||
if sticker is None:
|
||||
sticker = png_sticker or tgs_sticker or webm_sticker
|
||||
sticker = types.InputSticker(sticker, emojis, mask_position)
|
||||
|
||||
return await asyncio_helper.add_sticker_to_set(
|
||||
self.token, user_id, name, emojis, png_sticker, tgs_sticker, mask_position, webm_sticker)
|
||||
self.token, user_id, name, sticker)
|
||||
|
||||
|
||||
async def set_sticker_position_in_set(self, sticker: str, position: int) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user