From 46fa58ae07f1bf3f1b803153735a02993dd8fcd7 Mon Sep 17 00:00:00 2001 From: Ivan Date: Mon, 8 Apr 2024 19:00:28 +0300 Subject: [PATCH] Edited the types and methods for mixed-format sticker packs in butcher --- .butcher/methods/createNewStickerSet/entity.json | 8 -------- .../methods/setStickerSetThumbnail/entity.json | 8 ++++++++ .butcher/types/InputSticker/entity.json | 8 ++++++++ .butcher/types/StickerSet/entity.json | 16 ---------------- 1455.feature.rst | 6 ++++++ 5 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 1455.feature.rst diff --git a/.butcher/methods/createNewStickerSet/entity.json b/.butcher/methods/createNewStickerSet/entity.json index 7050c925..b5cbd44b 100644 --- a/.butcher/methods/createNewStickerSet/entity.json +++ b/.butcher/methods/createNewStickerSet/entity.json @@ -43,14 +43,6 @@ "rst_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set\n", "name": "stickers" }, - { - "type": "String", - "required": true, - "description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'", - "html_description": "Format of stickers in the set, must be one of “static”, “animated”, “video”", - "rst_description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'\n", - "name": "sticker_format" - }, { "type": "String", "required": false, diff --git a/.butcher/methods/setStickerSetThumbnail/entity.json b/.butcher/methods/setStickerSetThumbnail/entity.json index 906f7807..1717a4c6 100644 --- a/.butcher/methods/setStickerSetThumbnail/entity.json +++ b/.butcher/methods/setStickerSetThumbnail/entity.json @@ -34,6 +34,14 @@ "html_description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", "rst_description": "A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.\n", "name": "thumbnail" + }, + { + "type": "String", + "description": "Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a WEBM video", + "html_description": "Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a WEBM video", + "rst_description": "Format of the added sticker, must be one of “static” for a **.WEBP** or **.PNG** image, “animated” for a **.TGS** animation, “video” for a **WEBM** video", + "name": "format", + "required": true } ], "category": "methods" diff --git a/.butcher/types/InputSticker/entity.json b/.butcher/types/InputSticker/entity.json index 9968d594..d27af9b9 100644 --- a/.butcher/types/InputSticker/entity.json +++ b/.butcher/types/InputSticker/entity.json @@ -42,6 +42,14 @@ "rst_description": "*Optional*. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.\n", "name": "keywords", "required": false + }, + { + "type": "String", + "description": "Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a WEBM video", + "html_description": "Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a WEBM video", + "rst_description": "Format of the added sticker, must be one of “static” for a **.WEBP** or **.PNG** image, “animated” for a **.TGS** animation, “video” for a **WEBM** video", + "name": "format", + "required": true } ], "category": "types" diff --git a/.butcher/types/StickerSet/entity.json b/.butcher/types/StickerSet/entity.json index d74eb635..2e9afb3c 100644 --- a/.butcher/types/StickerSet/entity.json +++ b/.butcher/types/StickerSet/entity.json @@ -35,22 +35,6 @@ "name": "sticker_type", "required": true }, - { - "type": "Boolean", - "description": "True, if the sticker set contains animated stickers", - "html_description": "True, if the sticker set contains animated stickers", - "rst_description": ":code:`True`, if the sticker set contains `animated stickers `_\n", - "name": "is_animated", - "required": true - }, - { - "type": "Boolean", - "description": "True, if the sticker set contains video stickers", - "html_description": "True, if the sticker set contains video stickers", - "rst_description": ":code:`True`, if the sticker set contains `video stickers `_\n", - "name": "is_video", - "required": true - }, { "type": "Array of Sticker", "description": "List of all set stickers", diff --git a/1455.feature.rst b/1455.feature.rst new file mode 100644 index 00000000..af5d9e63 --- /dev/null +++ b/1455.feature.rst @@ -0,0 +1,6 @@ +Mixed-Format Sticker Packs + +* Removed the fields is_animated and is_video from the class StickerSet. +* Added the field format to the class InputSticker. +* Removed the parameter sticker_format from the method createNewStickerSet. +* Added the parameter format to the method setStickerSetThumbnail.