Refresh from docs

This commit is contained in:
Alex Root Junior 2023-03-09 19:46:53 +02:00
parent 71b4beb360
commit 6dc02c0bfa
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
90 changed files with 760 additions and 1836 deletions

View file

@ -9,9 +9,9 @@
"object": {
"anchor": "addstickertoset",
"name": "addStickerToSet",
"description": "Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.",
"html_description": "<p>Use this method to add a new sticker to a set created by the bot. You <strong>must</strong> use exactly one of the fields <em>png_sticker</em>, <em>tgs_sticker</em>, or <em>webm_sticker</em>. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success.",
"description": "Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.",
"html_description": "<p>Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",
@ -29,46 +29,6 @@
"rst_description": "Sticker set name\n",
"name": "name"
},
{
"type": "InputFile or String",
"required": false,
"description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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",
"html_description": "<td><strong>PNG</strong> image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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></td>",
"rst_description": "**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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>`\n",
"name": "png_sticker"
},
{
"type": "InputFile",
"required": false,
"description": "TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements",
"html_description": "<td><strong>TGS</strong> animation with the sticker, uploaded using multipart/form-data. 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 technical requirements</td>",
"rst_description": "**TGS** animation with the sticker, uploaded using multipart/form-data. 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 technical requirements\n",
"name": "tgs_sticker"
},
{
"type": "InputFile",
"required": false,
"description": "WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements",
"html_description": "<td><strong>WEBM</strong> video with the sticker, uploaded using multipart/form-data. 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 technical requirements</td>",
"rst_description": "**WEBM** video with the sticker, uploaded using multipart/form-data. 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 technical requirements\n",
"name": "webm_sticker"
},
{
"type": "String",
"required": true,
"description": "One or more emoji corresponding to the sticker",
"html_description": "<td>One or more emoji corresponding to the sticker</td>",
"rst_description": "One or more emoji corresponding to the sticker\n",
"name": "emojis"
},
{
"type": "MaskPosition",
"required": false,
"description": "A JSON-serialized object for position where the mask should be placed on faces",
"html_description": "<td>A JSON-serialized object for position where the mask should be placed on faces</td>",
"rst_description": "A JSON-serialized object for position where the mask should be placed on faces\n",
"name": "mask_position"
},
{
"type": "InputSticker",
"required": true,

View file

@ -9,9 +9,9 @@
"object": {
"anchor": "createnewstickerset",
"name": "createNewStickerSet",
"description": "Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Returns True on success.",
"html_description": "<p>Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You <strong>must</strong> use exactly one of the fields <em>png_sticker</em>, <em>tgs_sticker</em>, or <em>webm_sticker</em>. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Returns :code:`True` on success.",
"description": "Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success.",
"html_description": "<p>Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",
@ -37,62 +37,6 @@
"rst_description": "Sticker set title, 1-64 characters\n",
"name": "title"
},
{
"type": "InputFile or String",
"required": false,
"description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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",
"html_description": "<td><strong>PNG</strong> image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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></td>",
"rst_description": "**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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>`\n",
"name": "png_sticker"
},
{
"type": "InputFile",
"required": false,
"description": "TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements",
"html_description": "<td><strong>TGS</strong> animation with the sticker, uploaded using multipart/form-data. 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 technical requirements</td>",
"rst_description": "**TGS** animation with the sticker, uploaded using multipart/form-data. 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 technical requirements\n",
"name": "tgs_sticker"
},
{
"type": "InputFile",
"required": false,
"description": "WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements",
"html_description": "<td><strong>WEBM</strong> video with the sticker, uploaded using multipart/form-data. 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 technical requirements</td>",
"rst_description": "**WEBM** video with the sticker, uploaded using multipart/form-data. 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 technical requirements\n",
"name": "webm_sticker"
},
{
"type": "String",
"required": false,
"description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.",
"html_description": "<td>Type of stickers in the set, pass &#8220;regular&#8221;, &#8220;mask&#8221;, or &#8220;custom_emoji&#8221;. By default, a regular sticker set is created.</td>",
"rst_description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.\n",
"name": "sticker_type"
},
{
"type": "String",
"required": true,
"description": "One or more emoji corresponding to the sticker",
"html_description": "<td>One or more emoji corresponding to the sticker</td>",
"rst_description": "One or more emoji corresponding to the sticker\n",
"name": "emojis"
},
{
"type": "MaskPosition",
"required": false,
"description": "A JSON-serialized object for position where the mask should be placed on faces",
"html_description": "<td>A JSON-serialized object for position where the mask should be placed on faces</td>",
"rst_description": "A JSON-serialized object for position where the mask should be placed on faces\n",
"name": "mask_position"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only",
"html_description": "<td>Pass <em>True</em> if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only</td>",
"rst_description": "Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only\n",
"name": "needs_repainting"
},
{
"type": "Array of InputSticker",
"required": true,
@ -108,6 +52,22 @@
"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,
"description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.",
"html_description": "<td>Type of stickers in the set, pass &#8220;regular&#8221;, &#8220;mask&#8221;, or &#8220;custom_emoji&#8221;. By default, a regular sticker set is created.</td>",
"rst_description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.\n",
"name": "sticker_type"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only",
"html_description": "<td>Pass <em>True</em> if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only</td>",
"rst_description": "Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only\n",
"name": "needs_repainting"
}
],
"category": "methods"

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "deletestickerset",

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Available methods",
"anchor": "available-methods"
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "editmessagelivelocation",

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "getmydescription",

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "getmyshortdescription",

View file

@ -67,7 +67,7 @@
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td>Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumb"
"name": "thumbnail"
},
{
"type": "String",
@ -140,14 +140,6 @@
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"name": "reply_markup"
},
{
"type": "InputFile or String",
"required": false,
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td>Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumbnail"
}
],
"category": "methods"

View file

@ -91,7 +91,7 @@
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td>Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumb"
"name": "thumbnail"
},
{
"type": "Boolean",
@ -132,14 +132,6 @@
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"name": "reply_markup"
},
{
"type": "InputFile or String",
"required": false,
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td>Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumbnail"
}
],
"category": "methods"

View file

@ -43,7 +43,7 @@
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td>Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumb"
"name": "thumbnail"
},
{
"type": "String",
@ -116,14 +116,6 @@
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"name": "reply_markup"
},
{
"type": "InputFile or String",
"required": false,
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td>Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumbnail"
}
],
"category": "methods"

View file

@ -37,6 +37,14 @@
"rst_description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.\n",
"name": "sticker"
},
{
"type": "String",
"required": false,
"description": "Emoji associated with the sticker; only for just uploaded stickers",
"html_description": "<td>Emoji associated with the sticker; only for just uploaded stickers</td>",
"rst_description": "Emoji associated with the sticker; only for just uploaded stickers\n",
"name": "emoji"
},
{
"type": "Boolean",
"required": false,
@ -76,14 +84,6 @@
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"name": "reply_markup"
},
{
"type": "String",
"required": false,
"description": "Emoji associated with the sticker; only for uploaded stickers",
"html_description": "<td>Emoji associated with the sticker; only for uploaded stickers</td>",
"rst_description": "Emoji associated with the sticker; only for uploaded stickers\n",
"name": "emoji"
}
],
"category": "methods"

View file

@ -67,7 +67,7 @@
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td>Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumb"
"name": "thumbnail"
},
{
"type": "String",
@ -148,14 +148,6 @@
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"name": "reply_markup"
},
{
"type": "InputFile or String",
"required": false,
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td>Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumbnail"
}
],
"category": "methods"

View file

@ -59,7 +59,7 @@
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td>Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumb"
"name": "thumbnail"
},
{
"type": "Boolean",
@ -100,14 +100,6 @@
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"name": "reply_markup"
},
{
"type": "InputFile or String",
"required": false,
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td>Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumbnail"
}
],
"category": "methods"

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "setcustomemojistickersetthumbnail",

View file

@ -9,9 +9,9 @@
"object": {
"anchor": "setmydefaultadministratorrights",
"name": "setMyDefaultAdministratorRights",
"description": "Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.",
"html_description": "<p>Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns :code:`True` on success.",
"description": "Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success.",
"html_description": "<p>Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns :code:`True` on success.",
"annotations": [
{
"type": "ChatAdministratorRights",

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "setmydescription",

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "setmyshortdescription",

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "setstickeremojilist",

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "setstickerkeywords",

View file

@ -3,15 +3,15 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "setstickermaskposition",
"name": "setStickerMaskPosition",
"description": "Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success.",
"html_description": "<p>Use this method to change the <a href=\"#maskposition\">mask position</a> of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the `mask position <https://core.telegram.org/bots/update66ncjlkdbc80g428bfudsbcuiv793vudbcoiencpim29gbyutbvis#maskposition>`_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success.",
"rst_description": "Use this method to change the `mask position <https://core.telegram.org/bots/api#maskposition>`_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",

View file

@ -1,43 +0,0 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "setstickersetthumb",
"name": "setStickerSetThumb",
"description": "Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns True on success.",
"html_description": "<p>Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Sticker set name",
"html_description": "<td>Sticker set name</td>",
"rst_description": "Sticker set name\n",
"name": "name"
},
{
"type": "Integer",
"required": true,
"description": "User identifier of the sticker set owner",
"html_description": "<td>User identifier of the sticker set owner</td>",
"rst_description": "User identifier of the sticker set owner\n",
"name": "user_id"
},
{
"type": "InputFile or String",
"required": false,
"description": "A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the 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 sticker set thumbnails can't be uploaded via HTTP URL.",
"html_description": "<td>A <strong>PNG</strong> image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a <strong>TGS</strong> animation with the 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 sticker set thumbnails can't be uploaded via HTTP URL.</td>",
"rst_description": "A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the 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 sticker set thumbnails can't be uploaded via HTTP URL.\n",
"name": "thumb"
}
],
"category": "methods"
}
}

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "setstickersetthumbnail",

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "setstickersettitle",

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Available methods",
"anchor": "available-methods"
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "stopmessagelivelocation",

View file

@ -9,9 +9,9 @@
"object": {
"anchor": "uploadstickerfile",
"name": "uploadStickerFile",
"description": "Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.",
"html_description": "<p>Use this method to upload a .PNG file with a sticker for later use in <em>createNewStickerSet</em> and <em>addStickerToSet</em> methods (can be used multiple times). Returns the uploaded <a href=\"#file\">File</a> on success.</p>",
"rst_description": "Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.",
"description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success.",
"html_description": "<p>Use this method to upload a file with a sticker for later use in the <a href=\"#createnewstickerset\">createNewStickerSet</a> and <a href=\"#addstickertoset\">addStickerToSet</a> methods (the file can be used multiple times). Returns the uploaded <a href=\"#file\">File</a> on success.</p>",
"rst_description": "Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.",
"annotations": [
{
"type": "Integer",
@ -24,10 +24,10 @@
{
"type": "InputFile",
"required": true,
"description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. More information on Sending Files",
"html_description": "<td><strong>PNG</strong> image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "png_sticker"
"description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. More information on Sending Files",
"html_description": "<td>A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See <a href=\"/stickers\"/><a href=\"https://core.telegram.org/stickers\">https://core.telegram.org/stickers</a> for technical requirements. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers <https://core.telegram.org/stickers>`_`https://core.telegram.org/stickers <https://core.telegram.org/stickers>`_ for technical requirements. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "sticker"
},
{
"type": "String",
@ -36,14 +36,6 @@
"html_description": "<td>Format of the sticker, must be one of &#8220;static&#8221;, &#8220;animated&#8221;, &#8220;video&#8221;</td>",
"rst_description": "Format of the sticker, must be one of 'static', 'animated', 'video'\n",
"name": "sticker_format"
},
{
"type": "InputFile",
"required": true,
"description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. More information on Sending Files",
"html_description": "<td>A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See <a href=\"/stickers\"/><a href=\"https://core.telegram.org/stickers\">https://core.telegram.org/stickers</a> for technical requirements. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers <https://core.telegram.org/stickers>`_`https://core.telegram.org/stickers <https://core.telegram.org/stickers>`_ for technical requirements. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "sticker"
}
],
"category": "methods"

File diff suppressed because it is too large Load diff

View file

@ -58,7 +58,7 @@
"description": "Animation thumbnail as defined by sender",
"html_description": "<td><em>Optional</em>. Animation thumbnail as defined by sender</td>",
"rst_description": "*Optional*. Animation thumbnail as defined by sender\n",
"name": "thumb",
"name": "thumbnail",
"required": false
},
{
@ -84,14 +84,6 @@
"rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n",
"name": "file_size",
"required": false
},
{
"type": "PhotoSize",
"description": "Animation thumbnail as defined by the sender",
"html_description": "<td><em>Optional</em>. Animation thumbnail as defined by the sender</td>",
"rst_description": "*Optional*. Animation thumbnail as defined by the sender\n",
"name": "thumbnail",
"required": false
}
],
"category": "types"

View file

@ -77,14 +77,6 @@
"name": "file_size",
"required": false
},
{
"type": "PhotoSize",
"description": "Thumbnail of the album cover to which the music file belongs",
"html_description": "<td><em>Optional</em>. Thumbnail of the album cover to which the music file belongs</td>",
"rst_description": "*Optional*. Thumbnail of the album cover to which the music file belongs\n",
"name": "thumb",
"required": false
},
{
"type": "PhotoSize",
"description": "Thumbnail of the album cover to which the music file belongs",

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "botdescription",

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "botshortdescription",

View file

@ -34,7 +34,7 @@
"description": "Document thumbnail as defined by sender",
"html_description": "<td><em>Optional</em>. Document thumbnail as defined by sender</td>",
"rst_description": "*Optional*. Document thumbnail as defined by sender\n",
"name": "thumb",
"name": "thumbnail",
"required": false
},
{
@ -60,14 +60,6 @@
"rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n",
"name": "file_size",
"required": false
},
{
"type": "PhotoSize",
"description": "Document thumbnail as defined by the sender",
"html_description": "<td><em>Optional</em>. Document thumbnail as defined by the sender</td>",
"rst_description": "*Optional*. Document thumbnail as defined by the sender\n",
"name": "thumbnail",
"required": false
}
],
"category": "types"

View file

@ -77,30 +77,6 @@
"name": "description",
"required": false
},
{
"type": "String",
"description": "Url of the thumbnail for the result",
"html_description": "<td><em>Optional</em>. Url of the thumbnail for the result</td>",
"rst_description": "*Optional*. Url of the thumbnail for the result\n",
"name": "thumb_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumb_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"required": false
},
{
"type": "String",
"description": "Url of the thumbnail for the result",

View file

@ -77,30 +77,6 @@
"name": "input_message_content",
"required": false
},
{
"type": "String",
"description": "Url of the thumbnail for the result",
"html_description": "<td><em>Optional</em>. Url of the thumbnail for the result</td>",
"rst_description": "*Optional*. Url of the thumbnail for the result\n",
"name": "thumb_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumb_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"required": false
},
{
"type": "String",
"description": "Url of the thumbnail for the result",

View file

@ -101,30 +101,6 @@
"name": "input_message_content",
"required": false
},
{
"type": "String",
"description": "URL of the thumbnail (JPEG only) for the file",
"html_description": "<td><em>Optional</em>. URL of the thumbnail (JPEG only) for the file</td>",
"rst_description": "*Optional*. URL of the thumbnail (JPEG only) for the file\n",
"name": "thumb_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumb_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"required": false
},
{
"type": "String",
"description": "URL of the thumbnail (JPEG only) for the file",

View file

@ -66,7 +66,7 @@
"description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result",
"html_description": "<td>URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result</td>",
"rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n",
"name": "thumb_url",
"name": "thumbnail_url",
"required": true
},
{
@ -74,7 +74,7 @@
"description": "MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'",
"html_description": "<td><em>Optional</em>. MIME type of the thumbnail, must be one of &#8220;image/jpeg&#8221;, &#8220;image/gif&#8221;, or &#8220;video/mp4&#8221;. Defaults to &#8220;image/jpeg&#8221;</td>",
"rst_description": "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n",
"name": "thumb_mime_type",
"name": "thumbnail_mime_type",
"required": false
},
{
@ -124,22 +124,6 @@
"rst_description": "*Optional*. Content of the message to be sent instead of the GIF animation\n",
"name": "input_message_content",
"required": false
},
{
"type": "String",
"description": "MIME type of the thumbnail. Must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'",
"html_description": "<td><em>Optional</em>. MIME type of the thumbnail. Must be one of &#8220;image/jpeg&#8221;, &#8220;image/gif&#8221;, or &#8220;video/mp4&#8221;. Defaults to &#8220;image/jpeg&#8221;</td>",
"rst_description": "*Optional*. MIME type of the thumbnail. Must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n",
"name": "thumbnail_mime_type",
"required": false
},
{
"type": "String",
"description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result",
"html_description": "<td>URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result</td>",
"rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n",
"name": "thumbnail_url",
"required": true
}
],
"category": "types"

View file

@ -101,30 +101,6 @@
"name": "input_message_content",
"required": false
},
{
"type": "String",
"description": "Url of the thumbnail for the result",
"html_description": "<td><em>Optional</em>. Url of the thumbnail for the result</td>",
"rst_description": "*Optional*. Url of the thumbnail for the result\n",
"name": "thumb_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumb_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"required": false
},
{
"type": "String",
"description": "Url of the thumbnail for the result",

View file

@ -66,7 +66,7 @@
"description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result",
"html_description": "<td>URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result</td>",
"rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n",
"name": "thumb_url",
"name": "thumbnail_url",
"required": true
},
{
@ -74,7 +74,7 @@
"description": "MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'",
"html_description": "<td><em>Optional</em>. MIME type of the thumbnail, must be one of &#8220;image/jpeg&#8221;, &#8220;image/gif&#8221;, or &#8220;video/mp4&#8221;. Defaults to &#8220;image/jpeg&#8221;</td>",
"rst_description": "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n",
"name": "thumb_mime_type",
"name": "thumbnail_mime_type",
"required": false
},
{
@ -124,22 +124,6 @@
"rst_description": "*Optional*. Content of the message to be sent instead of the video animation\n",
"name": "input_message_content",
"required": false
},
{
"type": "String",
"description": "MIME type of the thumbnail. Must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'",
"html_description": "<td><em>Optional</em>. MIME type of the thumbnail. Must be one of &#8220;image/jpeg&#8221;, &#8220;image/gif&#8221;, or &#8220;video/mp4&#8221;. Defaults to &#8220;image/jpeg&#8221;</td>",
"rst_description": "*Optional*. MIME type of the thumbnail. Must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n",
"name": "thumbnail_mime_type",
"required": false
},
{
"type": "String",
"description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result",
"html_description": "<td>URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result</td>",
"rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n",
"name": "thumbnail_url",
"required": true
}
],
"category": "types"

View file

@ -42,7 +42,7 @@
"description": "URL of the thumbnail for the photo",
"html_description": "<td>URL of the thumbnail for the photo</td>",
"rst_description": "URL of the thumbnail for the photo\n",
"name": "thumb_url",
"name": "thumbnail_url",
"required": true
},
{
@ -116,14 +116,6 @@
"rst_description": "*Optional*. Content of the message to be sent instead of the photo\n",
"name": "input_message_content",
"required": false
},
{
"type": "String",
"description": "URL of the thumbnail for the photo",
"html_description": "<td>URL of the thumbnail for the photo</td>",
"rst_description": "URL of the thumbnail for the photo\n",
"name": "thumbnail_url",
"required": true
}
],
"category": "types"

View file

@ -109,30 +109,6 @@
"name": "input_message_content",
"required": false
},
{
"type": "String",
"description": "Url of the thumbnail for the result",
"html_description": "<td><em>Optional</em>. Url of the thumbnail for the result</td>",
"rst_description": "*Optional*. Url of the thumbnail for the result\n",
"name": "thumb_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumb_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"required": false
},
{
"type": "String",
"description": "Url of the thumbnail for the result",

View file

@ -50,7 +50,7 @@
"description": "URL of the thumbnail (JPEG only) for the video",
"html_description": "<td>URL of the thumbnail (JPEG only) for the video</td>",
"rst_description": "URL of the thumbnail (JPEG only) for the video\n",
"name": "thumb_url",
"name": "thumbnail_url",
"required": true
},
{
@ -132,14 +132,6 @@
"rst_description": "*Optional*. Content of the message to be sent instead of the video. This field is **required** if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).\n",
"name": "input_message_content",
"required": false
},
{
"type": "String",
"description": "URL of the thumbnail (JPEG only) for the video",
"html_description": "<td>URL of the thumbnail (JPEG only) for the video</td>",
"rst_description": "URL of the thumbnail (JPEG only) for the video\n",
"name": "thumbnail_url",
"required": true
}
],
"category": "types"

View file

@ -34,7 +34,7 @@
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumb",
"name": "thumbnail",
"required": false
},
{
@ -92,14 +92,6 @@
"rst_description": "*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation\n",
"name": "has_spoiler",
"required": false
},
{
"type": "InputFile or String",
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumbnail",
"required": false
}
],
"category": "types"

View file

@ -34,7 +34,7 @@
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumb",
"name": "thumbnail",
"required": false
},
{
@ -84,14 +84,6 @@
"rst_description": "*Optional*. Title of the audio\n",
"name": "title",
"required": false
},
{
"type": "InputFile or String",
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumbnail",
"required": false
}
],
"category": "types"

View file

@ -34,7 +34,7 @@
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumb",
"name": "thumbnail",
"required": false
},
{
@ -68,14 +68,6 @@
"rst_description": "*Optional*. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always :code:`True`, if the document is sent as part of an album.\n",
"name": "disable_content_type_detection",
"required": false
},
{
"type": "InputFile or String",
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumbnail",
"required": false
}
],
"category": "types"

View file

@ -34,7 +34,7 @@
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumb",
"name": "thumbnail",
"required": false
},
{
@ -100,14 +100,6 @@
"rst_description": "*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation\n",
"name": "has_spoiler",
"required": false
},
{
"type": "InputFile or String",
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumbnail",
"required": false
}
],
"category": "types"

View file

@ -3,8 +3,8 @@
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "inputsticker",

View file

@ -74,7 +74,7 @@
"description": "Sticker thumbnail in the .WEBP or .JPG format",
"html_description": "<td><em>Optional</em>. Sticker thumbnail in the .WEBP or .JPG format</td>",
"rst_description": "*Optional*. Sticker thumbnail in the .WEBP or .JPG format\n",
"name": "thumb",
"name": "thumbnail",
"required": false
},
{
@ -117,22 +117,6 @@
"name": "custom_emoji_id",
"required": false
},
{
"type": "Integer",
"description": "File size in bytes",
"html_description": "<td><em>Optional</em>. File size in bytes</td>",
"rst_description": "*Optional*. File size in bytes\n",
"name": "file_size",
"required": false
},
{
"type": "PhotoSize",
"description": "Sticker thumbnail in the .WEBP or .JPG format",
"html_description": "<td><em>Optional</em>. Sticker thumbnail in the .WEBP or .JPG format</td>",
"rst_description": "*Optional*. Sticker thumbnail in the .WEBP or .JPG format\n",
"name": "thumbnail",
"required": false
},
{
"type": "True",
"description": "True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places",
@ -140,6 +124,14 @@
"rst_description": "*Optional*. :code:`True`, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places\n",
"name": "needs_repainting",
"required": false
},
{
"type": "Integer",
"description": "File size in bytes",
"html_description": "<td><em>Optional</em>. File size in bytes</td>",
"rst_description": "*Optional*. File size in bytes\n",
"name": "file_size",
"required": false
}
],
"category": "types"

View file

@ -61,14 +61,6 @@
"name": "stickers",
"required": true
},
{
"type": "PhotoSize",
"description": "Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format",
"html_description": "<td><em>Optional</em>. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format</td>",
"rst_description": "*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format\n",
"name": "thumb",
"required": false
},
{
"type": "PhotoSize",
"description": "Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format",

View file

@ -58,7 +58,7 @@
"description": "Video thumbnail",
"html_description": "<td><em>Optional</em>. Video thumbnail</td>",
"rst_description": "*Optional*. Video thumbnail\n",
"name": "thumb",
"name": "thumbnail",
"required": false
},
{
@ -84,14 +84,6 @@
"rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n",
"name": "file_size",
"required": false
},
{
"type": "PhotoSize",
"description": "Video thumbnail",
"html_description": "<td><em>Optional</em>. Video thumbnail</td>",
"rst_description": "*Optional*. Video thumbnail\n",
"name": "thumbnail",
"required": false
}
],
"category": "types"

View file

@ -50,7 +50,7 @@
"description": "Video thumbnail",
"html_description": "<td><em>Optional</em>. Video thumbnail</td>",
"rst_description": "*Optional*. Video thumbnail\n",
"name": "thumb",
"name": "thumbnail",
"required": false
},
{
@ -60,14 +60,6 @@
"rst_description": "*Optional*. File size in bytes\n",
"name": "file_size",
"required": false
},
{
"type": "PhotoSize",
"description": "Video thumbnail",
"html_description": "<td><em>Optional</em>. Video thumbnail</td>",
"rst_description": "*Optional*. Video thumbnail\n",
"name": "thumbnail",
"required": false
}
],
"category": "types"

View file

@ -46,6 +46,7 @@ from ..methods import (
DeleteMessage,
DeleteMyCommands,
DeleteStickerFromSet,
DeleteStickerSet,
DeleteWebhook,
EditChatInviteLink,
EditForumTopic,
@ -69,6 +70,8 @@ from ..methods import (
GetMe,
GetMyCommands,
GetMyDefaultAdministratorRights,
GetMyDescription,
GetMyShortDescription,
GetStickerSet,
GetUpdates,
GetUserProfilePhotos,
@ -107,12 +110,20 @@ from ..methods import (
SetChatPhoto,
SetChatStickerSet,
SetChatTitle,
SetCustomEmojiStickerSetThumbnail,
SetGameScore,
SetMyCommands,
SetMyDefaultAdministratorRights,
SetMyDescription,
SetMyShortDescription,
SetPassportDataErrors,
SetStickerEmojiList,
SetStickerKeywords,
SetStickerMaskPosition,
SetStickerPositionInSet,
SetStickerSetThumb,
SetStickerSetThumbnail,
SetStickerSetTitle,
SetWebhook,
StopMessageLiveLocation,
StopPoll,
@ -124,22 +135,13 @@ from ..methods import (
UnpinAllForumTopicMessages,
UnpinChatMessage,
UploadStickerFile,
SetStickerSetTitle,
SetStickerSetThumbnail,
SetStickerMaskPosition,
SetStickerKeywords,
SetStickerEmojiList,
SetMyShortDescription,
SetMyDescription,
SetCustomEmojiStickerSetThumbnail,
GetMyShortDescription,
GetMyDescription,
DeleteStickerSet,
)
from ..types import (
UNSET,
BotCommand,
BotCommandScope,
BotDescription,
BotShortDescription,
Chat,
ChatAdministratorRights,
ChatInviteLink,
@ -163,6 +165,7 @@ from ..types import (
InputMediaDocument,
InputMediaPhoto,
InputMediaVideo,
InputSticker,
LabeledPrice,
MaskPosition,
MenuButtonCommands,
@ -183,9 +186,6 @@ from ..types import (
User,
UserProfilePhotos,
WebhookInfo,
InputSticker,
BotShortDescription,
BotDescription,
)
from .session.aiohttp import AiohttpSession
from .session.base import BaseSession
@ -410,27 +410,17 @@ class Bot(ContextInstanceMixin["Bot"]):
self,
user_id: int,
name: str,
emojis: str,
sticker: InputSticker,
png_sticker: Optional[Union[InputFile, str]] = None,
tgs_sticker: Optional[InputFile] = None,
webm_sticker: Optional[InputFile] = None,
mask_position: Optional[MaskPosition] = None,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success.
Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#addstickertoset
:param user_id: User identifier of sticker set owner
:param name: Sticker set name
:param emojis: One or more emoji corresponding to the sticker
:param sticker: A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.
:param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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>`
:param tgs_sticker: **TGS** animation with the sticker, uploaded using multipart/form-data. 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 technical requirements
:param webm_sticker: **WEBM** video with the sticker, uploaded using multipart/form-data. 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 technical requirements
:param mask_position: A JSON-serialized object for position where the mask should be placed on faces
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
@ -438,12 +428,7 @@ class Bot(ContextInstanceMixin["Bot"]):
call = AddStickerToSet(
user_id=user_id,
name=name,
emojis=emojis,
sticker=sticker,
png_sticker=png_sticker,
tgs_sticker=tgs_sticker,
webm_sticker=webm_sticker,
mask_position=mask_position,
)
return await self(call, request_timeout=request_timeout)
@ -911,33 +896,23 @@ class Bot(ContextInstanceMixin["Bot"]):
user_id: int,
name: str,
title: str,
emojis: str,
stickers: List[InputSticker],
sticker_format: str,
png_sticker: Optional[Union[InputFile, str]] = None,
tgs_sticker: Optional[InputFile] = None,
webm_sticker: Optional[InputFile] = None,
sticker_type: Optional[str] = None,
mask_position: Optional[MaskPosition] = None,
needs_repainting: Optional[bool] = None,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Returns :code:`True` on success.
Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#createnewstickerset
:param user_id: User identifier of created sticker set owner
:param name: Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_<bot_username>"`. :code:`<bot_username>` is case insensitive. 1-64 characters.
:param title: Sticker set title, 1-64 characters
:param emojis: One or more emoji corresponding to the sticker
:param stickers: A JSON-serialized list of 1-50 initial stickers to be added to the sticker set
:param sticker_format: Format of stickers in the set, must be one of 'static', 'animated', 'video'
:param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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>`
:param tgs_sticker: **TGS** animation with the sticker, uploaded using multipart/form-data. 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 technical requirements
:param webm_sticker: **WEBM** video with the sticker, uploaded using multipart/form-data. 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 technical requirements
:param sticker_type: Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.
:param mask_position: A JSON-serialized object for position where the mask should be placed on faces
:param needs_repainting: Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
@ -947,14 +922,9 @@ class Bot(ContextInstanceMixin["Bot"]):
user_id=user_id,
name=name,
title=title,
emojis=emojis,
stickers=stickers,
sticker_format=sticker_format,
png_sticker=png_sticker,
tgs_sticker=tgs_sticker,
webm_sticker=webm_sticker,
sticker_type=sticker_type,
mask_position=mask_position,
needs_repainting=needs_repainting,
)
return await self(call, request_timeout=request_timeout)
@ -2024,7 +1994,7 @@ class Bot(ContextInstanceMixin["Bot"]):
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET,
caption_entities: Optional[List[MessageEntity]] = None,
@ -2036,7 +2006,6 @@ class Bot(ContextInstanceMixin["Bot"]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
request_timeout: Optional[int] = None,
) -> Message:
"""
@ -2050,7 +2019,7 @@ class Bot(ContextInstanceMixin["Bot"]):
:param duration: Duration of sent animation in seconds
:param width: Animation width
:param height: Animation height
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the animation caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2060,7 +2029,6 @@ class Bot(ContextInstanceMixin["Bot"]):
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param request_timeout: Request timeout
:return: Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
"""
@ -2072,7 +2040,7 @@ class Bot(ContextInstanceMixin["Bot"]):
duration=duration,
width=width,
height=height,
thumb=thumb,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@ -2082,7 +2050,6 @@ class Bot(ContextInstanceMixin["Bot"]):
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
)
return await self(call, request_timeout=request_timeout)
@ -2097,7 +2064,7 @@ class Bot(ContextInstanceMixin["Bot"]):
duration: Optional[int] = None,
performer: Optional[str] = None,
title: Optional[str] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
reply_to_message_id: Optional[int] = None,
@ -2105,7 +2072,6 @@ class Bot(ContextInstanceMixin["Bot"]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
request_timeout: Optional[int] = None,
) -> Message:
"""
@ -2123,13 +2089,12 @@ class Bot(ContextInstanceMixin["Bot"]):
:param duration: Duration of the audio in seconds
:param performer: Performer
:param title: Track name
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param request_timeout: Request timeout
:return: Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
"""
@ -2144,13 +2109,12 @@ class Bot(ContextInstanceMixin["Bot"]):
duration=duration,
performer=performer,
title=title,
thumb=thumb,
thumbnail=thumbnail,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
)
return await self(call, request_timeout=request_timeout)
@ -2284,7 +2248,7 @@ class Bot(ContextInstanceMixin["Bot"]):
chat_id: Union[int, str],
document: Union[InputFile, str],
message_thread_id: Optional[int] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET,
caption_entities: Optional[List[MessageEntity]] = None,
@ -2296,7 +2260,6 @@ class Bot(ContextInstanceMixin["Bot"]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
request_timeout: Optional[int] = None,
) -> Message:
"""
@ -2307,7 +2270,7 @@ class Bot(ContextInstanceMixin["Bot"]):
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), 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>`
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the document caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2317,7 +2280,6 @@ class Bot(ContextInstanceMixin["Bot"]):
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param request_timeout: Request timeout
:return: Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
"""
@ -2326,7 +2288,7 @@ class Bot(ContextInstanceMixin["Bot"]):
chat_id=chat_id,
document=document,
message_thread_id=message_thread_id,
thumb=thumb,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@ -2336,7 +2298,6 @@ class Bot(ContextInstanceMixin["Bot"]):
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
)
return await self(call, request_timeout=request_timeout)
@ -2766,6 +2727,7 @@ class Bot(ContextInstanceMixin["Bot"]):
chat_id: Union[int, str],
sticker: Union[InputFile, str],
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
reply_to_message_id: Optional[int] = None,
@ -2773,7 +2735,6 @@ class Bot(ContextInstanceMixin["Bot"]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
emoji: Optional[str] = None,
request_timeout: Optional[int] = None,
) -> Message:
"""
@ -2784,12 +2745,12 @@ class Bot(ContextInstanceMixin["Bot"]):
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param emoji: Emoji associated with the sticker; only for uploaded stickers
:param request_timeout: Request timeout
:return: On success, the sent :class:`aiogram.types.message.Message` is returned.
"""
@ -2798,12 +2759,12 @@ class Bot(ContextInstanceMixin["Bot"]):
chat_id=chat_id,
sticker=sticker,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
emoji=emoji,
)
return await self(call, request_timeout=request_timeout)
@ -2879,7 +2840,7 @@ class Bot(ContextInstanceMixin["Bot"]):
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET,
caption_entities: Optional[List[MessageEntity]] = None,
@ -2892,7 +2853,6 @@ class Bot(ContextInstanceMixin["Bot"]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
request_timeout: Optional[int] = None,
) -> Message:
"""
@ -2906,7 +2866,7 @@ class Bot(ContextInstanceMixin["Bot"]):
:param duration: Duration of sent video in seconds
:param width: Video width
:param height: Video height
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2917,7 +2877,6 @@ class Bot(ContextInstanceMixin["Bot"]):
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param request_timeout: Request timeout
:return: Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
"""
@ -2929,7 +2888,7 @@ class Bot(ContextInstanceMixin["Bot"]):
duration=duration,
width=width,
height=height,
thumb=thumb,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@ -2940,7 +2899,6 @@ class Bot(ContextInstanceMixin["Bot"]):
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
)
return await self(call, request_timeout=request_timeout)
@ -2951,7 +2909,7 @@ class Bot(ContextInstanceMixin["Bot"]):
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
length: Optional[int] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
reply_to_message_id: Optional[int] = None,
@ -2959,7 +2917,6 @@ class Bot(ContextInstanceMixin["Bot"]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
request_timeout: Optional[int] = None,
) -> Message:
"""
@ -2972,13 +2929,12 @@ class Bot(ContextInstanceMixin["Bot"]):
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param request_timeout: Request timeout
:return: On success, the sent :class:`aiogram.types.message.Message` is returned.
"""
@ -2989,13 +2945,12 @@ class Bot(ContextInstanceMixin["Bot"]):
message_thread_id=message_thread_id,
duration=duration,
length=length,
thumb=thumb,
thumbnail=thumbnail,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
)
return await self(call, request_timeout=request_timeout)
@ -3294,7 +3249,7 @@ class Bot(ContextInstanceMixin["Bot"]):
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns :code:`True` on success.
Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setmydefaultadministratorrights
@ -3604,29 +3559,26 @@ class Bot(ContextInstanceMixin["Bot"]):
async def upload_sticker_file(
self,
user_id: int,
png_sticker: InputFile,
sticker_format: str,
sticker: InputFile,
sticker_format: str,
request_timeout: Optional[int] = None,
) -> File:
"""
Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.
Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.
Source: https://core.telegram.org/bots/api#uploadstickerfile
:param user_id: User identifier of sticker file owner
:param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More information on Sending Files » <sending-files>`
:param sticker_format: Format of the sticker, must be one of 'static', 'animated', 'video'
:param sticker: A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers <https://core.telegram.org/stickers>`_`https://core.telegram.org/stickers <https://core.telegram.org/stickers>`_ for technical requirements. :ref:`More information on Sending Files » <sending-files>`
:param sticker_format: Format of the sticker, must be one of 'static', 'animated', 'video'
:param request_timeout: Request timeout
:return: Returns the uploaded :class:`aiogram.types.file.File` on success.
"""
call = UploadStickerFile(
user_id=user_id,
png_sticker=png_sticker,
sticker_format=sticker_format,
sticker=sticker,
sticker_format=sticker_format,
)
return await self(call, request_timeout=request_timeout)
@ -3915,7 +3867,7 @@ class Bot(ContextInstanceMixin["Bot"]):
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to change the `mask position <https://core.telegram.org/bots/update66ncjlkdbc80g428bfudsbcuiv793vudbcoiencpim29gbyutbvis#maskposition>`_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success.
Use this method to change the `mask position <https://core.telegram.org/bots/api#maskposition>`_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickermaskposition

View file

@ -11,10 +11,10 @@ from .menu_button_type import MenuButtonType
from .message_entity_type import MessageEntityType
from .parse_mode import ParseMode
from .poll_type import PollType
from .sticker_format import StickerFormat
from .sticker_type import StickerType
from .topic_icon_color import TopicIconColor
from .update_type import UpdateType
from .sticker_format import StickerFormat
__all__ = (
"BotCommandScopeType",

View file

@ -23,6 +23,7 @@ from .delete_forum_topic import DeleteForumTopic
from .delete_message import DeleteMessage
from .delete_my_commands import DeleteMyCommands
from .delete_sticker_from_set import DeleteStickerFromSet
from .delete_sticker_set import DeleteStickerSet
from .delete_webhook import DeleteWebhook
from .edit_chat_invite_link import EditChatInviteLink
from .edit_forum_topic import EditForumTopic
@ -46,6 +47,8 @@ from .get_game_high_scores import GetGameHighScores
from .get_me import GetMe
from .get_my_commands import GetMyCommands
from .get_my_default_administrator_rights import GetMyDefaultAdministratorRights
from .get_my_description import GetMyDescription
from .get_my_short_description import GetMyShortDescription
from .get_sticker_set import GetStickerSet
from .get_updates import GetUpdates
from .get_user_profile_photos import GetUserProfilePhotos
@ -84,12 +87,19 @@ from .set_chat_permissions import SetChatPermissions
from .set_chat_photo import SetChatPhoto
from .set_chat_sticker_set import SetChatStickerSet
from .set_chat_title import SetChatTitle
from .set_custom_emoji_sticker_set_thumbnail import SetCustomEmojiStickerSetThumbnail
from .set_game_score import SetGameScore
from .set_my_commands import SetMyCommands
from .set_my_default_administrator_rights import SetMyDefaultAdministratorRights
from .set_my_description import SetMyDescription
from .set_my_short_description import SetMyShortDescription
from .set_passport_data_errors import SetPassportDataErrors
from .set_sticker_emoji_list import SetStickerEmojiList
from .set_sticker_keywords import SetStickerKeywords
from .set_sticker_mask_position import SetStickerMaskPosition
from .set_sticker_position_in_set import SetStickerPositionInSet
from .set_sticker_set_thumb import SetStickerSetThumb
from .set_sticker_set_thumbnail import SetStickerSetThumbnail
from .set_sticker_set_title import SetStickerSetTitle
from .set_webhook import SetWebhook
from .stop_message_live_location import StopMessageLiveLocation
from .stop_poll import StopPoll
@ -100,17 +110,6 @@ from .unpin_all_chat_messages import UnpinAllChatMessages
from .unpin_all_forum_topic_messages import UnpinAllForumTopicMessages
from .unpin_chat_message import UnpinChatMessage
from .upload_sticker_file import UploadStickerFile
from .delete_sticker_set import DeleteStickerSet
from .get_my_description import GetMyDescription
from .get_my_short_description import GetMyShortDescription
from .set_custom_emoji_sticker_set_thumbnail import SetCustomEmojiStickerSetThumbnail
from .set_my_description import SetMyDescription
from .set_my_short_description import SetMyShortDescription
from .set_sticker_emoji_list import SetStickerEmojiList
from .set_sticker_keywords import SetStickerKeywords
from .set_sticker_mask_position import SetStickerMaskPosition
from .set_sticker_set_thumbnail import SetStickerSetThumbnail
from .set_sticker_set_title import SetStickerSetTitle
__all__ = (
"AddStickerToSet",
@ -214,7 +213,6 @@ __all__ = (
"SetStickerKeywords",
"SetStickerMaskPosition",
"SetStickerPositionInSet",
"SetStickerSetThumb",
"SetStickerSetThumbnail",
"SetStickerSetTitle",
"SetWebhook",

View file

@ -2,7 +2,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
from ..types import InputFile, MaskPosition, InputSticker
from ..types import InputFile, InputSticker, MaskPosition
from .base import Request, TelegramMethod, prepare_file
if TYPE_CHECKING:
@ -11,7 +11,7 @@ if TYPE_CHECKING:
class AddStickerToSet(TelegramMethod[bool]):
"""
Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success.
Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#addstickertoset
"""
@ -22,18 +22,8 @@ class AddStickerToSet(TelegramMethod[bool]):
"""User identifier of sticker set owner"""
name: str
"""Sticker set name"""
emojis: str
"""One or more emoji corresponding to the sticker"""
sticker: InputSticker
"""A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed."""
png_sticker: Optional[Union[InputFile, str]] = None
"""**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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>`"""
tgs_sticker: Optional[InputFile] = None
"""**TGS** animation with the sticker, uploaded using multipart/form-data. 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 technical requirements"""
webm_sticker: Optional[InputFile] = None
"""**WEBM** video with the sticker, uploaded using multipart/form-data. 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 technical requirements"""
mask_position: Optional[MaskPosition] = None
"""A JSON-serialized object for position where the mask should be placed on faces"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict(exclude={"png_sticker", "tgs_sticker", "webm_sticker"})

View file

@ -1,8 +1,8 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional, Union, List
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
from ..types import InputFile, MaskPosition, InputSticker
from ..types import InputFile, InputSticker, MaskPosition
from .base import Request, TelegramMethod, prepare_file
if TYPE_CHECKING:
@ -11,7 +11,7 @@ if TYPE_CHECKING:
class CreateNewStickerSet(TelegramMethod[bool]):
"""
Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Returns :code:`True` on success.
Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#createnewstickerset
"""
@ -24,22 +24,12 @@ class CreateNewStickerSet(TelegramMethod[bool]):
"""Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_<bot_username>"`. :code:`<bot_username>` is case insensitive. 1-64 characters."""
title: str
"""Sticker set title, 1-64 characters"""
emojis: str
"""One or more emoji corresponding to the sticker"""
stickers: List[InputSticker]
"""A JSON-serialized list of 1-50 initial stickers to be added to the sticker set"""
sticker_format: str
"""Format of stickers in the set, must be one of 'static', 'animated', 'video'"""
png_sticker: Optional[Union[InputFile, str]] = None
"""**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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>`"""
tgs_sticker: Optional[InputFile] = None
"""**TGS** animation with the sticker, uploaded using multipart/form-data. 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 technical requirements"""
webm_sticker: Optional[InputFile] = None
"""**WEBM** video with the sticker, uploaded using multipart/form-data. 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 technical requirements"""
sticker_type: Optional[str] = None
"""Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created."""
mask_position: Optional[MaskPosition] = None
"""A JSON-serialized object for position where the mask should be placed on faces"""
needs_repainting: Optional[bool] = None
"""Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only"""

View file

@ -39,7 +39,7 @@ class SendAnimation(TelegramMethod[Message]):
"""Animation width"""
height: Optional[int] = None
"""Animation height"""
thumb: Optional[Union[InputFile, str]] = None
thumbnail: Optional[Union[InputFile, str]] = None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
caption: Optional[str] = None
"""Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing"""
@ -61,8 +61,6 @@ class SendAnimation(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
thumbnail: Optional[Union[InputFile, str]] = None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict(exclude={"animation", "thumb"})

View file

@ -46,7 +46,7 @@ class SendAudio(TelegramMethod[Message]):
"""Performer"""
title: Optional[str] = None
"""Track name"""
thumb: Optional[Union[InputFile, str]] = None
thumbnail: Optional[Union[InputFile, str]] = None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
disable_notification: Optional[bool] = None
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
@ -60,8 +60,6 @@ class SendAudio(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
thumbnail: Optional[Union[InputFile, str]] = None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict(exclude={"audio", "thumb"})

View file

@ -33,7 +33,7 @@ class SendDocument(TelegramMethod[Message]):
"""File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), 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>`"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
thumb: Optional[Union[InputFile, str]] = None
thumbnail: Optional[Union[InputFile, str]] = None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
caption: Optional[str] = None
"""Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing"""
@ -55,8 +55,6 @@ class SendDocument(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
thumbnail: Optional[Union[InputFile, str]] = None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict(exclude={"document", "thumb"})

View file

@ -31,6 +31,8 @@ class SendSticker(TelegramMethod[Message]):
"""Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL."""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
emoji: Optional[str] = None
"""Emoji associated with the sticker; only for just uploaded stickers"""
disable_notification: Optional[bool] = None
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
protect_content: Optional[bool] = None
@ -43,8 +45,6 @@ class SendSticker(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
emoji: Optional[str] = None
"""Emoji associated with the sticker; only for uploaded stickers"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict(exclude={"sticker"})

View file

@ -39,7 +39,7 @@ class SendVideo(TelegramMethod[Message]):
"""Video width"""
height: Optional[int] = None
"""Video height"""
thumb: Optional[Union[InputFile, str]] = None
thumbnail: Optional[Union[InputFile, str]] = None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
caption: Optional[str] = None
"""Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing"""
@ -63,8 +63,6 @@ class SendVideo(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
thumbnail: Optional[Union[InputFile, str]] = None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict(exclude={"video", "thumb"})

View file

@ -35,7 +35,7 @@ class SendVideoNote(TelegramMethod[Message]):
"""Duration of sent video in seconds"""
length: Optional[int] = None
"""Video width and height, i.e. diameter of the video message"""
thumb: Optional[Union[InputFile, str]] = None
thumbnail: Optional[Union[InputFile, str]] = None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
disable_notification: Optional[bool] = None
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
@ -49,8 +49,6 @@ class SendVideoNote(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
thumbnail: Optional[Union[InputFile, str]] = None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict(exclude={"video_note", "thumb"})

View file

@ -11,7 +11,7 @@ if TYPE_CHECKING:
class SetMyDefaultAdministratorRights(TelegramMethod[bool]):
"""
Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns :code:`True` on success.
Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setmydefaultadministratorrights
"""

View file

@ -1,6 +1,6 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional, List
from typing import TYPE_CHECKING, Any, Dict, List, Optional
from .base import Request, TelegramMethod

View file

@ -2,8 +2,8 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional
from .base import Request, TelegramMethod
from ..types import MaskPosition
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot
@ -11,7 +11,7 @@ if TYPE_CHECKING:
class SetStickerMaskPosition(TelegramMethod[bool]):
"""
Use this method to change the `mask position <https://core.telegram.org/bots/update66ncjlkdbc80g428bfudsbcuiv793vudbcoiencpim29gbyutbvis#maskposition>`_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success.
Use this method to change the `mask position <https://core.telegram.org/bots/api#maskposition>`_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickermaskposition
"""

View file

@ -1,34 +0,0 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
from ..types import InputFile
from .base import Request, TelegramMethod, prepare_file
if TYPE_CHECKING:
from ..client.bot import Bot
class SetStickerSetThumb(TelegramMethod[bool]):
"""
Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickersetthumb
"""
__returning__ = bool
name: str
"""Sticker set name"""
user_id: int
"""User identifier of the sticker set owner"""
thumb: Optional[Union[InputFile, str]] = None
"""A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the 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 sticker set thumbnails can't be uploaded via HTTP URL."""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict(exclude={"thumb"})
files: Dict[str, InputFile] = {}
prepare_file(data=data, files=files, name="thumb", value=self.thumb)
return Request(method="setStickerSetThumb", data=data, files=files)

View file

@ -2,8 +2,8 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
from .base import Request, TelegramMethod
from ..types import InputFile
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot

View file

@ -11,7 +11,7 @@ if TYPE_CHECKING:
class UploadStickerFile(TelegramMethod[File]):
"""
Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.
Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.
Source: https://core.telegram.org/bots/api#uploadstickerfile
"""
@ -20,12 +20,10 @@ class UploadStickerFile(TelegramMethod[File]):
user_id: int
"""User identifier of sticker file owner"""
png_sticker: InputFile
"""**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More information on Sending Files » <sending-files>`"""
sticker_format: str
"""Format of the sticker, must be one of 'static', 'animated', 'video'"""
sticker: InputFile
"""A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers <https://core.telegram.org/stickers>`_`https://core.telegram.org/stickers <https://core.telegram.org/stickers>`_ for technical requirements. :ref:`More information on Sending Files » <sending-files>`"""
sticker_format: str
"""Format of the sticker, must be one of 'static', 'animated', 'video'"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict(exclude={"png_sticker"})

View file

@ -14,6 +14,8 @@ from .bot_command_scope_chat import BotCommandScopeChat
from .bot_command_scope_chat_administrators import BotCommandScopeChatAdministrators
from .bot_command_scope_chat_member import BotCommandScopeChatMember
from .bot_command_scope_default import BotCommandScopeDefault
from .bot_description import BotDescription
from .bot_short_description import BotShortDescription
from .callback_game import CallbackGame
from .callback_query import CallbackQuery
from .chat import Chat
@ -86,6 +88,7 @@ from .input_media_document import InputMediaDocument
from .input_media_photo import InputMediaPhoto
from .input_media_video import InputMediaVideo
from .input_message_content import InputMessageContent
from .input_sticker import InputSticker
from .input_text_message_content import InputTextMessageContent
from .input_venue_message_content import InputVenueMessageContent
from .invoice import Invoice
@ -152,9 +155,6 @@ from .web_app_data import WebAppData
from .web_app_info import WebAppInfo
from .webhook_info import WebhookInfo
from .write_access_allowed import WriteAccessAllowed
from .bot_description import BotDescription
from .bot_short_description import BotShortDescription
from .input_sticker import InputSticker
__all__ = (
"Animation",

View file

@ -25,7 +25,7 @@ class Animation(TelegramObject):
"""Video height as defined by sender"""
duration: int
"""Duration of the video in seconds as defined by sender"""
thumb: Optional[PhotoSize] = None
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Animation thumbnail as defined by sender"""
file_name: Optional[str] = None
"""*Optional*. Original animation filename as defined by sender"""
@ -33,5 +33,3 @@ class Animation(TelegramObject):
"""*Optional*. MIME type of the file as defined by sender"""
file_size: Optional[int] = None
"""*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."""
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Animation thumbnail as defined by the sender"""

View file

@ -31,7 +31,5 @@ class Audio(TelegramObject):
"""*Optional*. MIME type of the file as defined by sender"""
file_size: Optional[int] = None
"""*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."""
thumb: Optional[PhotoSize] = None
"""*Optional*. Thumbnail of the album cover to which the music file belongs"""
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Thumbnail of the album cover to which the music file belongs"""

View file

@ -19,7 +19,7 @@ class Document(TelegramObject):
"""Identifier for this file, which can be used to download or reuse the file"""
file_unique_id: str
"""Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."""
thumb: Optional[PhotoSize] = None
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Document thumbnail as defined by sender"""
file_name: Optional[str] = None
"""*Optional*. Original filename as defined by sender"""
@ -27,5 +27,3 @@ class Document(TelegramObject):
"""*Optional*. MIME type of the file as defined by sender"""
file_size: Optional[int] = None
"""*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."""
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Document thumbnail as defined by the sender"""

View file

@ -35,12 +35,6 @@ class InlineQueryResultArticle(InlineQueryResult):
"""*Optional*. Pass :code:`True` if you don't want the URL to be shown in the message"""
description: Optional[str] = None
"""*Optional*. Short description of the result"""
thumb_url: Optional[str] = None
"""*Optional*. Url of the thumbnail for the result"""
thumb_width: Optional[int] = None
"""*Optional*. Thumbnail width"""
thumb_height: Optional[int] = None
"""*Optional*. Thumbnail height"""
thumbnail_url: Optional[str] = None
"""*Optional*. Url of the thumbnail for the result"""
thumbnail_width: Optional[int] = None

View file

@ -36,12 +36,6 @@ class InlineQueryResultContact(InlineQueryResult):
"""*Optional*. `Inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_ attached to the message"""
input_message_content: Optional[InputMessageContent] = None
"""*Optional*. Content of the message to be sent instead of the contact"""
thumb_url: Optional[str] = None
"""*Optional*. Url of the thumbnail for the result"""
thumb_width: Optional[int] = None
"""*Optional*. Thumbnail width"""
thumb_height: Optional[int] = None
"""*Optional*. Thumbnail height"""
thumbnail_url: Optional[str] = None
"""*Optional*. Url of the thumbnail for the result"""
thumbnail_width: Optional[int] = None

View file

@ -44,12 +44,6 @@ class InlineQueryResultDocument(InlineQueryResult):
"""*Optional*. Inline keyboard attached to the message"""
input_message_content: Optional[InputMessageContent] = None
"""*Optional*. Content of the message to be sent instead of the file"""
thumb_url: Optional[str] = None
"""*Optional*. URL of the thumbnail (JPEG only) for the file"""
thumb_width: Optional[int] = None
"""*Optional*. Thumbnail width"""
thumb_height: Optional[int] = None
"""*Optional*. Thumbnail height"""
thumbnail_url: Optional[str] = None
"""*Optional*. URL of the thumbnail (JPEG only) for the file"""
thumbnail_width: Optional[int] = None

View file

@ -27,8 +27,6 @@ class InlineQueryResultGif(InlineQueryResult):
"""Unique identifier for this result, 1-64 bytes"""
gif_url: str
"""A valid URL for the GIF file. File size must not exceed 1MB"""
thumb_url: str
"""URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"""
thumbnail_url: str
"""URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"""
gif_width: Optional[int] = None
@ -37,7 +35,7 @@ class InlineQueryResultGif(InlineQueryResult):
"""*Optional*. Height of the GIF"""
gif_duration: Optional[int] = None
"""*Optional*. Duration of the GIF in seconds"""
thumb_mime_type: Optional[str] = None
thumbnail_mime_type: Optional[str] = None
"""*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'"""
title: Optional[str] = None
"""*Optional*. Title for the result"""
@ -51,5 +49,3 @@ class InlineQueryResultGif(InlineQueryResult):
"""*Optional*. `Inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_ attached to the message"""
input_message_content: Optional[InputMessageContent] = None
"""*Optional*. Content of the message to be sent instead of the GIF animation"""
thumbnail_mime_type: Optional[str] = None
"""*Optional*. MIME type of the thumbnail. Must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'"""

View file

@ -42,12 +42,6 @@ class InlineQueryResultLocation(InlineQueryResult):
"""*Optional*. `Inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_ attached to the message"""
input_message_content: Optional[InputMessageContent] = None
"""*Optional*. Content of the message to be sent instead of the location"""
thumb_url: Optional[str] = None
"""*Optional*. Url of the thumbnail for the result"""
thumb_width: Optional[int] = None
"""*Optional*. Thumbnail width"""
thumb_height: Optional[int] = None
"""*Optional*. Thumbnail height"""
thumbnail_url: Optional[str] = None
"""*Optional*. Url of the thumbnail for the result"""
thumbnail_width: Optional[int] = None

View file

@ -27,8 +27,6 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
"""Unique identifier for this result, 1-64 bytes"""
mpeg4_url: str
"""A valid URL for the MPEG4 file. File size must not exceed 1MB"""
thumb_url: str
"""URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"""
thumbnail_url: str
"""URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"""
mpeg4_width: Optional[int] = None
@ -37,7 +35,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
"""*Optional*. Video height"""
mpeg4_duration: Optional[int] = None
"""*Optional*. Video duration in seconds"""
thumb_mime_type: Optional[str] = None
thumbnail_mime_type: Optional[str] = None
"""*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'"""
title: Optional[str] = None
"""*Optional*. Title for the result"""
@ -51,5 +49,3 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
"""*Optional*. `Inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_ attached to the message"""
input_message_content: Optional[InputMessageContent] = None
"""*Optional*. Content of the message to be sent instead of the video animation"""
thumbnail_mime_type: Optional[str] = None
"""*Optional*. MIME type of the thumbnail. Must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'"""

View file

@ -27,8 +27,6 @@ class InlineQueryResultPhoto(InlineQueryResult):
"""Unique identifier for this result, 1-64 bytes"""
photo_url: str
"""A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB"""
thumb_url: str
"""URL of the thumbnail for the photo"""
thumbnail_url: str
"""URL of the thumbnail for the photo"""
photo_width: Optional[int] = None

View file

@ -44,12 +44,6 @@ class InlineQueryResultVenue(InlineQueryResult):
"""*Optional*. `Inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_ attached to the message"""
input_message_content: Optional[InputMessageContent] = None
"""*Optional*. Content of the message to be sent instead of the venue"""
thumb_url: Optional[str] = None
"""*Optional*. Url of the thumbnail for the result"""
thumb_width: Optional[int] = None
"""*Optional*. Thumbnail width"""
thumb_height: Optional[int] = None
"""*Optional*. Thumbnail height"""
thumbnail_url: Optional[str] = None
"""*Optional*. Url of the thumbnail for the result"""
thumbnail_width: Optional[int] = None

View file

@ -31,12 +31,10 @@ class InlineQueryResultVideo(InlineQueryResult):
"""A valid URL for the embedded video player or video file"""
mime_type: str
"""MIME type of the content of the video URL, 'text/html' or 'video/mp4'"""
thumb_url: str
thumbnail_url: str
"""URL of the thumbnail (JPEG only) for the video"""
title: str
"""Title for the result"""
thumbnail_url: str
"""URL of the thumbnail (JPEG only) for the video"""
caption: Optional[str] = None
"""*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing"""
parse_mode: Optional[str] = UNSET

View file

@ -24,7 +24,7 @@ class InputMediaAnimation(InputMedia):
"""Type of the result, must be *animation*"""
media: Union[str, InputFile]
"""File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. :ref:`More information on Sending Files » <sending-files>`"""
thumb: Optional[Union[InputFile, str]] = None
thumbnail: Optional[Union[InputFile, str]] = None
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
caption: Optional[str] = None
"""*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing"""
@ -40,5 +40,3 @@ class InputMediaAnimation(InputMedia):
"""*Optional*. Animation duration in seconds"""
has_spoiler: Optional[bool] = None
"""*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation"""
thumbnail: Optional[Union[InputFile, str]] = None
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""

View file

@ -24,7 +24,7 @@ class InputMediaAudio(InputMedia):
"""Type of the result, must be *audio*"""
media: Union[str, InputFile]
"""File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. :ref:`More information on Sending Files » <sending-files>`"""
thumb: Optional[Union[InputFile, str]] = None
thumbnail: Optional[Union[InputFile, str]] = None
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
caption: Optional[str] = None
"""*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing"""
@ -38,5 +38,3 @@ class InputMediaAudio(InputMedia):
"""*Optional*. Performer of the audio"""
title: Optional[str] = None
"""*Optional*. Title of the audio"""
thumbnail: Optional[Union[InputFile, str]] = None
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""

View file

@ -24,7 +24,7 @@ class InputMediaDocument(InputMedia):
"""Type of the result, must be *document*"""
media: Union[str, InputFile]
"""File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. :ref:`More information on Sending Files » <sending-files>`"""
thumb: Optional[Union[InputFile, str]] = None
thumbnail: Optional[Union[InputFile, str]] = None
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
caption: Optional[str] = None
"""*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing"""
@ -34,5 +34,3 @@ class InputMediaDocument(InputMedia):
"""*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
disable_content_type_detection: Optional[bool] = None
"""*Optional*. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always :code:`True`, if the document is sent as part of an album."""
thumbnail: Optional[Union[InputFile, str]] = None
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""

View file

@ -24,7 +24,7 @@ class InputMediaVideo(InputMedia):
"""Type of the result, must be *video*"""
media: Union[str, InputFile]
"""File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. :ref:`More information on Sending Files » <sending-files>`"""
thumb: Optional[Union[InputFile, str]] = None
thumbnail: Optional[Union[InputFile, str]] = None
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
caption: Optional[str] = None
"""*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing"""
@ -42,5 +42,3 @@ class InputMediaVideo(InputMedia):
"""*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming"""
has_spoiler: Optional[bool] = None
"""*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation"""
thumbnail: Optional[Union[InputFile, str]] = None
"""*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""

View file

@ -1,6 +1,6 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Union, List, Optional
from typing import TYPE_CHECKING, List, Optional, Union
from .base import TelegramObject

View file

@ -348,7 +348,7 @@ class Message(TelegramObject):
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET,
caption_entities: Optional[List[MessageEntity]] = None,
@ -359,7 +359,6 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendAnimation:
"""
@ -378,7 +377,7 @@ class Message(TelegramObject):
:param duration: Duration of sent animation in seconds
:param width: Animation width
:param height: Animation height
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the animation caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -387,7 +386,6 @@ class Message(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:return: instance of method :class:`aiogram.methods.send_animation.SendAnimation`
"""
# DO NOT EDIT MANUALLY!!!
@ -403,7 +401,7 @@ class Message(TelegramObject):
duration=duration,
width=width,
height=height,
thumb=thumb,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@ -412,7 +410,6 @@ class Message(TelegramObject):
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -422,7 +419,7 @@ class Message(TelegramObject):
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET,
caption_entities: Optional[List[MessageEntity]] = None,
@ -434,7 +431,6 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendAnimation:
"""
@ -452,7 +448,7 @@ class Message(TelegramObject):
:param duration: Duration of sent animation in seconds
:param width: Animation width
:param height: Animation height
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the animation caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -462,7 +458,6 @@ class Message(TelegramObject):
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:return: instance of method :class:`aiogram.methods.send_animation.SendAnimation`
"""
# DO NOT EDIT MANUALLY!!!
@ -477,7 +472,7 @@ class Message(TelegramObject):
duration=duration,
width=width,
height=height,
thumb=thumb,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@ -487,7 +482,6 @@ class Message(TelegramObject):
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -500,14 +494,13 @@ class Message(TelegramObject):
duration: Optional[int] = None,
performer: Optional[str] = None,
title: Optional[str] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendAudio:
"""
@ -530,12 +523,11 @@ class Message(TelegramObject):
:param duration: Duration of the audio in seconds
:param performer: Performer
:param title: Track name
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:return: instance of method :class:`aiogram.methods.send_audio.SendAudio`
"""
# DO NOT EDIT MANUALLY!!!
@ -554,12 +546,11 @@ class Message(TelegramObject):
duration=duration,
performer=performer,
title=title,
thumb=thumb,
thumbnail=thumbnail,
disable_notification=disable_notification,
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -572,7 +563,7 @@ class Message(TelegramObject):
duration: Optional[int] = None,
performer: Optional[str] = None,
title: Optional[str] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
reply_to_message_id: Optional[int] = None,
@ -580,7 +571,6 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendAudio:
"""
@ -602,13 +592,12 @@ class Message(TelegramObject):
:param duration: Duration of the audio in seconds
:param performer: Performer
:param title: Track name
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:return: instance of method :class:`aiogram.methods.send_audio.SendAudio`
"""
# DO NOT EDIT MANUALLY!!!
@ -626,13 +615,12 @@ class Message(TelegramObject):
duration=duration,
performer=performer,
title=title,
thumb=thumb,
thumbnail=thumbnail,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -752,7 +740,7 @@ class Message(TelegramObject):
def reply_document(
self,
document: Union[InputFile, str],
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET,
caption_entities: Optional[List[MessageEntity]] = None,
@ -763,7 +751,6 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendDocument:
"""
@ -779,7 +766,7 @@ class Message(TelegramObject):
Source: https://core.telegram.org/bots/api#senddocument
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), 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>`
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the document caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -788,7 +775,6 @@ class Message(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:return: instance of method :class:`aiogram.methods.send_document.SendDocument`
"""
# DO NOT EDIT MANUALLY!!!
@ -801,7 +787,7 @@ class Message(TelegramObject):
message_thread_id=self.message_thread_id if self.is_topic_message else None,
reply_to_message_id=self.message_id,
document=document,
thumb=thumb,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@ -810,14 +796,13 @@ class Message(TelegramObject):
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
def answer_document(
self,
document: Union[InputFile, str],
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET,
caption_entities: Optional[List[MessageEntity]] = None,
@ -829,7 +814,6 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendDocument:
"""
@ -844,7 +828,7 @@ class Message(TelegramObject):
Source: https://core.telegram.org/bots/api#senddocument
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), 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>`
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the document caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -854,7 +838,6 @@ class Message(TelegramObject):
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:return: instance of method :class:`aiogram.methods.send_document.SendDocument`
"""
# DO NOT EDIT MANUALLY!!!
@ -866,7 +849,7 @@ class Message(TelegramObject):
chat_id=self.chat.id,
message_thread_id=self.message_thread_id if self.is_topic_message else None,
document=document,
thumb=thumb,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@ -876,7 +859,6 @@ class Message(TelegramObject):
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -1883,13 +1865,13 @@ class Message(TelegramObject):
def reply_sticker(
self,
sticker: Union[InputFile, str],
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
emoji: Optional[str] = None,
**kwargs: Any,
) -> SendSticker:
"""
@ -1905,11 +1887,11 @@ class Message(TelegramObject):
Source: https://core.telegram.org/bots/api#sendsticker
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param emoji: Emoji associated with the sticker; only for uploaded stickers
:return: instance of method :class:`aiogram.methods.send_sticker.SendSticker`
"""
# DO NOT EDIT MANUALLY!!!
@ -1922,17 +1904,18 @@ class Message(TelegramObject):
message_thread_id=self.message_thread_id if self.is_topic_message else None,
reply_to_message_id=self.message_id,
sticker=sticker,
emoji=emoji,
disable_notification=disable_notification,
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
emoji=emoji,
**kwargs,
)
def answer_sticker(
self,
sticker: Union[InputFile, str],
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
reply_to_message_id: Optional[int] = None,
@ -1940,7 +1923,6 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
emoji: Optional[str] = None,
**kwargs: Any,
) -> SendSticker:
"""
@ -1955,12 +1937,12 @@ class Message(TelegramObject):
Source: https://core.telegram.org/bots/api#sendsticker
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param emoji: Emoji associated with the sticker; only for uploaded stickers
:return: instance of method :class:`aiogram.methods.send_sticker.SendSticker`
"""
# DO NOT EDIT MANUALLY!!!
@ -1972,12 +1954,12 @@ class Message(TelegramObject):
chat_id=self.chat.id,
message_thread_id=self.message_thread_id if self.is_topic_message else None,
sticker=sticker,
emoji=emoji,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
emoji=emoji,
**kwargs,
)
@ -2124,7 +2106,7 @@ class Message(TelegramObject):
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET,
caption_entities: Optional[List[MessageEntity]] = None,
@ -2136,7 +2118,6 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendVideo:
"""
@ -2155,7 +2136,7 @@ class Message(TelegramObject):
:param duration: Duration of sent video in seconds
:param width: Video width
:param height: Video height
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2165,7 +2146,6 @@ class Message(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:return: instance of method :class:`aiogram.methods.send_video.SendVideo`
"""
# DO NOT EDIT MANUALLY!!!
@ -2181,7 +2161,7 @@ class Message(TelegramObject):
duration=duration,
width=width,
height=height,
thumb=thumb,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@ -2191,7 +2171,6 @@ class Message(TelegramObject):
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -2201,7 +2180,7 @@ class Message(TelegramObject):
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET,
caption_entities: Optional[List[MessageEntity]] = None,
@ -2214,7 +2193,6 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendVideo:
"""
@ -2232,7 +2210,7 @@ class Message(TelegramObject):
:param duration: Duration of sent video in seconds
:param width: Video width
:param height: Video height
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2243,7 +2221,6 @@ class Message(TelegramObject):
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:return: instance of method :class:`aiogram.methods.send_video.SendVideo`
"""
# DO NOT EDIT MANUALLY!!!
@ -2258,7 +2235,7 @@ class Message(TelegramObject):
duration=duration,
width=width,
height=height,
thumb=thumb,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@ -2269,7 +2246,6 @@ class Message(TelegramObject):
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -2278,14 +2254,13 @@ class Message(TelegramObject):
video_note: Union[InputFile, str],
duration: Optional[int] = None,
length: Optional[int] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendVideoNote:
"""
@ -2303,12 +2278,11 @@ class Message(TelegramObject):
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`
"""
# DO NOT EDIT MANUALLY!!!
@ -2323,12 +2297,11 @@ class Message(TelegramObject):
video_note=video_note,
duration=duration,
length=length,
thumb=thumb,
thumbnail=thumbnail,
disable_notification=disable_notification,
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -2337,7 +2310,7 @@ class Message(TelegramObject):
video_note: Union[InputFile, str],
duration: Optional[int] = None,
length: Optional[int] = None,
thumb: Optional[Union[InputFile, str]] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
reply_to_message_id: Optional[int] = None,
@ -2345,7 +2318,6 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendVideoNote:
"""
@ -2362,13 +2334,12 @@ class Message(TelegramObject):
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
:param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_to_message_id: If the message is a reply, ID of the original message
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`
"""
# DO NOT EDIT MANUALLY!!!
@ -2382,13 +2353,12 @@ class Message(TelegramObject):
video_note=video_note,
duration=duration,
length=length,
thumb=thumb,
thumbnail=thumbnail,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)

View file

@ -32,7 +32,7 @@ class Sticker(TelegramObject):
""":code:`True`, if the sticker is `animated <https://telegram.org/blog/animated-stickers>`_"""
is_video: bool
""":code:`True`, if the sticker is a `video sticker <https://telegram.org/blog/video-stickers-better-reactions>`_"""
thumb: Optional[PhotoSize] = None
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Sticker thumbnail in the .WEBP or .JPG format"""
emoji: Optional[str] = None
"""*Optional*. Emoji associated with the sticker"""
@ -44,12 +44,10 @@ class Sticker(TelegramObject):
"""*Optional*. For mask stickers, the position where the mask should be placed"""
custom_emoji_id: Optional[str] = None
"""*Optional*. For custom emoji stickers, unique identifier of the custom emoji"""
file_size: Optional[int] = None
"""*Optional*. File size in bytes"""
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Sticker thumbnail in the .WEBP or .JPG format"""
needs_repainting: Optional[bool] = None
"""*Optional*. :code:`True`, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places"""
file_size: Optional[int] = None
"""*Optional*. File size in bytes"""
def set_position_in_set(
self,

View file

@ -28,7 +28,5 @@ class StickerSet(TelegramObject):
""":code:`True`, if the sticker set contains `video stickers <https://telegram.org/blog/video-stickers-better-reactions>`_"""
stickers: List[Sticker]
"""List of all set stickers"""
thumb: Optional[PhotoSize] = None
"""*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"""
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"""

View file

@ -25,7 +25,7 @@ class Video(TelegramObject):
"""Video height as defined by sender"""
duration: int
"""Duration of the video in seconds as defined by sender"""
thumb: Optional[PhotoSize] = None
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Video thumbnail"""
file_name: Optional[str] = None
"""*Optional*. Original filename as defined by sender"""
@ -33,5 +33,3 @@ class Video(TelegramObject):
"""*Optional*. MIME type of the file as defined by sender"""
file_size: Optional[int] = None
"""*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."""
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Video thumbnail"""

View file

@ -23,9 +23,7 @@ class VideoNote(TelegramObject):
"""Video width and height (diameter of the video message) as defined by sender"""
duration: int
"""Duration of the video in seconds as defined by sender"""
thumb: Optional[PhotoSize] = None
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Video thumbnail"""
file_size: Optional[int] = None
"""*Optional*. File size in bytes"""
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Video thumbnail"""

View file

@ -29,7 +29,6 @@ Available methods
edit_chat_invite_link
edit_forum_topic
edit_general_forum_topic
edit_message_live_location
export_chat_invite_link
forward_message
get_chat
@ -42,6 +41,8 @@ Available methods
get_me
get_my_commands
get_my_default_administrator_rights
get_my_description
get_my_short_description
get_user_profile_photos
hide_general_forum_topic
leave_chat
@ -76,7 +77,8 @@ Available methods
set_chat_title
set_my_commands
set_my_default_administrator_rights
stop_message_live_location
set_my_description
set_my_short_description
unban_chat_member
unban_chat_sender_chat
unhide_general_forum_topic
@ -104,11 +106,17 @@ Stickers
add_sticker_to_set
create_new_sticker_set
delete_sticker_from_set
delete_sticker_set
get_custom_emoji_stickers
get_sticker_set
send_sticker
set_custom_emoji_sticker_set_thumbnail
set_sticker_emoji_list
set_sticker_keywords
set_sticker_mask_position
set_sticker_position_in_set
set_sticker_set_thumb
set_sticker_set_thumbnail
set_sticker_set_title
upload_sticker_file
Games
@ -121,24 +129,6 @@ Games
send_game
set_game_score
Upcoming update
===============
.. toctree::
:maxdepth: 1
delete_sticker_set
get_my_description
get_my_short_description
set_custom_emoji_sticker_set_thumbnail
set_my_description
set_my_short_description
set_sticker_emoji_list
set_sticker_keywords
set_sticker_mask_position
set_sticker_set_thumbnail
set_sticker_set_title
Getting updates
===============
@ -166,9 +156,11 @@ Updating messages
delete_message
edit_message_caption
edit_message_live_location
edit_message_media
edit_message_reply_markup
edit_message_text
stop_message_live_location
stop_poll
Inline mode

View file

@ -59,6 +59,8 @@ Available types
bot_command_scope_chat_administrators
bot_command_scope_chat_member
bot_command_scope_default
bot_description
bot_short_description
callback_query
chat
chat_administrator_rights
@ -170,6 +172,7 @@ Stickers
.. toctree::
:maxdepth: 1
input_sticker
mask_position
sticker
sticker_set
@ -189,16 +192,6 @@ Payments
shipping_query
successful_payment
Upcoming update
===============
.. toctree::
:maxdepth: 1
bot_description
bot_short_description
input_sticker
Games
=====