Added full support of Telegram Bot API 9.3

This commit is contained in:
JRoot Junior 2026-01-01 23:59:10 +02:00
parent b27ca9a45d
commit f626f19121
No known key found for this signature in database
GPG key ID: 738964250D5FF6E2
124 changed files with 2792 additions and 456 deletions

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{
@ -115,6 +115,14 @@
"rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ 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": "<td>Unique identifier of the message effect to be added to the message; only available when copying to private chats</td>",
"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,

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<p>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 <em>can_delete_messages</em> administrator rights. Returns <em>True</em> on success.</p>",
"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": "<p>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 <em>can_delete_messages</em> administrator rights. Returns <em>True</em> on success.</p>",
"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",

View file

@ -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": "<p>Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.",
"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": "<p>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 <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat 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",

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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": "<td>Unique identifier of the message effect to be added to the message; only available when forwarding to private chats</td>",
"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,

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times</td>",
"rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times\n",
"name": "exclude_limited"
"description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique",
"html_description": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times and can be upgraded to unique</td>",
"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": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique</td>",
"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": "<td>Pass <em>True</em> to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram</td>",
"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": "<td>The maximum number of gifts to be returned; 1-100. Defaults to 100</td>",
"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": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times</td>",
"rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times\n",
"name": "exclude_limited",
"deprecated": {
"version": "9.3",
"release_date": "2025-12-31"
}
}
],
"category": "methods"

105
.butcher/methods/getChatGifts/entity.json generated Normal file
View file

@ -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": "<p>Returns the gifts owned by a chat. Returns <a href=\"#ownedgifts\">OwnedGifts</a> on success.</p>",
"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": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "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": "<td>Pass <em>True</em> to exclude gifts that aren't saved to the chat's profile page. Always <em>True</em>, unless the bot has the <em>can_post_messages</em> administrator right in the channel.</td>",
"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": "<td>Pass <em>True</em> to exclude gifts that are saved to the chat's profile page. Always <em>False</em>, unless the bot has the <em>can_post_messages</em> administrator right in the channel.</td>",
"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": "<td>Pass <em>True</em> to exclude gifts that can be purchased an unlimited number of times</td>",
"rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n",
"name": "exclude_unlimited"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique",
"html_description": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times and can be upgraded to unique</td>",
"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": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique</td>",
"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": "<td>Pass <em>True</em> to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram</td>",
"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": "<td>Pass <em>True</em> to exclude unique gifts</td>",
"rst_description": "Pass :code:`True` to exclude unique gifts\n",
"name": "exclude_unique"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.",
"html_description": "<td>Pass <em>True</em> to sort results by gift price instead of send date. Sorting is applied before pagination.</td>",
"rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n",
"name": "sort_by_price"
},
{
"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": "<td>Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results</td>",
"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": "<td>The maximum number of gifts to be returned; 1-100. Defaults to 100</td>",
"rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n",
"name": "limit"
}
],
"category": "methods"
}
}

View file

@ -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": "<p>Returns the gifts owned and hosted by a user. Returns <a href=\"#ownedgifts\">OwnedGifts</a> on success.</p>",
"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": "<td>Unique identifier of the user</td>",
"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": "<td>Pass <em>True</em> to exclude gifts that can be purchased an unlimited number of times</td>",
"rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n",
"name": "exclude_unlimited"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique",
"html_description": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times and can be upgraded to unique</td>",
"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": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique</td>",
"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": "<td>Pass <em>True</em> to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram</td>",
"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": "<td>Pass <em>True</em> to exclude unique gifts</td>",
"rst_description": "Pass :code:`True` to exclude unique gifts\n",
"name": "exclude_unique"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.",
"html_description": "<td>Pass <em>True</em> to sort results by gift price instead of send date. Sorting is applied before pagination.</td>",
"rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n",
"name": "sort_by_price"
},
{
"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": "<td>Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results</td>",
"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": "<td>The maximum number of gifts to be returned; 1-100. Defaults to 100</td>",
"rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n",
"name": "limit"
}
],
"category": "methods"
}
}

View file

@ -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": "<td>Pass <em>True</em> if the administrator can restrict, ban or unban chat members, or access supergroup statistics</td>",
"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": "<td>Pass <em>True</em> if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to <em>True</em> for promotions of channel administrators</td>",
"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"
},
{

65
.butcher/methods/repostStory/entity.json generated Normal file
View file

@ -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": "<p>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 <em>can_manage_stories</em> business bot right for both business accounts. Returns <a href=\"#story\">Story</a> on success.</p>",
"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": "<td>Unique identifier of the business connection</td>",
"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": "<td>Unique identifier of the chat which posted the story that should be reposted</td>",
"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": "<td>Unique identifier of the story that should be reposted</td>",
"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": "<td>Period after which the story is moved to the archive, in seconds; must be one of <code>6 * 3600</code>, <code>12 * 3600</code>, <code>86400</code>, or <code>2 * 86400</code></td>",
"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": "<td>Pass <em>True</em> to keep the story accessible after it expires</td>",
"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": "<td>Pass <em>True</em> if the content of the story must be protected from forwarding and screenshotting</td>",
"rst_description": "Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting\n",
"name": "protect_content"
}
],
"category": "methods"
}
}

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
"description": "Unique identifier for the target message thread; for supergroups only",
"html_description": "<td>Unique identifier for the target message thread; for supergroups only</td>",
"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": "<td>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</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -30,9 +30,9 @@
{
"type": "String",
"required": true,
"description": "Identifier of the gift",
"html_description": "<td>Identifier of the gift</td>",
"rst_description": "Identifier of the gift\n",
"description": "Identifier of the gift; limited gifts can't be sent to channel chats",
"html_description": "<td>Identifier of the gift; limited gifts can't be sent to channel chats</td>",
"rst_description": "Identifier of the gift; limited gifts can't be sent to channel chats\n",
"name": "gift_id"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<p>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 <em>True</em> on success.</p>",
"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": "<td>Unique identifier for the target private chat</td>",
"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": "<td>Unique identifier for the target message thread</td>",
"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": "<td>Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated</td>",
"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": "<td>Text of the message to be sent, 1-4096 characters after entities parsing</td>",
"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": "<td>Mode for parsing entities in the message text. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#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": "<td>A JSON-serialized list of special entities that appear in message text, which can be specified instead of <em>parse_mode</em></td>",
"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"
}
}

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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": "<td>The number of Telegram Stars that must be paid to buy access to the media; 1-10000</td>",
"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": "<td>The number of Telegram Stars that must be paid to buy access to the media; 1-25000</td>",
"rst_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000\n",
"name": "star_count"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
"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": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"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"
},
{

View file

@ -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": "<p>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 <em>can_pin_messages</em> administrator right in the supergroup. Returns <em>True</em> on success.</p>",
"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": "<p>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 <em>can_pin_messages</em> administrator right in the supergroup. Returns <em>True</em> on success.</p>",
"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",

File diff suppressed because it is too large Load diff

View file

@ -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": "<td><em>True</em>, if transfers of unique gifts from channels are accepted</td>",
"rst_description": ":code:`True`, if transfers of unique gifts from channels are accepted\n",
"name": "gifts_from_channels",
"required": true
}
],
"category": "types"

View file

@ -387,6 +387,30 @@
"name": "location",
"required": false
},
{
"type": "UserRating",
"description": "For private chats, the rating of the user if any",
"html_description": "<td><em>Optional</em>. For private chats, the rating of the user if any</td>",
"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": "<td><em>Optional</em>. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews</td>",
"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": "<td><em>Optional</em>. The number of Telegram Stars a general user have to pay to send a message to the chat</td>",
"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",

View file

@ -37,12 +37,20 @@
},
{
"type": "User",
"description": "User that completed the task; omitted if the task wasn't completed",
"html_description": "<td><em>Optional</em>. User that completed the task; omitted if the task wasn't completed</td>",
"rst_description": "*Optional*. User that completed the task; omitted if the task wasn't completed\n",
"description": "User that completed the task; omitted if the task wasn't completed by a user",
"html_description": "<td><em>Optional</em>. User that completed the task; omitted if the task wasn't completed by a user</td>",
"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": "<td><em>Optional</em>. Chat that completed the task; omitted if the task wasn't completed by a chat</td>",
"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",

View file

@ -13,9 +13,9 @@
"annotations": [
{
"type": "Integer",
"description": "Unique identifier of the topic",
"html_description": "<td>Unique identifier of the topic</td>",
"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": "<td>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.</td>",
"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
},

View file

@ -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": "<td><em>Optional</em>. <em>True</em>, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot</td>",
"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"

View file

@ -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": "<td><em>Optional</em>. <em>True</em>, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot</td>",
"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"

View file

@ -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": "<td><em>Optional</em>. <em>True</em>, if the gift can only be purchased by Telegram Premium subscribers</td>",
"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": "<td><em>Optional</em>. <em>True</em>, if the gift can be used (after being upgraded) to customize a user's appearance</td>",
"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": "<td><em>Optional</em>. The total number of the gifts of this type that can be sent; for limited gifts only</td>",
"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": "<td><em>Optional</em>. The total number of gifts of this type that can be sent by all users; for limited gifts only</td>",
"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": "<td><em>Optional</em>. The number of remaining gifts of this type that can be sent; for limited gifts only</td>",
"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": "<td><em>Optional</em>. The number of remaining gifts of this type that can be sent by all users; for limited gifts only</td>",
"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": "<td><em>Optional</em>. The total number of gifts of this type that can be sent by the bot; for limited gifts only</td>",
"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": "<td><em>Optional</em>. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only</td>",
"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": "<td><em>Optional</em>. Background of the gift</td>",
"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": "<td><em>Optional</em>. The total number of different unique gifts that can be obtained by upgrading the gift</td>",
"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",

View file

@ -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": "<p>This object describes the background of a gift.</p>",
"rst_description": "This object describes the background of a gift.",
"annotations": [
{
"type": "Integer",
"description": "Center color of the background in RGB format",
"html_description": "<td>Center color of the background in RGB format</td>",
"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": "<td>Edge color of the background in RGB format</td>",
"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": "<td>Text color of the background in RGB format</td>",
"rst_description": "Text color of the background in RGB format\n",
"name": "text_color",
"required": true
}
],
"category": "types"
}
}

View file

@ -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": "<td><em>Optional</em>. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift</td>",
"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": "<td><em>Optional</em>. Number of Telegram Stars that were prepaid for the ability to upgrade the gift</td>",
"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": "<td><em>Optional</em>. <em>True</em>, if the gift's upgrade was purchased after the gift was sent</td>",
"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": "<td><em>Optional</em>. Unique number reserved for this gift when upgraded. See the <em>number</em> field in <a href=\"#uniquegift\">UniqueGift</a></td>",
"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"

View file

@ -22,8 +22,8 @@
{
"type": "String",
"description": "Mode for parsing entities in the title. See formatting options for more details.",
"html_description": "<td>Optional. Mode for parsing entities in the title. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "Optional. Mode for parsing entities in the title. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"html_description": "<td><em>Optional</em>. Mode for parsing entities in the title. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "*Optional*. Mode for parsing entities in the title. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"name": "parse_mode",
"required": false
},

View file

@ -30,8 +30,8 @@
{
"type": "String",
"description": "Mode for parsing entities in the text. See formatting options for more details.",
"html_description": "<td>Optional. Mode for parsing entities in the text. See <a href=\"https://core.telegram.org/bots/api#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "Optional. Mode for parsing entities in the text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"html_description": "<td><em>Optional</em>. Mode for parsing entities in the text. See <a href=\"https://core.telegram.org/bots/api#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "*Optional*. Mode for parsing entities in the text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"name": "parse_mode",
"required": false
},

View file

@ -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": "<td><em>Optional.</em> If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a &#8220;users_shared&#8221; service message. Available in private chats only.</td>",
"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": "<td><em>Optional</em>. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a &#8220;users_shared&#8221; service message. Available in private chats only.</td>",
"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": "<td><em>Optional.</em> 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 &#8220;chat_shared&#8221; service message. Available in private chats only.</td>",
"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": "<td><em>Optional</em>. 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 &#8220;chat_shared&#8221; service message. Available in private chats only.</td>",
"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
},

View file

@ -21,9 +21,9 @@
},
{
"type": "Integer",
"description": "Unique identifier of a message thread to which the message belongs; for supergroups only",
"html_description": "<td><em>Optional</em>. Unique identifier of a message thread to which the message belongs; for supergroups only</td>",
"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": "<td><em>Optional</em>. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only</td>",
"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": "<td><em>Optional</em>. <em>True</em>, if the message is sent to a forum topic</td>",
"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": "<td><em>Optional</em>. <em>True</em>, if the message is sent to a topic in a forum supergroup or a private chat with the bot</td>",
"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": "<td><em>Optional</em>. Service message: upgrade of a gift was purchased after the gift was sent</td>",
"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.",

View file

@ -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": "<td><em>Optional</em>. 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</td>",
"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": "<td><em>Optional</em>. 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</td>",
"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": "<td><em>Optional</em>. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift</td>",
"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": "<td><em>Optional</em>. Number of Telegram Stars that were paid for the ability to upgrade the gift</td>",
"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": "<td><em>Optional</em>. <em>True</em>, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only</td>",
"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": "<td><em>Optional</em>. Unique number reserved for this gift when upgraded. See the <em>number</em> field in <a href=\"#uniquegift\">UniqueGift</a></td>",
"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"

View file

@ -7,9 +7,9 @@
"object": {
"anchor": "suggestedpostprice",
"name": "SuggestedPostPrice",
"description": "Desribes price of a suggested post.",
"html_description": "<p>Desribes price of a suggested post.</p>",
"rst_description": "Desribes price of a suggested post.",
"description": "Describes the price of a suggested post.",
"html_description": "<p>Describes the price of a suggested post.</p>",
"rst_description": "Describes the price of a suggested post.",
"annotations": [
{
"type": "String",

View file

@ -11,6 +11,14 @@
"html_description": "<p>This object describes a unique gift that was upgraded from a regular gift.</p>",
"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": "<td>Identifier of the regular gift from which the gift was upgraded</td>",
"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": "<td><em>Optional</em>. <em>True</em>, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers</td>",
"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": "<td><em>Optional</em>. <em>True</em>, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram</td>",
"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": "<td><em>Optional</em>. 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</td>",
"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",

View file

@ -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": "<p>This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.</p>",
"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": "<td>Custom emoji identifier of the unique gift's model</td>",
"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": "<td>Custom emoji identifier of the unique gift's symbol</td>",
"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": "<td>Main color used in light themes; RGB format</td>",
"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": "<td>List of 1-3 additional colors used in light themes; RGB format</td>",
"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": "<td>Main color used in dark themes; RGB format</td>",
"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": "<td>List of 1-3 additional colors used in dark themes; RGB format</td>",
"rst_description": "List of 1-3 additional colors used in dark themes; RGB format\n",
"name": "dark_theme_other_colors",
"required": true
}
],
"category": "types"
}
}

View file

@ -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": "<td>Origin of the gift. Currently, either &#8220;upgrade&#8221; for gifts upgraded from regular gifts, &#8220;transfer&#8221; for gifts transferred from other users or channels, or &#8220;resale&#8221; for gifts bought from other users</td>",
"rst_description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, or 'resale' for gifts bought from other users\n",
"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": "<td>Origin of the gift. Currently, either &#8220;upgrade&#8221; for gifts upgraded from regular gifts, &#8220;transfer&#8221; for gifts transferred from other users or channels, &#8220;resale&#8221; for gifts bought from other users, &#8220;gifted_upgrade&#8221; for upgrades purchased after the gift was sent, or &#8220;offer&#8221; for gifts bought or sold through gift purchase offers</td>",
"rst_description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, '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": "<td><em>Optional</em>. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of &#8220;XTR&#8221; for Telegram Stars or &#8220;TON&#8221; for toncoins.</td>",
"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": "<td><em>Optional</em>. For gifts bought from other users, the price paid for the gift</td>",
"rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift\n",
"name": "last_resale_star_count",
"description": "For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins",
"html_description": "<td><em>Optional</em>. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins</td>",
"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": "<td><em>Optional</em>. For gifts bought from other users, the price paid for the gift</td>",
"rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift\n",
"name": "last_resale_star_count",
"required": false,
"deprecated": {
"version": "9.3",
"release_date": "2025-12-31"
}
}
],
"category": "types"

View file

@ -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": "<td><em>Optional</em>. <em>True</em>, if the bot has forum topic mode enabled in private chats. Returned only in <a href=\"#getme\">getMe</a>.</td>",
"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"

49
.butcher/types/UserRating/entity.json generated Normal file
View file

@ -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": "<p>This object describes the rating of a user based on their Telegram Star spendings.</p>",
"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": "<td>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.</td>",
"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": "<td>Numerical value of the user's rating; the higher the rating, the better</td>",
"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": "<td>The rating value required to get the current level</td>",
"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": "<td><em>Optional</em>. The rating value required to get to the next level; omitted if the maximum level was reached</td>",
"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"
}
}

View file

@ -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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ 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 <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, 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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 » <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 » <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 <https://core.telegram.org/bots/api#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 <https://core.telegram.org/bots/api#sendmessage>`_, *upload_photo* for `photos <https://core.telegram.org/bots/api#sendphoto>`_, *record_video* or *upload_video* for `videos <https://core.telegram.org/bots/api#sendvideo>`_, *record_voice* or *upload_voice* for `voice notes <https://core.telegram.org/bots/api#sendvoice>`_, *upload_document* for `general files <https://core.telegram.org/bots/api#senddocument>`_, *choose_sticker* for `stickers <https://core.telegram.org/bots/api#sendsticker>`_, *find_location* for `location data <https://core.telegram.org/bots/api#sendlocation>`_, *record_video_note* or *upload_video_note* for `video notes <https://core.telegram.org/bots/api#sendvideonote>`_.
: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 <https://en.wikipedia.org/wiki/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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 » <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://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <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 <https://t.me/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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ 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 <https://core.telegram.org/bots/payments#supported-currencies>`_. Pass 'XTR' for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
: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 <https://t.me/BotNews/90>`_.
: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 <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
: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 <https://core.telegram.org/bots/payments/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 <https://t.me/BotNews/90>`_.
@ -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 <https://telegram.org/blog/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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 <https://core.telegram.org/bots/api#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 » <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 <https://core.telegram.org/bots/api#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 <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed
:param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
@ -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 » <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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 » <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-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 » <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 <https://core.telegram.org/bots/api#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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 <https://core.telegram.org/bots/api#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)

View file

@ -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"

View file

@ -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",

View file

@ -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 <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ 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,

View file

@ -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

View file

@ -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
"""

View file

@ -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
"""

View file

@ -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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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,
)

View file

@ -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

View file

@ -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,
)

View file

@ -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,
)

View file

@ -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,
)

View file

@ -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

View file

@ -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,
)

View file

@ -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

View file

@ -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

View file

@ -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!!!

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
protect_content: Optional[Union[bool, Default]] = Default("protect_content")

View file

@ -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

View file

@ -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 <https://t.me/BotNews/90>`_."""
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

View file

@ -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

View file

@ -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

View file

@ -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")

View file

@ -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 <https://core.telegram.org/bots/api#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,
)

View file

@ -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

View file

@ -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

View file

@ -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 <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed"""
question_entities: Optional[list[MessageEntity]] = None

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
"""

View file

@ -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",

View file

@ -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,
)

View file

@ -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 <https://core.telegram.org/bots/api#sendmessage>`_, *upload_photo* for `photos <https://core.telegram.org/bots/api#sendphoto>`_, *record_video* or *upload_video* for `videos <https://core.telegram.org/bots/api#sendvideo>`_, *record_voice* or *upload_voice* for `voice notes <https://core.telegram.org/bots/api#sendvoice>`_, *upload_document* for `general files <https://core.telegram.org/bots/api#senddocument>`_, *choose_sticker* for `stickers <https://core.telegram.org/bots/api#sendsticker>`_, *find_location* for `location data <https://core.telegram.org/bots/api#sendlocation>`_, *record_video_note* or *upload_video_note* for `video notes <https://core.telegram.org/bots/api#sendvideonote>`_.
: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

View file

@ -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,
)

View file

@ -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 <https://core.telegram.org/bots/api#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 <https://core.telegram.org/bots/api#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 » <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 » <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 » <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 <https://core.telegram.org/bots/api#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 » <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 <https://core.telegram.org/bots/api#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 <https://en.wikipedia.org/wiki/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 <https://en.wikipedia.org/wiki/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 » <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://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <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 » <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://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <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 <https://t.me/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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ 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 <https://t.me/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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ 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 <https://core.telegram.org/bots/payments#supported-currencies>`_. Pass 'XTR' for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
: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 <https://t.me/BotNews/90>`_.
: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 <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
: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 <https://core.telegram.org/bots/payments/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 <https://t.me/BotNews/90>`_.
@ -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 <https://core.telegram.org/bots/payments#supported-currencies>`_. Pass 'XTR' for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
: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 <https://t.me/BotNews/90>`_.
: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 <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
: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 <https://core.telegram.org/bots/payments/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 <https://t.me/BotNews/90>`_.
@ -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 <https://telegram.org/blog/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 <https://telegram.org/blog/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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 » <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 <https://core.telegram.org/bots/api#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 » <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 <https://core.telegram.org/bots/api#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 <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed
:param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
@ -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 <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed
:param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
@ -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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 » <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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 » <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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 » <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 » <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-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-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 » <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 <https://core.telegram.org/bots/api#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 » <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 <https://core.telegram.org/bots/api#formatting-options>`_ for more details.

View file

@ -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 <https://core.telegram.org/bots/api#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 » <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 » <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 <https://core.telegram.org/bots/api#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 <https://en.wikipedia.org/wiki/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 » <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://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <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 <https://t.me/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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ 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 <https://core.telegram.org/bots/payments#supported-currencies>`_. Pass 'XTR' for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
: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 <https://t.me/BotNews/90>`_.
: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 <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
: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 <https://core.telegram.org/bots/payments/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 <https://t.me/BotNews/90>`_.
@ -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 <https://telegram.org/blog/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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 » <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 <https://core.telegram.org/bots/api#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 <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed
:param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
@ -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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 » <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 <https://telegram.org/blog/channels-2-0#silent-messages>`_. 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 » <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-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 » <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 <https://core.telegram.org/bots/api#formatting-options>`_ for more details.

View file

@ -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,
)

View file

@ -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"""

View file

@ -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,
)

View file

@ -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,
)

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