Added basic support of Bot API 6.6

This commit is contained in:
Alex Root Junior 2023-03-09 00:29:58 +02:00
parent 5adaf7a567
commit 824df34534
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
109 changed files with 2907 additions and 25 deletions

View file

@ -1,8 +1,8 @@
name: InlineQueryResultType
description: |
The part of the face relative to which the mask should be placed.
Type of inline query result
Source: https://core.telegram.org/bots/api#maskposition
Source: https://core.telegram.org/bots/api#inlinequeryresult
multi_parse:
attribute: type
regexp: "must be ([a-z_]+)"

View file

@ -68,6 +68,14 @@
"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,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "sticker"
}
],
"category": "methods"

View file

@ -64,9 +64,9 @@
{
"type": "String",
"required": false,
"description": "Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.",
"html_description": "<td>Type of stickers in the set, pass &#8220;regular&#8221; or &#8220;mask&#8221;. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.</td>",
"rst_description": "Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.\n",
"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"
},
{
@ -84,6 +84,30 @@
"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,
"description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set",
"html_description": "<td>A JSON-serialized list of 1-50 initial stickers to be added to the sticker set</td>",
"rst_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set\n",
"name": "stickers"
},
{
"type": "String",
"required": true,
"description": "Format of the sticker, must be one of 'static', 'animated', 'video'",
"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"
}
],
"category": "methods"

View file

@ -0,0 +1,27 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "deletestickerset",
"name": "deleteStickerSet",
"description": "Use this method to delete a sticker set that was created by the bot. Returns True on success.",
"html_description": "<p>Use this method to delete a sticker set that was created by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to delete a sticker set that was created by the bot. 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"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,27 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "getmydescription",
"name": "getMyDescription",
"description": "Use this method to get the current bot description for the given user language. Returns BotDescription on success.",
"html_description": "<p>Use this method to get the current bot description for the given user language. Returns <a href=\"#botdescription\">BotDescription</a> on success.</p>",
"rst_description": "Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success.",
"annotations": [
{
"type": "String",
"required": false,
"description": "A two-letter ISO 639-1 language code or an empty string",
"html_description": "<td>A two-letter ISO 639-1 language code or an empty string</td>",
"rst_description": "A two-letter ISO 639-1 language code or an empty string\n",
"name": "language_code"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,27 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "getmyshortdescription",
"name": "getMyShortDescription",
"description": "Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.",
"html_description": "<p>Use this method to get the current bot short description for the given user language. Returns <a href=\"#botshortdescription\">BotShortDescription</a> on success.</p>",
"rst_description": "Use this method to get the current bot short description for the given user language. Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success.",
"annotations": [
{
"type": "String",
"required": false,
"description": "A two-letter ISO 639-1 language code or an empty string",
"html_description": "<td>A two-letter ISO 639-1 language code or an empty string</td>",
"rst_description": "A two-letter ISO 639-1 language code or an empty string\n",
"name": "language_code"
}
],
"category": "methods"
}
}

View file

@ -140,6 +140,14 @@
"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

@ -132,6 +132,14 @@
"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

@ -116,6 +116,14 @@
"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

@ -32,9 +32,9 @@
{
"type": "InputFile or String",
"required": true,
"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 file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files",
"html_description": "<td>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 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": "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 file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`\n",
"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. More information on Sending Files. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.",
"html_description": "<td>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. <a href=\"#sending-files\">More information on Sending Files &#187;</a>. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.</td>",
"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"
},
{
@ -76,6 +76,14 @@
"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

@ -148,6 +148,14 @@
"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

@ -100,6 +100,14 @@
"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

@ -0,0 +1,35 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "setcustomemojistickersetthumbnail",
"name": "setCustomEmojiStickerSetThumbnail",
"description": "Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.",
"html_description": "<p>Use this method to set the thumbnail of a custom emoji sticker set. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to set the thumbnail of a custom emoji sticker set. 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": "String",
"required": false,
"description": "Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.",
"html_description": "<td>Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.</td>",
"rst_description": "Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.\n",
"name": "custom_emoji_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,35 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "setmydescription",
"name": "setMyDescription",
"description": "Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.",
"html_description": "<p>Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": false,
"description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.",
"html_description": "<td>New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.</td>",
"rst_description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.\n",
"name": "description"
},
{
"type": "String",
"required": false,
"description": "A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.",
"html_description": "<td>A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.</td>",
"rst_description": "A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.\n",
"name": "language_code"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,35 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "setmyshortdescription",
"name": "setMyShortDescription",
"description": "Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.",
"html_description": "<p>Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": false,
"description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.",
"html_description": "<td>New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.</td>",
"rst_description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.\n",
"name": "short_description"
},
{
"type": "String",
"required": false,
"description": "A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.",
"html_description": "<td>A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.</td>",
"rst_description": "A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.\n",
"name": "language_code"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,35 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "setstickeremojilist",
"name": "setStickerEmojiList",
"description": "Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.",
"html_description": "<p>Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "File identifier of the sticker",
"html_description": "<td>File identifier of the sticker</td>",
"rst_description": "File identifier of the sticker\n",
"name": "sticker"
},
{
"type": "Array of String",
"required": true,
"description": "A JSON-serialized list of 1-20 emoji associated with the sticker",
"html_description": "<td>A JSON-serialized list of 1-20 emoji associated with the sticker</td>",
"rst_description": "A JSON-serialized list of 1-20 emoji associated with the sticker\n",
"name": "emoji_list"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,35 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "setstickerkeywords",
"name": "setStickerKeywords",
"description": "Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.",
"html_description": "<p>Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "File identifier of the sticker",
"html_description": "<td>File identifier of the sticker</td>",
"rst_description": "File identifier of the sticker\n",
"name": "sticker"
},
{
"type": "Array of String",
"required": false,
"description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters",
"html_description": "<td>A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters</td>",
"rst_description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters\n",
"name": "keywords"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,35 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"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.",
"annotations": [
{
"type": "String",
"required": true,
"description": "File identifier of the sticker",
"html_description": "<td>File identifier of the sticker</td>",
"rst_description": "File identifier of the sticker\n",
"name": "sticker"
},
{
"type": "MaskPosition",
"required": false,
"description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.",
"html_description": "<td>A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.</td>",
"rst_description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.\n",
"name": "mask_position"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,43 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "setstickersetthumbnail",
"name": "setStickerSetThumbnail",
"description": "Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.",
"html_description": "<p>Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. 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 .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files. Animated and video sticker set thumbnails can't be uploaded via HTTP URL.",
"html_description": "<td>A <strong>.WEBP</strong> or <strong>.PNG</strong> image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a <strong>.TGS</strong> animation with a thumbnail up to 32 kilobytes in size (see <a href=\"/stickers#animated-sticker-requirements\"/><a href=\"https://core.telegram.org/stickers#animated-sticker-requirements\">https://core.telegram.org/stickers#animated-sticker-requirements</a> for animated sticker technical requirements), or a <strong>WEBM</strong> video with the thumbnail up to 32 kilobytes in size; see <a href=\"/stickers#video-sticker-requirements\"/><a href=\"https://core.telegram.org/stickers#video-sticker-requirements\">https://core.telegram.org/stickers#video-sticker-requirements</a> for video sticker technical requirements. Pass a <em>file_id</em> as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. <a href=\"#sending-files\">More information on Sending Files &#187;</a>. Animated and video sticker set thumbnails can't be uploaded via HTTP URL.</td>",
"rst_description": "A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_`https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_`https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Animated and video sticker set thumbnails can't be uploaded via HTTP URL.\n",
"name": "thumbnail"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,35 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "setstickersettitle",
"name": "setStickerSetTitle",
"description": "Use this method to set the title of a created sticker set. Returns True on success.",
"html_description": "<p>Use this method to set the title of a created sticker set. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to set the title of a created sticker set. 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": "String",
"required": true,
"description": "Sticker set title, 1-64 characters",
"html_description": "<td>Sticker set title, 1-64 characters</td>",
"rst_description": "Sticker set title, 1-64 characters\n",
"name": "title"
}
],
"category": "methods"
}
}

View file

@ -28,6 +28,22 @@
"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"
},
{
"type": "String",
"required": true,
"description": "Format of the sticker, must be one of 'static', 'animated', 'video'",
"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"

View file

@ -1484,6 +1484,14 @@
"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"
@ -1566,6 +1574,14 @@
"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",
"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": "thumbnail",
"required": false
}
],
"category": "types"
@ -1624,6 +1640,14 @@
"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"
@ -1706,6 +1730,14 @@
"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"
@ -1764,6 +1796,14 @@
"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"
@ -4518,6 +4558,14 @@
"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"
@ -4608,6 +4656,14 @@
"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"
@ -4690,6 +4746,14 @@
"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"
@ -4756,6 +4820,14 @@
"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"
@ -5297,6 +5369,14 @@
"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"
@ -5411,6 +5491,14 @@
"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"
@ -5557,6 +5645,14 @@
"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"
@ -5695,6 +5791,14 @@
"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"
@ -5899,6 +6003,14 @@
"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"
@ -8588,6 +8700,22 @@
"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",
"html_description": "<td><em>Optional</em>. <em>True</em>, 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</td>",
"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
}
],
"category": "types"
@ -8654,6 +8782,14 @@
"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",
"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": "thumbnail",
"required": false
}
],
"category": "types"
@ -8726,9 +8862,9 @@
{
"type": "InputFile or String",
"required": true,
"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 file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files",
"html_description": "<td>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 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": "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 file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`\n",
"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. More information on Sending Files. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.",
"html_description": "<td>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. <a href=\"#sending-files\">More information on Sending Files &#187;</a>. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.</td>",
"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"
},
{
@ -8770,6 +8906,14 @@
"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"
@ -8832,6 +8976,22 @@
"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"
},
{
"type": "String",
"required": true,
"description": "Format of the sticker, must be one of 'static', 'animated', 'video'",
"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"
@ -8894,9 +9054,9 @@
{
"type": "String",
"required": false,
"description": "Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.",
"html_description": "<td>Type of stickers in the set, pass &#8220;regular&#8221; or &#8220;mask&#8221;. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.</td>",
"rst_description": "Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.\n",
"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"
},
{
@ -8914,6 +9074,30 @@
"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,
"description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set",
"html_description": "<td>A JSON-serialized list of 1-50 initial stickers to be added to the sticker set</td>",
"rst_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set\n",
"name": "stickers"
},
{
"type": "String",
"required": true,
"description": "Format of the sticker, must be one of 'static', 'animated', 'video'",
"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"
}
],
"category": "methods"
@ -8980,6 +9164,14 @@
"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,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "sticker"
}
],
"category": "methods"
@ -9296,6 +9488,30 @@
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"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": "thumbnail_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumbnail_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumbnail_height",
"required": false
}
],
"category": "types"
@ -9410,6 +9626,14 @@
"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"
@ -9532,6 +9756,22 @@
"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"
@ -9654,6 +9894,22 @@
"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"
@ -9784,6 +10040,14 @@
"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"
@ -10094,6 +10358,30 @@
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"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": "thumbnail_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumbnail_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumbnail_height",
"required": false
}
],
"category": "types"
@ -10216,6 +10504,30 @@
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"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": "thumbnail_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumbnail_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumbnail_height",
"required": false
}
],
"category": "types"
@ -10346,6 +10658,30 @@
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"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": "thumbnail_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumbnail_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumbnail_height",
"required": false
}
],
"category": "types"
@ -10444,6 +10780,30 @@
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"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": "thumbnail_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumbnail_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumbnail_height",
"required": false
}
],
"category": "types"
@ -13402,6 +13762,360 @@
}
],
"description": "Your bot can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. Create games via @BotFather using the /newgame command. Please note that this kind of power requires responsibility: you will need to accept the terms for each game that your bots will be offering.\n - Games are a new type of content on Telegram, represented by the Game and InlineQueryResultGame objects.\n - Once you've created a game via BotFather, you can send games to chats as regular messages using the sendGame method, or use inline mode with InlineQueryResultGame.\n - If you send the game message without any buttons, it will automatically have a 'Play GameName' button. When this button is pressed, your bot gets a CallbackQuery with the game_short_name of the requested game. You provide the correct URL for this particular user and the app opens the game in the in-app browser.\n - You can manually add multiple buttons to your game message. Please note that the first button in the first row must always launch the game, using the field callback_game in InlineKeyboardButton. You can add extra buttons according to taste: e.g., for a description of the rules, or to open the game's official community.\n - To make your game more attractive, you can upload a GIF animation that demostrates the game to the users via BotFather (see Lumberjack for example).\n - A game message will also display high scores for the current chat. Use setGameScore to post high scores to the chat with the game, add the edit_message parameter to automatically update the message with the current scoreboard.\n - Use getGameHighScores to get data for in-game high score tables.\n - You can also add an extra sharing button for users to share their best score to different chats.\n - For examples of what can be done using this new stuff, check the @gamebot and @gamee bots."
},
{
"title": "Upcoming update",
"anchor": "upcoming-update",
"children": [
{
"anchor": "setmydescription",
"name": "setMyDescription",
"description": "Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.",
"html_description": "<p>Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": false,
"description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.",
"html_description": "<td>New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.</td>",
"rst_description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.\n",
"name": "description"
},
{
"type": "String",
"required": false,
"description": "A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.",
"html_description": "<td>A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.</td>",
"rst_description": "A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.\n",
"name": "language_code"
}
],
"category": "methods"
},
{
"anchor": "getmydescription",
"name": "getMyDescription",
"description": "Use this method to get the current bot description for the given user language. Returns BotDescription on success.",
"html_description": "<p>Use this method to get the current bot description for the given user language. Returns <a href=\"#botdescription\">BotDescription</a> on success.</p>",
"rst_description": "Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success.",
"annotations": [
{
"type": "String",
"required": false,
"description": "A two-letter ISO 639-1 language code or an empty string",
"html_description": "<td>A two-letter ISO 639-1 language code or an empty string</td>",
"rst_description": "A two-letter ISO 639-1 language code or an empty string\n",
"name": "language_code"
}
],
"category": "methods"
},
{
"anchor": "botdescription",
"name": "BotDescription",
"description": "This object represents the bot's description.",
"html_description": "<p>This object represents the bot's description.</p>",
"rst_description": "This object represents the bot's description.",
"annotations": [
{
"type": "String",
"description": "The bot's description",
"html_description": "<td>The bot's description</td>",
"rst_description": "The bot's description\n",
"name": "description",
"required": true
}
],
"category": "types"
},
{
"anchor": "setmyshortdescription",
"name": "setMyShortDescription",
"description": "Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.",
"html_description": "<p>Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": false,
"description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.",
"html_description": "<td>New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.</td>",
"rst_description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.\n",
"name": "short_description"
},
{
"type": "String",
"required": false,
"description": "A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.",
"html_description": "<td>A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.</td>",
"rst_description": "A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.\n",
"name": "language_code"
}
],
"category": "methods"
},
{
"anchor": "getmyshortdescription",
"name": "getMyShortDescription",
"description": "Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.",
"html_description": "<p>Use this method to get the current bot short description for the given user language. Returns <a href=\"#botshortdescription\">BotShortDescription</a> on success.</p>",
"rst_description": "Use this method to get the current bot short description for the given user language. Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success.",
"annotations": [
{
"type": "String",
"required": false,
"description": "A two-letter ISO 639-1 language code or an empty string",
"html_description": "<td>A two-letter ISO 639-1 language code or an empty string</td>",
"rst_description": "A two-letter ISO 639-1 language code or an empty string\n",
"name": "language_code"
}
],
"category": "methods"
},
{
"anchor": "botshortdescription",
"name": "BotShortDescription",
"description": "This object represents the bot's short description.",
"html_description": "<p>This object represents the bot's short description.</p>",
"rst_description": "This object represents the bot's short description.",
"annotations": [
{
"type": "String",
"description": "The bot's short description",
"html_description": "<td>The bot's short description</td>",
"rst_description": "The bot's short description\n",
"name": "short_description",
"required": true
}
],
"category": "types"
},
{
"anchor": "inputsticker",
"name": "InputSticker",
"description": "This object describes a sticker to be added to a sticker set.",
"html_description": "<p>This object describes a sticker to be added to a sticker set.</p>",
"rst_description": "This object describes a sticker to be added to a sticker set.",
"annotations": [
{
"type": "InputFile or String",
"description": "The added sticker. 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. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files",
"html_description": "<td>The added sticker. 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. Animated and video stickers can't be uploaded via HTTP URL. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "The added sticker. 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. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "sticker",
"required": true
},
{
"type": "Array of String",
"description": "List of 1-20 emoji associated with the sticker",
"html_description": "<td>List of 1-20 emoji associated with the sticker</td>",
"rst_description": "List of 1-20 emoji associated with the sticker\n",
"name": "emoji_list",
"required": true
},
{
"type": "MaskPosition",
"description": "Position where the mask should be placed on faces. For 'mask' stickers only.",
"html_description": "<td><em>Optional</em>. Position where the mask should be placed on faces. For &#8220;mask&#8221; stickers only.</td>",
"rst_description": "*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only.\n",
"name": "mask_position",
"required": false
},
{
"type": "Array of String",
"description": "List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.",
"html_description": "<td><em>Optional</em>. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For &#8220;regular&#8221; and &#8220;custom_emoji&#8221; stickers only.</td>",
"rst_description": "*Optional*. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.\n",
"name": "keywords",
"required": false
}
],
"category": "types"
},
{
"anchor": "setstickeremojilist",
"name": "setStickerEmojiList",
"description": "Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.",
"html_description": "<p>Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "File identifier of the sticker",
"html_description": "<td>File identifier of the sticker</td>",
"rst_description": "File identifier of the sticker\n",
"name": "sticker"
},
{
"type": "Array of String",
"required": true,
"description": "A JSON-serialized list of 1-20 emoji associated with the sticker",
"html_description": "<td>A JSON-serialized list of 1-20 emoji associated with the sticker</td>",
"rst_description": "A JSON-serialized list of 1-20 emoji associated with the sticker\n",
"name": "emoji_list"
}
],
"category": "methods"
},
{
"anchor": "setstickerkeywords",
"name": "setStickerKeywords",
"description": "Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.",
"html_description": "<p>Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "File identifier of the sticker",
"html_description": "<td>File identifier of the sticker</td>",
"rst_description": "File identifier of the sticker\n",
"name": "sticker"
},
{
"type": "Array of String",
"required": false,
"description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters",
"html_description": "<td>A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters</td>",
"rst_description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters\n",
"name": "keywords"
}
],
"category": "methods"
},
{
"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.",
"annotations": [
{
"type": "String",
"required": true,
"description": "File identifier of the sticker",
"html_description": "<td>File identifier of the sticker</td>",
"rst_description": "File identifier of the sticker\n",
"name": "sticker"
},
{
"type": "MaskPosition",
"required": false,
"description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.",
"html_description": "<td>A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.</td>",
"rst_description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.\n",
"name": "mask_position"
}
],
"category": "methods"
},
{
"anchor": "setstickersettitle",
"name": "setStickerSetTitle",
"description": "Use this method to set the title of a created sticker set. Returns True on success.",
"html_description": "<p>Use this method to set the title of a created sticker set. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to set the title of a created sticker set. 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": "String",
"required": true,
"description": "Sticker set title, 1-64 characters",
"html_description": "<td>Sticker set title, 1-64 characters</td>",
"rst_description": "Sticker set title, 1-64 characters\n",
"name": "title"
}
],
"category": "methods"
},
{
"anchor": "deletestickerset",
"name": "deleteStickerSet",
"description": "Use this method to delete a sticker set that was created by the bot. Returns True on success.",
"html_description": "<p>Use this method to delete a sticker set that was created by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to delete a sticker set that was created by the bot. 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"
}
],
"category": "methods"
},
{
"anchor": "setstickersetthumbnail",
"name": "setStickerSetThumbnail",
"description": "Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.",
"html_description": "<p>Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. 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 .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files. Animated and video sticker set thumbnails can't be uploaded via HTTP URL.",
"html_description": "<td>A <strong>.WEBP</strong> or <strong>.PNG</strong> image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a <strong>.TGS</strong> animation with a thumbnail up to 32 kilobytes in size (see <a href=\"/stickers#animated-sticker-requirements\"/><a href=\"https://core.telegram.org/stickers#animated-sticker-requirements\">https://core.telegram.org/stickers#animated-sticker-requirements</a> for animated sticker technical requirements), or a <strong>WEBM</strong> video with the thumbnail up to 32 kilobytes in size; see <a href=\"/stickers#video-sticker-requirements\"/><a href=\"https://core.telegram.org/stickers#video-sticker-requirements\">https://core.telegram.org/stickers#video-sticker-requirements</a> for video sticker technical requirements. Pass a <em>file_id</em> as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. <a href=\"#sending-files\">More information on Sending Files &#187;</a>. Animated and video sticker set thumbnails can't be uploaded via HTTP URL.</td>",
"rst_description": "A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_`https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_`https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Animated and video sticker set thumbnails can't be uploaded via HTTP URL.\n",
"name": "thumbnail"
}
],
"category": "methods"
},
{
"anchor": "setcustomemojistickersetthumbnail",
"name": "setCustomEmojiStickerSetThumbnail",
"description": "Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.",
"html_description": "<p>Use this method to set the thumbnail of a custom emoji sticker set. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to set the thumbnail of a custom emoji sticker set. 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": "String",
"required": false,
"description": "Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.",
"html_description": "<td>Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.</td>",
"rst_description": "Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.\n",
"name": "custom_emoji_id"
}
],
"category": "methods"
}
]
}
]
}

View file

@ -84,6 +84,14 @@
"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

@ -84,6 +84,14 @@
"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",
"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": "thumbnail",
"required": false
}
],
"category": "types"

View file

@ -0,0 +1,27 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "botdescription",
"name": "BotDescription",
"description": "This object represents the bot's description.",
"html_description": "<p>This object represents the bot's description.</p>",
"rst_description": "This object represents the bot's description.",
"annotations": [
{
"type": "String",
"description": "The bot's description",
"html_description": "<td>The bot's description</td>",
"rst_description": "The bot's description\n",
"name": "description",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,27 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "botshortdescription",
"name": "BotShortDescription",
"description": "This object represents the bot's short description.",
"html_description": "<p>This object represents the bot's short description.</p>",
"rst_description": "This object represents the bot's short description.",
"annotations": [
{
"type": "String",
"description": "The bot's short description",
"html_description": "<td>The bot's short description</td>",
"rst_description": "The bot's short description\n",
"name": "short_description",
"required": true
}
],
"category": "types"
}
}

View file

@ -60,6 +60,14 @@
"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

@ -100,6 +100,30 @@
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"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": "thumbnail_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumbnail_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumbnail_height",
"required": false
}
],
"category": "types"

View file

@ -100,6 +100,30 @@
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"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": "thumbnail_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumbnail_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumbnail_height",
"required": false
}
],
"category": "types"

View file

@ -124,6 +124,30 @@
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"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": "thumbnail_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumbnail_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumbnail_height",
"required": false
}
],
"category": "types"

View file

@ -124,6 +124,22 @@
"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

@ -124,6 +124,30 @@
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"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": "thumbnail_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumbnail_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumbnail_height",
"required": false
}
],
"category": "types"

View file

@ -124,6 +124,22 @@
"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

@ -116,6 +116,14 @@
"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

@ -132,6 +132,30 @@
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumb_height",
"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": "thumbnail_url",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail width",
"html_description": "<td><em>Optional</em>. Thumbnail width</td>",
"rst_description": "*Optional*. Thumbnail width\n",
"name": "thumbnail_width",
"required": false
},
{
"type": "Integer",
"description": "Thumbnail height",
"html_description": "<td><em>Optional</em>. Thumbnail height</td>",
"rst_description": "*Optional*. Thumbnail height\n",
"name": "thumbnail_height",
"required": false
}
],
"category": "types"

View file

@ -132,6 +132,14 @@
"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

@ -92,6 +92,14 @@
"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

@ -84,6 +84,14 @@
"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

@ -68,6 +68,14 @@
"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

@ -100,6 +100,14 @@
"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

@ -0,0 +1,51 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Upcoming update",
"anchor": "upcoming-update"
},
"object": {
"anchor": "inputsticker",
"name": "InputSticker",
"description": "This object describes a sticker to be added to a sticker set.",
"html_description": "<p>This object describes a sticker to be added to a sticker set.</p>",
"rst_description": "This object describes a sticker to be added to a sticker set.",
"annotations": [
{
"type": "InputFile or String",
"description": "The added sticker. 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. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files",
"html_description": "<td>The added sticker. 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. Animated and video stickers can't be uploaded via HTTP URL. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_description": "The added sticker. 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. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "sticker",
"required": true
},
{
"type": "Array of String",
"description": "List of 1-20 emoji associated with the sticker",
"html_description": "<td>List of 1-20 emoji associated with the sticker</td>",
"rst_description": "List of 1-20 emoji associated with the sticker\n",
"name": "emoji_list",
"required": true
},
{
"type": "MaskPosition",
"description": "Position where the mask should be placed on faces. For 'mask' stickers only.",
"html_description": "<td><em>Optional</em>. Position where the mask should be placed on faces. For &#8220;mask&#8221; stickers only.</td>",
"rst_description": "*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only.\n",
"name": "mask_position",
"required": false
},
{
"type": "Array of String",
"description": "List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.",
"html_description": "<td><em>Optional</em>. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For &#8220;regular&#8221; and &#8220;custom_emoji&#8221; stickers only.</td>",
"rst_description": "*Optional*. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.\n",
"name": "keywords",
"required": false
}
],
"category": "types"
}
}

View file

@ -124,6 +124,22 @@
"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",
"html_description": "<td><em>Optional</em>. <em>True</em>, 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</td>",
"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
}
],
"category": "types"

View file

@ -68,6 +68,14 @@
"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",
"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": "thumbnail",
"required": false
}
],
"category": "types"

View file

@ -84,6 +84,14 @@
"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

@ -60,6 +60,14 @@
"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

@ -124,6 +124,17 @@ from ..methods import (
UnpinAllForumTopicMessages,
UnpinChatMessage,
UploadStickerFile,
SetStickerSetTitle,
SetStickerSetThumbnail,
SetStickerMaskPosition,
SetStickerKeywords,
SetStickerEmojiList,
SetMyShortDescription,
SetMyDescription,
SetCustomEmojiStickerSetThumbnail,
GetMyShortDescription,
GetMyDescription,
DeleteStickerSet,
)
from ..types import (
UNSET,
@ -172,6 +183,9 @@ from ..types import (
User,
UserProfilePhotos,
WebhookInfo,
InputSticker,
BotShortDescription,
BotDescription,
)
from .session.aiohttp import AiohttpSession
from .session.base import BaseSession
@ -397,6 +411,7 @@ class Bot(ContextInstanceMixin["Bot"]):
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,
@ -411,6 +426,7 @@ class Bot(ContextInstanceMixin["Bot"]):
: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
@ -423,6 +439,7 @@ class Bot(ContextInstanceMixin["Bot"]):
user_id=user_id,
name=name,
emojis=emojis,
sticker=sticker,
png_sticker=png_sticker,
tgs_sticker=tgs_sticker,
webm_sticker=webm_sticker,
@ -895,11 +912,14 @@ class Bot(ContextInstanceMixin["Bot"]):
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:
"""
@ -911,11 +931,14 @@ class Bot(ContextInstanceMixin["Bot"]):
: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 the sticker, 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' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.
: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.
"""
@ -925,11 +948,14 @@ class Bot(ContextInstanceMixin["Bot"]):
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)
@ -2010,6 +2036,7 @@ 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:
"""
@ -2033,6 +2060,7 @@ 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.
"""
@ -2054,6 +2082,7 @@ 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)
@ -2076,6 +2105,7 @@ 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:
"""
@ -2099,6 +2129,7 @@ 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 audio files of up to 50 MB in size, this limit may be changed in the future.
"""
@ -2119,6 +2150,7 @@ 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)
@ -2264,6 +2296,7 @@ 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:
"""
@ -2284,6 +2317,7 @@ 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.
"""
@ -2302,6 +2336,7 @@ 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)
@ -2738,6 +2773,7 @@ class Bot(ContextInstanceMixin["Bot"]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
emoji: Optional[str] = None,
request_timeout: Optional[int] = None,
) -> Message:
"""
@ -2746,13 +2782,14 @@ class Bot(ContextInstanceMixin["Bot"]):
Source: https://core.telegram.org/bots/api#sendsticker
: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 file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
: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 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.
"""
@ -2766,6 +2803,7 @@ class Bot(ContextInstanceMixin["Bot"]):
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)
@ -2854,6 +2892,7 @@ 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:
"""
@ -2878,6 +2917,7 @@ 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.
"""
@ -2900,6 +2940,7 @@ 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)
@ -2918,6 +2959,7 @@ 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:
"""
@ -2936,6 +2978,7 @@ 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: On success, the sent :class:`aiogram.types.message.Message` is returned.
"""
@ -2952,6 +2995,7 @@ 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)
@ -3561,6 +3605,8 @@ class Bot(ContextInstanceMixin["Bot"]):
self,
user_id: int,
png_sticker: InputFile,
sticker_format: str,
sticker: InputFile,
request_timeout: Optional[int] = None,
) -> File:
"""
@ -3570,6 +3616,8 @@ class Bot(ContextInstanceMixin["Bot"]):
: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 request_timeout: Request timeout
:return: Returns the uploaded :class:`aiogram.types.file.File` on success.
"""
@ -3577,6 +3625,8 @@ class Bot(ContextInstanceMixin["Bot"]):
call = UploadStickerFile(
user_id=user_id,
png_sticker=png_sticker,
sticker_format=sticker_format,
sticker=sticker,
)
return await self(call, request_timeout=request_timeout)
@ -3682,3 +3732,250 @@ class Bot(ContextInstanceMixin["Bot"]):
chat_id=chat_id,
)
return await self(call, request_timeout=request_timeout)
async def delete_sticker_set(
self,
name: str,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to delete a sticker set that was created by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#deletestickerset
:param name: Sticker set name
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = DeleteStickerSet(
name=name,
)
return await self(call, request_timeout=request_timeout)
async def get_my_description(
self,
language_code: Optional[str] = None,
request_timeout: Optional[int] = None,
) -> BotDescription:
"""
Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success.
Source: https://core.telegram.org/bots/api#getmydescription
:param language_code: A two-letter ISO 639-1 language code or an empty string
:param request_timeout: Request timeout
:return: Returns :class:`aiogram.types.bot_description.BotDescription` on success.
"""
call = GetMyDescription(
language_code=language_code,
)
return await self(call, request_timeout=request_timeout)
async def get_my_short_description(
self,
language_code: Optional[str] = None,
request_timeout: Optional[int] = None,
) -> BotShortDescription:
"""
Use this method to get the current bot short description for the given user language. Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success.
Source: https://core.telegram.org/bots/api#getmyshortdescription
:param language_code: A two-letter ISO 639-1 language code or an empty string
:param request_timeout: Request timeout
:return: Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success.
"""
call = GetMyShortDescription(
language_code=language_code,
)
return await self(call, request_timeout=request_timeout)
async def set_custom_emoji_sticker_set_thumbnail(
self,
name: str,
custom_emoji_id: Optional[str] = None,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to set the thumbnail of a custom emoji sticker set. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail
:param name: Sticker set name
:param custom_emoji_id: Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = SetCustomEmojiStickerSetThumbnail(
name=name,
custom_emoji_id=custom_emoji_id,
)
return await self(call, request_timeout=request_timeout)
async def set_my_description(
self,
description: Optional[str] = None,
language_code: Optional[str] = None,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setmydescription
:param description: New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.
:param language_code: A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = SetMyDescription(
description=description,
language_code=language_code,
)
return await self(call, request_timeout=request_timeout)
async def set_my_short_description(
self,
short_description: Optional[str] = None,
language_code: Optional[str] = None,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setmyshortdescription
:param short_description: New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.
:param language_code: A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = SetMyShortDescription(
short_description=short_description,
language_code=language_code,
)
return await self(call, request_timeout=request_timeout)
async def set_sticker_emoji_list(
self,
sticker: str,
emoji_list: List[str],
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickeremojilist
:param sticker: File identifier of the sticker
:param emoji_list: A JSON-serialized list of 1-20 emoji associated with the sticker
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = SetStickerEmojiList(
sticker=sticker,
emoji_list=emoji_list,
)
return await self(call, request_timeout=request_timeout)
async def set_sticker_keywords(
self,
sticker: str,
keywords: Optional[List[str]] = None,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickerkeywords
:param sticker: File identifier of the sticker
:param keywords: A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = SetStickerKeywords(
sticker=sticker,
keywords=keywords,
)
return await self(call, request_timeout=request_timeout)
async def set_sticker_mask_position(
self,
sticker: str,
mask_position: Optional[MaskPosition] = None,
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.
Source: https://core.telegram.org/bots/api#setstickermaskposition
:param sticker: File identifier of the sticker
:param mask_position: A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = SetStickerMaskPosition(
sticker=sticker,
mask_position=mask_position,
)
return await self(call, request_timeout=request_timeout)
async def set_sticker_set_thumbnail(
self,
name: str,
user_id: int,
thumbnail: Optional[Union[InputFile, str]] = None,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickersetthumbnail
:param name: Sticker set name
:param user_id: User identifier of the sticker set owner
:param thumbnail: A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_`https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_`https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Animated and video sticker set thumbnails can't be uploaded via HTTP URL.
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = SetStickerSetThumbnail(
name=name,
user_id=user_id,
thumbnail=thumbnail,
)
return await self(call, request_timeout=request_timeout)
async def set_sticker_set_title(
self,
name: str,
title: str,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to set the title of a created sticker set. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickersettitle
:param name: Sticker set name
:param title: Sticker set title, 1-64 characters
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = SetStickerSetTitle(
name=name,
title=title,
)
return await self(call, request_timeout=request_timeout)

View file

@ -3,9 +3,9 @@ from enum import Enum
class InlineQueryResultType(str, Enum):
"""
The part of the face relative to which the mask should be placed.
Type of inline query result
Source: https://core.telegram.org/bots/api#maskposition
Source: https://core.telegram.org/bots/api#inlinequeryresult
"""
AUDIO = "audio"

View file

@ -100,6 +100,17 @@ 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",
@ -126,6 +137,7 @@ __all__ = (
"DeleteMessage",
"DeleteMyCommands",
"DeleteStickerFromSet",
"DeleteStickerSet",
"DeleteWebhook",
"EditChatInviteLink",
"EditForumTopic",
@ -149,6 +161,8 @@ __all__ = (
"GetMe",
"GetMyCommands",
"GetMyDefaultAdministratorRights",
"GetMyDescription",
"GetMyShortDescription",
"GetStickerSet",
"GetUpdates",
"GetUserProfilePhotos",
@ -189,12 +203,20 @@ __all__ = (
"SetChatPhoto",
"SetChatStickerSet",
"SetChatTitle",
"SetCustomEmojiStickerSetThumbnail",
"SetGameScore",
"SetMyCommands",
"SetMyDefaultAdministratorRights",
"SetMyDescription",
"SetMyShortDescription",
"SetPassportDataErrors",
"SetStickerEmojiList",
"SetStickerKeywords",
"SetStickerMaskPosition",
"SetStickerPositionInSet",
"SetStickerSetThumb",
"SetStickerSetThumbnail",
"SetStickerSetTitle",
"SetWebhook",
"StopMessageLiveLocation",
"StopPoll",

View file

@ -2,7 +2,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
from ..types import InputFile, MaskPosition
from ..types import InputFile, MaskPosition, InputSticker
from .base import Request, TelegramMethod, prepare_file
if TYPE_CHECKING:
@ -24,6 +24,8 @@ class AddStickerToSet(TelegramMethod[bool]):
"""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

View file

@ -1,8 +1,8 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
from typing import TYPE_CHECKING, Any, Dict, Optional, Union, List
from ..types import InputFile, MaskPosition
from ..types import InputFile, MaskPosition, InputSticker
from .base import Request, TelegramMethod, prepare_file
if TYPE_CHECKING:
@ -26,6 +26,10 @@ class CreateNewStickerSet(TelegramMethod[bool]):
"""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 the sticker, 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
@ -33,9 +37,11 @@ class CreateNewStickerSet(TelegramMethod[bool]):
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' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created."""
"""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"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict(exclude={"png_sticker", "tgs_sticker", "webm_sticker"})

View file

@ -0,0 +1,26 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot
class DeleteStickerSet(TelegramMethod[bool]):
"""
Use this method to delete a sticker set that was created by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#deletestickerset
"""
__returning__ = bool
name: str
"""Sticker set name"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="deleteStickerSet", data=data)

View file

@ -0,0 +1,27 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional
from ..types import BotDescription
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot
class GetMyDescription(TelegramMethod[BotDescription]):
"""
Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success.
Source: https://core.telegram.org/bots/api#getmydescription
"""
__returning__ = BotDescription
language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code or an empty string"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="getMyDescription", data=data)

View file

@ -0,0 +1,27 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional
from ..types import BotShortDescription
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot
class GetMyShortDescription(TelegramMethod[BotShortDescription]):
"""
Use this method to get the current bot short description for the given user language. Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success.
Source: https://core.telegram.org/bots/api#getmyshortdescription
"""
__returning__ = BotShortDescription
language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code or an empty string"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="getMyShortDescription", data=data)

View file

@ -61,6 +61,8 @@ 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

@ -60,6 +60,8 @@ 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

@ -55,6 +55,8 @@ 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

@ -28,7 +28,7 @@ class SendSticker(TelegramMethod[Message]):
chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
sticker: Union[InputFile, str]
"""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 file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`"""
"""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"""
disable_notification: Optional[bool] = None
@ -43,6 +43,8 @@ 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

@ -63,6 +63,8 @@ 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

@ -49,6 +49,8 @@ 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

@ -0,0 +1,28 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot
class SetCustomEmojiStickerSetThumbnail(TelegramMethod[bool]):
"""
Use this method to set the thumbnail of a custom emoji sticker set. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail
"""
__returning__ = bool
name: str
"""Sticker set name"""
custom_emoji_id: Optional[str] = None
"""Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail."""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="setCustomEmojiStickerSetThumbnail", data=data)

View file

@ -0,0 +1,28 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot
class SetMyDescription(TelegramMethod[bool]):
"""
Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setmydescription
"""
__returning__ = bool
description: Optional[str] = None
"""New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language."""
language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description."""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="setMyDescription", data=data)

View file

@ -0,0 +1,28 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot
class SetMyShortDescription(TelegramMethod[bool]):
"""
Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setmyshortdescription
"""
__returning__ = bool
short_description: Optional[str] = None
"""New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language."""
language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description."""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="setMyShortDescription", data=data)

View file

@ -0,0 +1,28 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, List
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot
class SetStickerEmojiList(TelegramMethod[bool]):
"""
Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickeremojilist
"""
__returning__ = bool
sticker: str
"""File identifier of the sticker"""
emoji_list: List[str]
"""A JSON-serialized list of 1-20 emoji associated with the sticker"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="setStickerEmojiList", data=data)

View file

@ -0,0 +1,28 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional, List
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot
class SetStickerKeywords(TelegramMethod[bool]):
"""
Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickerkeywords
"""
__returning__ = bool
sticker: str
"""File identifier of the sticker"""
keywords: Optional[List[str]] = None
"""A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="setStickerKeywords", data=data)

View file

@ -0,0 +1,29 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional
from .base import Request, TelegramMethod
from ..types import MaskPosition
if TYPE_CHECKING:
from ..client.bot import Bot
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.
Source: https://core.telegram.org/bots/api#setstickermaskposition
"""
__returning__ = bool
sticker: str
"""File identifier of the sticker"""
mask_position: Optional[MaskPosition] = None
"""A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position."""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="setStickerMaskPosition", data=data)

View file

@ -0,0 +1,31 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
from .base import Request, TelegramMethod
from ..types import InputFile
if TYPE_CHECKING:
from ..client.bot import Bot
class SetStickerSetThumbnail(TelegramMethod[bool]):
"""
Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickersetthumbnail
"""
__returning__ = bool
name: str
"""Sticker set name"""
user_id: int
"""User identifier of the sticker set owner"""
thumbnail: Optional[Union[InputFile, str]] = None
"""A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_`https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_`https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Animated and video sticker set thumbnails can't be uploaded via HTTP URL."""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="setStickerSetThumbnail", data=data)

View file

@ -0,0 +1,28 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict
from .base import Request, TelegramMethod
if TYPE_CHECKING:
from ..client.bot import Bot
class SetStickerSetTitle(TelegramMethod[bool]):
"""
Use this method to set the title of a created sticker set. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setstickersettitle
"""
__returning__ = bool
name: str
"""Sticker set name"""
title: str
"""Sticker set title, 1-64 characters"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()
return Request(method="setStickerSetTitle", data=data)

View file

@ -22,6 +22,10 @@ class UploadStickerFile(TelegramMethod[File]):
"""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>`"""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict(exclude={"png_sticker"})

View file

@ -152,6 +152,9 @@ 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",
@ -165,6 +168,8 @@ __all__ = (
"BotCommandScopeChatAdministrators",
"BotCommandScopeChatMember",
"BotCommandScopeDefault",
"BotDescription",
"BotShortDescription",
"BufferedInputFile",
"CallbackGame",
"CallbackQuery",
@ -240,6 +245,7 @@ __all__ = (
"InputMediaPhoto",
"InputMediaVideo",
"InputMessageContent",
"InputSticker",
"InputTextMessageContent",
"InputVenueMessageContent",
"Invoice",

View file

@ -33,3 +33,5 @@ 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

@ -33,3 +33,5 @@ class Audio(TelegramObject):
"""*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

@ -0,0 +1,12 @@
from aiogram.types import TelegramObject
class BotDescription(TelegramObject):
"""
This object represents the bot's description.
Source: https://core.telegram.org/bots/api#botdescription
"""
description: str
"""The bot's description"""

View file

@ -0,0 +1,12 @@
from aiogram.types import TelegramObject
class BotShortDescription(TelegramObject):
"""
This object represents the bot's short description.
Source: https://core.telegram.org/bots/api#botshortdescription
"""
short_description: str
"""The bot's short description"""

View file

@ -27,3 +27,5 @@ 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

@ -41,3 +41,9 @@ class InlineQueryResultArticle(InlineQueryResult):
"""*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
"""*Optional*. Thumbnail width"""
thumbnail_height: Optional[int] = None
"""*Optional*. Thumbnail height"""

View file

@ -42,3 +42,9 @@ class InlineQueryResultContact(InlineQueryResult):
"""*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
"""*Optional*. Thumbnail width"""
thumbnail_height: Optional[int] = None
"""*Optional*. Thumbnail height"""

View file

@ -50,3 +50,9 @@ class InlineQueryResultDocument(InlineQueryResult):
"""*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
"""*Optional*. Thumbnail width"""
thumbnail_height: Optional[int] = None
"""*Optional*. Thumbnail height"""

View file

@ -29,6 +29,8 @@ class InlineQueryResultGif(InlineQueryResult):
"""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
"""*Optional*. Width of the GIF"""
gif_height: Optional[int] = None
@ -49,3 +51,5 @@ 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

@ -48,3 +48,9 @@ class InlineQueryResultLocation(InlineQueryResult):
"""*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
"""*Optional*. Thumbnail width"""
thumbnail_height: Optional[int] = None
"""*Optional*. Thumbnail height"""

View file

@ -29,6 +29,8 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
"""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
"""*Optional*. Video width"""
mpeg4_height: Optional[int] = None
@ -49,3 +51,5 @@ 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

@ -29,6 +29,8 @@ class InlineQueryResultPhoto(InlineQueryResult):
"""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
"""*Optional*. Width of the photo"""
photo_height: Optional[int] = None

View file

@ -50,3 +50,9 @@ class InlineQueryResultVenue(InlineQueryResult):
"""*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
"""*Optional*. Thumbnail width"""
thumbnail_height: Optional[int] = None
"""*Optional*. Thumbnail height"""

View file

@ -35,6 +35,8 @@ class InlineQueryResultVideo(InlineQueryResult):
"""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

@ -40,3 +40,5 @@ 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

@ -38,3 +38,5 @@ 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

@ -34,3 +34,5 @@ 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

@ -42,3 +42,5 @@ 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

@ -0,0 +1,26 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Union, List, Optional
from .base import TelegramObject
if TYPE_CHECKING:
from .input_file import InputFile
from .mask_position import MaskPosition
class InputSticker(TelegramObject):
"""
This object describes a sticker to be added to a sticker set.
Source: https://core.telegram.org/bots/api#inputsticker
"""
sticker: Union[InputFile, str]
"""The added sticker. 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. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » <sending-files>`"""
emoji_list: List[str]
"""List of 1-20 emoji associated with the sticker"""
mask_position: Optional[MaskPosition] = None
"""*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only."""
keywords: Optional[List[str]] = None
"""*Optional*. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only."""

View file

@ -359,6 +359,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendAnimation:
"""
@ -386,6 +387,7 @@ 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!!!
@ -410,6 +412,7 @@ class Message(TelegramObject):
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -431,6 +434,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendAnimation:
"""
@ -458,6 +462,7 @@ 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!!!
@ -482,6 +487,7 @@ 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,
)
@ -501,6 +507,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendAudio:
"""
@ -528,6 +535,7 @@ 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_audio.SendAudio`
"""
# DO NOT EDIT MANUALLY!!!
@ -551,6 +559,7 @@ class Message(TelegramObject):
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -571,6 +580,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendAudio:
"""
@ -598,6 +608,7 @@ 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_audio.SendAudio`
"""
# DO NOT EDIT MANUALLY!!!
@ -621,6 +632,7 @@ 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,
)
@ -751,6 +763,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendDocument:
"""
@ -775,6 +788,7 @@ 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!!!
@ -796,6 +810,7 @@ class Message(TelegramObject):
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -814,6 +829,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendDocument:
"""
@ -838,6 +854,7 @@ 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!!!
@ -859,6 +876,7 @@ 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,
)
@ -1871,6 +1889,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
emoji: Optional[str] = None,
**kwargs: Any,
) -> SendSticker:
"""
@ -1885,11 +1904,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 file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
: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 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!!!
@ -1906,6 +1926,7 @@ class Message(TelegramObject):
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
emoji=emoji,
**kwargs,
)
@ -1919,6 +1940,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
emoji: Optional[str] = None,
**kwargs: Any,
) -> SendSticker:
"""
@ -1932,12 +1954,13 @@ 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 file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
: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 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!!!
@ -1954,6 +1977,7 @@ class Message(TelegramObject):
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
emoji=emoji,
**kwargs,
)
@ -2112,6 +2136,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendVideo:
"""
@ -2140,6 +2165,7 @@ 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!!!
@ -2165,6 +2191,7 @@ class Message(TelegramObject):
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -2187,6 +2214,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendVideo:
"""
@ -2215,6 +2243,7 @@ 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!!!
@ -2240,6 +2269,7 @@ 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,
)
@ -2255,6 +2285,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendVideoNote:
"""
@ -2277,6 +2308,7 @@ 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_note.SendVideoNote`
"""
# DO NOT EDIT MANUALLY!!!
@ -2296,6 +2328,7 @@ class Message(TelegramObject):
protect_content=protect_content,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
thumbnail=thumbnail,
**kwargs,
)
@ -2312,6 +2345,7 @@ class Message(TelegramObject):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
**kwargs: Any,
) -> SendVideoNote:
"""
@ -2334,6 +2368,7 @@ 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_note.SendVideoNote`
"""
# DO NOT EDIT MANUALLY!!!
@ -2353,6 +2388,7 @@ 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,
)

View file

@ -46,6 +46,10 @@ class Sticker(TelegramObject):
"""*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"""
def set_position_in_set(
self,

View file

@ -30,3 +30,5 @@ class StickerSet(TelegramObject):
"""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

@ -33,3 +33,5 @@ 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

@ -27,3 +27,5 @@ class VideoNote(TelegramObject):
"""*Optional*. Video thumbnail"""
file_size: Optional[int] = None
"""*Optional*. File size in bytes"""
thumbnail: Optional[PhotoSize] = None
"""*Optional*. Video thumbnail"""

View file

@ -0,0 +1,44 @@
################
deleteStickerSet
################
Returns: :obj:`bool`
.. automodule:: aiogram.methods.delete_sticker_set
:members:
:member-order: bysource
:undoc-members: True
Usage
=====
As bot method
-------------
.. code-block::
result: bool = await bot.delete_sticker_set(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.delete_sticker_set import DeleteStickerSet`
- alias: :code:`from aiogram.methods import DeleteStickerSet`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: bool = await bot(DeleteStickerSet(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
return DeleteStickerSet(...)

View file

@ -0,0 +1,37 @@
################
getMyDescription
################
Returns: :obj:`BotDescription`
.. automodule:: aiogram.methods.get_my_description
:members:
:member-order: bysource
:undoc-members: True
Usage
=====
As bot method
-------------
.. code-block::
result: BotDescription = await bot.get_my_description(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.get_my_description import GetMyDescription`
- alias: :code:`from aiogram.methods import GetMyDescription`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: BotDescription = await bot(GetMyDescription(...))

View file

@ -0,0 +1,37 @@
#####################
getMyShortDescription
#####################
Returns: :obj:`BotShortDescription`
.. automodule:: aiogram.methods.get_my_short_description
:members:
:member-order: bysource
:undoc-members: True
Usage
=====
As bot method
-------------
.. code-block::
result: BotShortDescription = await bot.get_my_short_description(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.get_my_short_description import GetMyShortDescription`
- alias: :code:`from aiogram.methods import GetMyShortDescription`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: BotShortDescription = await bot(GetMyShortDescription(...))

View file

@ -121,6 +121,24 @@ 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
===============

View file

@ -0,0 +1,44 @@
#################################
setCustomEmojiStickerSetThumbnail
#################################
Returns: :obj:`bool`
.. automodule:: aiogram.methods.set_custom_emoji_sticker_set_thumbnail
:members:
:member-order: bysource
:undoc-members: True
Usage
=====
As bot method
-------------
.. code-block::
result: bool = await bot.set_custom_emoji_sticker_set_thumbnail(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.set_custom_emoji_sticker_set_thumbnail import SetCustomEmojiStickerSetThumbnail`
- alias: :code:`from aiogram.methods import SetCustomEmojiStickerSetThumbnail`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: bool = await bot(SetCustomEmojiStickerSetThumbnail(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
return SetCustomEmojiStickerSetThumbnail(...)

View file

@ -0,0 +1,44 @@
################
setMyDescription
################
Returns: :obj:`bool`
.. automodule:: aiogram.methods.set_my_description
:members:
:member-order: bysource
:undoc-members: True
Usage
=====
As bot method
-------------
.. code-block::
result: bool = await bot.set_my_description(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.set_my_description import SetMyDescription`
- alias: :code:`from aiogram.methods import SetMyDescription`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: bool = await bot(SetMyDescription(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
return SetMyDescription(...)

View file

@ -0,0 +1,44 @@
#####################
setMyShortDescription
#####################
Returns: :obj:`bool`
.. automodule:: aiogram.methods.set_my_short_description
:members:
:member-order: bysource
:undoc-members: True
Usage
=====
As bot method
-------------
.. code-block::
result: bool = await bot.set_my_short_description(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.set_my_short_description import SetMyShortDescription`
- alias: :code:`from aiogram.methods import SetMyShortDescription`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: bool = await bot(SetMyShortDescription(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
return SetMyShortDescription(...)

Some files were not shown because too many files have changed in this diff Show more