From 95dc3fc53354e4dec7ff0ea9765e9c9d21036b32 Mon Sep 17 00:00:00 2001 From: ENCRYPTED <48645524+ENCRYPTEDFOREVER@users.noreply.github.com> Date: Sun, 18 Sep 2022 16:59:25 +0300 Subject: [PATCH] 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 --- aiogram/bot/bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aiogram/bot/bot.py b/aiogram/bot/bot.py index 27c1ed63..a641d4e7 100644 --- a/aiogram/bot/bot.py +++ b/aiogram/bot/bot.py @@ -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)