diff --git a/.butcher/methods/copyMessage/entity.json b/.butcher/methods/copyMessage/entity.json
index 2a68a358..3818a19b 100644
--- a/.butcher/methods/copyMessage/entity.json
+++ b/.butcher/methods/copyMessage/entity.json
@@ -22,9 +22,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "
`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n",
"name": "allow_paid_broadcast"
},
+ {
+ "type": "String",
+ "required": false,
+ "description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats",
+ "html_description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats | ",
+ "rst_description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats\n",
+ "name": "message_effect_id"
+ },
{
"type": "SuggestedPostParameters",
"required": false,
diff --git a/.butcher/methods/copyMessages/entity.json b/.butcher/methods/copyMessages/entity.json
index 28fde87e..c6b38dc8 100644
--- a/.butcher/methods/copyMessages/entity.json
+++ b/.butcher/methods/copyMessages/entity.json
@@ -22,9 +22,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/deleteForumTopic/entity.json b/.butcher/methods/deleteForumTopic/entity.json
index 4e231d5b..5afe09b0 100644
--- a/.butcher/methods/deleteForumTopic/entity.json
+++ b/.butcher/methods/deleteForumTopic/entity.json
@@ -7,9 +7,9 @@
"object": {
"anchor": "deleteforumtopic",
"name": "deleteForumTopic",
- "description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.",
- "html_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.
",
- "rst_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.",
+ "description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.",
+ "html_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.
",
+ "rst_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
diff --git a/.butcher/methods/editForumTopic/entity.json b/.butcher/methods/editForumTopic/entity.json
index 02261e1f..ebbdfbe3 100644
--- a/.butcher/methods/editForumTopic/entity.json
+++ b/.butcher/methods/editForumTopic/entity.json
@@ -7,9 +7,9 @@
"object": {
"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 the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.",
- "html_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.
",
- "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.",
+ "description": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a 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": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a 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.
",
+ "rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a 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",
diff --git a/.butcher/methods/forwardMessage/entity.json b/.butcher/methods/forwardMessage/entity.json
index 5237d730..13bd8cb4 100644
--- a/.butcher/methods/forwardMessage/entity.json
+++ b/.butcher/methods/forwardMessage/entity.json
@@ -22,9 +22,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -67,6 +67,14 @@
"rst_description": "Protects the contents of the forwarded 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; only available when forwarding to private chats",
+ "html_description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats | ",
+ "rst_description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats\n",
+ "name": "message_effect_id"
+ },
{
"type": "SuggestedPostParameters",
"required": false,
diff --git a/.butcher/methods/forwardMessages/entity.json b/.butcher/methods/forwardMessages/entity.json
index 8e4fe1c7..c08b6722 100644
--- a/.butcher/methods/forwardMessages/entity.json
+++ b/.butcher/methods/forwardMessages/entity.json
@@ -22,9 +22,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/getBusinessAccountGifts/entity.json b/.butcher/methods/getBusinessAccountGifts/entity.json
index 1d61c1f3..0ff3d056 100644
--- a/.butcher/methods/getBusinessAccountGifts/entity.json
+++ b/.butcher/methods/getBusinessAccountGifts/entity.json
@@ -46,10 +46,18 @@
{
"type": "Boolean",
"required": false,
- "description": "Pass True to exclude gifts that can be purchased a limited number of times",
- "html_description": "Pass True to exclude gifts that can be purchased a limited number of times | ",
- "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times\n",
- "name": "exclude_limited"
+ "description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n",
+ "name": "exclude_limited_upgradable"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n",
+ "name": "exclude_limited_non_upgradable"
},
{
"type": "Boolean",
@@ -59,6 +67,14 @@
"rst_description": "Pass :code:`True` to exclude unique gifts\n",
"name": "exclude_unique"
},
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram",
+ "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n",
+ "name": "exclude_from_blockchain"
+ },
{
"type": "Boolean",
"required": false,
@@ -82,6 +98,18 @@
"html_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100 | ",
"rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n",
"name": "limit"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that can be purchased a limited number of times",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times\n",
+ "name": "exclude_limited",
+ "deprecated": {
+ "version": "9.3",
+ "release_date": "2025-12-31"
+ }
}
],
"category": "methods"
diff --git a/.butcher/methods/getChatGifts/entity.json b/.butcher/methods/getChatGifts/entity.json
new file mode 100644
index 00000000..e3c13c21
--- /dev/null
+++ b/.butcher/methods/getChatGifts/entity.json
@@ -0,0 +1,105 @@
+{
+ "meta": {},
+ "group": {
+ "title": "Available methods",
+ "anchor": "available-methods"
+ },
+ "object": {
+ "anchor": "getchatgifts",
+ "name": "getChatGifts",
+ "description": "Returns the gifts owned by a chat. Returns OwnedGifts on success.",
+ "html_description": "Returns the gifts owned by a chat. Returns OwnedGifts on success.
",
+ "rst_description": "Returns the gifts owned by a chat. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.",
+ "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": "Unique identifier for the target chat or username of the target channel (in the format @channelusername) | ",
+ "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
+ "name": "chat_id"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that aren't saved to the chat's profile page. Always True, unless the bot has the can_post_messages administrator right in the channel.",
+ "html_description": "Pass True to exclude gifts that aren't saved to the chat's profile page. Always True, unless the bot has the can_post_messages administrator right in the channel. | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that aren't saved to the chat's profile page. Always :code:`True`, unless the bot has the *can_post_messages* administrator right in the channel.\n",
+ "name": "exclude_unsaved"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that are saved to the chat's profile page. Always False, unless the bot has the can_post_messages administrator right in the channel.",
+ "html_description": "Pass True to exclude gifts that are saved to the chat's profile page. Always False, unless the bot has the can_post_messages administrator right in the channel. | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that are saved to the chat's profile page. Always :code:`False`, unless the bot has the *can_post_messages* administrator right in the channel.\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": "Pass True to exclude gifts that can be purchased an unlimited number of times | ",
+ "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 and can be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n",
+ "name": "exclude_limited_upgradable"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n",
+ "name": "exclude_limited_non_upgradable"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram",
+ "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n",
+ "name": "exclude_from_blockchain"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude unique gifts",
+ "html_description": "Pass True to exclude unique gifts | ",
+ "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": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. | ",
+ "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"
+ },
+ {
+ "type": "String",
+ "required": false,
+ "description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results",
+ "html_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results | ",
+ "rst_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results\n",
+ "name": "offset"
+ },
+ {
+ "type": "Integer",
+ "required": false,
+ "description": "The maximum number of gifts to be returned; 1-100. Defaults to 100",
+ "html_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100 | ",
+ "rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n",
+ "name": "limit"
+ }
+ ],
+ "category": "methods"
+ }
+}
diff --git a/.butcher/methods/getUserGifts/entity.json b/.butcher/methods/getUserGifts/entity.json
new file mode 100644
index 00000000..87b76f34
--- /dev/null
+++ b/.butcher/methods/getUserGifts/entity.json
@@ -0,0 +1,89 @@
+{
+ "meta": {},
+ "group": {
+ "title": "Available methods",
+ "anchor": "available-methods"
+ },
+ "object": {
+ "anchor": "getusergifts",
+ "name": "getUserGifts",
+ "description": "Returns the gifts owned and hosted by a user. Returns OwnedGifts on success.",
+ "html_description": "Returns the gifts owned and hosted by a user. Returns OwnedGifts on success.
",
+ "rst_description": "Returns the gifts owned and hosted by a user. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.",
+ "annotations": [
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Unique identifier of the user",
+ "html_description": "Unique identifier of the user | ",
+ "rst_description": "Unique identifier of the user\n",
+ "name": "user_id"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that can be purchased an unlimited number of times",
+ "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times | ",
+ "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 and can be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n",
+ "name": "exclude_limited_upgradable"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n",
+ "name": "exclude_limited_non_upgradable"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram",
+ "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n",
+ "name": "exclude_from_blockchain"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude unique gifts",
+ "html_description": "Pass True to exclude unique gifts | ",
+ "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": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. | ",
+ "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"
+ },
+ {
+ "type": "String",
+ "required": false,
+ "description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results",
+ "html_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results | ",
+ "rst_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results\n",
+ "name": "offset"
+ },
+ {
+ "type": "Integer",
+ "required": false,
+ "description": "The maximum number of gifts to be returned; 1-100. Defaults to 100",
+ "html_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100 | ",
+ "rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n",
+ "name": "limit"
+ }
+ ],
+ "category": "methods"
+ }
+}
diff --git a/.butcher/methods/promoteChatMember/entity.json b/.butcher/methods/promoteChatMember/entity.json
index fc12f7a1..4f0e4480 100644
--- a/.butcher/methods/promoteChatMember/entity.json
+++ b/.butcher/methods/promoteChatMember/entity.json
@@ -62,9 +62,9 @@
{
"type": "Boolean",
"required": false,
- "description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics",
- "html_description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics | ",
- "rst_description": "Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics\n",
+ "description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to True for promotions of channel administrators",
+ "html_description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to True for promotions of channel administrators | ",
+ "rst_description": "Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to :code:`True` for promotions of channel administrators\n",
"name": "can_restrict_members"
},
{
diff --git a/.butcher/methods/repostStory/entity.json b/.butcher/methods/repostStory/entity.json
new file mode 100644
index 00000000..198c0779
--- /dev/null
+++ b/.butcher/methods/repostStory/entity.json
@@ -0,0 +1,65 @@
+{
+ "meta": {},
+ "group": {
+ "title": "Available methods",
+ "anchor": "available-methods"
+ },
+ "object": {
+ "anchor": "repoststory",
+ "name": "repostStory",
+ "description": "Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success.",
+ "html_description": "Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success.
",
+ "rst_description": "Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the *can_manage_stories* business bot right for both business accounts. Returns :class:`aiogram.types.story.Story` on success.",
+ "annotations": [
+ {
+ "type": "String",
+ "required": true,
+ "description": "Unique identifier of the business connection",
+ "html_description": "Unique identifier of the business connection | ",
+ "rst_description": "Unique identifier of the business connection\n",
+ "name": "business_connection_id"
+ },
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Unique identifier of the chat which posted the story that should be reposted",
+ "html_description": "Unique identifier of the chat which posted the story that should be reposted | ",
+ "rst_description": "Unique identifier of the chat which posted the story that should be reposted\n",
+ "name": "from_chat_id"
+ },
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Unique identifier of the story that should be reposted",
+ "html_description": "Unique identifier of the story that should be reposted | ",
+ "rst_description": "Unique identifier of the story that should be reposted\n",
+ "name": "from_story_id"
+ },
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400",
+ "html_description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 | ",
+ "rst_description": "Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400`\n",
+ "name": "active_period"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to keep the story accessible after it expires",
+ "html_description": "Pass True to keep the story accessible after it expires | ",
+ "rst_description": "Pass :code:`True` to keep the story accessible after it expires\n",
+ "name": "post_to_chat_page"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True if the content of the story must be protected from forwarding and screenshotting",
+ "html_description": "Pass True if the content of the story must be protected from forwarding and screenshotting | ",
+ "rst_description": "Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting\n",
+ "name": "protect_content"
+ }
+ ],
+ "category": "methods"
+ }
+}
diff --git a/.butcher/methods/sendAnimation/entity.json b/.butcher/methods/sendAnimation/entity.json
index 5e9c2fff..38435475 100644
--- a/.butcher/methods/sendAnimation/entity.json
+++ b/.butcher/methods/sendAnimation/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendAudio/entity.json b/.butcher/methods/sendAudio/entity.json
index 5f336ce2..9886f752 100644
--- a/.butcher/methods/sendAudio/entity.json
+++ b/.butcher/methods/sendAudio/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendChatAction/entity.json b/.butcher/methods/sendChatAction/entity.json
index b56b1211..80ef4215 100644
--- a/.butcher/methods/sendChatAction/entity.json
+++ b/.butcher/methods/sendChatAction/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread; for supergroups only",
- "html_description": "Unique identifier for the target message thread; for supergroups only | ",
- "rst_description": "Unique identifier for the target message thread; for supergroups only\n",
+ "description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendContact/entity.json b/.butcher/methods/sendContact/entity.json
index f9d13d40..d713e739 100644
--- a/.butcher/methods/sendContact/entity.json
+++ b/.butcher/methods/sendContact/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendDice/entity.json b/.butcher/methods/sendDice/entity.json
index 35afa97d..0d001776 100644
--- a/.butcher/methods/sendDice/entity.json
+++ b/.butcher/methods/sendDice/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendDocument/entity.json b/.butcher/methods/sendDocument/entity.json
index 11b6c8fe..320f1d54 100644
--- a/.butcher/methods/sendDocument/entity.json
+++ b/.butcher/methods/sendDocument/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendGame/entity.json b/.butcher/methods/sendGame/entity.json
index 6a2e71bc..594ed09f 100644
--- a/.butcher/methods/sendGame/entity.json
+++ b/.butcher/methods/sendGame/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendGift/entity.json b/.butcher/methods/sendGift/entity.json
index 10006635..1c428fc4 100644
--- a/.butcher/methods/sendGift/entity.json
+++ b/.butcher/methods/sendGift/entity.json
@@ -30,9 +30,9 @@
{
"type": "String",
"required": true,
- "description": "Identifier of the gift",
- "html_description": "Identifier of the gift | ",
- "rst_description": "Identifier of the gift\n",
+ "description": "Identifier of the gift; limited gifts can't be sent to channel chats",
+ "html_description": "Identifier of the gift; limited gifts can't be sent to channel chats | ",
+ "rst_description": "Identifier of the gift; limited gifts can't be sent to channel chats\n",
"name": "gift_id"
},
{
diff --git a/.butcher/methods/sendInvoice/entity.json b/.butcher/methods/sendInvoice/entity.json
index fb79ac29..99612e23 100644
--- a/.butcher/methods/sendInvoice/entity.json
+++ b/.butcher/methods/sendInvoice/entity.json
@@ -22,9 +22,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendLocation/entity.json b/.butcher/methods/sendLocation/entity.json
index 8385b971..ede4fdbf 100644
--- a/.butcher/methods/sendLocation/entity.json
+++ b/.butcher/methods/sendLocation/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendMediaGroup/entity.json b/.butcher/methods/sendMediaGroup/entity.json
index 4ed462cb..841f9b77 100644
--- a/.butcher/methods/sendMediaGroup/entity.json
+++ b/.butcher/methods/sendMediaGroup/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendMessage/entity.json b/.butcher/methods/sendMessage/entity.json
index 8e9db029..d4eff7f7 100644
--- a/.butcher/methods/sendMessage/entity.json
+++ b/.butcher/methods/sendMessage/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendMessageDraft/entity.json b/.butcher/methods/sendMessageDraft/entity.json
new file mode 100644
index 00000000..5d64e874
--- /dev/null
+++ b/.butcher/methods/sendMessageDraft/entity.json
@@ -0,0 +1,65 @@
+{
+ "meta": {},
+ "group": {
+ "title": "Available methods",
+ "anchor": "available-methods"
+ },
+ "object": {
+ "anchor": "sendmessagedraft",
+ "name": "sendMessageDraft",
+ "description": "Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns True on success.",
+ "html_description": "Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns True on success.
",
+ "rst_description": "Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns :code:`True` on success.",
+ "annotations": [
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Unique identifier for the target private chat",
+ "html_description": "Unique identifier for the target private chat | ",
+ "rst_description": "Unique identifier for the target private chat\n",
+ "name": "chat_id"
+ },
+ {
+ "type": "Integer",
+ "required": false,
+ "description": "Unique identifier for the target message thread",
+ "html_description": "Unique identifier for the target message thread | ",
+ "rst_description": "Unique identifier for the target message thread\n",
+ "name": "message_thread_id"
+ },
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated",
+ "html_description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated | ",
+ "rst_description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated\n",
+ "name": "draft_id"
+ },
+ {
+ "type": "String",
+ "required": true,
+ "description": "Text of the message to be sent, 1-4096 characters after entities parsing",
+ "html_description": "Text of the message to be sent, 1-4096 characters after entities parsing | ",
+ "rst_description": "Text of the message to be sent, 1-4096 characters after entities parsing\n",
+ "name": "text"
+ },
+ {
+ "type": "String",
+ "required": false,
+ "description": "Mode for parsing entities in the message text. See formatting options for more details.",
+ "html_description": "Mode for parsing entities in the message text. See formatting options for more details. | ",
+ "rst_description": "Mode for parsing entities in the message text. See `formatting options `_ for more details.\n",
+ "name": "parse_mode"
+ },
+ {
+ "type": "Array of MessageEntity",
+ "required": false,
+ "description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode",
+ "html_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode | ",
+ "rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n",
+ "name": "entities"
+ }
+ ],
+ "category": "methods"
+ }
+}
diff --git a/.butcher/methods/sendPaidMedia/entity.json b/.butcher/methods/sendPaidMedia/entity.json
index 69a7a0cc..708eb6cd 100644
--- a/.butcher/methods/sendPaidMedia/entity.json
+++ b/.butcher/methods/sendPaidMedia/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -46,9 +46,9 @@
{
"type": "Integer",
"required": true,
- "description": "The number of Telegram Stars that must be paid to buy access to the media; 1-10000",
- "html_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-10000 | ",
- "rst_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-10000\n",
+ "description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000",
+ "html_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000 | ",
+ "rst_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000\n",
"name": "star_count"
},
{
diff --git a/.butcher/methods/sendPhoto/entity.json b/.butcher/methods/sendPhoto/entity.json
index 5d967505..594f00e2 100644
--- a/.butcher/methods/sendPhoto/entity.json
+++ b/.butcher/methods/sendPhoto/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendPoll/entity.json b/.butcher/methods/sendPoll/entity.json
index 604586c9..44e010c7 100644
--- a/.butcher/methods/sendPoll/entity.json
+++ b/.butcher/methods/sendPoll/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendSticker/entity.json b/.butcher/methods/sendSticker/entity.json
index d16594d4..b922d274 100644
--- a/.butcher/methods/sendSticker/entity.json
+++ b/.butcher/methods/sendSticker/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendVenue/entity.json b/.butcher/methods/sendVenue/entity.json
index 058afebf..6475e4b4 100644
--- a/.butcher/methods/sendVenue/entity.json
+++ b/.butcher/methods/sendVenue/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendVideo/entity.json b/.butcher/methods/sendVideo/entity.json
index ff25ddc7..68391db5 100644
--- a/.butcher/methods/sendVideo/entity.json
+++ b/.butcher/methods/sendVideo/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendVideoNote/entity.json b/.butcher/methods/sendVideoNote/entity.json
index 8e8eed5f..5f15f5e8 100644
--- a/.butcher/methods/sendVideoNote/entity.json
+++ b/.butcher/methods/sendVideoNote/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/sendVoice/entity.json b/.butcher/methods/sendVoice/entity.json
index e7c1ddfc..fa28daad 100644
--- a/.butcher/methods/sendVoice/entity.json
+++ b/.butcher/methods/sendVoice/entity.json
@@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/methods/unpinAllForumTopicMessages/entity.json b/.butcher/methods/unpinAllForumTopicMessages/entity.json
index dc46ec72..b3b32d03 100644
--- a/.butcher/methods/unpinAllForumTopicMessages/entity.json
+++ b/.butcher/methods/unpinAllForumTopicMessages/entity.json
@@ -7,9 +7,9 @@
"object": {
"anchor": "unpinallforumtopicmessages",
"name": "unpinAllForumTopicMessages",
- "description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.",
- "html_description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
",
- "rst_description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.",
+ "description": "Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.",
+ "html_description": "Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
",
+ "rst_description": "Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
diff --git a/.butcher/schema/schema.json b/.butcher/schema/schema.json
index a88e681a..d492782d 100644
--- a/.butcher/schema/schema.json
+++ b/.butcher/schema/schema.json
@@ -1,7 +1,7 @@
{
"api": {
- "version": "9.2",
- "release_date": "2025-08-15"
+ "version": "9.3",
+ "release_date": "2025-12-31"
},
"items": [
{
@@ -544,6 +544,14 @@
"rst_description": "*Optional*. :code:`True`, if the bot has a main Web App. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n",
"name": "has_main_web_app",
"required": false
+ },
+ {
+ "type": "Boolean",
+ "description": "True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.",
+ "html_description": "Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe. | ",
+ "rst_description": "*Optional*. :code:`True`, if the bot has forum topic mode enabled in private chats. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n",
+ "name": "has_topics_enabled",
+ "required": false
}
],
"category": "types"
@@ -1004,6 +1012,30 @@
"rst_description": "*Optional*. For supergroups, the location to which the supergroup is connected\n",
"name": "location",
"required": false
+ },
+ {
+ "type": "UserRating",
+ "description": "For private chats, the rating of the user if any",
+ "html_description": "Optional. For private chats, the rating of the user if any | ",
+ "rst_description": "*Optional*. For private chats, the rating of the user if any\n",
+ "name": "rating",
+ "required": false
+ },
+ {
+ "type": "UniqueGiftColors",
+ "description": "The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews",
+ "html_description": "Optional. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews | ",
+ "rst_description": "*Optional*. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews\n",
+ "name": "unique_gift_colors",
+ "required": false
+ },
+ {
+ "type": "Integer",
+ "description": "The number of Telegram Stars a general user have to pay to send a message to the chat",
+ "html_description": "Optional. The number of Telegram Stars a general user have to pay to send a message to the chat | ",
+ "rst_description": "*Optional*. The number of Telegram Stars a general user have to pay to send a message to the chat\n",
+ "name": "paid_message_star_count",
+ "required": false
}
],
"category": "types"
@@ -1025,9 +1057,9 @@
},
{
"type": "Integer",
- "description": "Unique identifier of a message thread to which the message belongs; for supergroups only",
- "html_description": "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only | ",
- "rst_description": "*Optional*. Unique identifier of a message thread to which the message belongs; for supergroups only\n",
+ "description": "Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only",
+ "html_description": "Optional. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only | ",
+ "rst_description": "*Optional*. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only\n",
"name": "message_thread_id",
"required": false
},
@@ -1105,9 +1137,9 @@
},
{
"type": "True",
- "description": "True, if the message is sent to a forum topic",
- "html_description": "Optional. True, if the message is sent to a forum topic | ",
- "rst_description": "*Optional*. :code:`True`, if the message is sent to a forum topic\n",
+ "description": "True, if the message is sent to a topic in a forum supergroup or a private chat with the bot",
+ "html_description": "Optional. True, if the message is sent to a topic in a forum supergroup or a private chat with the bot | ",
+ "rst_description": "*Optional*. :code:`True`, if the message is sent to a topic in a forum supergroup or a private chat with the bot\n",
"name": "is_topic_message",
"required": false
},
@@ -1583,6 +1615,14 @@
"name": "unique_gift",
"required": false
},
+ {
+ "type": "GiftInfo",
+ "description": "Service message: upgrade of a gift was purchased after the gift was sent",
+ "html_description": "Optional. Service message: upgrade of a gift was purchased after the gift was sent | ",
+ "rst_description": "*Optional*. Service message: upgrade of a gift was purchased after the gift was sent\n",
+ "name": "gift_upgrade_sent",
+ "required": false
+ },
{
"type": "String",
"description": "The domain name of the website on which the user has logged in.",
@@ -3430,12 +3470,20 @@
},
{
"type": "User",
- "description": "User that completed the task; omitted if the task wasn't completed",
- "html_description": "Optional. User that completed the task; omitted if the task wasn't completed | ",
- "rst_description": "*Optional*. User that completed the task; omitted if the task wasn't completed\n",
+ "description": "User that completed the task; omitted if the task wasn't completed by a user",
+ "html_description": "Optional. User that completed the task; omitted if the task wasn't completed by a user | ",
+ "rst_description": "*Optional*. User that completed the task; omitted if the task wasn't completed by a user\n",
"name": "completed_by_user",
"required": false
},
+ {
+ "type": "Chat",
+ "description": "Chat that completed the task; omitted if the task wasn't completed by a chat",
+ "html_description": "Optional. Chat that completed the task; omitted if the task wasn't completed by a chat | ",
+ "rst_description": "*Optional*. Chat that completed the task; omitted if the task wasn't completed by a chat\n",
+ "name": "completed_by_chat",
+ "required": false
+ },
{
"type": "Integer",
"description": "Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed",
@@ -3523,8 +3571,8 @@
{
"type": "String",
"description": "Mode for parsing entities in the text. See formatting options for more details.",
- "html_description": "Optional. Mode for parsing entities in the text. See formatting options for more details. | ",
- "rst_description": "Optional. Mode for parsing entities in the text. See `formatting options `_ for more details.\n",
+ "html_description": "Optional. Mode for parsing entities in the text. See formatting options for more details. | ",
+ "rst_description": "*Optional*. Mode for parsing entities in the text. See `formatting options `_ for more details.\n",
"name": "parse_mode",
"required": false
},
@@ -3557,8 +3605,8 @@
{
"type": "String",
"description": "Mode for parsing entities in the title. See formatting options for more details.",
- "html_description": "Optional. Mode for parsing entities in the title. See formatting options for more details. | ",
- "rst_description": "Optional. Mode for parsing entities in the title. See `formatting options `_ for more details.\n",
+ "html_description": "Optional. Mode for parsing entities in the title. See formatting options for more details. | ",
+ "rst_description": "*Optional*. Mode for parsing entities in the title. See `formatting options `_ for more details.\n",
"name": "parse_mode",
"required": false
},
@@ -4205,6 +4253,14 @@
"rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n",
"name": "icon_custom_emoji_id",
"required": false
+ },
+ {
+ "type": "True",
+ "description": "True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot",
+ "html_description": "Optional. True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot | ",
+ "rst_description": "*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot\n",
+ "name": "is_name_implicit",
+ "required": false
}
],
"category": "types"
@@ -4993,9 +5049,9 @@
{
"anchor": "suggestedpostprice",
"name": "SuggestedPostPrice",
- "description": "Desribes price of a suggested post.",
- "html_description": "Desribes price of a suggested post.
",
- "rst_description": "Desribes price of a suggested post.",
+ "description": "Describes the price of a suggested post.",
+ "html_description": "Describes the price of a suggested post.
",
+ "rst_description": "Describes the price of a suggested post.",
"annotations": [
{
"type": "String",
@@ -5085,9 +5141,9 @@
"annotations": [
{
"type": "Integer",
- "description": "Unique identifier of the topic",
- "html_description": "Unique identifier of the topic | ",
- "rst_description": "Unique identifier of the topic\n",
+ "description": "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.",
+ "html_description": "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. | ",
+ "rst_description": "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.\n",
"name": "topic_id",
"required": true
},
@@ -5264,16 +5320,16 @@
{
"type": "KeyboardButtonRequestUsers",
"description": "If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.",
- "html_description": "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only. | ",
- "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.\n",
+ "html_description": "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only. | ",
+ "rst_description": "*Optional*. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.\n",
"name": "request_users",
"required": false
},
{
"type": "KeyboardButtonRequestChat",
"description": "If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.",
- "html_description": "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only. | ",
- "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n",
+ "html_description": "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only. | ",
+ "rst_description": "*Optional*. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n",
"name": "request_chat",
"required": false
},
@@ -6993,6 +7049,48 @@
],
"category": "types"
},
+ {
+ "anchor": "userrating",
+ "name": "UserRating",
+ "description": "This object describes the rating of a user based on their Telegram Star spendings.",
+ "html_description": "This object describes the rating of a user based on their Telegram Star spendings.
",
+ "rst_description": "This object describes the rating of a user based on their Telegram Star spendings.",
+ "annotations": [
+ {
+ "type": "Integer",
+ "description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.",
+ "html_description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern. | ",
+ "rst_description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.\n",
+ "name": "level",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "Numerical value of the user's rating; the higher the rating, the better",
+ "html_description": "Numerical value of the user's rating; the higher the rating, the better | ",
+ "rst_description": "Numerical value of the user's rating; the higher the rating, the better\n",
+ "name": "rating",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "The rating value required to get the current level",
+ "html_description": "The rating value required to get the current level | ",
+ "rst_description": "The rating value required to get the current level\n",
+ "name": "current_level_rating",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "The rating value required to get to the next level; omitted if the maximum level was reached",
+ "html_description": "Optional. The rating value required to get to the next level; omitted if the maximum level was reached | ",
+ "rst_description": "*Optional*. The rating value required to get to the next level; omitted if the maximum level was reached\n",
+ "name": "next_level_rating",
+ "required": false
+ }
+ ],
+ "category": "types"
+ },
{
"anchor": "storyareaposition",
"name": "StoryAreaPosition",
@@ -7583,6 +7681,48 @@
"rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n",
"name": "icon_custom_emoji_id",
"required": false
+ },
+ {
+ "type": "True",
+ "description": "True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot",
+ "html_description": "Optional. True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot | ",
+ "rst_description": "*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot\n",
+ "name": "is_name_implicit",
+ "required": false
+ }
+ ],
+ "category": "types"
+ },
+ {
+ "anchor": "giftbackground",
+ "name": "GiftBackground",
+ "description": "This object describes the background of a gift.",
+ "html_description": "This object describes the background of a gift.
",
+ "rst_description": "This object describes the background of a gift.",
+ "annotations": [
+ {
+ "type": "Integer",
+ "description": "Center color of the background in RGB format",
+ "html_description": "Center color of the background in RGB format | ",
+ "rst_description": "Center color of the background in RGB format\n",
+ "name": "center_color",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "Edge color of the background in RGB format",
+ "html_description": "Edge color of the background in RGB format | ",
+ "rst_description": "Edge color of the background in RGB format\n",
+ "name": "edge_color",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "Text color of the background in RGB format",
+ "html_description": "Text color of the background in RGB format | ",
+ "rst_description": "Text color of the background in RGB format\n",
+ "name": "text_color",
+ "required": true
}
],
"category": "types"
@@ -7626,22 +7766,70 @@
"name": "upgrade_star_count",
"required": false
},
+ {
+ "type": "True",
+ "description": "True, if the gift can only be purchased by Telegram Premium subscribers",
+ "html_description": "Optional. True, if the gift can only be purchased by Telegram Premium subscribers | ",
+ "rst_description": "*Optional*. :code:`True`, if the gift can only be purchased by Telegram Premium subscribers\n",
+ "name": "is_premium",
+ "required": false
+ },
+ {
+ "type": "True",
+ "description": "True, if the gift can be used (after being upgraded) to customize a user's appearance",
+ "html_description": "Optional. True, if the gift can be used (after being upgraded) to customize a user's appearance | ",
+ "rst_description": "*Optional*. :code:`True`, if the gift can be used (after being upgraded) to customize a user's appearance\n",
+ "name": "has_colors",
+ "required": false
+ },
{
"type": "Integer",
- "description": "The total number of the gifts of this type that can be sent; for limited gifts only",
- "html_description": "Optional. The total number of the gifts of this type that can be sent; for limited gifts only | ",
- "rst_description": "*Optional*. The total number of the gifts of this type that can be sent; for limited gifts only\n",
+ "description": "The total number of gifts of this type that can be sent by all users; for limited gifts only",
+ "html_description": "Optional. The total number of gifts of this type that can be sent by all users; for limited gifts only | ",
+ "rst_description": "*Optional*. The total number of gifts of this type that can be sent by all users; for limited gifts only\n",
"name": "total_count",
"required": false
},
{
"type": "Integer",
- "description": "The number of remaining gifts of this type that can be sent; for limited gifts only",
- "html_description": "Optional. The number of remaining gifts of this type that can be sent; for limited gifts only | ",
- "rst_description": "*Optional*. The number of remaining gifts of this type that can be sent; for limited gifts only\n",
+ "description": "The number of remaining gifts of this type that can be sent by all users; for limited gifts only",
+ "html_description": "Optional. The number of remaining gifts of this type that can be sent by all users; for limited gifts only | ",
+ "rst_description": "*Optional*. The number of remaining gifts of this type that can be sent by all users; for limited gifts only\n",
"name": "remaining_count",
"required": false
},
+ {
+ "type": "Integer",
+ "description": "The total number of gifts of this type that can be sent by the bot; for limited gifts only",
+ "html_description": "Optional. The total number of gifts of this type that can be sent by the bot; for limited gifts only | ",
+ "rst_description": "*Optional*. The total number of gifts of this type that can be sent by the bot; for limited gifts only\n",
+ "name": "personal_total_count",
+ "required": false
+ },
+ {
+ "type": "Integer",
+ "description": "The number of remaining gifts of this type that can be sent by the bot; for limited gifts only",
+ "html_description": "Optional. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only | ",
+ "rst_description": "*Optional*. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only\n",
+ "name": "personal_remaining_count",
+ "required": false
+ },
+ {
+ "type": "GiftBackground",
+ "description": "Background of the gift",
+ "html_description": "Optional. Background of the gift | ",
+ "rst_description": "*Optional*. Background of the gift\n",
+ "name": "background",
+ "required": false
+ },
+ {
+ "type": "Integer",
+ "description": "The total number of different unique gifts that can be obtained by upgrading the gift",
+ "html_description": "Optional. The total number of different unique gifts that can be obtained by upgrading the gift | ",
+ "rst_description": "*Optional*. The total number of different unique gifts that can be obtained by upgrading the gift\n",
+ "name": "unique_gift_variant_count",
+ "required": false
+ },
{
"type": "Chat",
"description": "Information about the chat that published the gift",
@@ -7815,6 +8003,64 @@
],
"category": "types"
},
+ {
+ "anchor": "uniquegiftcolors",
+ "name": "UniqueGiftColors",
+ "description": "This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.",
+ "html_description": "This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.
",
+ "rst_description": "This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.",
+ "annotations": [
+ {
+ "type": "String",
+ "description": "Custom emoji identifier of the unique gift's model",
+ "html_description": "Custom emoji identifier of the unique gift's model | ",
+ "rst_description": "Custom emoji identifier of the unique gift's model\n",
+ "name": "model_custom_emoji_id",
+ "required": true
+ },
+ {
+ "type": "String",
+ "description": "Custom emoji identifier of the unique gift's symbol",
+ "html_description": "Custom emoji identifier of the unique gift's symbol | ",
+ "rst_description": "Custom emoji identifier of the unique gift's symbol\n",
+ "name": "symbol_custom_emoji_id",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "Main color used in light themes; RGB format",
+ "html_description": "Main color used in light themes; RGB format | ",
+ "rst_description": "Main color used in light themes; RGB format\n",
+ "name": "light_theme_main_color",
+ "required": true
+ },
+ {
+ "type": "Array of Integer",
+ "description": "List of 1-3 additional colors used in light themes; RGB format",
+ "html_description": "List of 1-3 additional colors used in light themes; RGB format | ",
+ "rst_description": "List of 1-3 additional colors used in light themes; RGB format\n",
+ "name": "light_theme_other_colors",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "Main color used in dark themes; RGB format",
+ "html_description": "Main color used in dark themes; RGB format | ",
+ "rst_description": "Main color used in dark themes; RGB format\n",
+ "name": "dark_theme_main_color",
+ "required": true
+ },
+ {
+ "type": "Array of Integer",
+ "description": "List of 1-3 additional colors used in dark themes; RGB format",
+ "html_description": "List of 1-3 additional colors used in dark themes; RGB format | ",
+ "rst_description": "List of 1-3 additional colors used in dark themes; RGB format\n",
+ "name": "dark_theme_other_colors",
+ "required": true
+ }
+ ],
+ "category": "types"
+ },
{
"anchor": "uniquegift",
"name": "UniqueGift",
@@ -7822,6 +8068,14 @@
"html_description": "This object describes a unique gift that was upgraded from a regular gift.
",
"rst_description": "This object describes a unique gift that was upgraded from a regular gift.",
"annotations": [
+ {
+ "type": "String",
+ "description": "Identifier of the regular gift from which the gift was upgraded",
+ "html_description": "Identifier of the regular gift from which the gift was upgraded | ",
+ "rst_description": "Identifier of the regular gift from which the gift was upgraded\n",
+ "name": "gift_id",
+ "required": true
+ },
{
"type": "String",
"description": "Human-readable name of the regular gift from which this unique gift was upgraded",
@@ -7870,6 +8124,30 @@
"name": "backdrop",
"required": true
},
+ {
+ "type": "True",
+ "description": "True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers",
+ "html_description": "Optional. True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers | ",
+ "rst_description": "*Optional*. :code:`True`, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers\n",
+ "name": "is_premium",
+ "required": false
+ },
+ {
+ "type": "True",
+ "description": "True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram",
+ "html_description": "Optional. True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram | ",
+ "rst_description": "*Optional*. :code:`True`, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram\n",
+ "name": "is_from_blockchain",
+ "required": false
+ },
+ {
+ "type": "UniqueGiftColors",
+ "description": "The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only",
+ "html_description": "Optional. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only | ",
+ "rst_description": "*Optional*. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only\n",
+ "name": "colors",
+ "required": false
+ },
{
"type": "Chat",
"description": "Information about the chat that published the gift",
@@ -7914,12 +8192,20 @@
},
{
"type": "Integer",
- "description": "Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift",
- "html_description": "Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift | ",
- "rst_description": "*Optional*. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift\n",
+ "description": "Number of Telegram Stars that were prepaid for the ability to upgrade the gift",
+ "html_description": "Optional. Number of Telegram Stars that were prepaid for the ability to upgrade the gift | ",
+ "rst_description": "*Optional*. Number of Telegram Stars that were prepaid for the ability to upgrade the gift\n",
"name": "prepaid_upgrade_star_count",
"required": false
},
+ {
+ "type": "True",
+ "description": "True, if the gift's upgrade was purchased after the gift was sent",
+ "html_description": "Optional. True, if the gift's upgrade was purchased after the gift was sent | ",
+ "rst_description": "*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent\n",
+ "name": "is_upgrade_separate",
+ "required": false
+ },
{
"type": "True",
"description": "True, if the gift can be upgraded to a unique gift",
@@ -7951,6 +8237,14 @@
"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": "Integer",
+ "description": "Unique number reserved for this gift when upgraded. See the number field in UniqueGift",
+ "html_description": "Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift | ",
+ "rst_description": "*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`\n",
+ "name": "unique_gift_number",
+ "required": false
}
],
"category": "types"
@@ -7972,18 +8266,26 @@
},
{
"type": "String",
- "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": "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 | ",
- "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",
+ "description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, 'resale' for gifts bought from other users, 'gifted_upgrade' for upgrades purchased after the gift was sent, or 'offer' for gifts bought or sold through gift purchase offers",
+ "html_description": "Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, “resale” for gifts bought from other users, “gifted_upgrade” for upgrades purchased after the gift was sent, or “offer” for gifts bought or sold through gift purchase offers | ",
+ "rst_description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, 'resale' for gifts bought from other users, 'gifted_upgrade' for upgrades purchased after the gift was sent, or 'offer' for gifts bought or sold through gift purchase offers\n",
"name": "origin",
"required": true
},
+ {
+ "type": "String",
+ "description": "For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins.",
+ "html_description": "Optional. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins. | ",
+ "rst_description": "*Optional*. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins.\n",
+ "name": "last_resale_currency",
+ "required": false
+ },
{
"type": "Integer",
- "description": "For gifts bought from other users, the price paid for the gift",
- "html_description": "Optional. For gifts bought from other users, the price paid for the gift | ",
- "rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift\n",
- "name": "last_resale_star_count",
+ "description": "For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins",
+ "html_description": "Optional. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins | ",
+ "rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins\n",
+ "name": "last_resale_amount",
"required": false
},
{
@@ -8119,19 +8421,35 @@
},
{
"type": "Integer",
- "description": "Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars",
- "html_description": "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars | ",
- "rst_description": "*Optional*. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars\n",
+ "description": "Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only",
+ "html_description": "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only | ",
+ "rst_description": "*Optional*. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only\n",
"name": "convert_star_count",
"required": false
},
{
"type": "Integer",
- "description": "Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift",
- "html_description": "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift | ",
- "rst_description": "*Optional*. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift\n",
+ "description": "Number of Telegram Stars that were paid for the ability to upgrade the gift",
+ "html_description": "Optional. Number of Telegram Stars that were paid for the ability to upgrade the gift | ",
+ "rst_description": "*Optional*. Number of Telegram Stars that were paid for the ability to upgrade the gift\n",
"name": "prepaid_upgrade_star_count",
"required": false
+ },
+ {
+ "type": "True",
+ "description": "True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only",
+ "html_description": "Optional. True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only | ",
+ "rst_description": "*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only\n",
+ "name": "is_upgrade_separate",
+ "required": false
+ },
+ {
+ "type": "Integer",
+ "description": "Unique number reserved for this gift when upgraded. See the number field in UniqueGift",
+ "html_description": "Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift | ",
+ "rst_description": "*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`\n",
+ "name": "unique_gift_number",
+ "required": false
}
],
"category": "types"
@@ -8290,6 +8608,14 @@
"rst_description": ":code:`True`, if a Telegram Premium subscription is accepted\n",
"name": "premium_subscription",
"required": true
+ },
+ {
+ "type": "Boolean",
+ "description": "True, if transfers of unique gifts from channels are accepted",
+ "html_description": "True, if transfers of unique gifts from channels are accepted | ",
+ "rst_description": ":code:`True`, if transfers of unique gifts from channels are accepted\n",
+ "name": "gifts_from_channels",
+ "required": true
}
],
"category": "types"
@@ -9908,9 +10234,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -10030,9 +10356,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -10075,6 +10401,14 @@
"rst_description": "Protects the contents of the forwarded 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; only available when forwarding to private chats",
+ "html_description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats | ",
+ "rst_description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats\n",
+ "name": "message_effect_id"
+ },
{
"type": "SuggestedPostParameters",
"required": false,
@@ -10112,9 +10446,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -10178,9 +10512,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -10271,6 +10605,14 @@
"rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n",
"name": "allow_paid_broadcast"
},
+ {
+ "type": "String",
+ "required": false,
+ "description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats",
+ "html_description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats | ",
+ "rst_description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats\n",
+ "name": "message_effect_id"
+ },
{
"type": "SuggestedPostParameters",
"required": false,
@@ -10316,9 +10658,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -10398,9 +10740,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -10544,9 +10886,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -10706,9 +11048,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -10852,9 +11194,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -11054,9 +11396,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -11232,9 +11574,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -11370,9 +11712,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -11500,9 +11842,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -11516,9 +11858,9 @@
{
"type": "Integer",
"required": true,
- "description": "The number of Telegram Stars that must be paid to buy access to the media; 1-10000",
- "html_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-10000 | ",
- "rst_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-10000\n",
+ "description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000",
+ "html_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000 | ",
+ "rst_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000\n",
"name": "star_count"
},
{
@@ -11646,9 +11988,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -11736,9 +12078,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -11882,9 +12224,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -12044,9 +12386,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -12174,9 +12516,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -12442,9 +12784,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -12522,6 +12864,64 @@
],
"category": "methods"
},
+ {
+ "anchor": "sendmessagedraft",
+ "name": "sendMessageDraft",
+ "description": "Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns True on success.",
+ "html_description": "Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns True on success.
",
+ "rst_description": "Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns :code:`True` on success.",
+ "annotations": [
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Unique identifier for the target private chat",
+ "html_description": "Unique identifier for the target private chat | ",
+ "rst_description": "Unique identifier for the target private chat\n",
+ "name": "chat_id"
+ },
+ {
+ "type": "Integer",
+ "required": false,
+ "description": "Unique identifier for the target message thread",
+ "html_description": "Unique identifier for the target message thread | ",
+ "rst_description": "Unique identifier for the target message thread\n",
+ "name": "message_thread_id"
+ },
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated",
+ "html_description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated | ",
+ "rst_description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated\n",
+ "name": "draft_id"
+ },
+ {
+ "type": "String",
+ "required": true,
+ "description": "Text of the message to be sent, 1-4096 characters after entities parsing",
+ "html_description": "Text of the message to be sent, 1-4096 characters after entities parsing | ",
+ "rst_description": "Text of the message to be sent, 1-4096 characters after entities parsing\n",
+ "name": "text"
+ },
+ {
+ "type": "String",
+ "required": false,
+ "description": "Mode for parsing entities in the message text. See formatting options for more details.",
+ "html_description": "Mode for parsing entities in the message text. See formatting options for more details. | ",
+ "rst_description": "Mode for parsing entities in the message text. See `formatting options `_ for more details.\n",
+ "name": "parse_mode"
+ },
+ {
+ "type": "Array of MessageEntity",
+ "required": false,
+ "description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode",
+ "html_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode | ",
+ "rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n",
+ "name": "entities"
+ }
+ ],
+ "category": "methods"
+ },
{
"anchor": "sendchataction",
"name": "sendChatAction",
@@ -12548,9 +12948,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread; for supergroups only",
- "html_description": "Unique identifier for the target message thread; for supergroups only | ",
- "rst_description": "Unique identifier for the target message thread; for supergroups only\n",
+ "description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -12876,9 +13276,9 @@
{
"type": "Boolean",
"required": false,
- "description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics",
- "html_description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics | ",
- "rst_description": "Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics\n",
+ "description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to True for promotions of channel administrators",
+ "html_description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to True for promotions of channel administrators | ",
+ "rst_description": "Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to :code:`True` for promotions of channel administrators\n",
"name": "can_restrict_members"
},
{
@@ -13758,9 +14158,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 the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.",
- "html_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.
",
- "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.",
+ "description": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a 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": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a 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.
",
+ "rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a 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",
@@ -13852,9 +14252,9 @@
{
"anchor": "deleteforumtopic",
"name": "deleteForumTopic",
- "description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.",
- "html_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.
",
- "rst_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.",
+ "description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.",
+ "html_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.
",
+ "rst_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
@@ -13878,9 +14278,9 @@
{
"anchor": "unpinallforumtopicmessages",
"name": "unpinAllForumTopicMessages",
- "description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.",
- "html_description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
",
- "rst_description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.",
+ "description": "Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.",
+ "html_description": "Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
",
+ "rst_description": "Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
@@ -14452,9 +14852,9 @@
{
"type": "String",
"required": true,
- "description": "Identifier of the gift",
- "html_description": "Identifier of the gift | ",
- "rst_description": "Identifier of the gift\n",
+ "description": "Identifier of the gift; limited gifts can't be sent to channel chats",
+ "html_description": "Identifier of the gift; limited gifts can't be sent to channel chats | ",
+ "rst_description": "Identifier of the gift; limited gifts can't be sent to channel chats\n",
"name": "gift_id"
},
{
@@ -14964,10 +15364,108 @@
{
"type": "Boolean",
"required": false,
- "description": "Pass True to exclude gifts that can be purchased a limited number of times",
- "html_description": "Pass True to exclude gifts that can be purchased a limited number of times | ",
- "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times\n",
- "name": "exclude_limited"
+ "description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n",
+ "name": "exclude_limited_upgradable"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n",
+ "name": "exclude_limited_non_upgradable"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude unique gifts",
+ "html_description": "Pass True to exclude unique gifts | ",
+ "rst_description": "Pass :code:`True` to exclude unique gifts\n",
+ "name": "exclude_unique"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram",
+ "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n",
+ "name": "exclude_from_blockchain"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.",
+ "html_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. | ",
+ "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"
+ },
+ {
+ "type": "String",
+ "required": false,
+ "description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results",
+ "html_description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results | ",
+ "rst_description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results\n",
+ "name": "offset"
+ },
+ {
+ "type": "Integer",
+ "required": false,
+ "description": "The maximum number of gifts to be returned; 1-100. Defaults to 100",
+ "html_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100 | ",
+ "rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n",
+ "name": "limit"
+ }
+ ],
+ "category": "methods"
+ },
+ {
+ "anchor": "getusergifts",
+ "name": "getUserGifts",
+ "description": "Returns the gifts owned and hosted by a user. Returns OwnedGifts on success.",
+ "html_description": "Returns the gifts owned and hosted by a user. Returns OwnedGifts on success.
",
+ "rst_description": "Returns the gifts owned and hosted by a user. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.",
+ "annotations": [
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Unique identifier of the user",
+ "html_description": "Unique identifier of the user | ",
+ "rst_description": "Unique identifier of the user\n",
+ "name": "user_id"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that can be purchased an unlimited number of times",
+ "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times | ",
+ "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 and can be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n",
+ "name": "exclude_limited_upgradable"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n",
+ "name": "exclude_limited_non_upgradable"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram",
+ "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n",
+ "name": "exclude_from_blockchain"
},
{
"type": "Boolean",
@@ -14988,9 +15486,107 @@
{
"type": "String",
"required": false,
- "description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results",
- "html_description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results | ",
- "rst_description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results\n",
+ "description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results",
+ "html_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results | ",
+ "rst_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results\n",
+ "name": "offset"
+ },
+ {
+ "type": "Integer",
+ "required": false,
+ "description": "The maximum number of gifts to be returned; 1-100. Defaults to 100",
+ "html_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100 | ",
+ "rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n",
+ "name": "limit"
+ }
+ ],
+ "category": "methods"
+ },
+ {
+ "anchor": "getchatgifts",
+ "name": "getChatGifts",
+ "description": "Returns the gifts owned by a chat. Returns OwnedGifts on success.",
+ "html_description": "Returns the gifts owned by a chat. Returns OwnedGifts on success.
",
+ "rst_description": "Returns the gifts owned by a chat. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.",
+ "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": "Unique identifier for the target chat or username of the target channel (in the format @channelusername) | ",
+ "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
+ "name": "chat_id"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that aren't saved to the chat's profile page. Always True, unless the bot has the can_post_messages administrator right in the channel.",
+ "html_description": "Pass True to exclude gifts that aren't saved to the chat's profile page. Always True, unless the bot has the can_post_messages administrator right in the channel. | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that aren't saved to the chat's profile page. Always :code:`True`, unless the bot has the *can_post_messages* administrator right in the channel.\n",
+ "name": "exclude_unsaved"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that are saved to the chat's profile page. Always False, unless the bot has the can_post_messages administrator right in the channel.",
+ "html_description": "Pass True to exclude gifts that are saved to the chat's profile page. Always False, unless the bot has the can_post_messages administrator right in the channel. | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that are saved to the chat's profile page. Always :code:`False`, unless the bot has the *can_post_messages* administrator right in the channel.\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": "Pass True to exclude gifts that can be purchased an unlimited number of times | ",
+ "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 and can be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n",
+ "name": "exclude_limited_upgradable"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique",
+ "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n",
+ "name": "exclude_limited_non_upgradable"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram",
+ "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram | ",
+ "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n",
+ "name": "exclude_from_blockchain"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to exclude unique gifts",
+ "html_description": "Pass True to exclude unique gifts | ",
+ "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": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. | ",
+ "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"
+ },
+ {
+ "type": "String",
+ "required": false,
+ "description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results",
+ "html_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results | ",
+ "rst_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results\n",
"name": "offset"
},
{
@@ -15196,6 +15792,64 @@
],
"category": "methods"
},
+ {
+ "anchor": "repoststory",
+ "name": "repostStory",
+ "description": "Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success.",
+ "html_description": "Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success.
",
+ "rst_description": "Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the *can_manage_stories* business bot right for both business accounts. Returns :class:`aiogram.types.story.Story` on success.",
+ "annotations": [
+ {
+ "type": "String",
+ "required": true,
+ "description": "Unique identifier of the business connection",
+ "html_description": "Unique identifier of the business connection | ",
+ "rst_description": "Unique identifier of the business connection\n",
+ "name": "business_connection_id"
+ },
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Unique identifier of the chat which posted the story that should be reposted",
+ "html_description": "Unique identifier of the chat which posted the story that should be reposted | ",
+ "rst_description": "Unique identifier of the chat which posted the story that should be reposted\n",
+ "name": "from_chat_id"
+ },
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Unique identifier of the story that should be reposted",
+ "html_description": "Unique identifier of the story that should be reposted | ",
+ "rst_description": "Unique identifier of the story that should be reposted\n",
+ "name": "from_story_id"
+ },
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400",
+ "html_description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 | ",
+ "rst_description": "Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400`\n",
+ "name": "active_period"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True to keep the story accessible after it expires",
+ "html_description": "Pass True to keep the story accessible after it expires | ",
+ "rst_description": "Pass :code:`True` to keep the story accessible after it expires\n",
+ "name": "post_to_chat_page"
+ },
+ {
+ "type": "Boolean",
+ "required": false,
+ "description": "Pass True if the content of the story must be protected from forwarding and screenshotting",
+ "html_description": "Pass True if the content of the story must be protected from forwarding and screenshotting | ",
+ "rst_description": "Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting\n",
+ "name": "protect_content"
+ }
+ ],
+ "category": "methods"
+ },
{
"anchor": "editstory",
"name": "editStory",
@@ -16232,9 +16886,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -19506,9 +20160,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
@@ -21700,9 +22354,9 @@
{
"type": "Integer",
"required": false,
- "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
- "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | ",
- "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
+ "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
+ "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only | ",
+ "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
diff --git a/.butcher/types/AcceptedGiftTypes/entity.json b/.butcher/types/AcceptedGiftTypes/entity.json
index 705f4f65..5292a643 100644
--- a/.butcher/types/AcceptedGiftTypes/entity.json
+++ b/.butcher/types/AcceptedGiftTypes/entity.json
@@ -42,6 +42,14 @@
"rst_description": ":code:`True`, if a Telegram Premium subscription is accepted\n",
"name": "premium_subscription",
"required": true
+ },
+ {
+ "type": "Boolean",
+ "description": "True, if transfers of unique gifts from channels are accepted",
+ "html_description": "True, if transfers of unique gifts from channels are accepted | ",
+ "rst_description": ":code:`True`, if transfers of unique gifts from channels are accepted\n",
+ "name": "gifts_from_channels",
+ "required": true
}
],
"category": "types"
diff --git a/.butcher/types/ChatFullInfo/entity.json b/.butcher/types/ChatFullInfo/entity.json
index 228bfc9b..937ed037 100644
--- a/.butcher/types/ChatFullInfo/entity.json
+++ b/.butcher/types/ChatFullInfo/entity.json
@@ -387,6 +387,30 @@
"name": "location",
"required": false
},
+ {
+ "type": "UserRating",
+ "description": "For private chats, the rating of the user if any",
+ "html_description": "Optional. For private chats, the rating of the user if any | ",
+ "rst_description": "*Optional*. For private chats, the rating of the user if any\n",
+ "name": "rating",
+ "required": false
+ },
+ {
+ "type": "UniqueGiftColors",
+ "description": "The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews",
+ "html_description": "Optional. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews | ",
+ "rst_description": "*Optional*. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews\n",
+ "name": "unique_gift_colors",
+ "required": false
+ },
+ {
+ "type": "Integer",
+ "description": "The number of Telegram Stars a general user have to pay to send a message to the chat",
+ "html_description": "Optional. The number of Telegram Stars a general user have to pay to send a message to the chat | ",
+ "rst_description": "*Optional*. The number of Telegram Stars a general user have to pay to send a message to the chat\n",
+ "name": "paid_message_star_count",
+ "required": false
+ },
{
"type": "True",
"description": "True, if gifts can be sent to the chat",
diff --git a/.butcher/types/ChecklistTask/entity.json b/.butcher/types/ChecklistTask/entity.json
index 6c9318c4..7dd1af45 100644
--- a/.butcher/types/ChecklistTask/entity.json
+++ b/.butcher/types/ChecklistTask/entity.json
@@ -37,12 +37,20 @@
},
{
"type": "User",
- "description": "User that completed the task; omitted if the task wasn't completed",
- "html_description": "Optional. User that completed the task; omitted if the task wasn't completed | ",
- "rst_description": "*Optional*. User that completed the task; omitted if the task wasn't completed\n",
+ "description": "User that completed the task; omitted if the task wasn't completed by a user",
+ "html_description": "Optional. User that completed the task; omitted if the task wasn't completed by a user | ",
+ "rst_description": "*Optional*. User that completed the task; omitted if the task wasn't completed by a user\n",
"name": "completed_by_user",
"required": false
},
+ {
+ "type": "Chat",
+ "description": "Chat that completed the task; omitted if the task wasn't completed by a chat",
+ "html_description": "Optional. Chat that completed the task; omitted if the task wasn't completed by a chat | ",
+ "rst_description": "*Optional*. Chat that completed the task; omitted if the task wasn't completed by a chat\n",
+ "name": "completed_by_chat",
+ "required": false
+ },
{
"type": "Integer",
"description": "Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed",
diff --git a/.butcher/types/DirectMessagesTopic/entity.json b/.butcher/types/DirectMessagesTopic/entity.json
index 975449d4..7139d8de 100644
--- a/.butcher/types/DirectMessagesTopic/entity.json
+++ b/.butcher/types/DirectMessagesTopic/entity.json
@@ -13,9 +13,9 @@
"annotations": [
{
"type": "Integer",
- "description": "Unique identifier of the topic",
- "html_description": "Unique identifier of the topic | ",
- "rst_description": "Unique identifier of the topic\n",
+ "description": "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.",
+ "html_description": "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. | ",
+ "rst_description": "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.\n",
"name": "topic_id",
"required": true
},
diff --git a/.butcher/types/ForumTopic/entity.json b/.butcher/types/ForumTopic/entity.json
index 4198661a..d774fb7e 100644
--- a/.butcher/types/ForumTopic/entity.json
+++ b/.butcher/types/ForumTopic/entity.json
@@ -42,6 +42,14 @@
"rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n",
"name": "icon_custom_emoji_id",
"required": false
+ },
+ {
+ "type": "True",
+ "description": "True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot",
+ "html_description": "Optional. True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot | ",
+ "rst_description": "*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot\n",
+ "name": "is_name_implicit",
+ "required": false
}
],
"category": "types"
diff --git a/.butcher/types/ForumTopicCreated/entity.json b/.butcher/types/ForumTopicCreated/entity.json
index f1832898..a2b39b66 100644
--- a/.butcher/types/ForumTopicCreated/entity.json
+++ b/.butcher/types/ForumTopicCreated/entity.json
@@ -34,6 +34,14 @@
"rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n",
"name": "icon_custom_emoji_id",
"required": false
+ },
+ {
+ "type": "True",
+ "description": "True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot",
+ "html_description": "Optional. True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot | ",
+ "rst_description": "*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot\n",
+ "name": "is_name_implicit",
+ "required": false
}
],
"category": "types"
diff --git a/.butcher/types/Gift/entity.json b/.butcher/types/Gift/entity.json
index baabd8ba..be2f518f 100644
--- a/.butcher/types/Gift/entity.json
+++ b/.butcher/types/Gift/entity.json
@@ -43,22 +43,70 @@
"name": "upgrade_star_count",
"required": false
},
+ {
+ "type": "True",
+ "description": "True, if the gift can only be purchased by Telegram Premium subscribers",
+ "html_description": "Optional. True, if the gift can only be purchased by Telegram Premium subscribers | ",
+ "rst_description": "*Optional*. :code:`True`, if the gift can only be purchased by Telegram Premium subscribers\n",
+ "name": "is_premium",
+ "required": false
+ },
+ {
+ "type": "True",
+ "description": "True, if the gift can be used (after being upgraded) to customize a user's appearance",
+ "html_description": "Optional. True, if the gift can be used (after being upgraded) to customize a user's appearance | ",
+ "rst_description": "*Optional*. :code:`True`, if the gift can be used (after being upgraded) to customize a user's appearance\n",
+ "name": "has_colors",
+ "required": false
+ },
{
"type": "Integer",
- "description": "The total number of the gifts of this type that can be sent; for limited gifts only",
- "html_description": "Optional. The total number of the gifts of this type that can be sent; for limited gifts only | ",
- "rst_description": "*Optional*. The total number of the gifts of this type that can be sent; for limited gifts only\n",
+ "description": "The total number of gifts of this type that can be sent by all users; for limited gifts only",
+ "html_description": "Optional. The total number of gifts of this type that can be sent by all users; for limited gifts only | ",
+ "rst_description": "*Optional*. The total number of gifts of this type that can be sent by all users; for limited gifts only\n",
"name": "total_count",
"required": false
},
{
"type": "Integer",
- "description": "The number of remaining gifts of this type that can be sent; for limited gifts only",
- "html_description": "Optional. The number of remaining gifts of this type that can be sent; for limited gifts only | ",
- "rst_description": "*Optional*. The number of remaining gifts of this type that can be sent; for limited gifts only\n",
+ "description": "The number of remaining gifts of this type that can be sent by all users; for limited gifts only",
+ "html_description": "Optional. The number of remaining gifts of this type that can be sent by all users; for limited gifts only | ",
+ "rst_description": "*Optional*. The number of remaining gifts of this type that can be sent by all users; for limited gifts only\n",
"name": "remaining_count",
"required": false
},
+ {
+ "type": "Integer",
+ "description": "The total number of gifts of this type that can be sent by the bot; for limited gifts only",
+ "html_description": "Optional. The total number of gifts of this type that can be sent by the bot; for limited gifts only | ",
+ "rst_description": "*Optional*. The total number of gifts of this type that can be sent by the bot; for limited gifts only\n",
+ "name": "personal_total_count",
+ "required": false
+ },
+ {
+ "type": "Integer",
+ "description": "The number of remaining gifts of this type that can be sent by the bot; for limited gifts only",
+ "html_description": "Optional. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only | ",
+ "rst_description": "*Optional*. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only\n",
+ "name": "personal_remaining_count",
+ "required": false
+ },
+ {
+ "type": "GiftBackground",
+ "description": "Background of the gift",
+ "html_description": "Optional. Background of the gift | ",
+ "rst_description": "*Optional*. Background of the gift\n",
+ "name": "background",
+ "required": false
+ },
+ {
+ "type": "Integer",
+ "description": "The total number of different unique gifts that can be obtained by upgrading the gift",
+ "html_description": "Optional. The total number of different unique gifts that can be obtained by upgrading the gift | ",
+ "rst_description": "*Optional*. The total number of different unique gifts that can be obtained by upgrading the gift\n",
+ "name": "unique_gift_variant_count",
+ "required": false
+ },
{
"type": "Chat",
"description": "Information about the chat that published the gift",
diff --git a/.butcher/types/GiftBackground/entity.json b/.butcher/types/GiftBackground/entity.json
new file mode 100644
index 00000000..34e3e0a6
--- /dev/null
+++ b/.butcher/types/GiftBackground/entity.json
@@ -0,0 +1,41 @@
+{
+ "meta": {},
+ "group": {
+ "title": "Available types",
+ "anchor": "available-types"
+ },
+ "object": {
+ "anchor": "giftbackground",
+ "name": "GiftBackground",
+ "description": "This object describes the background of a gift.",
+ "html_description": "This object describes the background of a gift.
",
+ "rst_description": "This object describes the background of a gift.",
+ "annotations": [
+ {
+ "type": "Integer",
+ "description": "Center color of the background in RGB format",
+ "html_description": "Center color of the background in RGB format | ",
+ "rst_description": "Center color of the background in RGB format\n",
+ "name": "center_color",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "Edge color of the background in RGB format",
+ "html_description": "Edge color of the background in RGB format | ",
+ "rst_description": "Edge color of the background in RGB format\n",
+ "name": "edge_color",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "Text color of the background in RGB format",
+ "html_description": "Text color of the background in RGB format | ",
+ "rst_description": "Text color of the background in RGB format\n",
+ "name": "text_color",
+ "required": true
+ }
+ ],
+ "category": "types"
+ }
+}
diff --git a/.butcher/types/GiftInfo/entity.json b/.butcher/types/GiftInfo/entity.json
index 03af4484..daf00279 100644
--- a/.butcher/types/GiftInfo/entity.json
+++ b/.butcher/types/GiftInfo/entity.json
@@ -37,12 +37,20 @@
},
{
"type": "Integer",
- "description": "Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift",
- "html_description": "Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift | ",
- "rst_description": "*Optional*. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift\n",
+ "description": "Number of Telegram Stars that were prepaid for the ability to upgrade the gift",
+ "html_description": "Optional. Number of Telegram Stars that were prepaid for the ability to upgrade the gift | ",
+ "rst_description": "*Optional*. Number of Telegram Stars that were prepaid for the ability to upgrade the gift\n",
"name": "prepaid_upgrade_star_count",
"required": false
},
+ {
+ "type": "True",
+ "description": "True, if the gift's upgrade was purchased after the gift was sent",
+ "html_description": "Optional. True, if the gift's upgrade was purchased after the gift was sent | ",
+ "rst_description": "*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent\n",
+ "name": "is_upgrade_separate",
+ "required": false
+ },
{
"type": "True",
"description": "True, if the gift can be upgraded to a unique gift",
@@ -74,6 +82,14 @@
"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": "Integer",
+ "description": "Unique number reserved for this gift when upgraded. See the number field in UniqueGift",
+ "html_description": "Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift | ",
+ "rst_description": "*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`\n",
+ "name": "unique_gift_number",
+ "required": false
}
],
"category": "types"
diff --git a/.butcher/types/InputChecklist/entity.json b/.butcher/types/InputChecklist/entity.json
index dd1dc8d5..a04bdf65 100644
--- a/.butcher/types/InputChecklist/entity.json
+++ b/.butcher/types/InputChecklist/entity.json
@@ -22,8 +22,8 @@
{
"type": "String",
"description": "Mode for parsing entities in the title. See formatting options for more details.",
- "html_description": "Optional. Mode for parsing entities in the title. See formatting options for more details. | ",
- "rst_description": "Optional. Mode for parsing entities in the title. See `formatting options `_ for more details.\n",
+ "html_description": "Optional. Mode for parsing entities in the title. See formatting options for more details. | ",
+ "rst_description": "*Optional*. Mode for parsing entities in the title. See `formatting options `_ for more details.\n",
"name": "parse_mode",
"required": false
},
diff --git a/.butcher/types/InputChecklistTask/entity.json b/.butcher/types/InputChecklistTask/entity.json
index b951262a..7fd5b8cd 100644
--- a/.butcher/types/InputChecklistTask/entity.json
+++ b/.butcher/types/InputChecklistTask/entity.json
@@ -30,8 +30,8 @@
{
"type": "String",
"description": "Mode for parsing entities in the text. See formatting options for more details.",
- "html_description": "Optional. Mode for parsing entities in the text. See formatting options for more details. | ",
- "rst_description": "Optional. Mode for parsing entities in the text. See `formatting options `_ for more details.\n",
+ "html_description": "Optional. Mode for parsing entities in the text. See formatting options for more details. | ",
+ "rst_description": "*Optional*. Mode for parsing entities in the text. See `formatting options `_ for more details.\n",
"name": "parse_mode",
"required": false
},
diff --git a/.butcher/types/KeyboardButton/entity.json b/.butcher/types/KeyboardButton/entity.json
index f98688ff..d0eff8d0 100644
--- a/.butcher/types/KeyboardButton/entity.json
+++ b/.butcher/types/KeyboardButton/entity.json
@@ -22,16 +22,16 @@
{
"type": "KeyboardButtonRequestUsers",
"description": "If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.",
- "html_description": "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only. | ",
- "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.\n",
+ "html_description": "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only. | ",
+ "rst_description": "*Optional*. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.\n",
"name": "request_users",
"required": false
},
{
"type": "KeyboardButtonRequestChat",
"description": "If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.",
- "html_description": "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only. | ",
- "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n",
+ "html_description": "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only. | ",
+ "rst_description": "*Optional*. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n",
"name": "request_chat",
"required": false
},
diff --git a/.butcher/types/Message/entity.json b/.butcher/types/Message/entity.json
index 0fbb922b..d4dd8bc0 100644
--- a/.butcher/types/Message/entity.json
+++ b/.butcher/types/Message/entity.json
@@ -21,9 +21,9 @@
},
{
"type": "Integer",
- "description": "Unique identifier of a message thread to which the message belongs; for supergroups only",
- "html_description": "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only | ",
- "rst_description": "*Optional*. Unique identifier of a message thread to which the message belongs; for supergroups only\n",
+ "description": "Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only",
+ "html_description": "Optional. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only | ",
+ "rst_description": "*Optional*. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only\n",
"name": "message_thread_id",
"required": false
},
@@ -101,9 +101,9 @@
},
{
"type": "True",
- "description": "True, if the message is sent to a forum topic",
- "html_description": "Optional. True, if the message is sent to a forum topic | ",
- "rst_description": "*Optional*. :code:`True`, if the message is sent to a forum topic\n",
+ "description": "True, if the message is sent to a topic in a forum supergroup or a private chat with the bot",
+ "html_description": "Optional. True, if the message is sent to a topic in a forum supergroup or a private chat with the bot | ",
+ "rst_description": "*Optional*. :code:`True`, if the message is sent to a topic in a forum supergroup or a private chat with the bot\n",
"name": "is_topic_message",
"required": false
},
@@ -579,6 +579,14 @@
"name": "unique_gift",
"required": false
},
+ {
+ "type": "GiftInfo",
+ "description": "Service message: upgrade of a gift was purchased after the gift was sent",
+ "html_description": "Optional. Service message: upgrade of a gift was purchased after the gift was sent | ",
+ "rst_description": "*Optional*. Service message: upgrade of a gift was purchased after the gift was sent\n",
+ "name": "gift_upgrade_sent",
+ "required": false
+ },
{
"type": "String",
"description": "The domain name of the website on which the user has logged in.",
diff --git a/.butcher/types/OwnedGiftRegular/entity.json b/.butcher/types/OwnedGiftRegular/entity.json
index 35390001..27c3d590 100644
--- a/.butcher/types/OwnedGiftRegular/entity.json
+++ b/.butcher/types/OwnedGiftRegular/entity.json
@@ -101,19 +101,35 @@
},
{
"type": "Integer",
- "description": "Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars",
- "html_description": "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars | ",
- "rst_description": "*Optional*. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars\n",
+ "description": "Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only",
+ "html_description": "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only | ",
+ "rst_description": "*Optional*. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only\n",
"name": "convert_star_count",
"required": false
},
{
"type": "Integer",
- "description": "Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift",
- "html_description": "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift | ",
- "rst_description": "*Optional*. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift\n",
+ "description": "Number of Telegram Stars that were paid for the ability to upgrade the gift",
+ "html_description": "Optional. Number of Telegram Stars that were paid for the ability to upgrade the gift | ",
+ "rst_description": "*Optional*. Number of Telegram Stars that were paid for the ability to upgrade the gift\n",
"name": "prepaid_upgrade_star_count",
"required": false
+ },
+ {
+ "type": "True",
+ "description": "True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only",
+ "html_description": "Optional. True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only | ",
+ "rst_description": "*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only\n",
+ "name": "is_upgrade_separate",
+ "required": false
+ },
+ {
+ "type": "Integer",
+ "description": "Unique number reserved for this gift when upgraded. See the number field in UniqueGift",
+ "html_description": "Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift | ",
+ "rst_description": "*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`\n",
+ "name": "unique_gift_number",
+ "required": false
}
],
"category": "types"
diff --git a/.butcher/types/SuggestedPostPrice/entity.json b/.butcher/types/SuggestedPostPrice/entity.json
index 3234077d..192a6984 100644
--- a/.butcher/types/SuggestedPostPrice/entity.json
+++ b/.butcher/types/SuggestedPostPrice/entity.json
@@ -7,9 +7,9 @@
"object": {
"anchor": "suggestedpostprice",
"name": "SuggestedPostPrice",
- "description": "Desribes price of a suggested post.",
- "html_description": "Desribes price of a suggested post.
",
- "rst_description": "Desribes price of a suggested post.",
+ "description": "Describes the price of a suggested post.",
+ "html_description": "Describes the price of a suggested post.
",
+ "rst_description": "Describes the price of a suggested post.",
"annotations": [
{
"type": "String",
diff --git a/.butcher/types/UniqueGift/entity.json b/.butcher/types/UniqueGift/entity.json
index edb104ab..9d5f4a50 100644
--- a/.butcher/types/UniqueGift/entity.json
+++ b/.butcher/types/UniqueGift/entity.json
@@ -11,6 +11,14 @@
"html_description": "This object describes a unique gift that was upgraded from a regular gift.
",
"rst_description": "This object describes a unique gift that was upgraded from a regular gift.",
"annotations": [
+ {
+ "type": "String",
+ "description": "Identifier of the regular gift from which the gift was upgraded",
+ "html_description": "Identifier of the regular gift from which the gift was upgraded | ",
+ "rst_description": "Identifier of the regular gift from which the gift was upgraded\n",
+ "name": "gift_id",
+ "required": true
+ },
{
"type": "String",
"description": "Human-readable name of the regular gift from which this unique gift was upgraded",
@@ -59,6 +67,30 @@
"name": "backdrop",
"required": true
},
+ {
+ "type": "True",
+ "description": "True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers",
+ "html_description": "Optional. True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers | ",
+ "rst_description": "*Optional*. :code:`True`, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers\n",
+ "name": "is_premium",
+ "required": false
+ },
+ {
+ "type": "True",
+ "description": "True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram",
+ "html_description": "Optional. True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram | ",
+ "rst_description": "*Optional*. :code:`True`, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram\n",
+ "name": "is_from_blockchain",
+ "required": false
+ },
+ {
+ "type": "UniqueGiftColors",
+ "description": "The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only",
+ "html_description": "Optional. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only | ",
+ "rst_description": "*Optional*. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only\n",
+ "name": "colors",
+ "required": false
+ },
{
"type": "Chat",
"description": "Information about the chat that published the gift",
diff --git a/.butcher/types/UniqueGiftColors/entity.json b/.butcher/types/UniqueGiftColors/entity.json
new file mode 100644
index 00000000..70d9d3c9
--- /dev/null
+++ b/.butcher/types/UniqueGiftColors/entity.json
@@ -0,0 +1,65 @@
+{
+ "meta": {},
+ "group": {
+ "title": "Available types",
+ "anchor": "available-types"
+ },
+ "object": {
+ "anchor": "uniquegiftcolors",
+ "name": "UniqueGiftColors",
+ "description": "This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.",
+ "html_description": "This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.
",
+ "rst_description": "This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.",
+ "annotations": [
+ {
+ "type": "String",
+ "description": "Custom emoji identifier of the unique gift's model",
+ "html_description": "Custom emoji identifier of the unique gift's model | ",
+ "rst_description": "Custom emoji identifier of the unique gift's model\n",
+ "name": "model_custom_emoji_id",
+ "required": true
+ },
+ {
+ "type": "String",
+ "description": "Custom emoji identifier of the unique gift's symbol",
+ "html_description": "Custom emoji identifier of the unique gift's symbol | ",
+ "rst_description": "Custom emoji identifier of the unique gift's symbol\n",
+ "name": "symbol_custom_emoji_id",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "Main color used in light themes; RGB format",
+ "html_description": "Main color used in light themes; RGB format | ",
+ "rst_description": "Main color used in light themes; RGB format\n",
+ "name": "light_theme_main_color",
+ "required": true
+ },
+ {
+ "type": "Array of Integer",
+ "description": "List of 1-3 additional colors used in light themes; RGB format",
+ "html_description": "List of 1-3 additional colors used in light themes; RGB format | ",
+ "rst_description": "List of 1-3 additional colors used in light themes; RGB format\n",
+ "name": "light_theme_other_colors",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "Main color used in dark themes; RGB format",
+ "html_description": "Main color used in dark themes; RGB format | ",
+ "rst_description": "Main color used in dark themes; RGB format\n",
+ "name": "dark_theme_main_color",
+ "required": true
+ },
+ {
+ "type": "Array of Integer",
+ "description": "List of 1-3 additional colors used in dark themes; RGB format",
+ "html_description": "List of 1-3 additional colors used in dark themes; RGB format | ",
+ "rst_description": "List of 1-3 additional colors used in dark themes; RGB format\n",
+ "name": "dark_theme_other_colors",
+ "required": true
+ }
+ ],
+ "category": "types"
+ }
+}
diff --git a/.butcher/types/UniqueGiftInfo/entity.json b/.butcher/types/UniqueGiftInfo/entity.json
index 696a433f..c6693e33 100644
--- a/.butcher/types/UniqueGiftInfo/entity.json
+++ b/.butcher/types/UniqueGiftInfo/entity.json
@@ -21,18 +21,26 @@
},
{
"type": "String",
- "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": "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 | ",
- "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",
+ "description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, 'resale' for gifts bought from other users, 'gifted_upgrade' for upgrades purchased after the gift was sent, or 'offer' for gifts bought or sold through gift purchase offers",
+ "html_description": "Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, “resale” for gifts bought from other users, “gifted_upgrade” for upgrades purchased after the gift was sent, or “offer” for gifts bought or sold through gift purchase offers | ",
+ "rst_description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, 'resale' for gifts bought from other users, 'gifted_upgrade' for upgrades purchased after the gift was sent, or 'offer' for gifts bought or sold through gift purchase offers\n",
"name": "origin",
"required": true
},
+ {
+ "type": "String",
+ "description": "For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins.",
+ "html_description": "Optional. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins. | ",
+ "rst_description": "*Optional*. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins.\n",
+ "name": "last_resale_currency",
+ "required": false
+ },
{
"type": "Integer",
- "description": "For gifts bought from other users, the price paid for the gift",
- "html_description": "Optional. For gifts bought from other users, the price paid for the gift | ",
- "rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift\n",
- "name": "last_resale_star_count",
+ "description": "For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins",
+ "html_description": "Optional. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins | ",
+ "rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins\n",
+ "name": "last_resale_amount",
"required": false
},
{
@@ -58,6 +66,18 @@
"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
+ },
+ {
+ "type": "Integer",
+ "description": "For gifts bought from other users, the price paid for the gift",
+ "html_description": "Optional. For gifts bought from other users, the price paid for the gift | ",
+ "rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift\n",
+ "name": "last_resale_star_count",
+ "required": false,
+ "deprecated": {
+ "version": "9.3",
+ "release_date": "2025-12-31"
+ }
}
],
"category": "types"
diff --git a/.butcher/types/User/entity.json b/.butcher/types/User/entity.json
index 820d7563..b444dbb3 100644
--- a/.butcher/types/User/entity.json
+++ b/.butcher/types/User/entity.json
@@ -114,6 +114,14 @@
"rst_description": "*Optional*. :code:`True`, if the bot has a main Web App. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n",
"name": "has_main_web_app",
"required": false
+ },
+ {
+ "type": "Boolean",
+ "description": "True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.",
+ "html_description": "Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe. | ",
+ "rst_description": "*Optional*. :code:`True`, if the bot has forum topic mode enabled in private chats. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n",
+ "name": "has_topics_enabled",
+ "required": false
}
],
"category": "types"
diff --git a/.butcher/types/UserRating/entity.json b/.butcher/types/UserRating/entity.json
new file mode 100644
index 00000000..fb49d5b2
--- /dev/null
+++ b/.butcher/types/UserRating/entity.json
@@ -0,0 +1,49 @@
+{
+ "meta": {},
+ "group": {
+ "title": "Available types",
+ "anchor": "available-types"
+ },
+ "object": {
+ "anchor": "userrating",
+ "name": "UserRating",
+ "description": "This object describes the rating of a user based on their Telegram Star spendings.",
+ "html_description": "This object describes the rating of a user based on their Telegram Star spendings.
",
+ "rst_description": "This object describes the rating of a user based on their Telegram Star spendings.",
+ "annotations": [
+ {
+ "type": "Integer",
+ "description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.",
+ "html_description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern. | ",
+ "rst_description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.\n",
+ "name": "level",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "Numerical value of the user's rating; the higher the rating, the better",
+ "html_description": "Numerical value of the user's rating; the higher the rating, the better | ",
+ "rst_description": "Numerical value of the user's rating; the higher the rating, the better\n",
+ "name": "rating",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "The rating value required to get the current level",
+ "html_description": "The rating value required to get the current level | ",
+ "rst_description": "The rating value required to get the current level\n",
+ "name": "current_level_rating",
+ "required": true
+ },
+ {
+ "type": "Integer",
+ "description": "The rating value required to get to the next level; omitted if the maximum level was reached",
+ "html_description": "Optional. The rating value required to get to the next level; omitted if the maximum level was reached | ",
+ "rst_description": "*Optional*. The rating value required to get to the next level; omitted if the maximum level was reached\n",
+ "name": "next_level_rating",
+ "required": false
+ }
+ ],
+ "category": "types"
+ }
+}
diff --git a/CHANGES/1747.feature.rst b/CHANGES/1747.feature.rst
new file mode 100644
index 00000000..999d08a1
--- /dev/null
+++ b/CHANGES/1747.feature.rst
@@ -0,0 +1,42 @@
+Added full support for Telegram Bot API 9.3
+
+**Topics in Private Chats**
+
+Bot API 9.3 introduces forum topics functionality for private chats:
+
+- Added new ``sendMessageDraft`` method for streaming partial messages while being generated (requires forum topic mode enabled)
+- Added ``has_topics_enabled`` field to the ``User`` class to determine if forum topic mode is enabled in private chats
+- Added ``message_thread_id`` and ``is_topic_message`` fields to the ``Message`` class for private chat topic support
+- Added ``message_thread_id`` parameter support to messaging methods: ``sendMessage``, ``sendPhoto``, ``sendVideo``, ``sendAnimation``, ``sendAudio``, ``sendDocument``, ``sendPaidMedia``, ``sendSticker``, ``sendVideoNote``, ``sendVoice``, ``sendLocation``, ``sendVenue``, ``sendContact``, ``sendPoll``, ``sendDice``, ``sendInvoice``, ``sendGame``, ``sendMediaGroup``, ``copyMessage``, ``copyMessages``, ``forwardMessage``, ``forwardMessages``
+- Updated ``sendChatAction`` to support ``message_thread_id`` parameter in private chats
+- Updated ``editForumTopic``, ``deleteForumTopic``, ``unpinAllForumTopicMessages`` methods to manage private chat topics
+- Added ``is_name_implicit`` field to ``ForumTopic`` class
+
+**Gifts System Enhancements**
+
+Enhanced gifts functionality with new methods and extended capabilities:
+
+- Added ``getUserGifts`` method to retrieve gifts owned and hosted by a user
+- Added ``getChatGifts`` method to retrieve gifts owned by a chat
+- Updated ``UniqueGiftInfo`` class: replaced ``last_resale_star_count`` with ``last_resale_currency`` and ``last_resale_amount`` fields, added "gifted_upgrade" and "offer" as origin values
+- Updated ``getBusinessAccountGifts`` method: replaced ``exclude_limited`` parameter with ``exclude_limited_upgradable`` and ``exclude_limited_non_upgradable``, added ``exclude_from_blockchain`` parameter
+- Added new fields to ``Gift`` class: ``personal_total_count``, ``personal_remaining_count``, ``is_premium``, ``has_colors``, ``unique_gift_variant_count``, ``gift_background``
+- Added new fields to ``UniqueGift`` class: ``gift_id``, ``is_from_blockchain``, ``is_premium``, ``colors``
+- Added new fields to gift info classes: ``is_upgrade_separate``, ``unique_gift_number``
+- Added ``gift_upgrade_sent`` field to the ``Message`` class
+- Added ``gifts_from_channels`` field to the ``AcceptedGiftTypes`` class
+- Added new ``UniqueGiftColors`` class for color schemes in user names and link previews
+- Added new ``GiftBackground`` class for gift background styling
+
+**Business Accounts & Stories**
+
+- Added ``repostStory`` method to enable reposting stories across managed business accounts
+
+**Miscellaneous Updates**
+
+- Bots can now disable main usernames and set ``can_restrict_members`` rights in channels
+- Maximum paid media price increased to 25000 Telegram Stars
+- Added new ``UserRating`` class
+- Added ``rating``, ``paid_message_star_count``, ``unique_gift_colors`` fields to the ``ChatFullInfo`` class
+- Added support for ``message_effect_id`` parameter in forward/copy operations
+- Added ``completed_by_chat`` field to the ``ChecklistTask`` class
diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py
index 10ac1477..d263c7de 100644
--- a/aiogram/client/bot.py
+++ b/aiogram/client/bot.py
@@ -76,6 +76,7 @@ from ..methods import (
GetBusinessConnection,
GetChat,
GetChatAdministrators,
+ GetChatGifts,
GetChatMember,
GetChatMemberCount,
GetChatMenuButton,
@@ -94,6 +95,7 @@ from ..methods import (
GetStickerSet,
GetUpdates,
GetUserChatBoosts,
+ GetUserGifts,
GetUserProfilePhotos,
GetWebhookInfo,
GiftPremiumSubscription,
@@ -111,6 +113,7 @@ from ..methods import (
ReopenForumTopic,
ReopenGeneralForumTopic,
ReplaceStickerInSet,
+ RepostStory,
RestrictChatMember,
RevokeChatInviteLink,
SavePreparedInlineMessage,
@@ -127,6 +130,7 @@ from ..methods import (
SendLocation,
SendMediaGroup,
SendMessage,
+ SendMessageDraft,
SendPaidMedia,
SendPhoto,
SendPoll,
@@ -815,6 +819,7 @@ class Bot:
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
+ message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
@@ -830,7 +835,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)
:param message_id: Message identifier in the chat specified in *from_chat_id*
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param video_start_timestamp: New start timestamp for the copied video in the message
:param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
@@ -840,6 +845,7 @@ class Bot:
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; only available when copying to private chats
:param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
@@ -863,6 +869,7 @@ class Bot:
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
+ message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
@@ -1123,7 +1130,7 @@ class Bot:
request_timeout: Optional[int] = None,
) -> bool:
"""
- Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.
+ Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#deleteforumtopic
@@ -1289,7 +1296,7 @@ class Bot:
request_timeout: Optional[int] = None,
) -> bool:
"""
- 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.
+ Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a 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.
Source: https://core.telegram.org/bots/api#editforumtopic
@@ -1555,6 +1562,7 @@ class Bot:
video_start_timestamp: Optional[DateTimeUnion] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
+ message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
request_timeout: Optional[int] = None,
) -> Message:
@@ -1566,11 +1574,12 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)
:param message_id: Message identifier in the chat specified in *from_chat_id*
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat
:param video_start_timestamp: New start timestamp for the forwarded video in the message
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the forwarded message from forwarding and saving
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; only available when forwarding to private chats
:param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only
:param request_timeout: Request timeout
:return: On success, the sent :class:`aiogram.types.message.Message` is returned.
@@ -1585,6 +1594,7 @@ class Bot:
video_start_timestamp=video_start_timestamp,
disable_notification=disable_notification,
protect_content=protect_content,
+ message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
)
return await self(call, request_timeout=request_timeout)
@@ -2034,7 +2044,7 @@ class Bot:
: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
+ :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to :code:`True` for promotions of channel administrators
:param can_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)
:param can_change_info: Pass :code:`True` if the administrator can change chat title, photo and other settings
:param can_invite_users: Pass :code:`True` if the administrator can invite new users to the chat
@@ -2187,7 +2197,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent animation in seconds
:param width: Animation width
@@ -2272,7 +2282,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details.
@@ -2339,7 +2349,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`). Channel chats and channel direct messages chats aren't supported.
:param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_.
:param business_connection_id: Unique identifier of the business connection on behalf of which the action will be sent
- :param message_thread_id: Unique identifier for the target message thread; for supergroups only
+ :param message_thread_id: Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only
:param request_timeout: Request timeout
:return: The user will see a 'sending photo' status for the bot.
"""
@@ -2382,7 +2392,7 @@ class Bot:
:param phone_number: Contact's phone number
:param first_name: Contact's first name
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes
@@ -2445,7 +2455,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '๐ฒ', '๐ฏ', '๐', 'โฝ', '๐ณ', or '๐ฐ'. Dice can have values 1-6 for '๐ฒ', '๐ฏ' and '๐ณ', values 1-5 for '๐' and 'โฝ', and values 1-64 for '๐ฐ'. Defaults to '๐ฒ'
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -2510,7 +2520,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
@@ -2577,7 +2587,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats.
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
@@ -2654,7 +2664,7 @@ class Bot:
:param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
:param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.
:param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.
:param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_.
@@ -2754,7 +2764,7 @@ class Bot:
:param latitude: Latitude of the location
:param longitude: Longitude of the location
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
@@ -2820,7 +2830,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat
:param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@@ -2883,7 +2893,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
@@ -2957,7 +2967,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details.
@@ -3038,7 +3048,7 @@ class Bot:
:param question: Poll question, 1-300 characters
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param question_parse_mode: Mode for parsing entities in the question. See `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`
@@ -3119,7 +3129,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files ยป `. Video and animated stickers can't be sent via an HTTP URL.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -3190,7 +3200,7 @@ class Bot:
:param title: Name of the venue
:param address: Address of the venue
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param foursquare_id: Foursquare identifier of the venue
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
@@ -3274,7 +3284,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param width: Video width
@@ -3360,7 +3370,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `. Sending video notes by a URL is currently unsupported
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
@@ -3429,7 +3439,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Voice message caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.
@@ -3956,7 +3966,7 @@ class Bot:
request_timeout: Optional[int] = None,
) -> bool:
"""
- Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.
+ Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#unpinallforumtopicmessages
@@ -4460,7 +4470,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param from_chat_id: Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)
:param message_ids: A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order.
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat
:param disable_notification: Sends the messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@@ -4523,7 +4533,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param from_chat_id: Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)
:param message_ids: A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order.
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat
:param disable_notification: Sends the messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the forwarded messages from forwarding and saving
@@ -4716,10 +4726,10 @@ class Bot:
Source: https://core.telegram.org/bots/api#sendpaidmedia
:param chat_id: 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.
- :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-10000
+ :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-25000
:param media: A JSON-serialized array describing the media to be sent; up to 10 items
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.
:param caption: Media caption, 0-1024 characters after entities parsing
@@ -4905,7 +4915,7 @@ class Bot:
Source: https://core.telegram.org/bots/api#sendgift
- :param gift_id: Identifier of the gift
+ :param gift_id: Identifier of the gift; limited gifts can't be sent to channel chats
:param user_id: Required if *chat_id* is not specified. Unique identifier of the target user who will receive the gift.
:param chat_id: Required if *user_id* is not specified. Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`) that will receive the gift.
:param pay_for_upgrade: Pass :code:`True` to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver
@@ -5152,11 +5162,14 @@ class Bot:
exclude_unsaved: Optional[bool] = None,
exclude_saved: Optional[bool] = None,
exclude_unlimited: Optional[bool] = None,
- exclude_limited: Optional[bool] = None,
+ exclude_limited_upgradable: Optional[bool] = None,
+ exclude_limited_non_upgradable: Optional[bool] = None,
exclude_unique: Optional[bool] = None,
+ exclude_from_blockchain: Optional[bool] = None,
sort_by_price: Optional[bool] = None,
offset: Optional[str] = None,
limit: Optional[int] = None,
+ exclude_limited: Optional[bool] = None,
request_timeout: Optional[int] = None,
) -> OwnedGifts:
"""
@@ -5168,11 +5181,14 @@ class Bot:
: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_limited_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique
+ :param exclude_limited_non_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique
:param exclude_unique: Pass :code:`True` to exclude unique gifts
+ :param exclude_from_blockchain: Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram
: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 exclude_limited: Pass :code:`True` to exclude gifts that can be purchased a limited number of times
:param request_timeout: Request timeout
:return: Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.
"""
@@ -5182,11 +5198,14 @@ class Bot:
exclude_unsaved=exclude_unsaved,
exclude_saved=exclude_saved,
exclude_unlimited=exclude_unlimited,
- exclude_limited=exclude_limited,
+ exclude_limited_upgradable=exclude_limited_upgradable,
+ exclude_limited_non_upgradable=exclude_limited_non_upgradable,
exclude_unique=exclude_unique,
+ exclude_from_blockchain=exclude_from_blockchain,
sort_by_price=sort_by_price,
offset=offset,
limit=limit,
+ exclude_limited=exclude_limited,
)
return await self(call, request_timeout=request_timeout)
@@ -5683,3 +5702,167 @@ class Bot:
comment=comment,
)
return await self(call, request_timeout=request_timeout)
+
+ async def get_chat_gifts(
+ self,
+ chat_id: ChatIdUnion,
+ exclude_unsaved: Optional[bool] = None,
+ exclude_saved: Optional[bool] = None,
+ exclude_unlimited: Optional[bool] = None,
+ exclude_limited_upgradable: Optional[bool] = None,
+ exclude_limited_non_upgradable: Optional[bool] = None,
+ exclude_from_blockchain: Optional[bool] = None,
+ exclude_unique: Optional[bool] = None,
+ sort_by_price: Optional[bool] = None,
+ offset: Optional[str] = None,
+ limit: Optional[int] = None,
+ request_timeout: Optional[int] = None,
+ ) -> OwnedGifts:
+ """
+ Returns the gifts owned by a chat. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.
+
+ Source: https://core.telegram.org/bots/api#getchatgifts
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
+ :param exclude_unsaved: Pass :code:`True` to exclude gifts that aren't saved to the chat's profile page. Always :code:`True`, unless the bot has the *can_post_messages* administrator right in the channel.
+ :param exclude_saved: Pass :code:`True` to exclude gifts that are saved to the chat's profile page. Always :code:`False`, unless the bot has the *can_post_messages* administrator right in the channel.
+ :param exclude_unlimited: Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times
+ :param exclude_limited_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique
+ :param exclude_limited_non_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique
+ :param exclude_from_blockchain: Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram
+ :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 an 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
+ :return: Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.
+ """
+
+ call = GetChatGifts(
+ chat_id=chat_id,
+ exclude_unsaved=exclude_unsaved,
+ exclude_saved=exclude_saved,
+ exclude_unlimited=exclude_unlimited,
+ exclude_limited_upgradable=exclude_limited_upgradable,
+ exclude_limited_non_upgradable=exclude_limited_non_upgradable,
+ exclude_from_blockchain=exclude_from_blockchain,
+ exclude_unique=exclude_unique,
+ sort_by_price=sort_by_price,
+ offset=offset,
+ limit=limit,
+ )
+ return await self(call, request_timeout=request_timeout)
+
+ async def get_user_gifts(
+ self,
+ user_id: int,
+ exclude_unlimited: Optional[bool] = None,
+ exclude_limited_upgradable: Optional[bool] = None,
+ exclude_limited_non_upgradable: Optional[bool] = None,
+ exclude_from_blockchain: Optional[bool] = None,
+ exclude_unique: Optional[bool] = None,
+ sort_by_price: Optional[bool] = None,
+ offset: Optional[str] = None,
+ limit: Optional[int] = None,
+ request_timeout: Optional[int] = None,
+ ) -> OwnedGifts:
+ """
+ Returns the gifts owned and hosted by a user. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.
+
+ Source: https://core.telegram.org/bots/api#getusergifts
+
+ :param user_id: Unique identifier of the user
+ :param exclude_unlimited: Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times
+ :param exclude_limited_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique
+ :param exclude_limited_non_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique
+ :param exclude_from_blockchain: Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram
+ :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 an 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
+ :return: Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.
+ """
+
+ call = GetUserGifts(
+ user_id=user_id,
+ exclude_unlimited=exclude_unlimited,
+ exclude_limited_upgradable=exclude_limited_upgradable,
+ exclude_limited_non_upgradable=exclude_limited_non_upgradable,
+ exclude_from_blockchain=exclude_from_blockchain,
+ exclude_unique=exclude_unique,
+ sort_by_price=sort_by_price,
+ offset=offset,
+ limit=limit,
+ )
+ return await self(call, request_timeout=request_timeout)
+
+ async def repost_story(
+ self,
+ business_connection_id: str,
+ from_chat_id: int,
+ from_story_id: int,
+ active_period: int,
+ post_to_chat_page: Optional[bool] = None,
+ protect_content: Optional[bool] = None,
+ request_timeout: Optional[int] = None,
+ ) -> Story:
+ """
+ Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the *can_manage_stories* business bot right for both business accounts. Returns :class:`aiogram.types.story.Story` on success.
+
+ Source: https://core.telegram.org/bots/api#repoststory
+
+ :param business_connection_id: Unique identifier of the business connection
+ :param from_chat_id: Unique identifier of the chat which posted the story that should be reposted
+ :param from_story_id: Unique identifier of the story that should be reposted
+ :param active_period: Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400`
+ :param post_to_chat_page: Pass :code:`True` to keep the story accessible after it expires
+ :param protect_content: Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting
+ :param request_timeout: Request timeout
+ :return: Returns :class:`aiogram.types.story.Story` on success.
+ """
+
+ call = RepostStory(
+ business_connection_id=business_connection_id,
+ from_chat_id=from_chat_id,
+ from_story_id=from_story_id,
+ active_period=active_period,
+ post_to_chat_page=post_to_chat_page,
+ protect_content=protect_content,
+ )
+ return await self(call, request_timeout=request_timeout)
+
+ async def send_message_draft(
+ self,
+ chat_id: int,
+ draft_id: int,
+ text: str,
+ message_thread_id: Optional[int] = None,
+ parse_mode: Optional[str] = None,
+ entities: Optional[list[MessageEntity]] = None,
+ request_timeout: Optional[int] = None,
+ ) -> bool:
+ """
+ Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns :code:`True` on success.
+
+ Source: https://core.telegram.org/bots/api#sendmessagedraft
+
+ :param chat_id: Unique identifier for the target private chat
+ :param draft_id: Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated
+ :param text: Text of the message to be sent, 1-4096 characters after entities parsing
+ :param message_thread_id: Unique identifier for the target message thread
+ :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details.
+ :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
+ :param request_timeout: Request timeout
+ :return: Returns :code:`True` on success.
+ """
+
+ call = SendMessageDraft(
+ chat_id=chat_id,
+ draft_id=draft_id,
+ text=text,
+ message_thread_id=message_thread_id,
+ parse_mode=parse_mode,
+ entities=entities,
+ )
+ return await self(call, request_timeout=request_timeout)
diff --git a/aiogram/enums/content_type.py b/aiogram/enums/content_type.py
index a08919d5..0c1c4b29 100644
--- a/aiogram/enums/content_type.py
+++ b/aiogram/enums/content_type.py
@@ -45,6 +45,7 @@ class ContentType(str, Enum):
CHAT_SHARED = "chat_shared"
GIFT = "gift"
UNIQUE_GIFT = "unique_gift"
+ GIFT_UPGRADE_SENT = "gift_upgrade_sent"
CONNECTED_WEBSITE = "connected_website"
WRITE_ACCESS_ALLOWED = "write_access_allowed"
PASSPORT_DATA = "passport_data"
diff --git a/aiogram/methods/__init__.py b/aiogram/methods/__init__.py
index 766c18e8..9c1ebccd 100644
--- a/aiogram/methods/__init__.py
+++ b/aiogram/methods/__init__.py
@@ -54,6 +54,7 @@ from .get_business_account_star_balance import GetBusinessAccountStarBalance
from .get_business_connection import GetBusinessConnection
from .get_chat import GetChat
from .get_chat_administrators import GetChatAdministrators
+from .get_chat_gifts import GetChatGifts
from .get_chat_member import GetChatMember
from .get_chat_member_count import GetChatMemberCount
from .get_chat_menu_button import GetChatMenuButton
@@ -72,6 +73,7 @@ from .get_star_transactions import GetStarTransactions
from .get_sticker_set import GetStickerSet
from .get_updates import GetUpdates
from .get_user_chat_boosts import GetUserChatBoosts
+from .get_user_gifts import GetUserGifts
from .get_user_profile_photos import GetUserProfilePhotos
from .get_webhook_info import GetWebhookInfo
from .gift_premium_subscription import GiftPremiumSubscription
@@ -89,6 +91,7 @@ from .remove_user_verification import RemoveUserVerification
from .reopen_forum_topic import ReopenForumTopic
from .reopen_general_forum_topic import ReopenGeneralForumTopic
from .replace_sticker_in_set import ReplaceStickerInSet
+from .repost_story import RepostStory
from .restrict_chat_member import RestrictChatMember
from .revoke_chat_invite_link import RevokeChatInviteLink
from .save_prepared_inline_message import SavePreparedInlineMessage
@@ -105,6 +108,7 @@ from .send_invoice import SendInvoice
from .send_location import SendLocation
from .send_media_group import SendMediaGroup
from .send_message import SendMessage
+from .send_message_draft import SendMessageDraft
from .send_paid_media import SendPaidMedia
from .send_photo import SendPhoto
from .send_poll import SendPoll
@@ -214,6 +218,7 @@ __all__ = (
"GetBusinessConnection",
"GetChat",
"GetChatAdministrators",
+ "GetChatGifts",
"GetChatMember",
"GetChatMemberCount",
"GetChatMenuButton",
@@ -232,6 +237,7 @@ __all__ = (
"GetStickerSet",
"GetUpdates",
"GetUserChatBoosts",
+ "GetUserGifts",
"GetUserProfilePhotos",
"GetWebhookInfo",
"GiftPremiumSubscription",
@@ -249,6 +255,7 @@ __all__ = (
"ReopenForumTopic",
"ReopenGeneralForumTopic",
"ReplaceStickerInSet",
+ "RepostStory",
"Request",
"Response",
"RestrictChatMember",
@@ -267,6 +274,7 @@ __all__ = (
"SendLocation",
"SendMediaGroup",
"SendMessage",
+ "SendMessageDraft",
"SendPaidMedia",
"SendPhoto",
"SendPoll",
diff --git a/aiogram/methods/copy_message.py b/aiogram/methods/copy_message.py
index 7cab7ce9..60734784 100644
--- a/aiogram/methods/copy_message.py
+++ b/aiogram/methods/copy_message.py
@@ -34,7 +34,7 @@ class CopyMessage(TelegramMethod[MessageId]):
message_id: int
"""Message identifier in the chat specified in *from_chat_id*"""
message_thread_id: Optional[int] = None
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
video_start_timestamp: Optional[DateTimeUnion] = None
@@ -53,6 +53,8 @@ class CopyMessage(TelegramMethod[MessageId]):
"""Protects the contents of the sent message from forwarding and saving"""
allow_paid_broadcast: Optional[bool] = None
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
+ message_effect_id: Optional[str] = None
+ """Unique identifier of the message effect to be added to the message; only available when copying to private chats"""
suggested_post_parameters: Optional[SuggestedPostParameters] = None
"""A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined."""
reply_parameters: Optional[ReplyParameters] = None
@@ -94,6 +96,7 @@ class CopyMessage(TelegramMethod[MessageId]):
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
+ message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
@@ -119,6 +122,7 @@ class CopyMessage(TelegramMethod[MessageId]):
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
+ message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
diff --git a/aiogram/methods/copy_messages.py b/aiogram/methods/copy_messages.py
index 61215335..2ffd130a 100644
--- a/aiogram/methods/copy_messages.py
+++ b/aiogram/methods/copy_messages.py
@@ -21,7 +21,7 @@ class CopyMessages(TelegramMethod[list[MessageId]]):
message_ids: list[int]
"""A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order."""
message_thread_id: Optional[int] = None
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat"""
disable_notification: Optional[bool] = None
diff --git a/aiogram/methods/delete_forum_topic.py b/aiogram/methods/delete_forum_topic.py
index b221a555..f168c74e 100644
--- a/aiogram/methods/delete_forum_topic.py
+++ b/aiogram/methods/delete_forum_topic.py
@@ -8,7 +8,7 @@ from .base import TelegramMethod
class DeleteForumTopic(TelegramMethod[bool]):
"""
- Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.
+ Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#deleteforumtopic
"""
diff --git a/aiogram/methods/edit_forum_topic.py b/aiogram/methods/edit_forum_topic.py
index 7bac4456..10200382 100644
--- a/aiogram/methods/edit_forum_topic.py
+++ b/aiogram/methods/edit_forum_topic.py
@@ -8,7 +8,7 @@ from .base import TelegramMethod
class EditForumTopic(TelegramMethod[bool]):
"""
- 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.
+ Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a 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.
Source: https://core.telegram.org/bots/api#editforumtopic
"""
diff --git a/aiogram/methods/forward_message.py b/aiogram/methods/forward_message.py
index d8b51d8e..f1b3a054 100644
--- a/aiogram/methods/forward_message.py
+++ b/aiogram/methods/forward_message.py
@@ -24,7 +24,7 @@ class ForwardMessage(TelegramMethod[Message]):
message_id: int
"""Message identifier in the chat specified in *from_chat_id*"""
message_thread_id: Optional[int] = None
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat"""
video_start_timestamp: Optional[DateTimeUnion] = None
@@ -33,6 +33,8 @@ class ForwardMessage(TelegramMethod[Message]):
"""Sends the message `silently `_. Users will receive a notification with no sound."""
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
"""Protects the contents of the forwarded message from forwarding and saving"""
+ message_effect_id: Optional[str] = None
+ """Unique identifier of the message effect to be added to the message; only available when forwarding to private chats"""
suggested_post_parameters: Optional[SuggestedPostParameters] = None
"""A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only"""
@@ -51,6 +53,7 @@ class ForwardMessage(TelegramMethod[Message]):
video_start_timestamp: Optional[DateTimeUnion] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
+ message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
**__pydantic_kwargs: Any,
) -> None:
@@ -67,6 +70,7 @@ class ForwardMessage(TelegramMethod[Message]):
video_start_timestamp=video_start_timestamp,
disable_notification=disable_notification,
protect_content=protect_content,
+ message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
**__pydantic_kwargs,
)
diff --git a/aiogram/methods/forward_messages.py b/aiogram/methods/forward_messages.py
index 2d74f5aa..362e5dbb 100644
--- a/aiogram/methods/forward_messages.py
+++ b/aiogram/methods/forward_messages.py
@@ -21,7 +21,7 @@ class ForwardMessages(TelegramMethod[list[MessageId]]):
message_ids: list[int]
"""A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order."""
message_thread_id: Optional[int] = None
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat"""
disable_notification: Optional[bool] = None
diff --git a/aiogram/methods/get_business_account_gifts.py b/aiogram/methods/get_business_account_gifts.py
index 25050705..cc6c2cf9 100644
--- a/aiogram/methods/get_business_account_gifts.py
+++ b/aiogram/methods/get_business_account_gifts.py
@@ -2,6 +2,8 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
+from pydantic import Field
+
from ..types import OwnedGifts
from .base import TelegramMethod
@@ -24,16 +26,25 @@ class GetBusinessAccountGifts(TelegramMethod[OwnedGifts]):
"""Pass :code:`True` to exclude gifts that are saved to the account's profile page"""
exclude_unlimited: Optional[bool] = None
"""Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times"""
- exclude_limited: Optional[bool] = None
- """Pass :code:`True` to exclude gifts that can be purchased a limited number of times"""
+ exclude_limited_upgradable: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique"""
+ exclude_limited_non_upgradable: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique"""
exclude_unique: Optional[bool] = None
"""Pass :code:`True` to exclude unique gifts"""
+ exclude_from_blockchain: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram"""
sort_by_price: Optional[bool] = None
"""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
"""The maximum number of gifts to be returned; 1-100. Defaults to 100"""
+ exclude_limited: Optional[bool] = Field(None, json_schema_extra={"deprecated": True})
+ """Pass :code:`True` to exclude gifts that can be purchased a limited number of times
+
+.. deprecated:: API:9.3
+ https://core.telegram.org/bots/api-changelog#december-31-2025"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@@ -46,11 +57,14 @@ class GetBusinessAccountGifts(TelegramMethod[OwnedGifts]):
exclude_unsaved: Optional[bool] = None,
exclude_saved: Optional[bool] = None,
exclude_unlimited: Optional[bool] = None,
- exclude_limited: Optional[bool] = None,
+ exclude_limited_upgradable: Optional[bool] = None,
+ exclude_limited_non_upgradable: Optional[bool] = None,
exclude_unique: Optional[bool] = None,
+ exclude_from_blockchain: Optional[bool] = None,
sort_by_price: Optional[bool] = None,
offset: Optional[str] = None,
limit: Optional[int] = None,
+ exclude_limited: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@@ -62,10 +76,13 @@ class GetBusinessAccountGifts(TelegramMethod[OwnedGifts]):
exclude_unsaved=exclude_unsaved,
exclude_saved=exclude_saved,
exclude_unlimited=exclude_unlimited,
- exclude_limited=exclude_limited,
+ exclude_limited_upgradable=exclude_limited_upgradable,
+ exclude_limited_non_upgradable=exclude_limited_non_upgradable,
exclude_unique=exclude_unique,
+ exclude_from_blockchain=exclude_from_blockchain,
sort_by_price=sort_by_price,
offset=offset,
limit=limit,
+ exclude_limited=exclude_limited,
**__pydantic_kwargs,
)
diff --git a/aiogram/methods/get_chat_gifts.py b/aiogram/methods/get_chat_gifts.py
new file mode 100644
index 00000000..cb2f5f6c
--- /dev/null
+++ b/aiogram/methods/get_chat_gifts.py
@@ -0,0 +1,79 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, Any, Optional
+
+from ..types import ChatIdUnion, OwnedGifts
+from .base import TelegramMethod
+
+
+class GetChatGifts(TelegramMethod[OwnedGifts]):
+ """
+ Returns the gifts owned by a chat. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.
+
+ Source: https://core.telegram.org/bots/api#getchatgifts
+ """
+
+ __returning__ = OwnedGifts
+ __api_method__ = "getChatGifts"
+
+ chat_id: ChatIdUnion
+ """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
+ exclude_unsaved: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that aren't saved to the chat's profile page. Always :code:`True`, unless the bot has the *can_post_messages* administrator right in the channel."""
+ exclude_saved: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that are saved to the chat's profile page. Always :code:`False`, unless the bot has the *can_post_messages* administrator right in the channel."""
+ exclude_unlimited: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times"""
+ exclude_limited_upgradable: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique"""
+ exclude_limited_non_upgradable: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique"""
+ exclude_from_blockchain: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram"""
+ exclude_unique: Optional[bool] = None
+ """Pass :code:`True` to exclude unique gifts"""
+ sort_by_price: Optional[bool] = None
+ """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 an empty string to get the first chunk of results"""
+ limit: Optional[int] = None
+ """The maximum number of gifts to be returned; 1-100. Defaults to 100"""
+
+ if TYPE_CHECKING:
+ # DO NOT EDIT MANUALLY!!!
+ # This section was auto-generated via `butcher`
+
+ def __init__(
+ __pydantic__self__,
+ *,
+ chat_id: ChatIdUnion,
+ exclude_unsaved: Optional[bool] = None,
+ exclude_saved: Optional[bool] = None,
+ exclude_unlimited: Optional[bool] = None,
+ exclude_limited_upgradable: Optional[bool] = None,
+ exclude_limited_non_upgradable: Optional[bool] = None,
+ exclude_from_blockchain: Optional[bool] = None,
+ exclude_unique: Optional[bool] = None,
+ sort_by_price: Optional[bool] = None,
+ offset: Optional[str] = None,
+ limit: 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__(
+ chat_id=chat_id,
+ exclude_unsaved=exclude_unsaved,
+ exclude_saved=exclude_saved,
+ exclude_unlimited=exclude_unlimited,
+ exclude_limited_upgradable=exclude_limited_upgradable,
+ exclude_limited_non_upgradable=exclude_limited_non_upgradable,
+ exclude_from_blockchain=exclude_from_blockchain,
+ exclude_unique=exclude_unique,
+ sort_by_price=sort_by_price,
+ offset=offset,
+ limit=limit,
+ **__pydantic_kwargs,
+ )
diff --git a/aiogram/methods/get_user_gifts.py b/aiogram/methods/get_user_gifts.py
new file mode 100644
index 00000000..64882792
--- /dev/null
+++ b/aiogram/methods/get_user_gifts.py
@@ -0,0 +1,71 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, Any, Optional
+
+from ..types import OwnedGifts
+from .base import TelegramMethod
+
+
+class GetUserGifts(TelegramMethod[OwnedGifts]):
+ """
+ Returns the gifts owned and hosted by a user. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.
+
+ Source: https://core.telegram.org/bots/api#getusergifts
+ """
+
+ __returning__ = OwnedGifts
+ __api_method__ = "getUserGifts"
+
+ user_id: int
+ """Unique identifier of the user"""
+ exclude_unlimited: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times"""
+ exclude_limited_upgradable: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique"""
+ exclude_limited_non_upgradable: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique"""
+ exclude_from_blockchain: Optional[bool] = None
+ """Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram"""
+ exclude_unique: Optional[bool] = None
+ """Pass :code:`True` to exclude unique gifts"""
+ sort_by_price: Optional[bool] = None
+ """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 an empty string to get the first chunk of results"""
+ limit: Optional[int] = None
+ """The maximum number of gifts to be returned; 1-100. Defaults to 100"""
+
+ if TYPE_CHECKING:
+ # DO NOT EDIT MANUALLY!!!
+ # This section was auto-generated via `butcher`
+
+ def __init__(
+ __pydantic__self__,
+ *,
+ user_id: int,
+ exclude_unlimited: Optional[bool] = None,
+ exclude_limited_upgradable: Optional[bool] = None,
+ exclude_limited_non_upgradable: Optional[bool] = None,
+ exclude_from_blockchain: Optional[bool] = None,
+ exclude_unique: Optional[bool] = None,
+ sort_by_price: Optional[bool] = None,
+ offset: Optional[str] = None,
+ limit: 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__(
+ user_id=user_id,
+ exclude_unlimited=exclude_unlimited,
+ exclude_limited_upgradable=exclude_limited_upgradable,
+ exclude_limited_non_upgradable=exclude_limited_non_upgradable,
+ exclude_from_blockchain=exclude_from_blockchain,
+ exclude_unique=exclude_unique,
+ sort_by_price=sort_by_price,
+ offset=offset,
+ limit=limit,
+ **__pydantic_kwargs,
+ )
diff --git a/aiogram/methods/promote_chat_member.py b/aiogram/methods/promote_chat_member.py
index dc3fbbd8..a3c517a7 100644
--- a/aiogram/methods/promote_chat_member.py
+++ b/aiogram/methods/promote_chat_member.py
@@ -29,7 +29,7 @@ class PromoteChatMember(TelegramMethod[bool]):
can_manage_video_chats: Optional[bool] = None
"""Pass :code:`True` if the administrator can manage video chats"""
can_restrict_members: Optional[bool] = None
- """Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics"""
+ """Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to :code:`True` for promotions of channel administrators"""
can_promote_members: Optional[bool] = None
"""Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)"""
can_change_info: Optional[bool] = None
diff --git a/aiogram/methods/repost_story.py b/aiogram/methods/repost_story.py
new file mode 100644
index 00000000..23009ba3
--- /dev/null
+++ b/aiogram/methods/repost_story.py
@@ -0,0 +1,59 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, Any, Optional
+
+from ..types import Story
+from .base import TelegramMethod
+
+
+class RepostStory(TelegramMethod[Story]):
+ """
+ Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the *can_manage_stories* business bot right for both business accounts. Returns :class:`aiogram.types.story.Story` on success.
+
+ Source: https://core.telegram.org/bots/api#repoststory
+ """
+
+ __returning__ = Story
+ __api_method__ = "repostStory"
+
+ business_connection_id: str
+ """Unique identifier of the business connection"""
+ from_chat_id: int
+ """Unique identifier of the chat which posted the story that should be reposted"""
+ from_story_id: int
+ """Unique identifier of the story that should be reposted"""
+ active_period: int
+ """Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400`"""
+ post_to_chat_page: Optional[bool] = None
+ """Pass :code:`True` to keep the story accessible after it expires"""
+ protect_content: Optional[bool] = None
+ """Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting"""
+
+ if TYPE_CHECKING:
+ # DO NOT EDIT MANUALLY!!!
+ # This section was auto-generated via `butcher`
+
+ def __init__(
+ __pydantic__self__,
+ *,
+ business_connection_id: str,
+ from_chat_id: int,
+ from_story_id: int,
+ active_period: int,
+ post_to_chat_page: Optional[bool] = None,
+ protect_content: 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__(
+ business_connection_id=business_connection_id,
+ from_chat_id=from_chat_id,
+ from_story_id=from_story_id,
+ active_period=active_period,
+ post_to_chat_page=post_to_chat_page,
+ protect_content=protect_content,
+ **__pydantic_kwargs,
+ )
diff --git a/aiogram/methods/send_animation.py b/aiogram/methods/send_animation.py
index 62997db1..7699b2cc 100644
--- a/aiogram/methods/send_animation.py
+++ b/aiogram/methods/send_animation.py
@@ -35,7 +35,7 @@ class SendAnimation(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
duration: Optional[int] = None
diff --git a/aiogram/methods/send_audio.py b/aiogram/methods/send_audio.py
index 2e88ea6f..7c384752 100644
--- a/aiogram/methods/send_audio.py
+++ b/aiogram/methods/send_audio.py
@@ -36,7 +36,7 @@ class SendAudio(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
caption: Optional[str] = None
diff --git a/aiogram/methods/send_chat_action.py b/aiogram/methods/send_chat_action.py
index 6e5ed5ab..9fd601fa 100644
--- a/aiogram/methods/send_chat_action.py
+++ b/aiogram/methods/send_chat_action.py
@@ -27,7 +27,7 @@ class SendChatAction(TelegramMethod[bool]):
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the action will be sent"""
message_thread_id: Optional[int] = None
- """Unique identifier for the target message thread; for supergroups only"""
+ """Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
diff --git a/aiogram/methods/send_contact.py b/aiogram/methods/send_contact.py
index 73a81698..83a498be 100644
--- a/aiogram/methods/send_contact.py
+++ b/aiogram/methods/send_contact.py
@@ -34,7 +34,7 @@ class SendContact(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
last_name: Optional[str] = None
diff --git a/aiogram/methods/send_dice.py b/aiogram/methods/send_dice.py
index 356822d2..e16afc25 100644
--- a/aiogram/methods/send_dice.py
+++ b/aiogram/methods/send_dice.py
@@ -30,7 +30,7 @@ class SendDice(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
emoji: Optional[str] = None
diff --git a/aiogram/methods/send_document.py b/aiogram/methods/send_document.py
index fdb58431..801d9d06 100644
--- a/aiogram/methods/send_document.py
+++ b/aiogram/methods/send_document.py
@@ -35,7 +35,7 @@ class SendDocument(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
thumbnail: Optional[InputFile] = None
diff --git a/aiogram/methods/send_game.py b/aiogram/methods/send_game.py
index 2d69e8a9..c7d589b6 100644
--- a/aiogram/methods/send_game.py
+++ b/aiogram/methods/send_game.py
@@ -26,7 +26,7 @@ class SendGame(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
disable_notification: Optional[bool] = None
"""Sends the message `silently `_. Users will receive a notification with no sound."""
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
diff --git a/aiogram/methods/send_gift.py b/aiogram/methods/send_gift.py
index 4f8b444a..d6882556 100644
--- a/aiogram/methods/send_gift.py
+++ b/aiogram/methods/send_gift.py
@@ -18,7 +18,7 @@ class SendGift(TelegramMethod[bool]):
__api_method__ = "sendGift"
gift_id: str
- """Identifier of the gift"""
+ """Identifier of the gift; limited gifts can't be sent to channel chats"""
user_id: Optional[int] = None
"""Required if *chat_id* is not specified. Unique identifier of the target user who will receive the gift."""
chat_id: Optional[ChatIdUnion] = None
diff --git a/aiogram/methods/send_invoice.py b/aiogram/methods/send_invoice.py
index f1e83926..65d94bba 100644
--- a/aiogram/methods/send_invoice.py
+++ b/aiogram/methods/send_invoice.py
@@ -39,7 +39,7 @@ class SendInvoice(TelegramMethod[Message]):
prices: list[LabeledPrice]
"""Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_."""
message_thread_id: Optional[int] = None
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
provider_token: Optional[str] = None
diff --git a/aiogram/methods/send_location.py b/aiogram/methods/send_location.py
index f058b49e..26e15e5f 100644
--- a/aiogram/methods/send_location.py
+++ b/aiogram/methods/send_location.py
@@ -34,7 +34,7 @@ class SendLocation(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
horizontal_accuracy: Optional[float] = None
diff --git a/aiogram/methods/send_media_group.py b/aiogram/methods/send_media_group.py
index 5b7bff0d..8cd8c9fc 100644
--- a/aiogram/methods/send_media_group.py
+++ b/aiogram/methods/send_media_group.py
@@ -26,7 +26,7 @@ class SendMediaGroup(TelegramMethod[list[Message]]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat"""
disable_notification: Optional[bool] = None
diff --git a/aiogram/methods/send_message.py b/aiogram/methods/send_message.py
index 223da039..88138622 100644
--- a/aiogram/methods/send_message.py
+++ b/aiogram/methods/send_message.py
@@ -34,7 +34,7 @@ class SendMessage(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
diff --git a/aiogram/methods/send_message_draft.py b/aiogram/methods/send_message_draft.py
new file mode 100644
index 00000000..1221dc90
--- /dev/null
+++ b/aiogram/methods/send_message_draft.py
@@ -0,0 +1,59 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, Any, Optional
+
+from ..types import MessageEntity
+from .base import TelegramMethod
+
+
+class SendMessageDraft(TelegramMethod[bool]):
+ """
+ Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns :code:`True` on success.
+
+ Source: https://core.telegram.org/bots/api#sendmessagedraft
+ """
+
+ __returning__ = bool
+ __api_method__ = "sendMessageDraft"
+
+ chat_id: int
+ """Unique identifier for the target private chat"""
+ draft_id: int
+ """Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated"""
+ text: str
+ """Text of the message to be sent, 1-4096 characters after entities parsing"""
+ message_thread_id: Optional[int] = None
+ """Unique identifier for the target message thread"""
+ parse_mode: Optional[str] = None
+ """Mode for parsing entities in the message text. See `formatting options `_ for more details."""
+ entities: Optional[list[MessageEntity]] = None
+ """A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*"""
+
+ if TYPE_CHECKING:
+ # DO NOT EDIT MANUALLY!!!
+ # This section was auto-generated via `butcher`
+
+ def __init__(
+ __pydantic__self__,
+ *,
+ chat_id: int,
+ draft_id: int,
+ text: str,
+ message_thread_id: Optional[int] = None,
+ parse_mode: Optional[str] = None,
+ 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__(
+ chat_id=chat_id,
+ draft_id=draft_id,
+ text=text,
+ message_thread_id=message_thread_id,
+ parse_mode=parse_mode,
+ entities=entities,
+ **__pydantic_kwargs,
+ )
diff --git a/aiogram/methods/send_paid_media.py b/aiogram/methods/send_paid_media.py
index ef89d2c0..78b7eaa8 100644
--- a/aiogram/methods/send_paid_media.py
+++ b/aiogram/methods/send_paid_media.py
@@ -27,13 +27,13 @@ class SendPaidMedia(TelegramMethod[Message]):
chat_id: ChatIdUnion
"""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."""
star_count: int
- """The number of Telegram Stars that must be paid to buy access to the media; 1-10000"""
+ """The number of Telegram Stars that must be paid to buy access to the media; 1-25000"""
media: list[InputPaidMediaUnion]
"""A JSON-serialized array describing the media to be sent; up to 10 items"""
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
payload: Optional[str] = None
diff --git a/aiogram/methods/send_photo.py b/aiogram/methods/send_photo.py
index e7028462..0136351a 100644
--- a/aiogram/methods/send_photo.py
+++ b/aiogram/methods/send_photo.py
@@ -34,7 +34,7 @@ class SendPhoto(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
caption: Optional[str] = None
diff --git a/aiogram/methods/send_poll.py b/aiogram/methods/send_poll.py
index 56c48acb..f5f946d7 100644
--- a/aiogram/methods/send_poll.py
+++ b/aiogram/methods/send_poll.py
@@ -36,7 +36,7 @@ class SendPoll(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
"""Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed"""
question_entities: Optional[list[MessageEntity]] = None
diff --git a/aiogram/methods/send_sticker.py b/aiogram/methods/send_sticker.py
index 6f44f990..9c4d331c 100644
--- a/aiogram/methods/send_sticker.py
+++ b/aiogram/methods/send_sticker.py
@@ -33,7 +33,7 @@ class SendSticker(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
emoji: Optional[str] = None
diff --git a/aiogram/methods/send_venue.py b/aiogram/methods/send_venue.py
index dd2b92ed..c9dc7a95 100644
--- a/aiogram/methods/send_venue.py
+++ b/aiogram/methods/send_venue.py
@@ -38,7 +38,7 @@ class SendVenue(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
foursquare_id: Optional[str] = None
diff --git a/aiogram/methods/send_video.py b/aiogram/methods/send_video.py
index a09d17e7..c69ecea3 100644
--- a/aiogram/methods/send_video.py
+++ b/aiogram/methods/send_video.py
@@ -36,7 +36,7 @@ class SendVideo(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
duration: Optional[int] = None
diff --git a/aiogram/methods/send_video_note.py b/aiogram/methods/send_video_note.py
index ec036ca6..0732f5c2 100644
--- a/aiogram/methods/send_video_note.py
+++ b/aiogram/methods/send_video_note.py
@@ -34,7 +34,7 @@ class SendVideoNote(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
duration: Optional[int] = None
diff --git a/aiogram/methods/send_voice.py b/aiogram/methods/send_voice.py
index d47f208a..597c8724 100644
--- a/aiogram/methods/send_voice.py
+++ b/aiogram/methods/send_voice.py
@@ -34,7 +34,7 @@ class SendVoice(TelegramMethod[Message]):
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
- """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
direct_messages_topic_id: Optional[int] = None
"""Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
caption: Optional[str] = None
diff --git a/aiogram/methods/unpin_all_forum_topic_messages.py b/aiogram/methods/unpin_all_forum_topic_messages.py
index 083a84eb..e3fba5aa 100644
--- a/aiogram/methods/unpin_all_forum_topic_messages.py
+++ b/aiogram/methods/unpin_all_forum_topic_messages.py
@@ -8,7 +8,7 @@ from .base import TelegramMethod
class UnpinAllForumTopicMessages(TelegramMethod[bool]):
"""
- Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.
+ Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#unpinallforumtopicmessages
"""
diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py
index ce8db89b..6fe65642 100644
--- a/aiogram/types/__init__.py
+++ b/aiogram/types/__init__.py
@@ -100,6 +100,7 @@ from .game_high_score import GameHighScore
from .general_forum_topic_hidden import GeneralForumTopicHidden
from .general_forum_topic_unhidden import GeneralForumTopicUnhidden
from .gift import Gift
+from .gift_background import GiftBackground
from .gift_info import GiftInfo
from .gifts import Gifts
from .giveaway import Giveaway
@@ -296,6 +297,7 @@ from .transaction_partner_user import TransactionPartnerUser
from .unique_gift import UniqueGift
from .unique_gift_backdrop import UniqueGiftBackdrop
from .unique_gift_backdrop_colors import UniqueGiftBackdropColors
+from .unique_gift_colors import UniqueGiftColors
from .unique_gift_info import UniqueGiftInfo
from .unique_gift_model import UniqueGiftModel
from .unique_gift_symbol import UniqueGiftSymbol
@@ -303,6 +305,7 @@ from .update import Update
from .user import User
from .user_chat_boosts import UserChatBoosts
from .user_profile_photos import UserProfilePhotos
+from .user_rating import UserRating
from .user_shared import UserShared
from .users_shared import UsersShared
from .venue import Venue
@@ -419,6 +422,7 @@ __all__ = (
"GeneralForumTopicHidden",
"GeneralForumTopicUnhidden",
"Gift",
+ "GiftBackground",
"GiftInfo",
"Gifts",
"Giveaway",
@@ -616,6 +620,7 @@ __all__ = (
"UniqueGift",
"UniqueGiftBackdrop",
"UniqueGiftBackdropColors",
+ "UniqueGiftColors",
"UniqueGiftInfo",
"UniqueGiftModel",
"UniqueGiftSymbol",
@@ -623,6 +628,7 @@ __all__ = (
"User",
"UserChatBoosts",
"UserProfilePhotos",
+ "UserRating",
"UserShared",
"UsersShared",
"Venue",
diff --git a/aiogram/types/accepted_gift_types.py b/aiogram/types/accepted_gift_types.py
index 990c8fb8..6527bdb1 100644
--- a/aiogram/types/accepted_gift_types.py
+++ b/aiogram/types/accepted_gift_types.py
@@ -20,6 +20,8 @@ class AcceptedGiftTypes(TelegramObject):
""":code:`True`, if unique gifts or gifts that can be upgraded to unique for free are accepted"""
premium_subscription: bool
""":code:`True`, if a Telegram Premium subscription is accepted"""
+ gifts_from_channels: bool
+ """:code:`True`, if transfers of unique gifts from channels are accepted"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@@ -32,6 +34,7 @@ class AcceptedGiftTypes(TelegramObject):
limited_gifts: bool,
unique_gifts: bool,
premium_subscription: bool,
+ gifts_from_channels: bool,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@@ -43,5 +46,6 @@ class AcceptedGiftTypes(TelegramObject):
limited_gifts=limited_gifts,
unique_gifts=unique_gifts,
premium_subscription=premium_subscription,
+ gifts_from_channels=gifts_from_channels,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py
index fca6b427..8d0377ed 100644
--- a/aiogram/types/chat.py
+++ b/aiogram/types/chat.py
@@ -694,7 +694,7 @@ class Chat(TelegramObject):
:param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_.
:param business_connection_id: Unique identifier of the business connection on behalf of which the action will be sent
- :param message_thread_id: Unique identifier for the target message thread; for supergroups only
+ :param message_thread_id: Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only
:return: instance of method :class:`aiogram.methods.send_chat_action.SendChatAction`
"""
# DO NOT EDIT MANUALLY!!!
@@ -1039,7 +1039,7 @@ class Chat(TelegramObject):
: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
+ :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to :code:`True` for promotions of channel administrators
:param can_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)
:param can_change_info: Pass :code:`True` if the administrator can change chat title, photo and other settings
:param can_invite_users: Pass :code:`True` if the administrator can invite new users to the chat
diff --git a/aiogram/types/chat_full_info.py b/aiogram/types/chat_full_info.py
index 5d79b5f3..327d1a98 100644
--- a/aiogram/types/chat_full_info.py
+++ b/aiogram/types/chat_full_info.py
@@ -18,6 +18,8 @@ if TYPE_CHECKING:
from .chat_photo import ChatPhoto
from .message import Message
from .reaction_type_union import ReactionTypeUnion
+ from .unique_gift_colors import UniqueGiftColors
+ from .user_rating import UserRating
class ChatFullInfo(Chat):
@@ -121,6 +123,12 @@ class ChatFullInfo(Chat):
"""*Optional*. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier."""
location: Optional[ChatLocation] = None
"""*Optional*. For supergroups, the location to which the supergroup is connected"""
+ rating: Optional[UserRating] = None
+ """*Optional*. For private chats, the rating of the user if any"""
+ unique_gift_colors: Optional[UniqueGiftColors] = None
+ """*Optional*. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews"""
+ paid_message_star_count: Optional[int] = None
+ """*Optional*. The number of Telegram Stars a general user have to pay to send a message to the chat"""
can_send_gift: Optional[bool] = Field(None, json_schema_extra={"deprecated": True})
"""*Optional*. :code:`True`, if gifts can be sent to the chat
@@ -181,6 +189,9 @@ class ChatFullInfo(Chat):
custom_emoji_sticker_set_name: Optional[str] = None,
linked_chat_id: Optional[int] = None,
location: Optional[ChatLocation] = None,
+ rating: Optional[UserRating] = None,
+ unique_gift_colors: Optional[UniqueGiftColors] = None,
+ paid_message_star_count: Optional[int] = None,
can_send_gift: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
@@ -236,6 +247,9 @@ class ChatFullInfo(Chat):
custom_emoji_sticker_set_name=custom_emoji_sticker_set_name,
linked_chat_id=linked_chat_id,
location=location,
+ rating=rating,
+ unique_gift_colors=unique_gift_colors,
+ paid_message_star_count=paid_message_star_count,
can_send_gift=can_send_gift,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/chat_join_request.py b/aiogram/types/chat_join_request.py
index 3446990c..6910eb84 100644
--- a/aiogram/types/chat_join_request.py
+++ b/aiogram/types/chat_join_request.py
@@ -189,7 +189,7 @@ class ChatJoinRequest(TelegramObject):
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
@@ -270,7 +270,7 @@ class ChatJoinRequest(TelegramObject):
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
@@ -354,7 +354,7 @@ class ChatJoinRequest(TelegramObject):
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent animation in seconds
:param width: Animation width
@@ -448,7 +448,7 @@ class ChatJoinRequest(TelegramObject):
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent animation in seconds
:param width: Animation width
@@ -539,7 +539,7 @@ class ChatJoinRequest(TelegramObject):
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details.
@@ -626,7 +626,7 @@ class ChatJoinRequest(TelegramObject):
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details.
@@ -709,7 +709,7 @@ class ChatJoinRequest(TelegramObject):
:param phone_number: Contact's phone number
:param first_name: Contact's first name
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes
@@ -783,7 +783,7 @@ class ChatJoinRequest(TelegramObject):
:param phone_number: Contact's phone number
:param first_name: Contact's first name
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes
@@ -858,7 +858,7 @@ class ChatJoinRequest(TelegramObject):
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
@@ -938,7 +938,7 @@ class ChatJoinRequest(TelegramObject):
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
@@ -1011,7 +1011,7 @@ class ChatJoinRequest(TelegramObject):
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
@@ -1070,7 +1070,7 @@ class ChatJoinRequest(TelegramObject):
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
@@ -1153,7 +1153,7 @@ class ChatJoinRequest(TelegramObject):
:param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
:param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.
:param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.
:param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_.
@@ -1275,7 +1275,7 @@ class ChatJoinRequest(TelegramObject):
:param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
:param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.
:param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.
:param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_.
@@ -1381,7 +1381,7 @@ class ChatJoinRequest(TelegramObject):
:param latitude: Latitude of the location
:param longitude: Longitude of the location
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
@@ -1461,7 +1461,7 @@ class ChatJoinRequest(TelegramObject):
:param latitude: Latitude of the location
:param longitude: Longitude of the location
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
@@ -1533,7 +1533,7 @@ class ChatJoinRequest(TelegramObject):
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat
:param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@@ -1592,7 +1592,7 @@ class ChatJoinRequest(TelegramObject):
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat
:param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@@ -1660,7 +1660,7 @@ class ChatJoinRequest(TelegramObject):
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details.
@@ -1742,7 +1742,7 @@ class ChatJoinRequest(TelegramObject):
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details.
@@ -1829,7 +1829,7 @@ class ChatJoinRequest(TelegramObject):
:param question: Poll question, 1-300 characters
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param question_parse_mode: Mode for parsing entities in the question. See `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`
@@ -1927,7 +1927,7 @@ class ChatJoinRequest(TelegramObject):
:param question: Poll question, 1-300 characters
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param question_parse_mode: Mode for parsing entities in the question. See `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`
@@ -2012,7 +2012,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#senddice
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '๐ฒ', '๐ฏ', '๐', 'โฝ', '๐ณ', or '๐ฐ'. Dice can have values 1-6 for '๐ฒ', '๐ฏ' and '๐ณ', values 1-5 for '๐' and 'โฝ', and values 1-64 for '๐ฐ'. Defaults to '๐ฒ'
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -2077,7 +2077,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#senddice
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '๐ฒ', '๐ฏ', '๐', 'โฝ', '๐ณ', or '๐ฐ'. Dice can have values 1-6 for '๐ฒ', '๐ฏ' and '๐ณ', values 1-5 for '๐' and 'โฝ', and values 1-64 for '๐ฐ'. Defaults to '๐ฒ'
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -2144,7 +2144,7 @@ class ChatJoinRequest(TelegramObject):
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files ยป `. Video and animated stickers can't be sent via an HTTP URL.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -2212,7 +2212,7 @@ class ChatJoinRequest(TelegramObject):
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files ยป `. Video and animated stickers can't be sent via an HTTP URL.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -2289,7 +2289,7 @@ class ChatJoinRequest(TelegramObject):
:param title: Name of the venue
:param address: Address of the venue
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param foursquare_id: Foursquare identifier of the venue
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
@@ -2375,7 +2375,7 @@ class ChatJoinRequest(TelegramObject):
:param title: Name of the venue
:param address: Address of the venue
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param foursquare_id: Foursquare identifier of the venue
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
@@ -2465,7 +2465,7 @@ class ChatJoinRequest(TelegramObject):
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param width: Video width
@@ -2568,7 +2568,7 @@ class ChatJoinRequest(TelegramObject):
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param width: Video width
@@ -2660,7 +2660,7 @@ class ChatJoinRequest(TelegramObject):
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `. Sending video notes by a URL is currently unsupported
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
@@ -2734,7 +2734,7 @@ class ChatJoinRequest(TelegramObject):
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `. Sending video notes by a URL is currently unsupported
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
@@ -2809,7 +2809,7 @@ class ChatJoinRequest(TelegramObject):
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Voice message caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.
@@ -2886,7 +2886,7 @@ class ChatJoinRequest(TelegramObject):
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Voice message caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.
diff --git a/aiogram/types/chat_member_updated.py b/aiogram/types/chat_member_updated.py
index 48d62a6b..684db0f7 100644
--- a/aiogram/types/chat_member_updated.py
+++ b/aiogram/types/chat_member_updated.py
@@ -140,7 +140,7 @@ class ChatMemberUpdated(TelegramObject):
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
@@ -224,7 +224,7 @@ class ChatMemberUpdated(TelegramObject):
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent animation in seconds
:param width: Animation width
@@ -315,7 +315,7 @@ class ChatMemberUpdated(TelegramObject):
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details.
@@ -398,7 +398,7 @@ class ChatMemberUpdated(TelegramObject):
:param phone_number: Contact's phone number
:param first_name: Contact's first name
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes
@@ -473,7 +473,7 @@ class ChatMemberUpdated(TelegramObject):
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
@@ -546,7 +546,7 @@ class ChatMemberUpdated(TelegramObject):
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
@@ -629,7 +629,7 @@ class ChatMemberUpdated(TelegramObject):
:param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
:param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.
:param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.
:param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_.
@@ -735,7 +735,7 @@ class ChatMemberUpdated(TelegramObject):
:param latitude: Latitude of the location
:param longitude: Longitude of the location
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
@@ -807,7 +807,7 @@ class ChatMemberUpdated(TelegramObject):
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat
:param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@@ -875,7 +875,7 @@ class ChatMemberUpdated(TelegramObject):
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details.
@@ -962,7 +962,7 @@ class ChatMemberUpdated(TelegramObject):
:param question: Poll question, 1-300 characters
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param question_parse_mode: Mode for parsing entities in the question. See `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`
@@ -1047,7 +1047,7 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#senddice
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '๐ฒ', '๐ฏ', '๐', 'โฝ', '๐ณ', or '๐ฐ'. Dice can have values 1-6 for '๐ฒ', '๐ฏ' and '๐ณ', values 1-5 for '๐' and 'โฝ', and values 1-64 for '๐ฐ'. Defaults to '๐ฒ'
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -1114,7 +1114,7 @@ class ChatMemberUpdated(TelegramObject):
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files ยป `. Video and animated stickers can't be sent via an HTTP URL.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -1191,7 +1191,7 @@ class ChatMemberUpdated(TelegramObject):
:param title: Name of the venue
:param address: Address of the venue
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param foursquare_id: Foursquare identifier of the venue
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
@@ -1281,7 +1281,7 @@ class ChatMemberUpdated(TelegramObject):
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param width: Video width
@@ -1373,7 +1373,7 @@ class ChatMemberUpdated(TelegramObject):
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `. Sending video notes by a URL is currently unsupported
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
@@ -1448,7 +1448,7 @@ class ChatMemberUpdated(TelegramObject):
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Voice message caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.
diff --git a/aiogram/types/checklist_task.py b/aiogram/types/checklist_task.py
index 8a50f021..0e1de526 100644
--- a/aiogram/types/checklist_task.py
+++ b/aiogram/types/checklist_task.py
@@ -5,6 +5,7 @@ from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject
if TYPE_CHECKING:
+ from .chat import Chat
from .message_entity import MessageEntity
from .user import User
@@ -23,7 +24,9 @@ class ChecklistTask(TelegramObject):
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"""
+ """*Optional*. User that completed the task; omitted if the task wasn't completed by a user"""
+ completed_by_chat: Optional[Chat] = None
+ """*Optional*. Chat that completed the task; omitted if the task wasn't completed by a chat"""
completion_date: Optional[int] = None
"""*Optional*. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed"""
@@ -38,6 +41,7 @@ class ChecklistTask(TelegramObject):
text: str,
text_entities: Optional[list[MessageEntity]] = None,
completed_by_user: Optional[User] = None,
+ completed_by_chat: Optional[Chat] = None,
completion_date: Optional[int] = None,
**__pydantic_kwargs: Any,
) -> None:
@@ -50,6 +54,7 @@ class ChecklistTask(TelegramObject):
text=text,
text_entities=text_entities,
completed_by_user=completed_by_user,
+ completed_by_chat=completed_by_chat,
completion_date=completion_date,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/direct_messages_topic.py b/aiogram/types/direct_messages_topic.py
index 4dab4fac..e3d8bafe 100644
--- a/aiogram/types/direct_messages_topic.py
+++ b/aiogram/types/direct_messages_topic.py
@@ -16,7 +16,7 @@ class DirectMessagesTopic(TelegramObject):
"""
topic_id: int
- """Unique identifier of the topic"""
+ """Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."""
user: Optional[User] = None
"""*Optional*. Information about the user that created the topic. Currently, it is always present"""
diff --git a/aiogram/types/forum_topic.py b/aiogram/types/forum_topic.py
index a6464bc1..02938ad5 100644
--- a/aiogram/types/forum_topic.py
+++ b/aiogram/types/forum_topic.py
@@ -20,6 +20,8 @@ class ForumTopic(TelegramObject):
"""Color of the topic icon in RGB format"""
icon_custom_emoji_id: Optional[str] = None
"""*Optional*. Unique identifier of the custom emoji shown as the topic icon"""
+ is_name_implicit: Optional[bool] = None
+ """*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@@ -32,6 +34,7 @@ class ForumTopic(TelegramObject):
name: str,
icon_color: int,
icon_custom_emoji_id: Optional[str] = None,
+ is_name_implicit: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@@ -43,5 +46,6 @@ class ForumTopic(TelegramObject):
name=name,
icon_color=icon_color,
icon_custom_emoji_id=icon_custom_emoji_id,
+ is_name_implicit=is_name_implicit,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/forum_topic_created.py b/aiogram/types/forum_topic_created.py
index 513df956..ec2426af 100644
--- a/aiogram/types/forum_topic_created.py
+++ b/aiogram/types/forum_topic_created.py
@@ -18,6 +18,8 @@ class ForumTopicCreated(TelegramObject):
"""Color of the topic icon in RGB format"""
icon_custom_emoji_id: Optional[str] = None
"""*Optional*. Unique identifier of the custom emoji shown as the topic icon"""
+ is_name_implicit: Optional[bool] = None
+ """*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@@ -29,6 +31,7 @@ class ForumTopicCreated(TelegramObject):
name: str,
icon_color: int,
icon_custom_emoji_id: Optional[str] = None,
+ is_name_implicit: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@@ -39,5 +42,6 @@ class ForumTopicCreated(TelegramObject):
name=name,
icon_color=icon_color,
icon_custom_emoji_id=icon_custom_emoji_id,
+ is_name_implicit=is_name_implicit,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/gift.py b/aiogram/types/gift.py
index 3379be7d..a3be7a48 100644
--- a/aiogram/types/gift.py
+++ b/aiogram/types/gift.py
@@ -6,6 +6,7 @@ from .base import TelegramObject
if TYPE_CHECKING:
from .chat import Chat
+ from .gift_background import GiftBackground
from .sticker import Sticker
@@ -24,10 +25,22 @@ class Gift(TelegramObject):
"""The number of Telegram Stars that must be paid to send the sticker"""
upgrade_star_count: Optional[int] = None
"""*Optional*. The number of Telegram Stars that must be paid to upgrade the gift to a unique one"""
+ is_premium: Optional[bool] = None
+ """*Optional*. :code:`True`, if the gift can only be purchased by Telegram Premium subscribers"""
+ has_colors: Optional[bool] = None
+ """*Optional*. :code:`True`, if the gift can be used (after being upgraded) to customize a user's appearance"""
total_count: Optional[int] = None
- """*Optional*. The total number of the gifts of this type that can be sent; for limited gifts only"""
+ """*Optional*. The total number of gifts of this type that can be sent by all users; for limited gifts only"""
remaining_count: Optional[int] = None
- """*Optional*. The number of remaining gifts of this type that can be sent; for limited gifts only"""
+ """*Optional*. The number of remaining gifts of this type that can be sent by all users; for limited gifts only"""
+ personal_total_count: Optional[int] = None
+ """*Optional*. The total number of gifts of this type that can be sent by the bot; for limited gifts only"""
+ personal_remaining_count: Optional[int] = None
+ """*Optional*. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only"""
+ background: Optional[GiftBackground] = None
+ """*Optional*. Background of the gift"""
+ unique_gift_variant_count: Optional[int] = None
+ """*Optional*. The total number of different unique gifts that can be obtained by upgrading the gift"""
publisher_chat: Optional[Chat] = None
"""*Optional*. Information about the chat that published the gift"""
@@ -42,8 +55,14 @@ class Gift(TelegramObject):
sticker: Sticker,
star_count: int,
upgrade_star_count: Optional[int] = None,
+ is_premium: Optional[bool] = None,
+ has_colors: Optional[bool] = None,
total_count: Optional[int] = None,
remaining_count: Optional[int] = None,
+ personal_total_count: Optional[int] = None,
+ personal_remaining_count: Optional[int] = None,
+ background: Optional[GiftBackground] = None,
+ unique_gift_variant_count: Optional[int] = None,
publisher_chat: Optional[Chat] = None,
**__pydantic_kwargs: Any,
) -> None:
@@ -56,8 +75,14 @@ class Gift(TelegramObject):
sticker=sticker,
star_count=star_count,
upgrade_star_count=upgrade_star_count,
+ is_premium=is_premium,
+ has_colors=has_colors,
total_count=total_count,
remaining_count=remaining_count,
+ personal_total_count=personal_total_count,
+ personal_remaining_count=personal_remaining_count,
+ background=background,
+ unique_gift_variant_count=unique_gift_variant_count,
publisher_chat=publisher_chat,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/gift_background.py b/aiogram/types/gift_background.py
new file mode 100644
index 00000000..39c101d6
--- /dev/null
+++ b/aiogram/types/gift_background.py
@@ -0,0 +1,43 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, Any
+
+from .base import TelegramObject
+
+
+class GiftBackground(TelegramObject):
+ """
+ This object describes the background of a gift.
+
+ Source: https://core.telegram.org/bots/api#giftbackground
+ """
+
+ center_color: int
+ """Center color of the background in RGB format"""
+ edge_color: int
+ """Edge color of the background in RGB format"""
+ text_color: int
+ """Text color of the background in RGB format"""
+
+ if TYPE_CHECKING:
+ # DO NOT EDIT MANUALLY!!!
+ # This section was auto-generated via `butcher`
+
+ def __init__(
+ __pydantic__self__,
+ *,
+ center_color: int,
+ edge_color: int,
+ text_color: int,
+ **__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__(
+ center_color=center_color,
+ edge_color=edge_color,
+ text_color=text_color,
+ **__pydantic_kwargs,
+ )
diff --git a/aiogram/types/gift_info.py b/aiogram/types/gift_info.py
index 7f817b09..e09f5fd5 100644
--- a/aiogram/types/gift_info.py
+++ b/aiogram/types/gift_info.py
@@ -23,7 +23,9 @@ class GiftInfo(TelegramObject):
convert_star_count: Optional[int] = None
"""*Optional*. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible"""
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"""
+ """*Optional*. Number of Telegram Stars that were prepaid for the ability to upgrade the gift"""
+ is_upgrade_separate: Optional[bool] = None
+ """*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent"""
can_be_upgraded: Optional[bool] = None
"""*Optional*. :code:`True`, if the gift can be upgraded to a unique gift"""
text: Optional[str] = None
@@ -32,6 +34,8 @@ class GiftInfo(TelegramObject):
"""*Optional*. Special entities that appear in the text"""
is_private: Optional[bool] = None
"""*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"""
+ unique_gift_number: Optional[int] = None
+ """*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@@ -44,10 +48,12 @@ class GiftInfo(TelegramObject):
owned_gift_id: Optional[str] = None,
convert_star_count: Optional[int] = None,
prepaid_upgrade_star_count: Optional[int] = None,
+ is_upgrade_separate: Optional[bool] = None,
can_be_upgraded: Optional[bool] = None,
text: Optional[str] = None,
entities: Optional[list[MessageEntity]] = None,
is_private: Optional[bool] = None,
+ unique_gift_number: Optional[int] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@@ -59,9 +65,11 @@ class GiftInfo(TelegramObject):
owned_gift_id=owned_gift_id,
convert_star_count=convert_star_count,
prepaid_upgrade_star_count=prepaid_upgrade_star_count,
+ is_upgrade_separate=is_upgrade_separate,
can_be_upgraded=can_be_upgraded,
text=text,
entities=entities,
is_private=is_private,
+ unique_gift_number=unique_gift_number,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/inaccessible_message.py b/aiogram/types/inaccessible_message.py
index 796c2e66..dbeea26a 100644
--- a/aiogram/types/inaccessible_message.py
+++ b/aiogram/types/inaccessible_message.py
@@ -112,7 +112,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
@@ -196,7 +196,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
@@ -281,7 +281,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent animation in seconds
:param width: Animation width
@@ -378,7 +378,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent animation in seconds
:param width: Animation width
@@ -470,7 +470,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details.
@@ -560,7 +560,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details.
@@ -644,7 +644,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param phone_number: Contact's phone number
:param first_name: Contact's first name
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes
@@ -721,7 +721,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param phone_number: Contact's phone number
:param first_name: Contact's first name
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes
@@ -797,7 +797,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
@@ -880,7 +880,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
@@ -954,7 +954,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
@@ -1016,7 +1016,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
@@ -1100,7 +1100,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
:param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.
:param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.
:param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_.
@@ -1225,7 +1225,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
:param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.
:param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.
:param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_.
@@ -1332,7 +1332,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param latitude: Latitude of the location
:param longitude: Longitude of the location
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
@@ -1415,7 +1415,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param latitude: Latitude of the location
:param longitude: Longitude of the location
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
@@ -1488,7 +1488,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat
:param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@@ -1550,7 +1550,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat
:param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@@ -1619,7 +1619,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details.
@@ -1704,7 +1704,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details.
@@ -1792,7 +1792,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param question: Poll question, 1-300 characters
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param question_parse_mode: Mode for parsing entities in the question. See `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`
@@ -1893,7 +1893,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param question: Poll question, 1-300 characters
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param question_parse_mode: Mode for parsing entities in the question. See `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`
@@ -1979,7 +1979,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#senddice
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '๐ฒ', '๐ฏ', '๐', 'โฝ', '๐ณ', or '๐ฐ'. Dice can have values 1-6 for '๐ฒ', '๐ฏ' and '๐ณ', values 1-5 for '๐' and 'โฝ', and values 1-64 for '๐ฐ'. Defaults to '๐ฒ'
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -2047,7 +2047,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#senddice
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '๐ฒ', '๐ฏ', '๐', 'โฝ', '๐ณ', or '๐ฐ'. Dice can have values 1-6 for '๐ฒ', '๐ฏ' and '๐ณ', values 1-5 for '๐' and 'โฝ', and values 1-64 for '๐ฐ'. Defaults to '๐ฒ'
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -2115,7 +2115,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files ยป `. Video and animated stickers can't be sent via an HTTP URL.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -2186,7 +2186,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files ยป `. Video and animated stickers can't be sent via an HTTP URL.
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
@@ -2264,7 +2264,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param title: Name of the venue
:param address: Address of the venue
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param foursquare_id: Foursquare identifier of the venue
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
@@ -2353,7 +2353,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param title: Name of the venue
:param address: Address of the venue
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param foursquare_id: Foursquare identifier of the venue
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
@@ -2444,7 +2444,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param width: Video width
@@ -2550,7 +2550,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param width: Video width
@@ -2643,7 +2643,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `. Sending video notes by a URL is currently unsupported
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
@@ -2720,7 +2720,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `. Sending video notes by a URL is currently unsupported
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
@@ -2796,7 +2796,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Voice message caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.
@@ -2876,7 +2876,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Voice message caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.
@@ -2951,10 +2951,10 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#sendpaidmedia
- :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-10000
+ :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-25000
:param media: A JSON-serialized array describing the media to be sent; up to 10 items
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.
:param caption: Media caption, 0-1024 characters after entities parsing
@@ -3029,10 +3029,10 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#sendpaidmedia
- :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-10000
+ :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-25000
:param media: A JSON-serialized array describing the media to be sent; up to 10 items
: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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.
:param caption: Media caption, 0-1024 characters after entities parsing
diff --git a/aiogram/types/input_checklist.py b/aiogram/types/input_checklist.py
index 9a0cd40d..4a0eebea 100644
--- a/aiogram/types/input_checklist.py
+++ b/aiogram/types/input_checklist.py
@@ -21,7 +21,7 @@ class InputChecklist(TelegramObject):
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 `_ for more details."""
+ """*Optional*. Mode for parsing entities in the title. See `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
diff --git a/aiogram/types/input_checklist_task.py b/aiogram/types/input_checklist_task.py
index 17b62ac8..15f57061 100644
--- a/aiogram/types/input_checklist_task.py
+++ b/aiogram/types/input_checklist_task.py
@@ -20,7 +20,7 @@ class InputChecklistTask(TelegramObject):
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 `_ for more details."""
+ """*Optional*. Mode for parsing entities in the text. See `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."""
diff --git a/aiogram/types/keyboard_button.py b/aiogram/types/keyboard_button.py
index 0cf7d58d..63f08054 100644
--- a/aiogram/types/keyboard_button.py
+++ b/aiogram/types/keyboard_button.py
@@ -25,9 +25,9 @@ class KeyboardButton(MutableTelegramObject):
text: str
"""Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed"""
request_users: Optional[KeyboardButtonRequestUsers] = None
- """*Optional.* If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only."""
+ """*Optional*. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only."""
request_chat: Optional[KeyboardButtonRequestChat] = None
- """*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only."""
+ """*Optional*. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only."""
request_contact: Optional[bool] = None
"""*Optional*. If :code:`True`, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only."""
request_location: Optional[bool] = None
diff --git a/aiogram/types/message.py b/aiogram/types/message.py
index 7dbf612a..53032360 100644
--- a/aiogram/types/message.py
+++ b/aiogram/types/message.py
@@ -144,7 +144,7 @@ class Message(MaybeInaccessibleMessage):
chat: Chat
"""Chat the message belongs to"""
message_thread_id: Optional[int] = None
- """*Optional*. Unique identifier of a message thread to which the message belongs; for supergroups only"""
+ """*Optional*. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only"""
direct_messages_topic: Optional[DirectMessagesTopic] = None
"""*Optional*. Information about the direct messages chat topic that contains the message"""
from_user: Optional[User] = Field(None, alias="from")
@@ -160,7 +160,7 @@ class Message(MaybeInaccessibleMessage):
forward_origin: Optional[MessageOriginUnion] = None
"""*Optional*. Information about the original message for forwarded messages"""
is_topic_message: Optional[bool] = None
- """*Optional*. :code:`True`, if the message is sent to a forum topic"""
+ """*Optional*. :code:`True`, if the message is sent to a topic in a forum supergroup or a private chat with the bot"""
is_automatic_forward: Optional[bool] = None
"""*Optional*. :code:`True`, if the message is a channel post that was automatically forwarded to the connected discussion group"""
reply_to_message: Optional[Message] = None
@@ -279,6 +279,8 @@ class Message(MaybeInaccessibleMessage):
"""*Optional*. Service message: a regular gift was sent or received"""
unique_gift: Optional[UniqueGiftInfo] = None
"""*Optional*. Service message: a unique gift was sent or received"""
+ gift_upgrade_sent: Optional[GiftInfo] = None
+ """*Optional*. Service message: upgrade of a gift was purchased after the gift was sent"""
connected_website: Optional[str] = None
"""*Optional*. The domain name of the website on which the user has logged in. `More about Telegram Login ยป `_"""
write_access_allowed: Optional[WriteAccessAllowed] = None
@@ -455,6 +457,7 @@ class Message(MaybeInaccessibleMessage):
chat_shared: Optional[ChatShared] = None,
gift: Optional[GiftInfo] = None,
unique_gift: Optional[UniqueGiftInfo] = None,
+ gift_upgrade_sent: Optional[GiftInfo] = None,
connected_website: Optional[str] = None,
write_access_allowed: Optional[WriteAccessAllowed] = None,
passport_data: Optional[PassportData] = None,
@@ -571,6 +574,7 @@ class Message(MaybeInaccessibleMessage):
chat_shared=chat_shared,
gift=gift,
unique_gift=unique_gift,
+ gift_upgrade_sent=gift_upgrade_sent,
connected_website=connected_website,
write_access_allowed=write_access_allowed,
passport_data=passport_data,
@@ -738,6 +742,8 @@ class Message(MaybeInaccessibleMessage):
return ContentType.GIFT
if self.unique_gift:
return ContentType.UNIQUE_GIFT
+ if self.gift_upgrade_sent:
+ return ContentType.GIFT_UPGRADE_SENT
if self.paid_message_price_changed:
return ContentType.PAID_MESSAGE_PRICE_CHANGED
if self.suggested_post_approved:
@@ -3781,6 +3787,7 @@ class Message(MaybeInaccessibleMessage):
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
+ message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
@@ -3800,7 +3807,7 @@ class Message(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#copymessage
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param video_start_timestamp: New start timestamp for the copied video in the message
:param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
@@ -3810,6 +3817,7 @@ class Message(MaybeInaccessibleMessage):
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; only available when copying to private chats
:param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
@@ -3840,6 +3848,7 @@ class Message(MaybeInaccessibleMessage):
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
+ message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
@@ -3915,6 +3924,7 @@ class Message(MaybeInaccessibleMessage):
video_start_timestamp: Optional[DateTimeUnion] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
+ message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
**kwargs: Any,
) -> ForwardMessage:
@@ -3930,11 +3940,12 @@ class Message(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#forwardmessage
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat
:param video_start_timestamp: New start timestamp for the forwarded video in the message
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the forwarded message from forwarding and saving
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; only available when forwarding to private chats
:param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only
:return: instance of method :class:`aiogram.methods.forward_message.ForwardMessage`
"""
@@ -3956,6 +3967,7 @@ class Message(MaybeInaccessibleMessage):
video_start_timestamp=video_start_timestamp,
disable_notification=disable_notification,
protect_content=protect_content,
+ message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
**kwargs,
).as_(self._bot)
@@ -4458,7 +4470,7 @@ class Message(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#sendpaidmedia
- :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-10000
+ :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-25000
:param media: A JSON-serialized array describing the media to be sent; up to 10 items
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.
@@ -4534,7 +4546,7 @@ class Message(MaybeInaccessibleMessage):
Source: https://core.telegram.org/bots/api#sendpaidmedia
- :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-10000
+ :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-25000
:param media: A JSON-serialized array describing the media to be sent; up to 10 items
:param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.
diff --git a/aiogram/types/owned_gift_regular.py b/aiogram/types/owned_gift_regular.py
index 53eb1260..1f0ebbf2 100644
--- a/aiogram/types/owned_gift_regular.py
+++ b/aiogram/types/owned_gift_regular.py
@@ -42,9 +42,13 @@ class OwnedGiftRegular(OwnedGift):
was_refunded: Optional[bool] = None
"""*Optional*. :code:`True`, if the gift was refunded and isn't available anymore"""
convert_star_count: Optional[int] = None
- """*Optional*. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars"""
+ """*Optional*. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only"""
prepaid_upgrade_star_count: Optional[int] = None
- """*Optional*. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift"""
+ """*Optional*. Number of Telegram Stars that were paid for the ability to upgrade the gift"""
+ is_upgrade_separate: Optional[bool] = None
+ """*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only"""
+ unique_gift_number: Optional[int] = None
+ """*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@@ -66,6 +70,8 @@ class OwnedGiftRegular(OwnedGift):
was_refunded: Optional[bool] = None,
convert_star_count: Optional[int] = None,
prepaid_upgrade_star_count: Optional[int] = None,
+ is_upgrade_separate: Optional[bool] = None,
+ unique_gift_number: Optional[int] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@@ -86,5 +92,7 @@ class OwnedGiftRegular(OwnedGift):
was_refunded=was_refunded,
convert_star_count=convert_star_count,
prepaid_upgrade_star_count=prepaid_upgrade_star_count,
+ is_upgrade_separate=is_upgrade_separate,
+ unique_gift_number=unique_gift_number,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/suggested_post_price.py b/aiogram/types/suggested_post_price.py
index 0fc0ae4c..88d73332 100644
--- a/aiogram/types/suggested_post_price.py
+++ b/aiogram/types/suggested_post_price.py
@@ -7,7 +7,7 @@ from .base import TelegramObject
class SuggestedPostPrice(TelegramObject):
"""
- Desribes price of a suggested post.
+ Describes the price of a suggested post.
Source: https://core.telegram.org/bots/api#suggestedpostprice
"""
diff --git a/aiogram/types/unique_gift.py b/aiogram/types/unique_gift.py
index 9f3f0f5a..c8de0b77 100644
--- a/aiogram/types/unique_gift.py
+++ b/aiogram/types/unique_gift.py
@@ -7,6 +7,7 @@ from .base import TelegramObject
if TYPE_CHECKING:
from .chat import Chat
from .unique_gift_backdrop import UniqueGiftBackdrop
+ from .unique_gift_colors import UniqueGiftColors
from .unique_gift_model import UniqueGiftModel
from .unique_gift_symbol import UniqueGiftSymbol
@@ -18,6 +19,8 @@ class UniqueGift(TelegramObject):
Source: https://core.telegram.org/bots/api#uniquegift
"""
+ gift_id: str
+ """Identifier of the regular gift from which the gift was upgraded"""
base_name: str
"""Human-readable name of the regular gift from which this unique gift was upgraded"""
name: str
@@ -30,6 +33,12 @@ class UniqueGift(TelegramObject):
"""Symbol of the gift"""
backdrop: UniqueGiftBackdrop
"""Backdrop of the gift"""
+ is_premium: Optional[bool] = None
+ """*Optional*. :code:`True`, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers"""
+ is_from_blockchain: Optional[bool] = None
+ """*Optional*. :code:`True`, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram"""
+ colors: Optional[UniqueGiftColors] = None
+ """*Optional*. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only"""
publisher_chat: Optional[Chat] = None
"""*Optional*. Information about the chat that published the gift"""
@@ -40,12 +49,16 @@ class UniqueGift(TelegramObject):
def __init__(
__pydantic__self__,
*,
+ gift_id: str,
base_name: str,
name: str,
number: int,
model: UniqueGiftModel,
symbol: UniqueGiftSymbol,
backdrop: UniqueGiftBackdrop,
+ is_premium: Optional[bool] = None,
+ is_from_blockchain: Optional[bool] = None,
+ colors: Optional[UniqueGiftColors] = None,
publisher_chat: Optional[Chat] = None,
**__pydantic_kwargs: Any,
) -> None:
@@ -54,12 +67,16 @@ class UniqueGift(TelegramObject):
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
+ gift_id=gift_id,
base_name=base_name,
name=name,
number=number,
model=model,
symbol=symbol,
backdrop=backdrop,
+ is_premium=is_premium,
+ is_from_blockchain=is_from_blockchain,
+ colors=colors,
publisher_chat=publisher_chat,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/unique_gift_colors.py b/aiogram/types/unique_gift_colors.py
new file mode 100644
index 00000000..1d78e6e7
--- /dev/null
+++ b/aiogram/types/unique_gift_colors.py
@@ -0,0 +1,55 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, Any
+
+from .base import TelegramObject
+
+
+class UniqueGiftColors(TelegramObject):
+ """
+ This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.
+
+ Source: https://core.telegram.org/bots/api#uniquegiftcolors
+ """
+
+ model_custom_emoji_id: str
+ """Custom emoji identifier of the unique gift's model"""
+ symbol_custom_emoji_id: str
+ """Custom emoji identifier of the unique gift's symbol"""
+ light_theme_main_color: int
+ """Main color used in light themes; RGB format"""
+ light_theme_other_colors: list[int]
+ """List of 1-3 additional colors used in light themes; RGB format"""
+ dark_theme_main_color: int
+ """Main color used in dark themes; RGB format"""
+ dark_theme_other_colors: list[int]
+ """List of 1-3 additional colors used in dark themes; RGB format"""
+
+ if TYPE_CHECKING:
+ # DO NOT EDIT MANUALLY!!!
+ # This section was auto-generated via `butcher`
+
+ def __init__(
+ __pydantic__self__,
+ *,
+ model_custom_emoji_id: str,
+ symbol_custom_emoji_id: str,
+ light_theme_main_color: int,
+ light_theme_other_colors: list[int],
+ dark_theme_main_color: int,
+ dark_theme_other_colors: list[int],
+ **__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__(
+ model_custom_emoji_id=model_custom_emoji_id,
+ symbol_custom_emoji_id=symbol_custom_emoji_id,
+ light_theme_main_color=light_theme_main_color,
+ light_theme_other_colors=light_theme_other_colors,
+ dark_theme_main_color=dark_theme_main_color,
+ dark_theme_other_colors=dark_theme_other_colors,
+ **__pydantic_kwargs,
+ )
diff --git a/aiogram/types/unique_gift_info.py b/aiogram/types/unique_gift_info.py
index 40e935a5..4fd3a0c2 100644
--- a/aiogram/types/unique_gift_info.py
+++ b/aiogram/types/unique_gift_info.py
@@ -2,6 +2,8 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
+from pydantic import Field
+
from .base import TelegramObject
from .custom import DateTime
@@ -19,15 +21,22 @@ class UniqueGiftInfo(TelegramObject):
gift: UniqueGift
"""Information about the gift"""
origin: str
- """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"""
- last_resale_star_count: Optional[int] = None
- """*Optional*. For gifts bought from other users, the price paid for the gift"""
+ """Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, 'resale' for gifts bought from other users, 'gifted_upgrade' for upgrades purchased after the gift was sent, or 'offer' for gifts bought or sold through gift purchase offers"""
+ last_resale_currency: Optional[str] = None
+ """*Optional*. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins."""
+ last_resale_amount: Optional[int] = None
+ """*Optional*. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins"""
owned_gift_id: Optional[str] = None
"""*Optional*. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"""
transfer_star_count: Optional[int] = None
"""*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"""
next_transfer_date: Optional[DateTime] = None
"""*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"""
+ last_resale_star_count: Optional[int] = Field(None, json_schema_extra={"deprecated": True})
+ """*Optional*. For gifts bought from other users, the price paid for the gift
+
+.. deprecated:: API:9.3
+ https://core.telegram.org/bots/api-changelog#december-31-2025"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@@ -38,10 +47,12 @@ class UniqueGiftInfo(TelegramObject):
*,
gift: UniqueGift,
origin: str,
- last_resale_star_count: Optional[int] = None,
+ last_resale_currency: Optional[str] = None,
+ last_resale_amount: Optional[int] = None,
owned_gift_id: Optional[str] = None,
transfer_star_count: Optional[int] = None,
next_transfer_date: Optional[DateTime] = None,
+ last_resale_star_count: Optional[int] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@@ -51,9 +62,11 @@ class UniqueGiftInfo(TelegramObject):
super().__init__(
gift=gift,
origin=origin,
- last_resale_star_count=last_resale_star_count,
+ last_resale_currency=last_resale_currency,
+ last_resale_amount=last_resale_amount,
owned_gift_id=owned_gift_id,
transfer_star_count=transfer_star_count,
next_transfer_date=next_transfer_date,
+ last_resale_star_count=last_resale_star_count,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/user.py b/aiogram/types/user.py
index 56782f2f..21df1a2a 100644
--- a/aiogram/types/user.py
+++ b/aiogram/types/user.py
@@ -43,6 +43,8 @@ class User(TelegramObject):
"""*Optional*. :code:`True`, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in :class:`aiogram.methods.get_me.GetMe`."""
has_main_web_app: Optional[bool] = None
"""*Optional*. :code:`True`, if the bot has a main Web App. Returned only in :class:`aiogram.methods.get_me.GetMe`."""
+ has_topics_enabled: Optional[bool] = None
+ """*Optional*. :code:`True`, if the bot has forum topic mode enabled in private chats. Returned only in :class:`aiogram.methods.get_me.GetMe`."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@@ -64,6 +66,7 @@ class User(TelegramObject):
supports_inline_queries: Optional[bool] = None,
can_connect_to_business: Optional[bool] = None,
has_main_web_app: Optional[bool] = None,
+ has_topics_enabled: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@@ -84,6 +87,7 @@ class User(TelegramObject):
supports_inline_queries=supports_inline_queries,
can_connect_to_business=can_connect_to_business,
has_main_web_app=has_main_web_app,
+ has_topics_enabled=has_topics_enabled,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/user_rating.py b/aiogram/types/user_rating.py
new file mode 100644
index 00000000..f00fe788
--- /dev/null
+++ b/aiogram/types/user_rating.py
@@ -0,0 +1,47 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, Any, Optional
+
+from .base import TelegramObject
+
+
+class UserRating(TelegramObject):
+ """
+ This object describes the rating of a user based on their Telegram Star spendings.
+
+ Source: https://core.telegram.org/bots/api#userrating
+ """
+
+ level: int
+ """Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern."""
+ rating: int
+ """Numerical value of the user's rating; the higher the rating, the better"""
+ current_level_rating: int
+ """The rating value required to get the current level"""
+ next_level_rating: Optional[int] = None
+ """*Optional*. The rating value required to get to the next level; omitted if the maximum level was reached"""
+
+ if TYPE_CHECKING:
+ # DO NOT EDIT MANUALLY!!!
+ # This section was auto-generated via `butcher`
+
+ def __init__(
+ __pydantic__self__,
+ *,
+ level: int,
+ rating: int,
+ current_level_rating: int,
+ next_level_rating: 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__(
+ level=level,
+ rating=rating,
+ current_level_rating=current_level_rating,
+ next_level_rating=next_level_rating,
+ **__pydantic_kwargs,
+ )
diff --git a/docs/api/methods/get_chat_gifts.rst b/docs/api/methods/get_chat_gifts.rst
new file mode 100644
index 00000000..87f48d3b
--- /dev/null
+++ b/docs/api/methods/get_chat_gifts.rst
@@ -0,0 +1,38 @@
+############
+getChatGifts
+############
+
+Returns: :obj:`OwnedGifts`
+
+.. automodule:: aiogram.methods.get_chat_gifts
+ :members:
+ :member-order: bysource
+ :undoc-members: True
+ :exclude-members: model_config,model_fields
+
+
+Usage
+=====
+
+As bot method
+-------------
+
+.. code-block::
+
+ result: OwnedGifts = await bot.get_chat_gifts(...)
+
+
+Method as object
+----------------
+
+Imports:
+
+- :code:`from aiogram.methods.get_chat_gifts import GetChatGifts`
+- alias: :code:`from aiogram.methods import GetChatGifts`
+
+With specific bot
+~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ result: OwnedGifts = await bot(GetChatGifts(...))
diff --git a/docs/api/methods/get_user_gifts.rst b/docs/api/methods/get_user_gifts.rst
new file mode 100644
index 00000000..77b96e0f
--- /dev/null
+++ b/docs/api/methods/get_user_gifts.rst
@@ -0,0 +1,38 @@
+############
+getUserGifts
+############
+
+Returns: :obj:`OwnedGifts`
+
+.. automodule:: aiogram.methods.get_user_gifts
+ :members:
+ :member-order: bysource
+ :undoc-members: True
+ :exclude-members: model_config,model_fields
+
+
+Usage
+=====
+
+As bot method
+-------------
+
+.. code-block::
+
+ result: OwnedGifts = await bot.get_user_gifts(...)
+
+
+Method as object
+----------------
+
+Imports:
+
+- :code:`from aiogram.methods.get_user_gifts import GetUserGifts`
+- alias: :code:`from aiogram.methods import GetUserGifts`
+
+With specific bot
+~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ result: OwnedGifts = await bot(GetUserGifts(...))
diff --git a/docs/api/methods/index.rst b/docs/api/methods/index.rst
index 270234e1..a93ed67d 100644
--- a/docs/api/methods/index.rst
+++ b/docs/api/methods/index.rst
@@ -68,6 +68,7 @@ Available methods
get_business_connection
get_chat
get_chat_administrators
+ get_chat_gifts
get_chat_member
get_chat_member_count
get_chat_menu_button
@@ -80,6 +81,7 @@ Available methods
get_my_name
get_my_short_description
get_user_chat_boosts
+ get_user_gifts
get_user_profile_photos
gift_premium_subscription
hide_general_forum_topic
@@ -94,6 +96,7 @@ Available methods
remove_user_verification
reopen_forum_topic
reopen_general_forum_topic
+ repost_story
restrict_chat_member
revoke_chat_invite_link
send_animation
@@ -107,6 +110,7 @@ Available methods
send_location
send_media_group
send_message
+ send_message_draft
send_paid_media
send_photo
send_poll
diff --git a/docs/api/methods/repost_story.rst b/docs/api/methods/repost_story.rst
new file mode 100644
index 00000000..c5a55d84
--- /dev/null
+++ b/docs/api/methods/repost_story.rst
@@ -0,0 +1,45 @@
+###########
+repostStory
+###########
+
+Returns: :obj:`Story`
+
+.. automodule:: aiogram.methods.repost_story
+ :members:
+ :member-order: bysource
+ :undoc-members: True
+ :exclude-members: model_config,model_fields
+
+
+Usage
+=====
+
+As bot method
+-------------
+
+.. code-block::
+
+ result: Story = await bot.repost_story(...)
+
+
+Method as object
+----------------
+
+Imports:
+
+- :code:`from aiogram.methods.repost_story import RepostStory`
+- alias: :code:`from aiogram.methods import RepostStory`
+
+With specific bot
+~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ result: Story = await bot(RepostStory(...))
+
+As reply into Webhook in handler
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ return RepostStory(...)
diff --git a/docs/api/methods/send_message_draft.rst b/docs/api/methods/send_message_draft.rst
new file mode 100644
index 00000000..6519674a
--- /dev/null
+++ b/docs/api/methods/send_message_draft.rst
@@ -0,0 +1,45 @@
+################
+sendMessageDraft
+################
+
+Returns: :obj:`bool`
+
+.. automodule:: aiogram.methods.send_message_draft
+ :members:
+ :member-order: bysource
+ :undoc-members: True
+ :exclude-members: model_config,model_fields
+
+
+Usage
+=====
+
+As bot method
+-------------
+
+.. code-block::
+
+ result: bool = await bot.send_message_draft(...)
+
+
+Method as object
+----------------
+
+Imports:
+
+- :code:`from aiogram.methods.send_message_draft import SendMessageDraft`
+- alias: :code:`from aiogram.methods import SendMessageDraft`
+
+With specific bot
+~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ result: bool = await bot(SendMessageDraft(...))
+
+As reply into Webhook in handler
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ return SendMessageDraft(...)
diff --git a/docs/api/types/gift_background.rst b/docs/api/types/gift_background.rst
new file mode 100644
index 00000000..6ac9c31e
--- /dev/null
+++ b/docs/api/types/gift_background.rst
@@ -0,0 +1,10 @@
+##############
+GiftBackground
+##############
+
+
+.. automodule:: aiogram.types.gift_background
+ :members:
+ :member-order: bysource
+ :undoc-members: True
+ :exclude-members: model_config,model_fields
diff --git a/docs/api/types/index.rst b/docs/api/types/index.rst
index f6fb9bc6..e48d11b5 100644
--- a/docs/api/types/index.rst
+++ b/docs/api/types/index.rst
@@ -91,6 +91,7 @@ Available types
general_forum_topic_hidden
general_forum_topic_unhidden
gift
+ gift_background
gift_info
gifts
giveaway
@@ -192,12 +193,14 @@ Available types
unique_gift
unique_gift_backdrop
unique_gift_backdrop_colors
+ unique_gift_colors
unique_gift_info
unique_gift_model
unique_gift_symbol
user
user_chat_boosts
user_profile_photos
+ user_rating
user_shared
users_shared
venue
diff --git a/docs/api/types/unique_gift_colors.rst b/docs/api/types/unique_gift_colors.rst
new file mode 100644
index 00000000..8cab2a79
--- /dev/null
+++ b/docs/api/types/unique_gift_colors.rst
@@ -0,0 +1,10 @@
+################
+UniqueGiftColors
+################
+
+
+.. automodule:: aiogram.types.unique_gift_colors
+ :members:
+ :member-order: bysource
+ :undoc-members: True
+ :exclude-members: model_config,model_fields
diff --git a/docs/api/types/user_rating.rst b/docs/api/types/user_rating.rst
new file mode 100644
index 00000000..c313ca2c
--- /dev/null
+++ b/docs/api/types/user_rating.rst
@@ -0,0 +1,10 @@
+##########
+UserRating
+##########
+
+
+.. automodule:: aiogram.types.user_rating
+ :members:
+ :member-order: bysource
+ :undoc-members: True
+ :exclude-members: model_config,model_fields
diff --git a/tests/test_api/test_methods/test_get_chat.py b/tests/test_api/test_methods/test_get_chat.py
index a5cfaf52..bc0eb8cd 100644
--- a/tests/test_api/test_methods/test_get_chat.py
+++ b/tests/test_api/test_methods/test_get_chat.py
@@ -19,6 +19,7 @@ class TestGetChat:
limited_gifts=True,
unique_gifts=True,
premium_subscription=True,
+ gifts_from_channels=True,
),
),
)
diff --git a/tests/test_api/test_methods/test_get_chat_gifts.py b/tests/test_api/test_methods/test_get_chat_gifts.py
new file mode 100644
index 00000000..26c83b47
--- /dev/null
+++ b/tests/test_api/test_methods/test_get_chat_gifts.py
@@ -0,0 +1,41 @@
+import datetime
+
+from aiogram.methods import GetChatGifts
+from aiogram.types import Gift, OwnedGiftRegular, OwnedGifts, Sticker
+from tests.mocked_bot import MockedBot
+
+
+class TestGetChatGifts:
+ async def test_bot_method(self, bot: MockedBot):
+ prepare_result = bot.add_result_for(
+ GetChatGifts,
+ ok=True,
+ result=OwnedGifts(
+ total_count=1,
+ gifts=[
+ OwnedGiftRegular(
+ gift=Gift(
+ id="test_gift_id",
+ sticker=Sticker(
+ file_id="test_file_id",
+ file_unique_id="test_file_unique_id",
+ type="regular",
+ width=512,
+ height=512,
+ is_animated=False,
+ is_video=False,
+ ),
+ star_count=100,
+ ),
+ send_date=int(datetime.datetime.now().timestamp()),
+ )
+ ],
+ ),
+ )
+
+ response: OwnedGifts = await bot.get_chat_gifts(
+ chat_id=42,
+ limit=10,
+ )
+ request = bot.get_request()
+ assert response == prepare_result.result
diff --git a/tests/test_api/test_methods/test_get_user_gifts.py b/tests/test_api/test_methods/test_get_user_gifts.py
new file mode 100644
index 00000000..38430c0e
--- /dev/null
+++ b/tests/test_api/test_methods/test_get_user_gifts.py
@@ -0,0 +1,41 @@
+import datetime
+
+from aiogram.methods import GetUserGifts
+from aiogram.types import Gift, OwnedGiftRegular, OwnedGifts, Sticker
+from tests.mocked_bot import MockedBot
+
+
+class TestGetUserGifts:
+ async def test_bot_method(self, bot: MockedBot):
+ prepare_result = bot.add_result_for(
+ GetUserGifts,
+ ok=True,
+ result=OwnedGifts(
+ total_count=1,
+ gifts=[
+ OwnedGiftRegular(
+ gift=Gift(
+ id="test_gift_id",
+ sticker=Sticker(
+ file_id="test_file_id",
+ file_unique_id="test_file_unique_id",
+ type="regular",
+ width=512,
+ height=512,
+ is_animated=False,
+ is_video=False,
+ ),
+ star_count=100,
+ ),
+ send_date=int(datetime.datetime.now().timestamp()),
+ )
+ ],
+ ),
+ )
+
+ response: OwnedGifts = await bot.get_user_gifts(
+ user_id=42,
+ limit=10,
+ )
+ request = bot.get_request()
+ assert response == prepare_result.result
diff --git a/tests/test_api/test_methods/test_repost_story.py b/tests/test_api/test_methods/test_repost_story.py
new file mode 100644
index 00000000..f00b9f11
--- /dev/null
+++ b/tests/test_api/test_methods/test_repost_story.py
@@ -0,0 +1,24 @@
+from aiogram.methods import RepostStory
+from aiogram.types import Chat, Story
+from tests.mocked_bot import MockedBot
+
+
+class TestRepostStory:
+ async def test_bot_method(self, bot: MockedBot):
+ prepare_result = bot.add_result_for(
+ RepostStory,
+ ok=True,
+ result=Story(
+ id=42,
+ chat=Chat(id=42, type="private"),
+ ),
+ )
+
+ response: Story = await bot.repost_story(
+ business_connection_id="test_connection_id",
+ from_chat_id=123,
+ from_story_id=456,
+ active_period=6 * 3600,
+ )
+ request = bot.get_request()
+ assert response == prepare_result.result
diff --git a/tests/test_api/test_methods/test_send_message_draft.py b/tests/test_api/test_methods/test_send_message_draft.py
new file mode 100644
index 00000000..cdb775fd
--- /dev/null
+++ b/tests/test_api/test_methods/test_send_message_draft.py
@@ -0,0 +1,19 @@
+from aiogram.methods import SendMessageDraft
+from tests.mocked_bot import MockedBot
+
+
+class TestSendMessageDraft:
+ async def test_bot_method(self, bot: MockedBot):
+ prepare_result = bot.add_result_for(
+ SendMessageDraft,
+ ok=True,
+ result=True,
+ )
+
+ response: bool = await bot.send_message_draft(
+ chat_id=42,
+ draft_id=1,
+ text="test draft",
+ )
+ request = bot.get_request()
+ assert response == prepare_result.result
diff --git a/tests/test_api/test_methods/test_set_business_account_gift_settings.py b/tests/test_api/test_methods/test_set_business_account_gift_settings.py
index 44b095ef..9aaa7201 100644
--- a/tests/test_api/test_methods/test_set_business_account_gift_settings.py
+++ b/tests/test_api/test_methods/test_set_business_account_gift_settings.py
@@ -11,6 +11,7 @@ class TestSetBusinessAccountGiftSettings:
business_connection_id="test_connection_id",
show_gift_button=True,
accepted_gift_types=AcceptedGiftTypes(
+ gifts_from_channels=True,
unlimited_gifts=True,
limited_gifts=True,
unique_gifts=True,
diff --git a/tests/test_api/test_types/test_message.py b/tests/test_api/test_types/test_message.py
index 4648117b..f211f300 100644
--- a/tests/test_api/test_types/test_message.py
+++ b/tests/test_api/test_types/test_message.py
@@ -16,7 +16,6 @@ from aiogram.methods import (
PinChatMessage,
SendAnimation,
SendAudio,
- SendChecklist,
SendContact,
SendDice,
SendDocument,
@@ -661,6 +660,7 @@ TEST_MESSAGE_UNIQUE_GIFT = Message(
from_user=User(id=42, is_bot=False, first_name="Test"),
unique_gift=UniqueGiftInfo(
gift=UniqueGift(
+ gift_id="test_gift_id",
base_name="test_gift",
name="test_unique_gift",
number=1,
@@ -704,6 +704,33 @@ TEST_MESSAGE_UNIQUE_GIFT = Message(
origin="upgrade",
),
)
+TEST_MESSAGE_GIFT_UPGRADE_SENT = Message(
+ message_id=42,
+ chat=Chat(id=42, type="private"),
+ from_user=User(id=42, is_bot=False, first_name="Test"),
+ date=datetime.datetime.now(),
+ gift_upgrade_sent=GiftInfo(
+ gift=Gift(
+ id="test_gift_id",
+ sticker=Sticker(
+ file_id="test_file_id",
+ file_unique_id="test_file_unique_id",
+ type="regular",
+ width=512,
+ height=512,
+ is_animated=False,
+ is_video=False,
+ ),
+ star_count=100,
+ ),
+ owned_gift_id="test_owned_gift_id",
+ convert_star_count=50,
+ prepaid_upgrade_star_count=25,
+ can_be_upgraded=True,
+ text="Test gift message",
+ is_private=False,
+ ),
+)
TEST_MESSAGE_CHECKLIST = Message(
message_id=42,
date=datetime.datetime.now(),
@@ -874,6 +901,7 @@ MESSAGES_AND_CONTENT_TYPES = [
[TEST_REFUND_PAYMENT, ContentType.REFUNDED_PAYMENT],
[TEST_MESSAGE_GIFT, ContentType.GIFT],
[TEST_MESSAGE_UNIQUE_GIFT, ContentType.UNIQUE_GIFT],
+ [TEST_MESSAGE_GIFT_UPGRADE_SENT, ContentType.GIFT_UPGRADE_SENT],
[TEST_MESSAGE_PAID_MESSAGE_PRICE_CHANGED, ContentType.PAID_MESSAGE_PRICE_CHANGED],
[TEST_MESSAGE_SUGGESTED_POST_APPROVED, ContentType.SUGGESTED_POST_APPROVED],
[TEST_MESSAGE_SUGGESTED_POST_APPROVAL_FAILED, ContentType.SUGGESTED_POST_APPROVAL_FAILED],
@@ -947,6 +975,7 @@ MESSAGES_AND_COPY_METHODS = [
[TEST_REFUND_PAYMENT, None],
[TEST_MESSAGE_GIFT, None],
[TEST_MESSAGE_UNIQUE_GIFT, None],
+ [TEST_MESSAGE_GIFT_UPGRADE_SENT, None],
[TEST_MESSAGE_PAID_MESSAGE_PRICE_CHANGED, None],
[TEST_MESSAGE_SUGGESTED_POST_APPROVED, None],
[TEST_MESSAGE_SUGGESTED_POST_APPROVAL_FAILED, None],