feat: Added the method setCustomEmojiStickerSetThumbnail

#1140
This commit is contained in:
Oleg A 2023-03-09 23:07:23 +03:00
parent 0f5fb066a8
commit b6c06ea80c
No known key found for this signature in database
GPG key ID: 5FE046817A9657C5
2 changed files with 26 additions and 0 deletions

View file

@ -291,6 +291,7 @@ class Methods(Helper):
SET_STICKER_POSITION_IN_SET = Item() # setStickerPositionInSet
DELETE_STICKER_FROM_SET = Item() # deleteStickerFromSet
SET_STICKER_SET_THUMBNAIL = Item() # setStickerSetThumbnail
SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL = Item() # setCustomEmojiStickerSetThumbnail
# Inline mode
ANSWER_INLINE_QUERY = Item() # answerInlineQuery

View file

@ -3785,6 +3785,31 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin):
return await self.request(api.Methods.SET_STICKER_SET_THUMBNAIL, payload, files)
async def set_custom_emoji_sticker_set_thumbnail(
self,
name: base.String,
custom_emoji_id: typing.Optional[base.String] = None,
) -> base.Boolean:
"""
Use this method to set the thumbnail of a custom emoji sticker set.
Source: https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail
:param name: Sticker set name
:type name: :obj:`base.String`
:param custom_emoji_id: Custom emoji identifier of a sticker
from the sticker set; pass an empty string to drop the thumbnail
and use the first sticker as the thumbnail.
:type custom_emoji_id: :obj:`typing.Optional[base.String]`
:return: Returns True on success.
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
return await self.request(api.Methods.SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL, payload)
async def answer_inline_query(self, inline_query_id: base.String,
results: typing.List[types.InlineQueryResult],
cache_time: typing.Optional[base.Integer] = None,