Added full support for the Bot API 9.6 (#1792)

* Added full support for the Bot API 9.6

* Add support for `managed_bot` updates

* Set `description_parse_mode` default to `"parse_mode"` and use `DateTime` for `addition_date` in `PollOption`

* Update changelog with features and changes from Bot API 9.6

* Add changelog fragment generator and update poll parameter descriptions
This commit is contained in:
Alex Root Junior 2026-04-04 01:22:08 +03:00 committed by GitHub
parent 00c1130938
commit 9f49c0413f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
107 changed files with 3077 additions and 328 deletions

View file

@ -1,8 +1,8 @@
{
"meta": {},
"group": {
"title": "Inline mode",
"anchor": "inline-mode"
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "answerwebappquery",

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "getmanagedbottoken",
"name": "getManagedBotToken",
"description": "Use this method to get the token of a managed bot. Returns the token as String on success.",
"html_description": "<p>Use this method to get the token of a managed bot. Returns the token as <em>String</em> on success.</p>",
"rst_description": "Use this method to get the token of a managed bot. Returns the token as *String* on success.",
"annotations": [
{
"type": "Integer",
"required": true,
"description": "User identifier of the managed bot whose token will be returned",
"html_description": "<td>User identifier of the managed bot whose token will be returned</td>",
"rst_description": "User identifier of the managed bot whose token will be returned\n",
"name": "user_id"
}
],
"category": "methods"
}
}

View file

@ -46,17 +46,17 @@
{
"type": "String",
"required": false,
"description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.",
"html_description": "<td>Mode for parsing entities in the text. See <a href=\"#formatting-options\">formatting options</a> for more details. Entities other than &#8220;bold&#8221;, &#8220;italic&#8221;, &#8220;underline&#8221;, &#8220;strikethrough&#8221;, &#8220;spoiler&#8221;, and &#8220;custom_emoji&#8221; are ignored.</td>",
"rst_description": "Mode for parsing entities in the text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.\n",
"description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.",
"html_description": "<td>Mode for parsing entities in the text. See <a href=\"#formatting-options\">formatting options</a> for more details. Entities other than &#8220;bold&#8221;, &#8220;italic&#8221;, &#8220;underline&#8221;, &#8220;strikethrough&#8221;, &#8220;spoiler&#8221;, &#8220;custom_emoji&#8221;, and &#8220;date_time&#8221; are ignored.</td>",
"rst_description": "Mode for parsing entities in the text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n",
"name": "text_parse_mode"
},
{
"type": "Array of MessageEntity",
"required": false,
"description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.",
"html_description": "<td>A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of <em>text_parse_mode</em>. Entities other than &#8220;bold&#8221;, &#8220;italic&#8221;, &#8220;underline&#8221;, &#8220;strikethrough&#8221;, &#8220;spoiler&#8221;, and &#8220;custom_emoji&#8221; are ignored.</td>",
"rst_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.\n",
"description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.",
"html_description": "<td>A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of <em>text_parse_mode</em>. Entities other than &#8220;bold&#8221;, &#8220;italic&#8221;, &#8220;underline&#8221;, &#8220;strikethrough&#8221;, &#8220;spoiler&#8221;, &#8220;custom_emoji&#8221;, and &#8220;date_time&#8221; are ignored.</td>",
"rst_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n",
"name": "text_entities"
}
],

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "replacemanagedbottoken",
"name": "replaceManagedBotToken",
"description": "Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as String on success.",
"html_description": "<p>Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as <em>String</em> on success.</p>",
"rst_description": "Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as *String* on success.",
"annotations": [
{
"type": "Integer",
"required": true,
"description": "User identifier of the managed bot whose token will be replaced",
"html_description": "<td>User identifier of the managed bot whose token will be replaced</td>",
"rst_description": "User identifier of the managed bot whose token will be replaced\n",
"name": "user_id"
}
],
"category": "methods"
}
}

View file

@ -1,8 +1,8 @@
{
"meta": {},
"group": {
"title": "Inline mode",
"anchor": "inline-mode"
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "savepreparedinlinemessage",

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "savepreparedkeyboardbutton",
"name": "savePreparedKeyboardButton",
"description": "Stores a keyboard button that can be used by a user within a Mini App. Returns a PreparedKeyboardButton object.",
"html_description": "<p>Stores a keyboard button that can be used by a user within a Mini App. Returns a <a href=\"#preparedkeyboardbutton\">PreparedKeyboardButton</a> object.</p>",
"rst_description": "Stores a keyboard button that can be used by a user within a Mini App. Returns a :class:`aiogram.types.prepared_keyboard_button.PreparedKeyboardButton` object.",
"annotations": [
{
"type": "Integer",
"required": true,
"description": "Unique identifier of the target user that can use the button",
"html_description": "<td>Unique identifier of the target user that can use the button</td>",
"rst_description": "Unique identifier of the target user that can use the button\n",
"name": "user_id"
},
{
"type": "KeyboardButton",
"required": true,
"description": "A JSON-serialized object describing the button to be saved. The button must be of the type request_users, request_chat, or request_managed_bot",
"html_description": "<td>A JSON-serialized object describing the button to be saved. The button must be of the type <em>request_users</em>, <em>request_chat</em>, or <em>request_managed_bot</em></td>",
"rst_description": "A JSON-serialized object describing the button to be saved. The button must be of the type *request_users*, *request_chat*, or *request_managed_bot*\n",
"name": "button"
}
],
"category": "methods"
}
}

View file

@ -54,17 +54,17 @@
{
"type": "String",
"required": false,
"description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.",
"html_description": "<td>Mode for parsing entities in the text. See <a href=\"#formatting-options\">formatting options</a> for more details. Entities other than &#8220;bold&#8221;, &#8220;italic&#8221;, &#8220;underline&#8221;, &#8220;strikethrough&#8221;, &#8220;spoiler&#8221;, and &#8220;custom_emoji&#8221; are ignored.</td>",
"rst_description": "Mode for parsing entities in the text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.\n",
"description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.",
"html_description": "<td>Mode for parsing entities in the text. See <a href=\"#formatting-options\">formatting options</a> for more details. Entities other than &#8220;bold&#8221;, &#8220;italic&#8221;, &#8220;underline&#8221;, &#8220;strikethrough&#8221;, &#8220;spoiler&#8221;, &#8220;custom_emoji&#8221;, and &#8220;date_time&#8221; are ignored.</td>",
"rst_description": "Mode for parsing entities in the text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n",
"name": "text_parse_mode"
},
{
"type": "Array of MessageEntity",
"required": false,
"description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.",
"html_description": "<td>A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of <em>text_parse_mode</em>. Entities other than &#8220;bold&#8221;, &#8220;italic&#8221;, &#8220;underline&#8221;, &#8220;strikethrough&#8221;, &#8220;spoiler&#8221;, and &#8220;custom_emoji&#8221; are ignored.</td>",
"rst_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.\n",
"description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.",
"html_description": "<td>A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of <em>text_parse_mode</em>. Entities other than &#8220;bold&#8221;, &#8220;italic&#8221;, &#8220;underline&#8221;, &#8220;strikethrough&#8221;, &#8220;spoiler&#8221;, &#8220;custom_emoji&#8221;, and &#8220;date_time&#8221; are ignored.</td>",
"rst_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n",
"name": "text_entities"
}
],

View file

@ -1,3 +1,4 @@
explanation_parse_mode: parse_mode
question_parse_mode: parse_mode
description_parse_mode: parse_mode
protect_content: protect_content

View file

@ -86,18 +86,50 @@
{
"type": "Boolean",
"required": false,
"description": "True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False",
"html_description": "<td><em>True</em>, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to <em>False</em></td>",
"rst_description": ":code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False`\n",
"description": "Pass True, if the poll allows multiple answers, defaults to False",
"html_description": "<td>Pass <em>True</em>, if the poll allows multiple answers, defaults to <em>False</em></td>",
"rst_description": "Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False`\n",
"name": "allows_multiple_answers"
},
{
"type": "Integer",
"type": "Boolean",
"required": false,
"description": "0-based identifier of the correct answer option, required for polls in quiz mode",
"html_description": "<td>0-based identifier of the correct answer option, required for polls in quiz mode</td>",
"rst_description": "0-based identifier of the correct answer option, required for polls in quiz mode\n",
"name": "correct_option_id"
"description": "Pass True, if the poll allows to change chosen answer options, defaults to False for quizzes and to True for regular polls",
"html_description": "<td>Pass <em>True</em>, if the poll allows to change chosen answer options, defaults to <em>False</em> for quizzes and to <em>True</em> for regular polls</td>",
"rst_description": "Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls\n",
"name": "allows_revoting"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True, if the poll options must be shown in random order",
"html_description": "<td>Pass <em>True</em>, if the poll options must be shown in random order</td>",
"rst_description": "Pass :code:`True`, if the poll options must be shown in random order\n",
"name": "shuffle_options"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes",
"html_description": "<td>Pass <em>True</em>, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes</td>",
"rst_description": "Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes\n",
"name": "allow_adding_options"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True, if poll results must be shown only after the poll closes",
"html_description": "<td>Pass <em>True</em>, if poll results must be shown only after the poll closes</td>",
"rst_description": "Pass :code:`True`, if poll results must be shown only after the poll closes\n",
"name": "hide_results_until_closes"
},
{
"type": "Array of Integer",
"required": false,
"description": "A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode",
"html_description": "<td>A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode</td>",
"rst_description": "A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode\n",
"name": "correct_option_ids"
},
{
"type": "String",
@ -126,17 +158,17 @@
{
"type": "Integer",
"required": false,
"description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.",
"html_description": "<td>Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with <em>close_date</em>.</td>",
"rst_description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*.\n",
"description": "Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with close_date.",
"html_description": "<td>Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with <em>close_date</em>.</td>",
"rst_description": "Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*.\n",
"name": "open_period"
},
{
"type": "Integer",
"required": false,
"description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.",
"html_description": "<td>Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with <em>open_period</em>.</td>",
"rst_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*.\n",
"description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with open_period.",
"html_description": "<td>Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with <em>open_period</em>.</td>",
"rst_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*.\n",
"name": "close_date"
},
{
@ -147,6 +179,30 @@
"rst_description": "Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview.\n",
"name": "is_closed"
},
{
"type": "String",
"required": false,
"description": "Description of the poll to be sent, 0-1024 characters after entities parsing",
"html_description": "<td>Description of the poll to be sent, 0-1024 characters after entities parsing</td>",
"rst_description": "Description of the poll to be sent, 0-1024 characters after entities parsing\n",
"name": "description"
},
{
"type": "String",
"required": false,
"description": "Mode for parsing entities in the poll description. See formatting options for more details.",
"html_description": "<td>Mode for parsing entities in the poll description. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "Mode for parsing entities in the poll description. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"name": "description_parse_mode"
},
{
"type": "Array of MessageEntity",
"required": false,
"description": "A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of description_parse_mode",
"html_description": "<td>A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of <em>description_parse_mode</em></td>",
"rst_description": "A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode*\n",
"name": "description_entities"
},
{
"type": "Boolean",
"required": false,
@ -207,6 +263,18 @@
"release_date": "2023-12-29"
}
},
{
"type": "Integer",
"required": false,
"description": "0-based identifier of the correct answer option, required for polls in quiz mode",
"html_description": "<td>0-based identifier of the correct answer option, required for polls in quiz mode</td>",
"rst_description": "0-based identifier of the correct answer option, required for polls in quiz mode\n",
"name": "correct_option_id",
"deprecated": {
"version": "9.6",
"release_date": "2026-04-03"
}
},
{
"type": "Integer",
"required": false,