Edited the types and methods for mixed-format sticker packs in butcher

This commit is contained in:
Ivan 2024-04-08 19:00:28 +03:00
parent acf52f468c
commit 46fa58ae07
5 changed files with 22 additions and 24 deletions

View file

@ -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": "<td>Format of stickers in the set, must be one of &#8220;static&#8221;, &#8220;animated&#8221;, &#8220;video&#8221;</td>",
"rst_description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'\n",
"name": "sticker_format"
},
{
"type": "String",
"required": false,

View file

@ -34,6 +34,14 @@
"html_description": "<td>A <strong>.WEBP</strong> or <strong>.PNG</strong> image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a <strong>.TGS</strong> animation with a thumbnail up to 32 kilobytes in size (see <a href=\"/stickers#animated-sticker-requirements\"/><a href=\"https://core.telegram.org/stickers#animated-sticker-requirements\">https://core.telegram.org/stickers#animated-sticker-requirements</a> for animated sticker technical requirements), or a <strong>WEBM</strong> video with the thumbnail up to 32 kilobytes in size; see <a href=\"/stickers#video-sticker-requirements\"/><a href=\"https://core.telegram.org/stickers#video-sticker-requirements\">https://core.telegram.org/stickers#video-sticker-requirements</a> for video sticker technical requirements. Pass a <em>file_id</em> 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. <a href=\"#sending-files\">More information on Sending Files &#187;</a>. 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.</td>",
"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>`_`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>`_`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 » <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 <b>.WEBP</b> or <b>.PNG</b> image, “animated” for a <b>.TGS</b> animation, “video” for a <b>WEBM</b> 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"

View file

@ -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 <b>.WEBP</b> or <b>.PNG</b> image, “animated” for a <b>.TGS</b> animation, “video” for a <b>WEBM</b> 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"

View file

@ -35,22 +35,6 @@
"name": "sticker_type",
"required": true
},
{
"type": "Boolean",
"description": "True, if the sticker set contains animated stickers",
"html_description": "<td><em>True</em>, if the sticker set contains <a href=\"https://telegram.org/blog/animated-stickers\">animated stickers</a></td>",
"rst_description": ":code:`True`, if the sticker set contains `animated stickers <https://telegram.org/blog/animated-stickers>`_\n",
"name": "is_animated",
"required": true
},
{
"type": "Boolean",
"description": "True, if the sticker set contains video stickers",
"html_description": "<td><em>True</em>, if the sticker set contains <a href=\"https://telegram.org/blog/video-stickers-better-reactions\">video stickers</a></td>",
"rst_description": ":code:`True`, if the sticker set contains `video stickers <https://telegram.org/blog/video-stickers-better-reactions>`_\n",
"name": "is_video",
"required": true
},
{
"type": "Array of Sticker",
"description": "List of all set stickers",

6
1455.feature.rst Normal file
View file

@ -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.