feat: Added the method setStickerSetTitle

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

View file

@ -290,6 +290,7 @@ class Methods(Helper):
ADD_STICKER_TO_SET = Item() # addStickerToSet
SET_STICKER_POSITION_IN_SET = Item() # setStickerPositionInSet
DELETE_STICKER_FROM_SET = Item() # deleteStickerFromSet
SET_STICKER_SET_TITLE = Item() # setStickerSetTitle
SET_STICKER_SET_THUMBNAIL = Item() # setStickerSetThumbnail
SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL = Item() # setCustomEmojiStickerSetThumbnail

View file

@ -3723,6 +3723,29 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin):
return await self.request(api.Methods.DELETE_STICKER_FROM_SET, payload)
async def set_sticker_set_title(
self,
name: base.String,
title: base.String,
) -> base.Boolean:
"""
Use this method to set the title of a created sticker set.
Source: https://core.telegram.org/bots/api#setstickersettitle
:param name: Sticker set name
:type name: :obj:`base.String`
:param title: Sticker set title, 1-64 characters
:type title: :obj:`base.Sticker`
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
return await self.request(api.Methods.SET_STICKER_SET_TITLE, payload)
async def set_sticker_set_thumbnail(
self,
name: base.String,