feat: Added the method deleteStickerSet

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

View file

@ -293,6 +293,7 @@ class Methods(Helper):
SET_STICKER_SET_TITLE = Item() # setStickerSetTitle
SET_STICKER_SET_THUMBNAIL = Item() # setStickerSetThumbnail
SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL = Item() # setCustomEmojiStickerSetThumbnail
DELETE_STICKER_SET = Item() # deleteStickerSet
# Inline mode
ANSWER_INLINE_QUERY = Item() # answerInlineQuery

View file

@ -3833,6 +3833,22 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin):
return await self.request(api.Methods.SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL, payload)
async def delete_sticker_set(self, name: base.String) -> base.Boolean:
"""
Use this method to delete a sticker set that was created by the bot
Source: https://core.telegram.org/bots/api#deletestickerset
:param name: Sticker set name
:type name: :obj:`base.String`
:return: Returns True on success.
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
return await self.request(api.Methods.DELETE_STICKER_SET, payload)
async def answer_inline_query(self, inline_query_id: base.String,
results: typing.List[types.InlineQueryResult],
cache_time: typing.Optional[base.Integer] = None,