mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 07:50:32 +00:00
Fixed get_custom_emoji_stickers method (#1002)
* Fixed possible incorrect escaping of list[str]. By default if you call str() on collection python will escape strings inside of it using single quotes, which will cause "Can't parse custom emoji identifiers json object" error when calling getCustomEmojiStickers. json.dumps() escapes strings by double quotes so no error occurs. * get_custom_emoji_stickers docstring fix * Revert compose_data changes * Correctly fixed get_custom_emoji_stickers method
This commit is contained in:
parent
e065285857
commit
95dc3fc533
1 changed files with 3 additions and 2 deletions
|
|
@ -3051,13 +3051,14 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin):
|
|||
Use this method to get information about custom emoji stickers by their identifiers.
|
||||
|
||||
|
||||
Source: https://core.telegram.org/bots/api#uploadstickerfile
|
||||
Source: https://core.telegram.org/bots/api#getcustomemojistickers
|
||||
|
||||
:param custom_emoji_ids: User identifier of sticker file owner
|
||||
:param custom_emoji_ids: List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.
|
||||
:type custom_emoji_ids: :obj:`typing.List[base.String]`
|
||||
:return: Returns an Array of Sticker objects.
|
||||
:rtype: :obj:`typing.List[types.Sticker]`
|
||||
"""
|
||||
custom_emoji_ids = prepare_arg(custom_emoji_ids)
|
||||
payload = generate_payload(**locals())
|
||||
|
||||
result = await self.request(api.Methods.GET_CUSTOM_EMOJI_STICKERS, payload)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue