mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 16:15:51 +00:00
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
This commit is contained in:
parent
77ca49518e
commit
f060c08d16
117 changed files with 2565 additions and 466 deletions
|
|
@ -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",
|
||||
|
|
|
|||
57
.butcher/methods/editMessageChecklist/entity.json
Normal file
57
.butcher/methods/editMessageChecklist/entity.json
Normal 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"
|
||||
}
|
||||
}
|
||||
|
|
@ -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"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
16
.butcher/methods/getMyStarBalance/entity.json
Normal file
16
.butcher/methods/getMyStarBalance/entity.json
Normal 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"
|
||||
}
|
||||
}
|
||||
|
|
@ -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"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
81
.butcher/methods/sendChecklist/entity.json
Normal file
81
.butcher/methods/sendChecklist/entity.json
Normal 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"
|
||||
}
|
||||
}
|
||||
|
|
@ -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"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue