Added full support of Bot API 7.9 (#1560)

* Added full support of Bot API 7.9

* Added changelog

* Try to fix towncrier

* Fixed towncrier check
This commit is contained in:
Alex Root Junior 2024-08-16 00:44:40 +03:00 committed by GitHub
parent 1c323ecc97
commit c3a08664d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 817 additions and 114 deletions

View file

@ -1,7 +1,7 @@
{
"api": {
"version": "7.8",
"release_date": "2024-07-31"
"version": "7.9",
"release_date": "2024-08-14"
},
"items": [
{
@ -993,17 +993,17 @@
},
{
"type": "User",
"description": "Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.",
"html_description": "<td><em>Optional</em>. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.</td>",
"rst_description": "*Optional*. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.\n",
"description": "Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats",
"html_description": "<td><em>Optional</em>. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats</td>",
"rst_description": "*Optional*. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats\n",
"name": "from",
"required": false
},
{
"type": "Chat",
"description": "Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.",
"html_description": "<td><em>Optional</em>. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field <em>from</em> contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.</td>",
"rst_description": "*Optional*. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field *from* contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.\n",
"description": "Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.",
"html_description": "<td><em>Optional</em>. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field <em>from</em> contains a fake sender user in non-channel chats.</td>",
"rst_description": "*Optional*. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field *from* contains a fake sender user in non-channel chats.\n",
"name": "sender_chat",
"required": false
},
@ -5572,6 +5572,14 @@
"rst_description": "Information about the user\n",
"name": "user",
"required": true
},
{
"type": "Integer",
"description": "Date when the user's subscription will expire; Unix time",
"html_description": "<td><em>Optional</em>. Date when the user's subscription will expire; Unix time</td>",
"rst_description": "*Optional*. Date when the user's subscription will expire; Unix time\n",
"name": "until_date",
"required": false
}
],
"category": "types"
@ -6145,9 +6153,9 @@
{
"anchor": "reactiontype",
"name": "ReactionType",
"description": "This object describes the type of a reaction. Currently, it can be one of\n - ReactionTypeEmoji\n - ReactionTypeCustomEmoji",
"html_description": "<p>This object describes the type of a reaction. Currently, it can be one of</p><ul>\n<li><a href=\"#reactiontypeemoji\">ReactionTypeEmoji</a></li>\n<li><a href=\"#reactiontypecustomemoji\">ReactionTypeCustomEmoji</a></li>\n</ul>",
"rst_description": "This object describes the type of a reaction. Currently, it can be one of\n\n - :class:`aiogram.types.reaction_type_emoji.ReactionTypeEmoji`\n - :class:`aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji`",
"description": "This object describes the type of a reaction. Currently, it can be one of\n - ReactionTypeEmoji\n - ReactionTypeCustomEmoji\n - ReactionTypePaid",
"html_description": "<p>This object describes the type of a reaction. Currently, it can be one of</p><ul>\n<li><a href=\"#reactiontypeemoji\">ReactionTypeEmoji</a></li>\n<li><a href=\"#reactiontypecustomemoji\">ReactionTypeCustomEmoji</a></li>\n<li><a href=\"#reactiontypepaid\">ReactionTypePaid</a></li>\n</ul>",
"rst_description": "This object describes the type of a reaction. Currently, it can be one of\n\n - :class:`aiogram.types.reaction_type_emoji.ReactionTypeEmoji`\n - :class:`aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji`\n - :class:`aiogram.types.reaction_type_paid.ReactionTypePaid`",
"annotations": [],
"category": "types"
},
@ -6203,6 +6211,24 @@
],
"category": "types"
},
{
"anchor": "reactiontypepaid",
"name": "ReactionTypePaid",
"description": "The reaction is paid.",
"html_description": "<p>The reaction is paid.</p>",
"rst_description": "The reaction is paid.",
"annotations": [
{
"type": "String",
"description": "Type of the reaction, always 'paid'",
"html_description": "<td>Type of the reaction, always &#8220;paid&#8221;</td>",
"rst_description": "Type of the reaction, always 'paid'\n",
"name": "type",
"required": true
}
],
"category": "types"
},
{
"anchor": "reactioncount",
"name": "ReactionCount",
@ -8940,16 +8966,24 @@
{
"anchor": "sendpaidmedia",
"name": "sendPaidMedia",
"description": "Use this method to send paid media to channel chats. On success, the sent Message is returned.",
"html_description": "<p>Use this method to send paid media to channel chats. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send paid media to channel chats. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"description": "Use this method to send paid media. On success, the sent Message is returned.",
"html_description": "<p>Use this method to send paid media. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"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 or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.\n",
"name": "chat_id"
},
{
@ -9788,9 +9822,9 @@
{
"anchor": "setmessagereaction",
"name": "setMessageReaction",
"description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.",
"html_description": "<p>Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns :code:`True` on success.",
"description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.",
"html_description": "<p>Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
@ -9811,9 +9845,9 @@
{
"type": "Array of ReactionType",
"required": false,
"description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.",
"html_description": "<td>A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.</td>",
"rst_description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.\n",
"description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.",
"html_description": "<td>A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.</td>",
"rst_description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.\n",
"name": "reaction"
},
{
@ -10397,6 +10431,82 @@
],
"category": "methods"
},
{
"anchor": "createchatsubscriptioninvitelink",
"name": "createChatSubscriptionInviteLink",
"description": "Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.",
"html_description": "<p>Use this method to create a <a href=\"https://telegram.org/blog/superchannels-star-reactions-subscriptions#star-subscriptions\">subscription invite link</a> for a channel chat. The bot must have the <em>can_invite_users</em> administrator rights. The link can be edited using the method <a href=\"#editchatsubscriptioninvitelink\">editChatSubscriptionInviteLink</a> or revoked using the method <a href=\"#revokechatinvitelink\">revokeChatInviteLink</a>. Returns the new invite link as a <a href=\"#chatinvitelink\">ChatInviteLink</a> object.</p>",
"rst_description": "Use this method to create a `subscription invite link <https://telegram.org/blog/superchannels-star-reactions-subscriptions#star-subscriptions>`_ for a channel chat. The bot must have the *can_invite_users* administrator rights. The link can be edited using the method :class:`aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink` or revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target channel chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target channel chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "String",
"required": false,
"description": "Invite link name; 0-32 characters",
"html_description": "<td>Invite link name; 0-32 characters</td>",
"rst_description": "Invite link name; 0-32 characters\n",
"name": "name"
},
{
"type": "Integer",
"required": true,
"description": "The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).",
"html_description": "<td>The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).</td>",
"rst_description": "The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).\n",
"name": "subscription_period"
},
{
"type": "Integer",
"required": true,
"description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500",
"html_description": "<td>The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500</td>",
"rst_description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500\n",
"name": "subscription_price"
}
],
"category": "methods"
},
{
"anchor": "editchatsubscriptioninvitelink",
"name": "editChatSubscriptionInviteLink",
"description": "Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.",
"html_description": "<p>Use this method to edit a subscription invite link created by the bot. The bot must have the <em>can_invite_users</em> administrator rights. Returns the edited invite link as a <a href=\"#chatinvitelink\">ChatInviteLink</a> object.</p>",
"rst_description": "Use this method to edit a subscription invite link created by the bot. The bot must have the *can_invite_users* administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "String",
"required": true,
"description": "The invite link to edit",
"html_description": "<td>The invite link to edit</td>",
"rst_description": "The invite link to edit\n",
"name": "invite_link"
},
{
"type": "String",
"required": false,
"description": "Invite link name; 0-32 characters",
"html_description": "<td>Invite link name; 0-32 characters</td>",
"rst_description": "Invite link name; 0-32 characters\n",
"name": "name"
}
],
"category": "methods"
},
{
"anchor": "revokechatinvitelink",
"name": "revokeChatInviteLink",
@ -10861,9 +10971,9 @@
{
"anchor": "editforumtopic",
"name": "editForumTopic",
"description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.",
"html_description": "<p>Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.",
"description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.",
"html_description": "<p>Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
@ -11007,9 +11117,9 @@
{
"anchor": "editgeneralforumtopic",
"name": "editGeneralForumTopic",
"description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.",
"html_description": "<p>Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have <em>can_manage_topics</em> administrator rights. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights. Returns :code:`True` on success.",
"description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.",
"html_description": "<p>Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
@ -16586,6 +16696,14 @@
"rst_description": "*Optional*. Bot-specified invoice payload\n",
"name": "invoice_payload",
"required": false
},
{
"type": "Array of PaidMedia",
"description": "Information about the paid media bought by the user",
"html_description": "<td><em>Optional</em>. Information about the paid media bought by the user</td>",
"rst_description": "*Optional*. Information about the paid media bought by the user\n",
"name": "paid_media",
"required": false
}
],
"category": "types"