Compare commits

...

2 commits

Author SHA1 Message Date
JRoot Junior
7a517f1eba
Bump version to 3.21.0 and update changelog
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
2025-07-05 03:07:18 +03:00
Alex Root Junior
f060c08d16
Add support for Telegram Bot API 9.1 (#1704)
* Add support for Telegram Bot API 9.1 features, including checklists, gifts, and new methods like `SendChecklist`, `EditMessageChecklist`, and `GetMyStarBalance`. Update changelog and improve `True` field descriptions.

* Bump API Version

* Refactor profile photo types to use `InputProfilePhotoType` enums instead of hardcoded literals

* Refactor imports and clean up redundant code across methods, types, and webhook server classes
2025-07-05 03:02:44 +03:00
125 changed files with 2623 additions and 492 deletions

View file

@ -1 +1 @@
9.0
9.1

View file

@ -5,7 +5,7 @@ description: |
Source: https://core.telegram.org/bots/api#inputprofilephoto
multi_parse:
attribute: type
regexp: "must be '([a-z_]+)'"
regexp: "must be *([a-z_]+)*"
entities:
- InputProfilePhotoStatic
- InputProfilePhotoAnimated

View file

@ -5,7 +5,7 @@ description: |
Source: https://core.telegram.org/bots/api#inputstorycontentphoto
multi_parse:
attribute: type
regexp: "must be '([a-z_]+)'"
regexp: "must be *([a-z_]+)*"
entities:
- InputStoryContentPhoto
- InputStoryContentVideo

View file

@ -7,9 +7,9 @@
"object": {
"anchor": "deletebusinessmessages",
"name": "deleteBusinessMessages",
"description": "Delete messages on behalf of a business account. Requires the can_delete_outgoing_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.",
"html_description": "<p>Delete messages on behalf of a business account. Requires the <em>can_delete_outgoing_messages</em> business bot right to delete messages sent by the bot itself, or the <em>can_delete_all_messages</em> business bot right to delete any message. Returns <em>True</em> on success.</p>",
"rst_description": "Delete messages on behalf of a business account. Requires the *can_delete_outgoing_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.",
"description": "Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.",
"html_description": "<p>Delete messages on behalf of a business account. Requires the <em>can_delete_sent_messages</em> business bot right to delete messages sent by the bot itself, or the <em>can_delete_all_messages</em> business bot right to delete any message. Returns <em>True</em> on success.</p>",
"rst_description": "Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",

View file

@ -0,0 +1,57 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "editmessagechecklist",
"name": "editMessageChecklist",
"description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.",
"html_description": "<p>Use this method to edit a checklist on behalf of a connected business account. On success, the edited <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target chat",
"html_description": "<td>Unique identifier for the target chat</td>",
"rst_description": "Unique identifier for the target chat\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target message",
"html_description": "<td>Unique identifier for the target message</td>",
"rst_description": "Unique identifier for the target message\n",
"name": "message_id"
},
{
"type": "InputChecklist",
"required": true,
"description": "A JSON-serialized object for the new checklist",
"html_description": "<td>A JSON-serialized object for the new checklist</td>",
"rst_description": "A JSON-serialized object for the new checklist\n",
"name": "checklist"
},
{
"type": "InlineKeyboardMarkup",
"required": false,
"description": "A JSON-serialized object for the new inline keyboard for the message",
"html_description": "<td>A JSON-serialized object for the new inline keyboard for the message</td>",
"rst_description": "A JSON-serialized object for the new inline keyboard for the message\n",
"name": "reply_markup"
}
],
"category": "methods"
}
}

View file

@ -23,48 +23,48 @@
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that aren't saved to the account's profile page",
"html_description": "<td>Pass True to exclude gifts that aren't saved to the account's profile page</td>",
"rst_description": "Pass True to exclude gifts that aren't saved to the account's profile page\n",
"html_description": "<td>Pass <em>True</em> to exclude gifts that aren't saved to the account's profile page</td>",
"rst_description": "Pass :code:`True` to exclude gifts that aren't saved to the account's profile page\n",
"name": "exclude_unsaved"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that are saved to the account's profile page",
"html_description": "<td>Pass True to exclude gifts that are saved to the account's profile page</td>",
"rst_description": "Pass True to exclude gifts that are saved to the account's profile page\n",
"html_description": "<td>Pass <em>True</em> to exclude gifts that are saved to the account's profile page</td>",
"rst_description": "Pass :code:`True` to exclude gifts that are saved to the account's profile page\n",
"name": "exclude_saved"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that can be purchased an unlimited number of times",
"html_description": "<td>Pass True to exclude gifts that can be purchased an unlimited number of times</td>",
"rst_description": "Pass True to exclude gifts that can be purchased an unlimited number of times\n",
"html_description": "<td>Pass <em>True</em> to exclude gifts that can be purchased an unlimited number of times</td>",
"rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n",
"name": "exclude_unlimited"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that can be purchased a limited number of times",
"html_description": "<td>Pass True to exclude gifts that can be purchased a limited number of times</td>",
"rst_description": "Pass True to exclude gifts that can be purchased a limited number of times\n",
"html_description": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times</td>",
"rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times\n",
"name": "exclude_limited"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude unique gifts",
"html_description": "<td>Pass True to exclude unique gifts</td>",
"rst_description": "Pass True to exclude unique gifts\n",
"html_description": "<td>Pass <em>True</em> to exclude unique gifts</td>",
"rst_description": "Pass :code:`True` to exclude unique gifts\n",
"name": "exclude_unique"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.",
"html_description": "<td>Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.</td>",
"rst_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.\n",
"html_description": "<td>Pass <em>True</em> to sort results by gift price instead of send date. Sorting is applied before pagination.</td>",
"rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n",
"name": "sort_by_price"
},
{

View file

@ -0,0 +1,16 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "getmystarbalance",
"name": "getMyStarBalance",
"description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.",
"html_description": "<p>A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a <a href=\"#staramount\">StarAmount</a> object.</p>",
"rst_description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a :class:`aiogram.types.star_amount.StarAmount` object.",
"annotations": [],
"category": "methods"
}
}

View file

@ -38,9 +38,9 @@
{
"type": "Boolean",
"required": false,
"description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.",
"html_description": "<td>Pass <em>True</em> if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.</td>",
"rst_description": "Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n",
"description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.",
"html_description": "<td>Pass <em>True</em> if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.</td>",
"rst_description": "Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n",
"name": "can_manage_chat"
},
{
@ -118,9 +118,9 @@
{
"type": "Boolean",
"required": false,
"description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only",
"html_description": "<td>Pass <em>True</em> if the administrator can post messages in the channel, or access channel statistics; for channels only</td>",
"rst_description": "Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only\n",
"description": "Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only",
"html_description": "<td>Pass <em>True</em> if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only</td>",
"rst_description": "Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n",
"name": "can_post_messages"
},
{

View file

@ -23,8 +23,8 @@
"type": "Boolean",
"required": false,
"description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.",
"html_description": "<td>Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.</td>",
"rst_description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.\n",
"html_description": "<td>Pass <em>True</em> to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.</td>",
"rst_description": "Pass :code:`True` to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.\n",
"name": "is_public"
}
],

View file

@ -0,0 +1,81 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "sendchecklist",
"name": "sendChecklist",
"description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.",
"html_description": "<p>Use this method to send a checklist on behalf of a connected business account. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target chat",
"html_description": "<td>Unique identifier for the target chat</td>",
"rst_description": "Unique identifier for the target chat\n",
"name": "chat_id"
},
{
"type": "InputChecklist",
"required": true,
"description": "A JSON-serialized object for the checklist to send",
"html_description": "<td>A JSON-serialized object for the checklist to send</td>",
"rst_description": "A JSON-serialized object for the checklist to send\n",
"name": "checklist"
},
{
"type": "Boolean",
"required": false,
"description": "Sends the message silently. Users will receive a notification with no sound.",
"html_description": "<td>Sends the message silently. Users will receive a notification with no sound.</td>",
"rst_description": "Sends the message silently. Users will receive a notification with no sound.\n",
"name": "disable_notification"
},
{
"type": "Boolean",
"required": false,
"description": "Protects the contents of the sent message from forwarding and saving",
"html_description": "<td>Protects the contents of the sent message from forwarding and saving</td>",
"rst_description": "Protects the contents of the sent message from forwarding and saving\n",
"name": "protect_content"
},
{
"type": "String",
"required": false,
"description": "Unique identifier of the message effect to be added to the message",
"html_description": "<td>Unique identifier of the message effect to be added to the message</td>",
"rst_description": "Unique identifier of the message effect to be added to the message\n",
"name": "message_effect_id"
},
{
"type": "ReplyParameters",
"required": false,
"description": "A JSON-serialized object for description of the message to reply to",
"html_description": "<td>A JSON-serialized object for description of the message to reply to</td>",
"rst_description": "A JSON-serialized object for description of the message to reply to\n",
"name": "reply_parameters"
},
{
"type": "InlineKeyboardMarkup",
"required": false,
"description": "A JSON-serialized object for an inline keyboard",
"html_description": "<td>A JSON-serialized object for an inline keyboard</td>",
"rst_description": "A JSON-serialized object for an inline keyboard\n",
"name": "reply_markup"
}
],
"category": "methods"
}
}

View file

@ -62,9 +62,9 @@
{
"type": "Array of InputPollOption",
"required": true,
"description": "A JSON-serialized list of 2-10 answer options",
"html_description": "<td>A JSON-serialized list of 2-10 answer options</td>",
"rst_description": "A JSON-serialized list of 2-10 answer options\n",
"description": "A JSON-serialized list of 2-12 answer options",
"html_description": "<td>A JSON-serialized list of 2-12 answer options</td>",
"rst_description": "A JSON-serialized list of 2-12 answer options\n",
"name": "options"
},
{

View file

@ -23,8 +23,8 @@
"type": "Boolean",
"required": true,
"description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field",
"html_description": "<td>Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field</td>",
"rst_description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field\n",
"html_description": "<td>Pass <em>True</em>, if a button for sending a gift to the user or by the business account must always be shown in the input field</td>",
"rst_description": "Pass :code:`True`, if a button for sending a gift to the user or by the business account must always be shown in the input field\n",
"name": "show_gift_button"
},
{

View file

@ -31,8 +31,8 @@
"type": "Boolean",
"required": false,
"description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.",
"html_description": "<td>Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.</td>",
"rst_description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.\n",
"html_description": "<td>Pass <em>True</em> to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.</td>",
"rst_description": "Pass :code:`True` to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.\n",
"name": "is_public"
}
],

View file

@ -31,8 +31,8 @@
"type": "Boolean",
"required": false,
"description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift",
"html_description": "<td>Pass True to keep the original gift text, sender and receiver in the upgraded gift</td>",
"rst_description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift\n",
"html_description": "<td>Pass <em>True</em> to keep the original gift text, sender and receiver in the upgraded gift</td>",
"rst_description": "Pass :code:`True` to keep the original gift text, sender and receiver in the upgraded gift\n",
"name": "keep_original_details"
},
{

File diff suppressed because one or more lines are too long

View file

@ -14,32 +14,32 @@
{
"type": "Boolean",
"description": "True, if unlimited regular gifts are accepted",
"html_description": "<td>True, if unlimited regular gifts are accepted</td>",
"rst_description": "True, if unlimited regular gifts are accepted\n",
"html_description": "<td><em>True</em>, if unlimited regular gifts are accepted</td>",
"rst_description": ":code:`True`, if unlimited regular gifts are accepted\n",
"name": "unlimited_gifts",
"required": true
},
{
"type": "Boolean",
"description": "True, if limited regular gifts are accepted",
"html_description": "<td>True, if limited regular gifts are accepted</td>",
"rst_description": "True, if limited regular gifts are accepted\n",
"html_description": "<td><em>True</em>, if limited regular gifts are accepted</td>",
"rst_description": ":code:`True`, if limited regular gifts are accepted\n",
"name": "limited_gifts",
"required": true
},
{
"type": "Boolean",
"description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted",
"html_description": "<td>True, if unique gifts or gifts that can be upgraded to unique for free are accepted</td>",
"rst_description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted\n",
"html_description": "<td><em>True</em>, if unique gifts or gifts that can be upgraded to unique for free are accepted</td>",
"rst_description": ":code:`True`, if unique gifts or gifts that can be upgraded to unique for free are accepted\n",
"name": "unique_gifts",
"required": true
},
{
"type": "Boolean",
"description": "True, if a Telegram Premium subscription is accepted",
"html_description": "<td>True, if a Telegram Premium subscription is accepted</td>",
"rst_description": "True, if a Telegram Premium subscription is accepted\n",
"html_description": "<td><em>True</em>, if a Telegram Premium subscription is accepted</td>",
"rst_description": ":code:`True`, if a Telegram Premium subscription is accepted\n",
"name": "premium_subscription",
"required": true
}

View file

@ -14,114 +14,126 @@
{
"type": "True",
"description": "True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours",
"html_description": "<td><em>Optional</em>. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours</td>",
"rst_description": "*Optional*. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours\n",
"name": "can_reply",
"required": false
},
{
"type": "True",
"description": "True, if the bot can mark incoming private messages as read",
"html_description": "<td><em>Optional</em>. True, if the bot can mark incoming private messages as read</td>",
"rst_description": "*Optional*. True, if the bot can mark incoming private messages as read\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can mark incoming private messages as read</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can mark incoming private messages as read\n",
"name": "can_read_messages",
"required": false
},
{
"type": "True",
"description": "True, if the bot can delete messages sent by the bot",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can delete messages sent by the bot</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can delete messages sent by the bot\n",
"name": "can_delete_sent_messages",
"required": false
},
{
"type": "True",
"description": "True, if the bot can delete all private messages in managed chats",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can delete all private messages in managed chats</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can delete all private messages in managed chats\n",
"name": "can_delete_all_messages",
"required": false
},
{
"type": "True",
"description": "True, if the bot can edit the first and last name of the business account",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can edit the first and last name of the business account</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can edit the first and last name of the business account\n",
"name": "can_edit_name",
"required": false
},
{
"type": "True",
"description": "True, if the bot can edit the bio of the business account",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can edit the bio of the business account</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can edit the bio of the business account\n",
"name": "can_edit_bio",
"required": false
},
{
"type": "True",
"description": "True, if the bot can edit the profile photo of the business account",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can edit the profile photo of the business account</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can edit the profile photo of the business account\n",
"name": "can_edit_profile_photo",
"required": false
},
{
"type": "True",
"description": "True, if the bot can edit the username of the business account",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can edit the username of the business account</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can edit the username of the business account\n",
"name": "can_edit_username",
"required": false
},
{
"type": "True",
"description": "True, if the bot can change the privacy settings pertaining to gifts for the business account",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can change the privacy settings pertaining to gifts for the business account</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can change the privacy settings pertaining to gifts for the business account\n",
"name": "can_change_gift_settings",
"required": false
},
{
"type": "True",
"description": "True, if the bot can view gifts and the amount of Telegram Stars owned by the business account",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can view gifts and the amount of Telegram Stars owned by the business account</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can view gifts and the amount of Telegram Stars owned by the business account\n",
"name": "can_view_gifts_and_stars",
"required": false
},
{
"type": "True",
"description": "True, if the bot can convert regular gifts owned by the business account to Telegram Stars",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can convert regular gifts owned by the business account to Telegram Stars</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can convert regular gifts owned by the business account to Telegram Stars\n",
"name": "can_convert_gifts_to_stars",
"required": false
},
{
"type": "True",
"description": "True, if the bot can transfer and upgrade gifts owned by the business account",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can transfer and upgrade gifts owned by the business account</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can transfer and upgrade gifts owned by the business account\n",
"name": "can_transfer_and_upgrade_gifts",
"required": false
},
{
"type": "True",
"description": "True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts\n",
"name": "can_transfer_stars",
"required": false
},
{
"type": "True",
"description": "True, if the bot can post, edit and delete stories on behalf of the business account",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can post, edit and delete stories on behalf of the business account</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can post, edit and delete stories on behalf of the business account\n",
"name": "can_manage_stories",
"required": false
},
{
"type": "True",
"description": "True, if the bot can delete messages sent by the bot",
"html_description": "<td><em>Optional</em>. True, if the bot can delete messages sent by the bot</td>",
"rst_description": "*Optional*. True, if the bot can delete messages sent by the bot\n",
"name": "can_delete_outgoing_messages",
"required": false
},
{
"type": "True",
"description": "True, if the bot can delete all private messages in managed chats",
"html_description": "<td><em>Optional</em>. True, if the bot can delete all private messages in managed chats</td>",
"rst_description": "*Optional*. True, if the bot can delete all private messages in managed chats\n",
"name": "can_delete_all_messages",
"required": false
},
{
"type": "True",
"description": "True, if the bot can edit the first and last name of the business account",
"html_description": "<td><em>Optional</em>. True, if the bot can edit the first and last name of the business account</td>",
"rst_description": "*Optional*. True, if the bot can edit the first and last name of the business account\n",
"name": "can_edit_name",
"required": false
},
{
"type": "True",
"description": "True, if the bot can edit the bio of the business account",
"html_description": "<td><em>Optional</em>. True, if the bot can edit the bio of the business account</td>",
"rst_description": "*Optional*. True, if the bot can edit the bio of the business account\n",
"name": "can_edit_bio",
"required": false
},
{
"type": "True",
"description": "True, if the bot can edit the profile photo of the business account",
"html_description": "<td><em>Optional</em>. True, if the bot can edit the profile photo of the business account</td>",
"rst_description": "*Optional*. True, if the bot can edit the profile photo of the business account\n",
"name": "can_edit_profile_photo",
"required": false
},
{
"type": "True",
"description": "True, if the bot can edit the username of the business account",
"html_description": "<td><em>Optional</em>. True, if the bot can edit the username of the business account</td>",
"rst_description": "*Optional*. True, if the bot can edit the username of the business account\n",
"name": "can_edit_username",
"required": false
},
{
"type": "True",
"description": "True, if the bot can change the privacy settings pertaining to gifts for the business account",
"html_description": "<td><em>Optional</em>. True, if the bot can change the privacy settings pertaining to gifts for the business account</td>",
"rst_description": "*Optional*. True, if the bot can change the privacy settings pertaining to gifts for the business account\n",
"name": "can_change_gift_settings",
"required": false
},
{
"type": "True",
"description": "True, if the bot can view gifts and the amount of Telegram Stars owned by the business account",
"html_description": "<td><em>Optional</em>. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account</td>",
"rst_description": "*Optional*. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account\n",
"name": "can_view_gifts_and_stars",
"required": false
},
{
"type": "True",
"description": "True, if the bot can convert regular gifts owned by the business account to Telegram Stars",
"html_description": "<td><em>Optional</em>. True, if the bot can convert regular gifts owned by the business account to Telegram Stars</td>",
"rst_description": "*Optional*. True, if the bot can convert regular gifts owned by the business account to Telegram Stars\n",
"name": "can_convert_gifts_to_stars",
"required": false
},
{
"type": "True",
"description": "True, if the bot can transfer and upgrade gifts owned by the business account",
"html_description": "<td><em>Optional</em>. True, if the bot can transfer and upgrade gifts owned by the business account</td>",
"rst_description": "*Optional*. True, if the bot can transfer and upgrade gifts owned by the business account\n",
"name": "can_transfer_and_upgrade_gifts",
"required": false
},
{
"type": "True",
"description": "True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts",
"html_description": "<td><em>Optional</em>. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts</td>",
"rst_description": "*Optional*. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts\n",
"name": "can_transfer_stars",
"required": false
},
{
"type": "True",
"description": "True, if the bot can post, edit and delete stories on behalf of the business account",
"html_description": "<td><em>Optional</em>. True, if the bot can post, edit and delete stories on behalf of the business account</td>",
"rst_description": "*Optional*. True, if the bot can post, edit and delete stories on behalf of the business account\n",
"name": "can_manage_stories",
"required": false
"required": false,
"deprecated": {
"version": "9.1",
"release_date": "2025-07-03"
}
}
],
"category": "types"

View file

@ -54,8 +54,8 @@
{
"type": "Boolean",
"description": "True, if the connection is active",
"html_description": "<td>True, if the connection is active</td>",
"rst_description": "True, if the connection is active\n",
"html_description": "<td><em>True</em>, if the connection is active</td>",
"rst_description": ":code:`True`, if the connection is active\n",
"name": "is_enabled",
"required": true
},

View file

@ -21,9 +21,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n",
"description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n",
"name": "can_manage_chat",
"required": true
},
@ -101,9 +101,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, or access channel statistics; for channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n",
"description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n",
"name": "can_post_messages",
"required": false
},

View file

@ -46,8 +46,8 @@
{
"type": "True",
"description": "True, if the giveaway was completed, but there was no user to win the prize",
"html_description": "<td><em>Optional</em>. True, if the giveaway was completed, but there was no user to win the prize</td>",
"rst_description": "*Optional*. True, if the giveaway was completed, but there was no user to win the prize\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the giveaway was completed, but there was no user to win the prize</td>",
"rst_description": "*Optional*. :code:`True`, if the giveaway was completed, but there was no user to win the prize\n",
"name": "is_unclaimed",
"required": false
}

View file

@ -45,9 +45,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n",
"description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n",
"name": "can_manage_chat",
"required": true
},
@ -125,9 +125,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, or access channel statistics; for channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n",
"description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n",
"name": "can_post_messages",
"required": false
},

View file

@ -93,9 +93,9 @@
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send polls",
"html_description": "<td><em>True</em>, if the user is allowed to send polls</td>",
"rst_description": ":code:`True`, if the user is allowed to send polls\n",
"description": "True, if the user is allowed to send polls and checklists",
"html_description": "<td><em>True</em>, if the user is allowed to send polls and checklists</td>",
"rst_description": ":code:`True`, if the user is allowed to send polls and checklists\n",
"name": "can_send_polls",
"required": true
},

View file

@ -62,16 +62,16 @@
{
"type": "Boolean",
"description": "True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator",
"html_description": "<td><em>Optional</em>. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator</td>",
"rst_description": "*Optional*. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator</td>",
"rst_description": "*Optional*. :code:`True`, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator\n",
"name": "via_join_request",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user joined the chat via a chat folder invite link",
"html_description": "<td><em>Optional</em>. True, if the user joined the chat via a chat folder invite link</td>",
"rst_description": "*Optional*. True, if the user joined the chat via a chat folder invite link\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user joined the chat via a chat folder invite link</td>",
"rst_description": "*Optional*. :code:`True`, if the user joined the chat via a chat folder invite link\n",
"name": "via_chat_folder_invite_link",
"required": false
}

View file

@ -69,9 +69,9 @@
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send polls",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send polls</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls\n",
"description": "True, if the user is allowed to send polls and checklists",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send polls and checklists</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls and checklists\n",
"name": "can_send_polls",
"required": false
},

View file

@ -0,0 +1,57 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "checklist",
"name": "Checklist",
"description": "Describes a checklist.",
"html_description": "<p>Describes a checklist.</p>",
"rst_description": "Describes a checklist.",
"annotations": [
{
"type": "String",
"description": "Title of the checklist",
"html_description": "<td>Title of the checklist</td>",
"rst_description": "Title of the checklist\n",
"name": "title",
"required": true
},
{
"type": "Array of MessageEntity",
"description": "Special entities that appear in the checklist title",
"html_description": "<td><em>Optional</em>. Special entities that appear in the checklist title</td>",
"rst_description": "*Optional*. Special entities that appear in the checklist title\n",
"name": "title_entities",
"required": false
},
{
"type": "Array of ChecklistTask",
"description": "List of tasks in the checklist",
"html_description": "<td>List of tasks in the checklist</td>",
"rst_description": "List of tasks in the checklist\n",
"name": "tasks",
"required": true
},
{
"type": "True",
"description": "True, if users other than the creator of the list can add tasks to the list",
"html_description": "<td><em>Optional</em>. <em>True</em>, if users other than the creator of the list can add tasks to the list</td>",
"rst_description": "*Optional*. :code:`True`, if users other than the creator of the list can add tasks to the list\n",
"name": "others_can_add_tasks",
"required": false
},
{
"type": "True",
"description": "True, if users other than the creator of the list can mark tasks as done or not done",
"html_description": "<td><em>Optional</em>. <em>True</em>, if users other than the creator of the list can mark tasks as done or not done</td>",
"rst_description": "*Optional*. :code:`True`, if users other than the creator of the list can mark tasks as done or not done\n",
"name": "others_can_mark_tasks_as_done",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,57 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "checklisttask",
"name": "ChecklistTask",
"description": "Describes a task in a checklist.",
"html_description": "<p>Describes a task in a checklist.</p>",
"rst_description": "Describes a task in a checklist.",
"annotations": [
{
"type": "Integer",
"description": "Unique identifier of the task",
"html_description": "<td>Unique identifier of the task</td>",
"rst_description": "Unique identifier of the task\n",
"name": "id",
"required": true
},
{
"type": "String",
"description": "Text of the task",
"html_description": "<td>Text of the task</td>",
"rst_description": "Text of the task\n",
"name": "text",
"required": true
},
{
"type": "Array of MessageEntity",
"description": "Special entities that appear in the task text",
"html_description": "<td><em>Optional</em>. Special entities that appear in the task text</td>",
"rst_description": "*Optional*. Special entities that appear in the task text\n",
"name": "text_entities",
"required": false
},
{
"type": "User",
"description": "User that completed the task; omitted if the task wasn't completed",
"html_description": "<td><em>Optional</em>. User that completed the task; omitted if the task wasn't completed</td>",
"rst_description": "*Optional*. User that completed the task; omitted if the task wasn't completed\n",
"name": "completed_by_user",
"required": false
},
{
"type": "Integer",
"description": "Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed",
"html_description": "<td><em>Optional</em>. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed</td>",
"rst_description": "*Optional*. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed\n",
"name": "completion_date",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "checklisttasksadded",
"name": "ChecklistTasksAdded",
"description": "Describes a service message about tasks added to a checklist.",
"html_description": "<p>Describes a service message about tasks added to a checklist.</p>",
"rst_description": "Describes a service message about tasks added to a checklist.",
"annotations": [
{
"type": "Message",
"description": "Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the <em>reply_to_message</em> field even if it itself is a reply.</td>",
"rst_description": "*Optional*. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n",
"name": "checklist_message",
"required": false
},
{
"type": "Array of ChecklistTask",
"description": "List of tasks added to the checklist",
"html_description": "<td>List of tasks added to the checklist</td>",
"rst_description": "List of tasks added to the checklist\n",
"name": "tasks",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "checklisttasksdone",
"name": "ChecklistTasksDone",
"description": "Describes a service message about checklist tasks marked as done or not done.",
"html_description": "<p>Describes a service message about checklist tasks marked as done or not done.</p>",
"rst_description": "Describes a service message about checklist tasks marked as done or not done.",
"annotations": [
{
"type": "Message",
"description": "Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the <em>reply_to_message</em> field even if it itself is a reply.</td>",
"rst_description": "*Optional*. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n",
"name": "checklist_message",
"required": false
},
{
"type": "Array of Integer",
"description": "Identifiers of the tasks that were marked as done",
"html_description": "<td><em>Optional</em>. Identifiers of the tasks that were marked as done</td>",
"rst_description": "*Optional*. Identifiers of the tasks that were marked as done\n",
"name": "marked_as_done_task_ids",
"required": false
},
{
"type": "Array of Integer",
"description": "Identifiers of the tasks that were marked as not done",
"html_description": "<td><em>Optional</em>. Identifiers of the tasks that were marked as not done</td>",
"rst_description": "*Optional*. Identifiers of the tasks that were marked as not done\n",
"name": "marked_as_not_done_task_ids",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "directmessagepricechanged",
"name": "DirectMessagePriceChanged",
"description": "Describes a service message about a change in the price of direct messages sent to a channel chat.",
"html_description": "<p>Describes a service message about a change in the price of direct messages sent to a channel chat.</p>",
"rst_description": "Describes a service message about a change in the price of direct messages sent to a channel chat.",
"annotations": [
{
"type": "Boolean",
"description": "True, if direct messages are enabled for the channel chat; false otherwise",
"html_description": "<td><em>True</em>, if direct messages are enabled for the channel chat; false otherwise</td>",
"rst_description": ":code:`True`, if direct messages are enabled for the channel chat; false otherwise\n",
"name": "are_direct_messages_enabled",
"required": true
},
{
"type": "Integer",
"description": "The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.",
"html_description": "<td><em>Optional</em>. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.</td>",
"rst_description": "*Optional*. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.\n",
"name": "direct_message_star_count",
"required": false
}
],
"category": "types"
}
}

View file

@ -131,6 +131,14 @@
"name": "has_media_spoiler",
"required": false
},
{
"type": "Checklist",
"description": "Message is a checklist",
"html_description": "<td><em>Optional</em>. Message is a checklist</td>",
"rst_description": "*Optional*. Message is a checklist\n",
"name": "checklist",
"required": false
},
{
"type": "Contact",
"description": "Message is a shared contact, information about the contact",

View file

@ -46,8 +46,8 @@
{
"type": "True",
"description": "True, if the gift can be upgraded to a unique gift",
"html_description": "<td><em>Optional</em>. True, if the gift can be upgraded to a unique gift</td>",
"rst_description": "*Optional*. True, if the gift can be upgraded to a unique gift\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the gift can be upgraded to a unique gift</td>",
"rst_description": "*Optional*. :code:`True`, if the gift can be upgraded to a unique gift\n",
"name": "can_be_upgraded",
"required": false
},
@ -70,8 +70,8 @@
{
"type": "True",
"description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them",
"html_description": "<td><em>Optional</em>. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them</td>",
"rst_description": "*Optional*. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them</td>",
"rst_description": "*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n",
"name": "is_private",
"required": false
}

View file

@ -0,0 +1,65 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "inputchecklist",
"name": "InputChecklist",
"description": "Describes a checklist to create.",
"html_description": "<p>Describes a checklist to create.</p>",
"rst_description": "Describes a checklist to create.",
"annotations": [
{
"type": "String",
"description": "Title of the checklist; 1-255 characters after entities parsing",
"html_description": "<td>Title of the checklist; 1-255 characters after entities parsing</td>",
"rst_description": "Title of the checklist; 1-255 characters after entities parsing\n",
"name": "title",
"required": true
},
{
"type": "String",
"description": "Mode for parsing entities in the title. See formatting options for more details.",
"html_description": "<td>Optional. Mode for parsing entities in the title. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "Optional. Mode for parsing entities in the title. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"name": "parse_mode",
"required": false
},
{
"type": "Array of MessageEntity",
"description": "List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.",
"html_description": "<td><em>Optional</em>. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only <em>bold</em>, <em>italic</em>, <em>underline</em>, <em>strikethrough</em>, <em>spoiler</em>, and <em>custom_emoji</em> entities are allowed.</td>",
"rst_description": "*Optional*. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are allowed.\n",
"name": "title_entities",
"required": false
},
{
"type": "Array of InputChecklistTask",
"description": "List of 1-30 tasks in the checklist",
"html_description": "<td>List of 1-30 tasks in the checklist</td>",
"rst_description": "List of 1-30 tasks in the checklist\n",
"name": "tasks",
"required": true
},
{
"type": "Boolean",
"description": "Pass True if other users can add tasks to the checklist",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if other users can add tasks to the checklist</td>",
"rst_description": "*Optional*. Pass :code:`True` if other users can add tasks to the checklist\n",
"name": "others_can_add_tasks",
"required": false
},
{
"type": "True",
"description": "Pass True if other users can mark tasks as done or not done in the checklist",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if other users can mark tasks as done or not done in the checklist</td>",
"rst_description": "*Optional*. Pass :code:`True` if other users can mark tasks as done or not done in the checklist\n",
"name": "others_can_mark_tasks_as_done",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "inputchecklisttask",
"name": "InputChecklistTask",
"description": "Describes a task to add to a checklist.",
"html_description": "<p>Describes a task to add to a checklist.</p>",
"rst_description": "Describes a task to add to a checklist.",
"annotations": [
{
"type": "Integer",
"description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist",
"html_description": "<td>Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist</td>",
"rst_description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist\n",
"name": "id",
"required": true
},
{
"type": "String",
"description": "Text of the task; 1-100 characters after entities parsing",
"html_description": "<td>Text of the task; 1-100 characters after entities parsing</td>",
"rst_description": "Text of the task; 1-100 characters after entities parsing\n",
"name": "text",
"required": true
},
{
"type": "String",
"description": "Mode for parsing entities in the text. See formatting options for more details.",
"html_description": "<td>Optional. Mode for parsing entities in the text. See <a href=\"https://core.telegram.org/bots/api#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "Optional. Mode for parsing entities in the text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"name": "parse_mode",
"required": false
},
{
"type": "Array of MessageEntity",
"description": "List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.",
"html_description": "<td><em>Optional</em>. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only <em>bold</em>, <em>italic</em>, <em>underline</em>, <em>strikethrough</em>, <em>spoiler</em>, and <em>custom_emoji</em> entities are allowed.</td>",
"rst_description": "*Optional*. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are allowed.\n",
"name": "text_entities",
"required": false
}
],
"category": "types"
}
}

View file

@ -13,9 +13,9 @@
"annotations": [
{
"type": "String",
"description": "Type of the profile photo, must be 'animated'",
"html_description": "<td>Type of the profile photo, must be &#8220;animated&#8221;</td>",
"rst_description": "Type of the profile photo, must be 'animated'\n",
"description": "Type of the profile photo, must be animated",
"html_description": "<td>Type of the profile photo, must be <em>animated</em></td>",
"rst_description": "Type of the profile photo, must be *animated*\n",
"name": "type",
"required": true
},

View file

@ -13,9 +13,9 @@
"annotations": [
{
"type": "String",
"description": "Type of the profile photo, must be 'static'",
"html_description": "<td>Type of the profile photo, must be &#8220;static&#8221;</td>",
"rst_description": "Type of the profile photo, must be 'static'\n",
"description": "Type of the profile photo, must be static",
"html_description": "<td>Type of the profile photo, must be <em>static</em></td>",
"rst_description": "Type of the profile photo, must be *static*\n",
"name": "type",
"required": true
},

View file

@ -13,9 +13,9 @@
"annotations": [
{
"type": "String",
"description": "Type of the content, must be 'photo'",
"html_description": "<td>Type of the content, must be &#8220;photo&#8221;</td>",
"rst_description": "Type of the content, must be 'photo'\n",
"description": "Type of the content, must be photo",
"html_description": "<td>Type of the content, must be <em>photo</em></td>",
"rst_description": "Type of the content, must be *photo*\n",
"name": "type",
"required": true
},

View file

@ -13,9 +13,9 @@
"annotations": [
{
"type": "String",
"description": "Type of the content, must be 'video'",
"html_description": "<td>Type of the content, must be &#8220;video&#8221;</td>",
"rst_description": "Type of the content, must be 'video'\n",
"description": "Type of the content, must be video",
"html_description": "<td>Type of the content, must be <em>video</em></td>",
"rst_description": "Type of the content, must be *video*\n",
"name": "type",
"required": true
},

View file

@ -166,8 +166,8 @@
{
"type": "True",
"description": "True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message",
"html_description": "<td><em>Optional</em>. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message</td>",
"rst_description": "*Optional*. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message</td>",
"rst_description": "*Optional*. :code:`True`, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message\n",
"name": "is_from_offline",
"required": false
},
@ -326,8 +326,8 @@
{
"type": "True",
"description": "True, if the caption must be shown above the message media",
"html_description": "<td><em>Optional</em>. True, if the caption must be shown above the message media</td>",
"rst_description": "*Optional*. True, if the caption must be shown above the message media\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the caption must be shown above the message media</td>",
"rst_description": "*Optional*. :code:`True`, if the caption must be shown above the message media\n",
"name": "show_caption_above_media",
"required": false
},
@ -339,6 +339,14 @@
"name": "has_media_spoiler",
"required": false
},
{
"type": "Checklist",
"description": "Message is a checklist",
"html_description": "<td><em>Optional</em>. Message is a checklist</td>",
"rst_description": "*Optional*. Message is a checklist\n",
"name": "checklist",
"required": false
},
{
"type": "Contact",
"description": "Message is a shared contact, information about the contact",
@ -587,6 +595,30 @@
"name": "chat_background_set",
"required": false
},
{
"type": "ChecklistTasksDone",
"description": "Service message: some tasks in a checklist were marked as done or not done",
"html_description": "<td><em>Optional</em>. Service message: some tasks in a checklist were marked as done or not done</td>",
"rst_description": "*Optional*. Service message: some tasks in a checklist were marked as done or not done\n",
"name": "checklist_tasks_done",
"required": false
},
{
"type": "ChecklistTasksAdded",
"description": "Service message: tasks were added to a checklist",
"html_description": "<td><em>Optional</em>. Service message: tasks were added to a checklist</td>",
"rst_description": "*Optional*. Service message: tasks were added to a checklist\n",
"name": "checklist_tasks_added",
"required": false
},
{
"type": "DirectMessagePriceChanged",
"description": "Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed",
"html_description": "<td><em>Optional</em>. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed</td>",
"rst_description": "*Optional*. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed\n",
"name": "direct_message_price_changed",
"required": false
},
{
"type": "ForumTopicCreated",
"description": "Service message: forum topic created",

View file

@ -70,32 +70,32 @@
{
"type": "True",
"description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them",
"html_description": "<td><em>Optional</em>. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them</td>",
"rst_description": "*Optional*. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them</td>",
"rst_description": "*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n",
"name": "is_private",
"required": false
},
{
"type": "True",
"description": "True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only",
"html_description": "<td><em>Optional</em>. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only</td>",
"rst_description": "*Optional*. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only</td>",
"rst_description": "*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n",
"name": "is_saved",
"required": false
},
{
"type": "True",
"description": "True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only",
"html_description": "<td><em>Optional</em>. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only</td>",
"rst_description": "*Optional*. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only</td>",
"rst_description": "*Optional*. :code:`True`, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only\n",
"name": "can_be_upgraded",
"required": false
},
{
"type": "True",
"description": "True, if the gift was refunded and isn't available anymore",
"html_description": "<td><em>Optional</em>. True, if the gift was refunded and isn't available anymore</td>",
"rst_description": "*Optional*. True, if the gift was refunded and isn't available anymore\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the gift was refunded and isn't available anymore</td>",
"rst_description": "*Optional*. :code:`True`, if the gift was refunded and isn't available anymore\n",
"name": "was_refunded",
"required": false
},

View file

@ -54,16 +54,16 @@
{
"type": "True",
"description": "True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only",
"html_description": "<td><em>Optional</em>. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only</td>",
"rst_description": "*Optional*. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only</td>",
"rst_description": "*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n",
"name": "is_saved",
"required": false
},
{
"type": "True",
"description": "True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only",
"html_description": "<td><em>Optional</em>. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only</td>",
"rst_description": "*Optional*. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only</td>",
"rst_description": "*Optional*. :code:`True`, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only\n",
"name": "can_be_transferred",
"required": false
},
@ -74,6 +74,14 @@
"rst_description": "*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift\n",
"name": "transfer_star_count",
"required": false
},
{
"type": "Integer",
"description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now",
"html_description": "<td><em>Optional</em>. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now</td>",
"rst_description": "*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now\n",
"name": "next_transfer_date",
"required": false
}
],
"category": "types"

View file

@ -0,0 +1,5 @@
annotations:
next_transfer_date:
parsed_type:
type: std
name: DateTime

File diff suppressed because one or more lines are too long

View file

@ -46,16 +46,16 @@
{
"type": "True",
"description": "True, if the payment is a recurring payment for a subscription",
"html_description": "<td><em>Optional</em>. True, if the payment is a recurring payment for a subscription</td>",
"rst_description": "*Optional*. True, if the payment is a recurring payment for a subscription\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the payment is a recurring payment for a subscription</td>",
"rst_description": "*Optional*. :code:`True`, if the payment is a recurring payment for a subscription\n",
"name": "is_recurring",
"required": false
},
{
"type": "True",
"description": "True, if the payment is the first payment for a subscription",
"html_description": "<td><em>Optional</em>. True, if the payment is the first payment for a subscription</td>",
"rst_description": "*Optional*. True, if the payment is the first payment for a subscription\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the payment is the first payment for a subscription</td>",
"rst_description": "*Optional*. :code:`True`, if the payment is the first payment for a subscription\n",
"name": "is_first_recurring",
"required": false
},

View file

@ -22,32 +22,32 @@
{
"type": "Boolean",
"description": "True, if private chats with users can be chosen",
"html_description": "<td><em>Optional</em>. True, if private chats with users can be chosen</td>",
"rst_description": "*Optional*. True, if private chats with users can be chosen\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if private chats with users can be chosen</td>",
"rst_description": "*Optional*. :code:`True`, if private chats with users can be chosen\n",
"name": "allow_user_chats",
"required": false
},
{
"type": "Boolean",
"description": "True, if private chats with bots can be chosen",
"html_description": "<td><em>Optional</em>. True, if private chats with bots can be chosen</td>",
"rst_description": "*Optional*. True, if private chats with bots can be chosen\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if private chats with bots can be chosen</td>",
"rst_description": "*Optional*. :code:`True`, if private chats with bots can be chosen\n",
"name": "allow_bot_chats",
"required": false
},
{
"type": "Boolean",
"description": "True, if group and supergroup chats can be chosen",
"html_description": "<td><em>Optional</em>. True, if group and supergroup chats can be chosen</td>",
"rst_description": "*Optional*. True, if group and supergroup chats can be chosen\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if group and supergroup chats can be chosen</td>",
"rst_description": "*Optional*. :code:`True`, if group and supergroup chats can be chosen\n",
"name": "allow_group_chats",
"required": false
},
{
"type": "Boolean",
"description": "True, if channel chats can be chosen",
"html_description": "<td><em>Optional</em>. True, if channel chats can be chosen</td>",
"rst_description": "*Optional*. True, if channel chats can be chosen\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if channel chats can be chosen</td>",
"rst_description": "*Optional*. :code:`True`, if channel chats can be chosen\n",
"name": "allow_channel_chats",
"required": false
}

View file

@ -38,8 +38,8 @@
{
"type": "True",
"description": "True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.",
"html_description": "<td><em>Optional</em>. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.</td>",
"rst_description": "*Optional*. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.</td>",
"rst_description": "*Optional*. :code:`True`, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.\n",
"name": "is_manual",
"required": false
}

View file

@ -21,12 +21,20 @@
},
{
"type": "String",
"description": "Origin of the gift. Currently, either 'upgrade' or 'transfer'",
"html_description": "<td>Origin of the gift. Currently, either &#8220;upgrade&#8221; or &#8220;transfer&#8221;</td>",
"rst_description": "Origin of the gift. Currently, either 'upgrade' or 'transfer'\n",
"description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, or 'resale' for gifts bought from other users",
"html_description": "<td>Origin of the gift. Currently, either &#8220;upgrade&#8221; for gifts upgraded from regular gifts, &#8220;transfer&#8221; for gifts transferred from other users or channels, or &#8220;resale&#8221; for gifts bought from other users</td>",
"rst_description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, or 'resale' for gifts bought from other users\n",
"name": "origin",
"required": true
},
{
"type": "Integer",
"description": "For gifts bought from other users, the price paid for the gift",
"html_description": "<td><em>Optional</em>. For gifts bought from other users, the price paid for the gift</td>",
"rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift\n",
"name": "last_resale_star_count",
"required": false
},
{
"type": "String",
"description": "Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts",
@ -42,6 +50,14 @@
"rst_description": "*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift\n",
"name": "transfer_star_count",
"required": false
},
{
"type": "Integer",
"description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now",
"html_description": "<td><em>Optional</em>. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now</td>",
"rst_description": "*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now\n",
"name": "next_transfer_date",
"required": false
}
],
"category": "types"

View file

@ -0,0 +1,5 @@
annotations:
next_transfer_date:
parsed_type:
type: std
name: DateTime

View file

@ -14,8 +14,8 @@
{
"type": "Boolean",
"description": "True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess",
"html_description": "<td><em>Optional</em>. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method <a href=\"/bots/webapps#initializing-mini-apps\">requestWriteAccess</a></td>",
"rst_description": "*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the access was granted after the user accepted an explicit request from a Web App sent by the method <a href=\"/bots/webapps#initializing-mini-apps\">requestWriteAccess</a></td>",
"rst_description": "*Optional*. :code:`True`, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_\n",
"name": "from_request",
"required": false
},
@ -30,8 +30,8 @@
{
"type": "Boolean",
"description": "True, if the access was granted when the bot was added to the attachment or side menu",
"html_description": "<td><em>Optional</em>. True, if the access was granted when the bot was added to the attachment or side menu</td>",
"rst_description": "*Optional*. True, if the access was granted when the bot was added to the attachment or side menu\n",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the access was granted when the bot was added to the attachment or side menu</td>",
"rst_description": "*Optional*. :code:`True`, if the access was granted when the bot was added to the attachment or side menu\n",
"name": "from_attachment_menu",
"required": false
}

View file

@ -16,6 +16,88 @@ Changelog
.. towncrier release notes start
3.21.0 (2025-07-05)
====================
Features
--------
- Refactor methods input types to calm down MyPy. #1682
`Dict[str, Any]` is replaced with `Mapping[str, Any]` in the following methods:
- `FSMContext.set_data`
- `FSMContext.update_data`
- `BaseStorage.set_data`
- `BaseStorage.update_data`
- `BaseStorage's child methods`
- `SceneWizard.set_data`
- `SceneWizard.update_data`
`#1683 <https://github.com/aiogram/aiogram/issues/1683>`_
- Add support for `State` type in scenes methods like `goto`, `enter`, `get`
`#1685 <https://github.com/aiogram/aiogram/issues/1685>`_
- Added full support for the `Bot API 9.1 <https://core.telegram.org/bots/api-changelog#july-3-2025>`_:
**Checklists**
- Added the class :class:`aiogram.types.checklist_task.ChecklistTask` representing a task in a checklist.
- Added the class :class:`aiogram.types.checklist.Checklist` representing a checklist.
- Added the class :class:`aiogram.types.input_checklist_task.InputChecklistTask` representing a task to add to a checklist.
- Added the class :class:`aiogram.types.input_checklist.InputChecklist` representing a checklist to create.
- Added the field :code:`checklist` to the classes :class:`aiogram.types.message.Message` and :class:`aiogram.types.external_reply_info.ExternalReplyInfo`, describing a checklist in a message.
- Added the class :class:`aiogram.types.checklist_tasks_done.ChecklistTasksDone` and the field :code:`checklist_tasks_done` to the class :class:`aiogram.types.message.Message`, describing a service message about status changes for tasks in a checklist (i.e., marked as done/not done).
- Added the class :class:`aiogram.types.checklist_tasks_added.ChecklistTasksAdded` and the field :code:`checklist_tasks_added` to the class :class:`aiogram.types.message.Message`, describing a service message about the addition of new tasks to a checklist.
- Added the method :class:`aiogram.methods.send_checklist.SendChecklist`, allowing bots to send a checklist on behalf of a business account.
- Added the method :class:`aiogram.methods.edit_message_checklist.EditMessageChecklist`, allowing bots to edit a checklist on behalf of a business account.
**Gifts**
- Added the field :code:`next_transfer_date` to the classes :class:`aiogram.types.owned_gift_unique.OwnedGiftUnique` and :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`.
- Added the field :code:`last_resale_star_count` to the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`.
- Added "resale" as the possible value of the field :code:`origin` in the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`.
**General**
- Increased the maximum number of options in a poll to 12.
- Added the method :class:`aiogram.methods.get_my_star_balance.GetMyStarBalance`, allowing bots to get their current balance of Telegram Stars.
- Added the class :class:`aiogram.types.direct_message_price_changed.DirectMessagePriceChanged` and the field :code:`direct_message_price_changed` to the class :class:`aiogram.types.message.Message`, describing a service message about a price change for direct messages sent to the channel chat.
`#1704 <https://github.com/aiogram/aiogram/issues/1704>`_
Bugfixes
--------
- Fixed an issue where the scene entry handler (:code:`enter`) was not receiving data
passed to the context by middleware, which could result in a :code:`TypeError`.
Also updated the documentation to clarify how to enter the scene.
`#1672 <https://github.com/aiogram/aiogram/issues/1672>`_
- Correctly pass error message in TelegramMigrateToChat.
`#1694 <https://github.com/aiogram/aiogram/issues/1694>`_
Improved Documentation
----------------------
- Added documentation for changing state of another user in FSM
`#1633 <https://github.com/aiogram/aiogram/issues/1633>`_
Misc
----
- Fixed MyPy [return-value] error in `InlineKeyboardBuilder().as_markup()`.
`as_markup` method now overloads parent class method and uses `super()`, to call parent's
`as_markup` method.
Also added correct type hint to `as_markup`'s return in `InlineKeyboardBuilder` and
`ReplyKeyboardBuilder` classes.
`#1677 <https://github.com/aiogram/aiogram/issues/1677>`_
- Changed Babel's pinned version from minor to major.
`#1681 <https://github.com/aiogram/aiogram/issues/1681>`_
- Increased max :code:`aiohttp` version support from “<3.12” to “<3.13”
`#1700 <https://github.com/aiogram/aiogram/issues/1700>`_
3.20.0 (2025-04-14)
====================

View file

@ -1 +0,0 @@
Added documentation for changing state of another user in FSM

View file

@ -1,4 +0,0 @@
Fixed an issue where the scene entry handler (:code:`enter`) was not receiving data
passed to the context by middleware, which could result in a :code:`TypeError`.
Also updated the documentation to clarify how to enter the scene.

View file

@ -1,5 +0,0 @@
Fixed MyPy [return-value] error in `InlineKeyboardBuilder().as_markup()`.
`as_markup` method now overloads parent class method and uses `super()`, to call parent's
`as_markup` method.
Also added correct type hint to `as_markup`'s return in `InlineKeyboardBuilder` and
`ReplyKeyboardBuilder` classes.

View file

@ -1 +0,0 @@
Changed Babel's pinned version from minor to major.

View file

@ -1,11 +0,0 @@
Refactor methods input types to calm down MyPy. #1682
`Dict[str, Any]` is replaced with `Mapping[str, Any]` in the following methods:
- `FSMContext.set_data`
- `FSMContext.update_data`
- `BaseStorage.set_data`
- `BaseStorage.update_data`
- `BaseStorage's child methods`
- `SceneWizard.set_data`
- `SceneWizard.update_data`

View file

@ -1 +0,0 @@
Add support for `State` type in scenes methods like `goto`, `enter`, `get`

View file

@ -1 +0,0 @@
Correctly pass error message in TelegramMigrateToChat.

View file

@ -1 +0,0 @@
Increased max :code:`aiohttp` version support from “<3.12” to “<3.13”

View file

@ -52,7 +52,7 @@ Features
- Asynchronous (`asyncio docs <https://docs.python.org/3/library/asyncio.html>`_, :pep:`492`)
- Has type hints (:pep:`484`) and can be used with `mypy <http://mypy-lang.org/>`_
- Supports `PyPy <https://www.pypy.org/>`_
- Supports `Telegram Bot API 9.0 <https://core.telegram.org/bots/api>`_ and gets fast updates to the latest versions of the Bot API
- Supports `Telegram Bot API 9.1 <https://core.telegram.org/bots/api>`_ and gets fast updates to the latest versions of the Bot API
- Telegram Bot API integration code was `autogenerated <https://github.com/aiogram/tg-codegen>`_ and can be easily re-generated when API gets updated
- Updates router (Blueprints)
- Has Finite State Machine

View file

@ -1,2 +1,2 @@
__version__ = "3.20.0.post0"
__api_version__ = "9.0"
__version__ = "3.21.0"
__api_version__ = "9.1"

View file

@ -58,6 +58,7 @@ from ..methods import (
EditForumTopic,
EditGeneralForumTopic,
EditMessageCaption,
EditMessageChecklist,
EditMessageLiveLocation,
EditMessageMedia,
EditMessageReplyMarkup,
@ -86,6 +87,7 @@ from ..methods import (
GetMyDescription,
GetMyName,
GetMyShortDescription,
GetMyStarBalance,
GetStarTransactions,
GetStickerSet,
GetUpdates,
@ -113,6 +115,7 @@ from ..methods import (
SendAnimation,
SendAudio,
SendChatAction,
SendChecklist,
SendContact,
SendDice,
SendDocument,
@ -198,6 +201,7 @@ from ..types import (
InlineKeyboardMarkup,
InlineQueryResultsButton,
InlineQueryResultUnion,
InputChecklist,
InputFile,
InputFileUnion,
InputMediaUnion,
@ -2009,7 +2013,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param user_id: Unique identifier of the target user
:param is_anonymous: Pass :code:`True` if the administrator's presence in the chat is hidden
:param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.
:param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.
:param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users
:param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats
:param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics
@ -2019,7 +2023,7 @@ class Bot:
:param can_post_stories: Pass :code:`True` if the administrator can post stories to the chat
:param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive
:param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users
:param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only
:param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only
:param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only
:param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only
@ -2955,7 +2959,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of 2-10 answer options
:param options: A JSON-serialized list of 2-12 answer options
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param question_parse_mode: Mode for parsing entities in the question. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed
@ -4943,7 +4947,7 @@ class Bot:
request_timeout: Optional[int] = None,
) -> bool:
"""
Delete messages on behalf of a business account. Requires the *can_delete_outgoing_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.
Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#deletebusinessmessages
@ -5039,12 +5043,12 @@ class Bot:
Source: https://core.telegram.org/bots/api#getbusinessaccountgifts
:param business_connection_id: Unique identifier of the business connection
:param exclude_unsaved: Pass True to exclude gifts that aren't saved to the account's profile page
:param exclude_saved: Pass True to exclude gifts that are saved to the account's profile page
:param exclude_unlimited: Pass True to exclude gifts that can be purchased an unlimited number of times
:param exclude_limited: Pass True to exclude gifts that can be purchased a limited number of times
:param exclude_unique: Pass True to exclude unique gifts
:param sort_by_price: Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.
:param exclude_unsaved: Pass :code:`True` to exclude gifts that aren't saved to the account's profile page
:param exclude_saved: Pass :code:`True` to exclude gifts that are saved to the account's profile page
:param exclude_unlimited: Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times
:param exclude_limited: Pass :code:`True` to exclude gifts that can be purchased a limited number of times
:param exclude_unique: Pass :code:`True` to exclude unique gifts
:param sort_by_price: Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.
:param offset: Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
:param limit: The maximum number of gifts to be returned; 1-100. Defaults to 100
:param request_timeout: Request timeout
@ -5201,7 +5205,7 @@ class Bot:
Source: https://core.telegram.org/bots/api#removebusinessaccountprofilephoto
:param business_connection_id: Unique identifier of the business connection
:param is_public: Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.
:param is_public: Pass :code:`True` to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
@ -5248,7 +5252,7 @@ class Bot:
Source: https://core.telegram.org/bots/api#setbusinessaccountgiftsettings
:param business_connection_id: Unique identifier of the business connection
:param show_gift_button: Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field
:param show_gift_button: Pass :code:`True`, if a button for sending a gift to the user or by the business account must always be shown in the input field
:param accepted_gift_types: Types of gifts accepted by the business account
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
@ -5301,7 +5305,7 @@ class Bot:
:param business_connection_id: Unique identifier of the business connection
:param photo: The new profile photo to set
:param is_public: Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.
:param is_public: Pass :code:`True` to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
@ -5403,7 +5407,7 @@ class Bot:
:param business_connection_id: Unique identifier of the business connection
:param owned_gift_id: Unique identifier of the regular gift that should be upgraded to a unique one
:param keep_original_details: Pass True to keep the original gift text, sender and receiver in the upgraded gift
:param keep_original_details: Pass :code:`True` to keep the original gift text, sender and receiver in the upgraded gift
:param star_count: The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If :code:`gift.prepaid_upgrade_star_count > 0`, then pass 0, otherwise, the *can_transfer_stars* business bot right is required and :code:`gift.upgrade_star_count` must be passed.
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
@ -5416,3 +5420,92 @@ class Bot:
star_count=star_count,
)
return await self(call, request_timeout=request_timeout)
async def edit_message_checklist(
self,
business_connection_id: str,
chat_id: int,
message_id: int,
checklist: InputChecklist,
reply_markup: Optional[InlineKeyboardMarkup] = None,
request_timeout: Optional[int] = None,
) -> Message:
"""
Use this method to edit a checklist on behalf of a connected business account. On success, the edited :class:`aiogram.types.message.Message` is returned.
Source: https://core.telegram.org/bots/api#editmessagechecklist
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param chat_id: Unique identifier for the target chat
:param message_id: Unique identifier for the target message
:param checklist: A JSON-serialized object for the new checklist
:param reply_markup: A JSON-serialized object for the new inline keyboard for the message
:param request_timeout: Request timeout
:return: On success, the edited :class:`aiogram.types.message.Message` is returned.
"""
call = EditMessageChecklist(
business_connection_id=business_connection_id,
chat_id=chat_id,
message_id=message_id,
checklist=checklist,
reply_markup=reply_markup,
)
return await self(call, request_timeout=request_timeout)
async def get_my_star_balance(
self,
request_timeout: Optional[int] = None,
) -> StarAmount:
"""
A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a :class:`aiogram.types.star_amount.StarAmount` object.
Source: https://core.telegram.org/bots/api#getmystarbalance
:param request_timeout: Request timeout
:return: On success, returns a :class:`aiogram.types.star_amount.StarAmount` object.
"""
call = GetMyStarBalance()
return await self(call, request_timeout=request_timeout)
async def send_checklist(
self,
business_connection_id: str,
chat_id: int,
checklist: InputChecklist,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
message_effect_id: Optional[str] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None,
request_timeout: Optional[int] = None,
) -> Message:
"""
Use this method to send a checklist on behalf of a connected business account. On success, the sent :class:`aiogram.types.message.Message` is returned.
Source: https://core.telegram.org/bots/api#sendchecklist
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param chat_id: Unique identifier for the target chat
:param checklist: A JSON-serialized object for the checklist to send
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param message_effect_id: Unique identifier of the message effect to be added to the message
:param reply_parameters: A JSON-serialized object for description of the message to reply to
:param reply_markup: A JSON-serialized object for an inline keyboard
:param request_timeout: Request timeout
:return: On success, the sent :class:`aiogram.types.message.Message` is returned.
"""
call = SendChecklist(
business_connection_id=business_connection_id,
chat_id=chat_id,
checklist=checklist,
disable_notification=disable_notification,
protect_content=protect_content,
message_effect_id=message_effect_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
)
return await self(call, request_timeout=request_timeout)

View file

@ -19,6 +19,7 @@ class ContentType(str, Enum):
VIDEO = "video"
VIDEO_NOTE = "video_note"
VOICE = "voice"
CHECKLIST = "checklist"
CONTACT = "contact"
DICE = "dice"
GAME = "game"
@ -50,6 +51,9 @@ class ContentType(str, Enum):
PROXIMITY_ALERT_TRIGGERED = "proximity_alert_triggered"
BOOST_ADDED = "boost_added"
CHAT_BACKGROUND_SET = "chat_background_set"
CHECKLIST_TASKS_DONE = "checklist_tasks_done"
CHECKLIST_TASKS_ADDED = "checklist_tasks_added"
DIRECT_MESSAGE_PRICE_CHANGED = "direct_message_price_changed"
FORUM_TOPIC_CREATED = "forum_topic_created"
FORUM_TOPIC_EDITED = "forum_topic_edited"
FORUM_TOPIC_CLOSED = "forum_topic_closed"

View file

@ -36,6 +36,7 @@ from .edit_chat_subscription_invite_link import EditChatSubscriptionInviteLink
from .edit_forum_topic import EditForumTopic
from .edit_general_forum_topic import EditGeneralForumTopic
from .edit_message_caption import EditMessageCaption
from .edit_message_checklist import EditMessageChecklist
from .edit_message_live_location import EditMessageLiveLocation
from .edit_message_media import EditMessageMedia
from .edit_message_reply_markup import EditMessageReplyMarkup
@ -64,6 +65,7 @@ from .get_my_default_administrator_rights import GetMyDefaultAdministratorRights
from .get_my_description import GetMyDescription
from .get_my_name import GetMyName
from .get_my_short_description import GetMyShortDescription
from .get_my_star_balance import GetMyStarBalance
from .get_star_transactions import GetStarTransactions
from .get_sticker_set import GetStickerSet
from .get_updates import GetUpdates
@ -91,6 +93,7 @@ from .save_prepared_inline_message import SavePreparedInlineMessage
from .send_animation import SendAnimation
from .send_audio import SendAudio
from .send_chat_action import SendChatAction
from .send_checklist import SendChecklist
from .send_contact import SendContact
from .send_dice import SendDice
from .send_document import SendDocument
@ -191,6 +194,7 @@ __all__ = (
"EditForumTopic",
"EditGeneralForumTopic",
"EditMessageCaption",
"EditMessageChecklist",
"EditMessageLiveLocation",
"EditMessageMedia",
"EditMessageReplyMarkup",
@ -219,6 +223,7 @@ __all__ = (
"GetMyDescription",
"GetMyName",
"GetMyShortDescription",
"GetMyStarBalance",
"GetStarTransactions",
"GetStickerSet",
"GetUpdates",
@ -248,6 +253,7 @@ __all__ = (
"SendAnimation",
"SendAudio",
"SendChatAction",
"SendChecklist",
"SendContact",
"SendDice",
"SendDocument",

View file

@ -7,7 +7,7 @@ from .base import TelegramMethod
class DeleteBusinessMessages(TelegramMethod[bool]):
"""
Delete messages on behalf of a business account. Requires the *can_delete_outgoing_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.
Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#deletebusinessmessages
"""

View file

@ -0,0 +1,55 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from ..types import InlineKeyboardMarkup, InputChecklist, Message
from .base import TelegramMethod
class EditMessageChecklist(TelegramMethod[Message]):
"""
Use this method to edit a checklist on behalf of a connected business account. On success, the edited :class:`aiogram.types.message.Message` is returned.
Source: https://core.telegram.org/bots/api#editmessagechecklist
"""
__returning__ = Message
__api_method__ = "editMessageChecklist"
business_connection_id: str
"""Unique identifier of the business connection on behalf of which the message will be sent"""
chat_id: int
"""Unique identifier for the target chat"""
message_id: int
"""Unique identifier for the target message"""
checklist: InputChecklist
"""A JSON-serialized object for the new checklist"""
reply_markup: Optional[InlineKeyboardMarkup] = None
"""A JSON-serialized object for the new inline keyboard for the message"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
business_connection_id: str,
chat_id: int,
message_id: int,
checklist: InputChecklist,
reply_markup: Optional[InlineKeyboardMarkup] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
business_connection_id=business_connection_id,
chat_id=chat_id,
message_id=message_id,
checklist=checklist,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -19,17 +19,17 @@ class GetBusinessAccountGifts(TelegramMethod[OwnedGifts]):
business_connection_id: str
"""Unique identifier of the business connection"""
exclude_unsaved: Optional[bool] = None
"""Pass True to exclude gifts that aren't saved to the account's profile page"""
"""Pass :code:`True` to exclude gifts that aren't saved to the account's profile page"""
exclude_saved: Optional[bool] = None
"""Pass True to exclude gifts that are saved to the account's profile page"""
"""Pass :code:`True` to exclude gifts that are saved to the account's profile page"""
exclude_unlimited: Optional[bool] = None
"""Pass True to exclude gifts that can be purchased an unlimited number of times"""
"""Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times"""
exclude_limited: Optional[bool] = None
"""Pass True to exclude gifts that can be purchased a limited number of times"""
"""Pass :code:`True` to exclude gifts that can be purchased a limited number of times"""
exclude_unique: Optional[bool] = None
"""Pass True to exclude unique gifts"""
"""Pass :code:`True` to exclude unique gifts"""
sort_by_price: Optional[bool] = None
"""Pass True to sort results by gift price instead of send date. Sorting is applied before pagination."""
"""Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination."""
offset: Optional[str] = None
"""Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results"""
limit: Optional[int] = None

View file

@ -0,0 +1,15 @@
from __future__ import annotations
from ..types import StarAmount
from .base import TelegramMethod
class GetMyStarBalance(TelegramMethod[StarAmount]):
"""
A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a :class:`aiogram.types.star_amount.StarAmount` object.
Source: https://core.telegram.org/bots/api#getmystarbalance
"""
__returning__ = StarAmount
__api_method__ = "getMyStarBalance"

View file

@ -23,7 +23,7 @@ class PromoteChatMember(TelegramMethod[bool]):
is_anonymous: Optional[bool] = None
"""Pass :code:`True` if the administrator's presence in the chat is hidden"""
can_manage_chat: Optional[bool] = None
"""Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege."""
"""Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."""
can_delete_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can delete messages of other users"""
can_manage_video_chats: Optional[bool] = None
@ -43,7 +43,7 @@ class PromoteChatMember(TelegramMethod[bool]):
can_delete_stories: Optional[bool] = None
"""Pass :code:`True` if the administrator can delete stories posted by other users"""
can_post_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only"""
"""Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"""
can_edit_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only"""
can_pin_messages: Optional[bool] = None

View file

@ -18,7 +18,7 @@ class RemoveBusinessAccountProfilePhoto(TelegramMethod[bool]):
business_connection_id: str
"""Unique identifier of the business connection"""
is_public: Optional[bool] = None
"""Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo."""
"""Pass :code:`True` to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -0,0 +1,67 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from ..types import InlineKeyboardMarkup, InputChecklist, Message, ReplyParameters
from .base import TelegramMethod
class SendChecklist(TelegramMethod[Message]):
"""
Use this method to send a checklist on behalf of a connected business account. On success, the sent :class:`aiogram.types.message.Message` is returned.
Source: https://core.telegram.org/bots/api#sendchecklist
"""
__returning__ = Message
__api_method__ = "sendChecklist"
business_connection_id: str
"""Unique identifier of the business connection on behalf of which the message will be sent"""
chat_id: int
"""Unique identifier for the target chat"""
checklist: InputChecklist
"""A JSON-serialized object for the checklist to send"""
disable_notification: Optional[bool] = None
"""Sends the message silently. Users will receive a notification with no sound."""
protect_content: Optional[bool] = None
"""Protects the contents of the sent message from forwarding and saving"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message"""
reply_parameters: Optional[ReplyParameters] = None
"""A JSON-serialized object for description of the message to reply to"""
reply_markup: Optional[InlineKeyboardMarkup] = None
"""A JSON-serialized object for an inline keyboard"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
business_connection_id: str,
chat_id: int,
checklist: InputChecklist,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
message_effect_id: Optional[str] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
business_connection_id=business_connection_id,
chat_id=chat_id,
checklist=checklist,
disable_notification=disable_notification,
protect_content=protect_content,
message_effect_id=message_effect_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -32,7 +32,7 @@ class SendPoll(TelegramMethod[Message]):
question: str
"""Poll question, 1-300 characters"""
options: list[InputPollOptionUnion]
"""A JSON-serialized list of 2-10 answer options"""
"""A JSON-serialized list of 2-12 answer options"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None

View file

@ -19,7 +19,7 @@ class SetBusinessAccountGiftSettings(TelegramMethod[bool]):
business_connection_id: str
"""Unique identifier of the business connection"""
show_gift_button: bool
"""Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field"""
"""Pass :code:`True`, if a button for sending a gift to the user or by the business account must always be shown in the input field"""
accepted_gift_types: AcceptedGiftTypes
"""Types of gifts accepted by the business account"""

View file

@ -21,7 +21,7 @@ class SetBusinessAccountProfilePhoto(TelegramMethod[bool]):
photo: InputProfilePhotoUnion
"""The new profile photo to set"""
is_public: Optional[bool] = None
"""Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo."""
"""Pass :code:`True` to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -20,7 +20,7 @@ class UpgradeGift(TelegramMethod[bool]):
owned_gift_id: str
"""Unique identifier of the regular gift that should be upgraded to a unique one"""
keep_original_details: Optional[bool] = None
"""Pass True to keep the original gift text, sender and receiver in the upgraded gift"""
"""Pass :code:`True` to keep the original gift text, sender and receiver in the upgraded gift"""
star_count: Optional[int] = None
"""The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If :code:`gift.prepaid_upgrade_star_count > 0`, then pass 0, otherwise, the *can_transfer_stars* business bot right is required and :code:`gift.upgrade_star_count` must be passed."""

View file

@ -70,12 +70,17 @@ from .chat_member_updated import ChatMemberUpdated
from .chat_permissions import ChatPermissions
from .chat_photo import ChatPhoto
from .chat_shared import ChatShared
from .checklist import Checklist
from .checklist_task import ChecklistTask
from .checklist_tasks_added import ChecklistTasksAdded
from .checklist_tasks_done import ChecklistTasksDone
from .chosen_inline_result import ChosenInlineResult
from .contact import Contact
from .copy_text_button import CopyTextButton
from .custom import DateTime
from .date_time_union import DateTimeUnion
from .dice import Dice
from .direct_message_price_changed import DirectMessagePriceChanged
from .document import Document
from .downloadable import Downloadable
from .encrypted_credentials import EncryptedCredentials
@ -127,6 +132,8 @@ from .inline_query_result_venue import InlineQueryResultVenue
from .inline_query_result_video import InlineQueryResultVideo
from .inline_query_result_voice import InlineQueryResultVoice
from .inline_query_results_button import InlineQueryResultsButton
from .input_checklist import InputChecklist
from .input_checklist_task import InputChecklistTask
from .input_contact_message_content import InputContactMessageContent
from .input_file import BufferedInputFile, FSInputFile, InputFile, URLInputFile
from .input_file_union import InputFileUnion
@ -371,6 +378,10 @@ __all__ = (
"ChatPermissions",
"ChatPhoto",
"ChatShared",
"Checklist",
"ChecklistTask",
"ChecklistTasksAdded",
"ChecklistTasksDone",
"ChosenInlineResult",
"Contact",
"ContentType",
@ -378,6 +389,7 @@ __all__ = (
"DateTime",
"DateTimeUnion",
"Dice",
"DirectMessagePriceChanged",
"Document",
"Downloadable",
"EncryptedCredentials",
@ -430,6 +442,8 @@ __all__ = (
"InlineQueryResultVideo",
"InlineQueryResultVoice",
"InlineQueryResultsButton",
"InputChecklist",
"InputChecklistTask",
"InputContactMessageContent",
"InputFile",
"InputFileUnion",

View file

@ -13,13 +13,13 @@ class AcceptedGiftTypes(TelegramObject):
"""
unlimited_gifts: bool
"""True, if unlimited regular gifts are accepted"""
""":code:`True`, if unlimited regular gifts are accepted"""
limited_gifts: bool
"""True, if limited regular gifts are accepted"""
""":code:`True`, if limited regular gifts are accepted"""
unique_gifts: bool
"""True, if unique gifts or gifts that can be upgraded to unique for free are accepted"""
""":code:`True`, if unique gifts or gifts that can be upgraded to unique for free are accepted"""
premium_subscription: bool
"""True, if a Telegram Premium subscription is accepted"""
""":code:`True`, if a Telegram Premium subscription is accepted"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -2,6 +2,8 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from pydantic import Field
from .base import TelegramObject
@ -13,33 +15,40 @@ class BusinessBotRights(TelegramObject):
"""
can_reply: Optional[bool] = None
"""*Optional*. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours"""
"""*Optional*. :code:`True`, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours"""
can_read_messages: Optional[bool] = None
"""*Optional*. True, if the bot can mark incoming private messages as read"""
can_delete_outgoing_messages: Optional[bool] = None
"""*Optional*. True, if the bot can delete messages sent by the bot"""
"""*Optional*. :code:`True`, if the bot can mark incoming private messages as read"""
can_delete_sent_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the bot can delete messages sent by the bot"""
can_delete_all_messages: Optional[bool] = None
"""*Optional*. True, if the bot can delete all private messages in managed chats"""
"""*Optional*. :code:`True`, if the bot can delete all private messages in managed chats"""
can_edit_name: Optional[bool] = None
"""*Optional*. True, if the bot can edit the first and last name of the business account"""
"""*Optional*. :code:`True`, if the bot can edit the first and last name of the business account"""
can_edit_bio: Optional[bool] = None
"""*Optional*. True, if the bot can edit the bio of the business account"""
"""*Optional*. :code:`True`, if the bot can edit the bio of the business account"""
can_edit_profile_photo: Optional[bool] = None
"""*Optional*. True, if the bot can edit the profile photo of the business account"""
"""*Optional*. :code:`True`, if the bot can edit the profile photo of the business account"""
can_edit_username: Optional[bool] = None
"""*Optional*. True, if the bot can edit the username of the business account"""
"""*Optional*. :code:`True`, if the bot can edit the username of the business account"""
can_change_gift_settings: Optional[bool] = None
"""*Optional*. True, if the bot can change the privacy settings pertaining to gifts for the business account"""
"""*Optional*. :code:`True`, if the bot can change the privacy settings pertaining to gifts for the business account"""
can_view_gifts_and_stars: Optional[bool] = None
"""*Optional*. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account"""
"""*Optional*. :code:`True`, if the bot can view gifts and the amount of Telegram Stars owned by the business account"""
can_convert_gifts_to_stars: Optional[bool] = None
"""*Optional*. True, if the bot can convert regular gifts owned by the business account to Telegram Stars"""
"""*Optional*. :code:`True`, if the bot can convert regular gifts owned by the business account to Telegram Stars"""
can_transfer_and_upgrade_gifts: Optional[bool] = None
"""*Optional*. True, if the bot can transfer and upgrade gifts owned by the business account"""
"""*Optional*. :code:`True`, if the bot can transfer and upgrade gifts owned by the business account"""
can_transfer_stars: Optional[bool] = None
"""*Optional*. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts"""
"""*Optional*. :code:`True`, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts"""
can_manage_stories: Optional[bool] = None
"""*Optional*. True, if the bot can post, edit and delete stories on behalf of the business account"""
"""*Optional*. :code:`True`, if the bot can post, edit and delete stories on behalf of the business account"""
can_delete_outgoing_messages: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
"""*Optional*. True, if the bot can delete messages sent by the bot
.. deprecated:: API:9.1
https://core.telegram.org/bots/api-changelog#july-3-2025"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@ -50,7 +59,7 @@ class BusinessBotRights(TelegramObject):
*,
can_reply: Optional[bool] = None,
can_read_messages: Optional[bool] = None,
can_delete_outgoing_messages: Optional[bool] = None,
can_delete_sent_messages: Optional[bool] = None,
can_delete_all_messages: Optional[bool] = None,
can_edit_name: Optional[bool] = None,
can_edit_bio: Optional[bool] = None,
@ -62,6 +71,7 @@ class BusinessBotRights(TelegramObject):
can_transfer_and_upgrade_gifts: Optional[bool] = None,
can_transfer_stars: Optional[bool] = None,
can_manage_stories: Optional[bool] = None,
can_delete_outgoing_messages: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@ -71,7 +81,7 @@ class BusinessBotRights(TelegramObject):
super().__init__(
can_reply=can_reply,
can_read_messages=can_read_messages,
can_delete_outgoing_messages=can_delete_outgoing_messages,
can_delete_sent_messages=can_delete_sent_messages,
can_delete_all_messages=can_delete_all_messages,
can_edit_name=can_edit_name,
can_edit_bio=can_edit_bio,
@ -83,5 +93,6 @@ class BusinessBotRights(TelegramObject):
can_transfer_and_upgrade_gifts=can_transfer_and_upgrade_gifts,
can_transfer_stars=can_transfer_stars,
can_manage_stories=can_manage_stories,
can_delete_outgoing_messages=can_delete_outgoing_messages,
**__pydantic_kwargs,
)

View file

@ -28,7 +28,7 @@ class BusinessConnection(TelegramObject):
date: DateTime
"""Date the connection was established in Unix time"""
is_enabled: bool
"""True, if the connection is active"""
""":code:`True`, if the connection is active"""
rights: Optional[BusinessBotRights] = None
"""*Optional*. Rights of the business bot"""
can_reply: Optional[bool] = Field(None, json_schema_extra={"deprecated": True})

View file

@ -1029,7 +1029,7 @@ class Chat(TelegramObject):
:param user_id: Unique identifier of the target user
:param is_anonymous: Pass :code:`True` if the administrator's presence in the chat is hidden
:param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.
:param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.
:param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users
:param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats
:param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics
@ -1039,7 +1039,7 @@ class Chat(TelegramObject):
:param can_post_stories: Pass :code:`True` if the administrator can post stories to the chat
:param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive
:param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users
:param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only
:param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only
:param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only
:param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only

View file

@ -18,7 +18,7 @@ class ChatAdministratorRights(TelegramObject):
is_anonymous: bool
""":code:`True`, if the user's presence in the chat is hidden"""
can_manage_chat: bool
""":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege."""
""":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."""
can_delete_messages: bool
""":code:`True`, if the administrator can delete messages of other users"""
can_manage_video_chats: bool
@ -38,7 +38,7 @@ class ChatAdministratorRights(TelegramObject):
can_delete_stories: bool
""":code:`True`, if the administrator can delete stories posted by other users"""
can_post_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only"""
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"""
can_edit_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only"""
can_pin_messages: Optional[bool] = None

View file

@ -25,7 +25,7 @@ class ChatBoostSourceGiveaway(ChatBoostSource):
prize_star_count: Optional[int] = None
"""*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"""
is_unclaimed: Optional[bool] = None
"""*Optional*. True, if the giveaway was completed, but there was no user to win the prize"""
"""*Optional*. :code:`True`, if the giveaway was completed, but there was no user to win the prize"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -1724,7 +1724,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendpoll
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of 2-10 answer options
:param options: A JSON-serialized list of 2-12 answer options
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param question_parse_mode: Mode for parsing entities in the question. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed
@ -1822,7 +1822,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendpoll
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of 2-10 answer options
:param options: A JSON-serialized list of 2-12 answer options
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param question_parse_mode: Mode for parsing entities in the question. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed

View file

@ -25,7 +25,7 @@ class ChatMemberAdministrator(ChatMember):
is_anonymous: bool
""":code:`True`, if the user's presence in the chat is hidden"""
can_manage_chat: bool
""":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege."""
""":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."""
can_delete_messages: bool
""":code:`True`, if the administrator can delete messages of other users"""
can_manage_video_chats: bool
@ -45,7 +45,7 @@ class ChatMemberAdministrator(ChatMember):
can_delete_stories: bool
""":code:`True`, if the administrator can delete stories posted by other users"""
can_post_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only"""
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"""
can_edit_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only"""
can_pin_messages: Optional[bool] = None

View file

@ -38,7 +38,7 @@ class ChatMemberRestricted(ChatMember):
can_send_voice_notes: bool
""":code:`True`, if the user is allowed to send voice notes"""
can_send_polls: bool
""":code:`True`, if the user is allowed to send polls"""
""":code:`True`, if the user is allowed to send polls and checklists"""
can_send_other_messages: bool
""":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots"""
can_add_web_page_previews: bool

View file

@ -65,9 +65,9 @@ class ChatMemberUpdated(TelegramObject):
invite_link: Optional[ChatInviteLink] = None
"""*Optional*. Chat invite link, which was used by the user to join the chat; for joining by invite link events only."""
via_join_request: Optional[bool] = None
"""*Optional*. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator"""
"""*Optional*. :code:`True`, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator"""
via_chat_folder_invite_link: Optional[bool] = None
"""*Optional*. True, if the user joined the chat via a chat folder invite link"""
"""*Optional*. :code:`True`, if the user joined the chat via a chat folder invite link"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@ -908,7 +908,7 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#sendpoll
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of 2-10 answer options
:param options: A JSON-serialized list of 2-12 answer options
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param question_parse_mode: Mode for parsing entities in the question. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed

View file

@ -27,7 +27,7 @@ class ChatPermissions(MutableTelegramObject):
can_send_voice_notes: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send voice notes"""
can_send_polls: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send polls"""
"""*Optional*. :code:`True`, if the user is allowed to send polls and checklists"""
can_send_other_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots"""
can_add_web_page_previews: Optional[bool] = None

View file

@ -0,0 +1,55 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject
if TYPE_CHECKING:
from .checklist_task import ChecklistTask
from .message_entity import MessageEntity
class Checklist(TelegramObject):
"""
Describes a checklist.
Source: https://core.telegram.org/bots/api#checklist
"""
title: str
"""Title of the checklist"""
tasks: list[ChecklistTask]
"""List of tasks in the checklist"""
title_entities: Optional[list[MessageEntity]] = None
"""*Optional*. Special entities that appear in the checklist title"""
others_can_add_tasks: Optional[bool] = None
"""*Optional*. :code:`True`, if users other than the creator of the list can add tasks to the list"""
others_can_mark_tasks_as_done: Optional[bool] = None
"""*Optional*. :code:`True`, if users other than the creator of the list can mark tasks as done or not done"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
title: str,
tasks: list[ChecklistTask],
title_entities: Optional[list[MessageEntity]] = None,
others_can_add_tasks: Optional[bool] = None,
others_can_mark_tasks_as_done: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
title=title,
tasks=tasks,
title_entities=title_entities,
others_can_add_tasks=others_can_add_tasks,
others_can_mark_tasks_as_done=others_can_mark_tasks_as_done,
**__pydantic_kwargs,
)

View file

@ -0,0 +1,55 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject
if TYPE_CHECKING:
from .message_entity import MessageEntity
from .user import User
class ChecklistTask(TelegramObject):
"""
Describes a task in a checklist.
Source: https://core.telegram.org/bots/api#checklisttask
"""
id: int
"""Unique identifier of the task"""
text: str
"""Text of the task"""
text_entities: Optional[list[MessageEntity]] = None
"""*Optional*. Special entities that appear in the task text"""
completed_by_user: Optional[User] = None
"""*Optional*. User that completed the task; omitted if the task wasn't completed"""
completion_date: Optional[int] = None
"""*Optional*. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
id: int,
text: str,
text_entities: Optional[list[MessageEntity]] = None,
completed_by_user: Optional[User] = None,
completion_date: Optional[int] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
id=id,
text=text,
text_entities=text_entities,
completed_by_user=completed_by_user,
completion_date=completion_date,
**__pydantic_kwargs,
)

View file

@ -0,0 +1,39 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject
if TYPE_CHECKING:
from .checklist_task import ChecklistTask
from .message import Message
class ChecklistTasksAdded(TelegramObject):
"""
Describes a service message about tasks added to a checklist.
Source: https://core.telegram.org/bots/api#checklisttasksadded
"""
tasks: list[ChecklistTask]
"""List of tasks added to the checklist"""
checklist_message: Optional[Message] = None
"""*Optional*. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
tasks: list[ChecklistTask],
checklist_message: Optional[Message] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(tasks=tasks, checklist_message=checklist_message, **__pydantic_kwargs)

View file

@ -0,0 +1,46 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject
if TYPE_CHECKING:
from .message import Message
class ChecklistTasksDone(TelegramObject):
"""
Describes a service message about checklist tasks marked as done or not done.
Source: https://core.telegram.org/bots/api#checklisttasksdone
"""
checklist_message: Optional[Message] = None
"""*Optional*. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply."""
marked_as_done_task_ids: Optional[list[int]] = None
"""*Optional*. Identifiers of the tasks that were marked as done"""
marked_as_not_done_task_ids: Optional[list[int]] = None
"""*Optional*. Identifiers of the tasks that were marked as not done"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
checklist_message: Optional[Message] = None,
marked_as_done_task_ids: Optional[list[int]] = None,
marked_as_not_done_task_ids: Optional[list[int]] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
checklist_message=checklist_message,
marked_as_done_task_ids=marked_as_done_task_ids,
marked_as_not_done_task_ids=marked_as_not_done_task_ids,
**__pydantic_kwargs,
)

View file

@ -0,0 +1,39 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject
class DirectMessagePriceChanged(TelegramObject):
"""
Describes a service message about a change in the price of direct messages sent to a channel chat.
Source: https://core.telegram.org/bots/api#directmessagepricechanged
"""
are_direct_messages_enabled: bool
""":code:`True`, if direct messages are enabled for the channel chat; false otherwise"""
direct_message_star_count: Optional[int] = None
"""*Optional*. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
are_direct_messages_enabled: bool,
direct_message_star_count: Optional[int] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
are_direct_messages_enabled=are_direct_messages_enabled,
direct_message_star_count=direct_message_star_count,
**__pydantic_kwargs,
)

View file

@ -8,6 +8,7 @@ if TYPE_CHECKING:
from .animation import Animation
from .audio import Audio
from .chat import Chat
from .checklist import Checklist
from .contact import Contact
from .dice import Dice
from .document import Document
@ -66,6 +67,8 @@ class ExternalReplyInfo(TelegramObject):
"""*Optional*. Message is a voice message, information about the file"""
has_media_spoiler: Optional[bool] = None
"""*Optional*. :code:`True`, if the message media is covered by a spoiler animation"""
checklist: Optional[Checklist] = None
"""*Optional*. Message is a checklist"""
contact: Optional[Contact] = None
"""*Optional*. Message is a shared contact, information about the contact"""
dice: Optional[Dice] = None
@ -107,6 +110,7 @@ class ExternalReplyInfo(TelegramObject):
video_note: Optional[VideoNote] = None,
voice: Optional[Voice] = None,
has_media_spoiler: Optional[bool] = None,
checklist: Optional[Checklist] = None,
contact: Optional[Contact] = None,
dice: Optional[Dice] = None,
game: Optional[Game] = None,
@ -138,6 +142,7 @@ class ExternalReplyInfo(TelegramObject):
video_note=video_note,
voice=voice,
has_media_spoiler=has_media_spoiler,
checklist=checklist,
contact=contact,
dice=dice,
game=game,

View file

@ -25,13 +25,13 @@ class GiftInfo(TelegramObject):
prepaid_upgrade_star_count: Optional[int] = None
"""*Optional*. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift"""
can_be_upgraded: Optional[bool] = None
"""*Optional*. True, if the gift can be upgraded to a unique gift"""
"""*Optional*. :code:`True`, if the gift can be upgraded to a unique gift"""
text: Optional[str] = None
"""*Optional*. Text of the message that was added to the gift"""
entities: Optional[list[MessageEntity]] = None
"""*Optional*. Special entities that appear in the text"""
is_private: Optional[bool] = None
"""*Optional*. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"""
"""*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -1687,7 +1687,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#sendpoll
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of 2-10 answer options
:param options: A JSON-serialized list of 2-12 answer options
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param question_parse_mode: Mode for parsing entities in the question. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed
@ -1788,7 +1788,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#sendpoll
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of 2-10 answer options
:param options: A JSON-serialized list of 2-12 answer options
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param question_parse_mode: Mode for parsing entities in the question. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed

View file

@ -0,0 +1,59 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject
if TYPE_CHECKING:
from .input_checklist_task import InputChecklistTask
from .message_entity import MessageEntity
class InputChecklist(TelegramObject):
"""
Describes a checklist to create.
Source: https://core.telegram.org/bots/api#inputchecklist
"""
title: str
"""Title of the checklist; 1-255 characters after entities parsing"""
tasks: list[InputChecklistTask]
"""List of 1-30 tasks in the checklist"""
parse_mode: Optional[str] = None
"""Optional. Mode for parsing entities in the title. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
title_entities: Optional[list[MessageEntity]] = None
"""*Optional*. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are allowed."""
others_can_add_tasks: Optional[bool] = None
"""*Optional*. Pass :code:`True` if other users can add tasks to the checklist"""
others_can_mark_tasks_as_done: Optional[bool] = None
"""*Optional*. Pass :code:`True` if other users can mark tasks as done or not done in the checklist"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
title: str,
tasks: list[InputChecklistTask],
parse_mode: Optional[str] = None,
title_entities: Optional[list[MessageEntity]] = None,
others_can_add_tasks: Optional[bool] = None,
others_can_mark_tasks_as_done: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
title=title,
tasks=tasks,
parse_mode=parse_mode,
title_entities=title_entities,
others_can_add_tasks=others_can_add_tasks,
others_can_mark_tasks_as_done=others_can_mark_tasks_as_done,
**__pydantic_kwargs,
)

View file

@ -0,0 +1,50 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject
if TYPE_CHECKING:
from .message_entity import MessageEntity
class InputChecklistTask(TelegramObject):
"""
Describes a task to add to a checklist.
Source: https://core.telegram.org/bots/api#inputchecklisttask
"""
id: int
"""Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist"""
text: str
"""Text of the task; 1-100 characters after entities parsing"""
parse_mode: Optional[str] = None
"""Optional. Mode for parsing entities in the text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
text_entities: Optional[list[MessageEntity]] = None
"""*Optional*. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are allowed."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
id: int,
text: str,
parse_mode: Optional[str] = None,
text_entities: Optional[list[MessageEntity]] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
id=id,
text=text,
parse_mode=parse_mode,
text_entities=text_entities,
**__pydantic_kwargs,
)

View file

@ -16,7 +16,7 @@ class InputProfilePhotoAnimated(InputProfilePhoto):
"""
type: Literal[InputProfilePhotoType.ANIMATED] = InputProfilePhotoType.ANIMATED
"""Type of the profile photo, must be 'animated'"""
"""Type of the profile photo, must be *animated*"""
animation: InputFileUnion
"""The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the photo was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
main_frame_timestamp: Optional[float] = None

View file

@ -16,7 +16,7 @@ class InputProfilePhotoStatic(InputProfilePhoto):
"""
type: Literal[InputProfilePhotoType.STATIC] = InputProfilePhotoType.STATIC
"""Type of the profile photo, must be 'static'"""
"""Type of the profile photo, must be *static*"""
photo: InputFileUnion
"""The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the photo was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""

View file

@ -15,7 +15,7 @@ class InputStoryContentPhoto(InputStoryContent):
"""
type: Literal[InputStoryContentType.PHOTO] = InputStoryContentType.PHOTO
"""Type of the content, must be 'photo'"""
"""Type of the content, must be *photo*"""
photo: str
"""The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the photo was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""

View file

@ -15,7 +15,7 @@ class InputStoryContentVideo(InputStoryContent):
"""
type: Literal[InputStoryContentType.VIDEO] = InputStoryContentType.VIDEO
"""Type of the content, must be 'video'"""
"""Type of the content, must be *video*"""
video: str
"""The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the video was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`"""
duration: Optional[float] = None

View file

@ -56,9 +56,13 @@ if TYPE_CHECKING:
from .chat_boost_added import ChatBoostAdded
from .chat_id_union import ChatIdUnion
from .chat_shared import ChatShared
from .checklist import Checklist
from .checklist_tasks_added import ChecklistTasksAdded
from .checklist_tasks_done import ChecklistTasksDone
from .contact import Contact
from .date_time_union import DateTimeUnion
from .dice import Dice
from .direct_message_price_changed import DirectMessagePriceChanged
from .document import Document
from .external_reply_info import ExternalReplyInfo
from .forum_topic_closed import ForumTopicClosed
@ -164,7 +168,7 @@ class Message(MaybeInaccessibleMessage):
has_protected_content: Optional[bool] = None
"""*Optional*. :code:`True`, if the message can't be forwarded"""
is_from_offline: Optional[bool] = None
"""*Optional*. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"""
"""*Optional*. :code:`True`, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"""
media_group_id: Optional[str] = None
"""*Optional*. The unique identifier of a media message group this message belongs to"""
author_signature: Optional[str] = None
@ -204,9 +208,11 @@ class Message(MaybeInaccessibleMessage):
caption_entities: Optional[list[MessageEntity]] = None
"""*Optional*. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"""
show_caption_above_media: Optional[bool] = None
"""*Optional*. True, if the caption must be shown above the message media"""
"""*Optional*. :code:`True`, if the caption must be shown above the message media"""
has_media_spoiler: Optional[bool] = None
"""*Optional*. :code:`True`, if the message media is covered by a spoiler animation"""
checklist: Optional[Checklist] = None
"""*Optional*. Message is a checklist"""
contact: Optional[Contact] = None
"""*Optional*. Message is a shared contact, information about the contact"""
dice: Optional[Dice] = None
@ -269,6 +275,12 @@ class Message(MaybeInaccessibleMessage):
"""*Optional*. Service message: user boosted the chat"""
chat_background_set: Optional[ChatBackground] = None
"""*Optional*. Service message: chat background set"""
checklist_tasks_done: Optional[ChecklistTasksDone] = None
"""*Optional*. Service message: some tasks in a checklist were marked as done or not done"""
checklist_tasks_added: Optional[ChecklistTasksAdded] = None
"""*Optional*. Service message: tasks were added to a checklist"""
direct_message_price_changed: Optional[DirectMessagePriceChanged] = None
"""*Optional*. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"""
forum_topic_created: Optional[ForumTopicCreated] = None
"""*Optional*. Service message: forum topic created"""
forum_topic_edited: Optional[ForumTopicEdited] = None
@ -387,6 +399,7 @@ class Message(MaybeInaccessibleMessage):
caption_entities: Optional[list[MessageEntity]] = None,
show_caption_above_media: Optional[bool] = None,
has_media_spoiler: Optional[bool] = None,
checklist: Optional[Checklist] = None,
contact: Optional[Contact] = None,
dice: Optional[Dice] = None,
game: Optional[Game] = None,
@ -418,6 +431,9 @@ class Message(MaybeInaccessibleMessage):
proximity_alert_triggered: Optional[ProximityAlertTriggered] = None,
boost_added: Optional[ChatBoostAdded] = None,
chat_background_set: Optional[ChatBackground] = None,
checklist_tasks_done: Optional[ChecklistTasksDone] = None,
checklist_tasks_added: Optional[ChecklistTasksAdded] = None,
direct_message_price_changed: Optional[DirectMessagePriceChanged] = None,
forum_topic_created: Optional[ForumTopicCreated] = None,
forum_topic_edited: Optional[ForumTopicEdited] = None,
forum_topic_closed: Optional[ForumTopicClosed] = None,
@ -490,6 +506,7 @@ class Message(MaybeInaccessibleMessage):
caption_entities=caption_entities,
show_caption_above_media=show_caption_above_media,
has_media_spoiler=has_media_spoiler,
checklist=checklist,
contact=contact,
dice=dice,
game=game,
@ -521,6 +538,9 @@ class Message(MaybeInaccessibleMessage):
proximity_alert_triggered=proximity_alert_triggered,
boost_added=boost_added,
chat_background_set=chat_background_set,
checklist_tasks_done=checklist_tasks_done,
checklist_tasks_added=checklist_tasks_added,
direct_message_price_changed=direct_message_price_changed,
forum_topic_created=forum_topic_created,
forum_topic_edited=forum_topic_edited,
forum_topic_closed=forum_topic_closed,
@ -570,6 +590,8 @@ class Message(MaybeInaccessibleMessage):
return ContentType.VIDEO_NOTE
if self.voice:
return ContentType.VOICE
if self.checklist:
return ContentType.CHECKLIST
if self.contact:
return ContentType.CONTACT
if self.venue:
@ -660,6 +682,12 @@ class Message(MaybeInaccessibleMessage):
return ContentType.CHAT_BACKGROUND_SET
if self.boost_added:
return ContentType.BOOST_ADDED
if self.checklist_tasks_done:
return ContentType.CHECKLIST_TASKS_DONE
if self.checklist_tasks_added:
return ContentType.CHECKLIST_TASKS_ADDED
if self.direct_message_price_changed:
return ContentType.DIRECT_MESSAGE_PRICE_CHANGED
if self.refunded_payment:
return ContentType.REFUNDED_PAYMENT
if self.gift:
@ -2281,7 +2309,7 @@ class Message(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#sendpoll
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of 2-10 answer options
:param options: A JSON-serialized list of 2-12 answer options
:param question_parse_mode: Mode for parsing entities in the question. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed
:param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
@ -2378,7 +2406,7 @@ class Message(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#sendpoll
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of 2-10 answer options
:param options: A JSON-serialized list of 2-12 answer options
:param question_parse_mode: Mode for parsing entities in the question. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed
:param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`

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