Added full support for the Bot API 9.2 (#1720)

* Added full support for the Bot API 9.2

* Mark butcher tool output files as linguist-generated in .gitattributes

* Switch `send_date` type from `int` to `DateTime` in suggested post models
This commit is contained in:
Alex Root Junior 2025-08-17 19:07:58 +03:00 committed by GitHub
parent ddcedadfbd
commit ab8af773cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
165 changed files with 4404 additions and 813 deletions

View file

@ -44,3 +44,7 @@ extract:
- effect_id - effect_id
- show_caption_above_media - show_caption_above_media
- paid_star_count - paid_star_count
- direct_messages_topic
- reply_to_checklist_task_id
- suggested_post_info
- is_paid_post

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "approvesuggestedpost",
"name": "approveSuggestedPost",
"description": "Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success.",
"html_description": "<p>Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target direct messages chat",
"html_description": "<td>Unique identifier for the target direct messages chat</td>",
"rst_description": "Unique identifier for the target direct messages chat\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Identifier of a suggested post message to approve",
"html_description": "<td>Identifier of a suggested post message to approve</td>",
"rst_description": "Identifier of a suggested post message to approve\n",
"name": "message_id"
},
{
"type": "Integer",
"required": false,
"description": "Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future",
"html_description": "<td>Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future</td>",
"rst_description": "Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future\n",
"name": "send_date"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,11 @@
annotations:
send_date:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "convertgifttostars", "anchor": "convertgifttostars",

View file

@ -27,6 +27,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "Integer or String", "type": "Integer or String",
"required": true, "required": true,
@ -107,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", "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" "name": "allow_paid_broadcast"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -27,6 +27,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "Integer or String", "type": "Integer or String",
"required": true, "required": true,

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "declinesuggestedpost",
"name": "declineSuggestedPost",
"description": "Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success.",
"html_description": "<p>Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target direct messages chat",
"html_description": "<td>Unique identifier for the target direct messages chat</td>",
"rst_description": "Unique identifier for the target direct messages chat\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Identifier of a suggested post message to decline",
"html_description": "<td>Identifier of a suggested post message to decline</td>",
"rst_description": "Identifier of a suggested post message to decline\n",
"name": "message_id"
},
{
"type": "String",
"required": false,
"description": "Comment for the creator of the suggested post; 0-128 characters",
"html_description": "<td>Comment for the creator of the suggested post; 0-128 characters</td>",
"rst_description": "Comment for the creator of the suggested post; 0-128 characters\n",
"name": "comment"
}
],
"category": "methods"
}
}

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "deletebusinessmessages", "anchor": "deletebusinessmessages",

View file

@ -7,9 +7,9 @@
"object": { "object": {
"anchor": "deletemessage", "anchor": "deletemessage",
"name": "deleteMessage", "name": "deleteMessage",
"description": "Use this method to delete a message, including service messages, with the following limitations:\n- A message can only be deleted if it was sent less than 48 hours ago.\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n- Bots can delete incoming messages in private chats.\n- Bots granted can_post_messages permissions can delete outgoing messages in channels.\n- If the bot is an administrator of a group, it can delete any message there.\n- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.\nReturns True on success.", "description": "Use this method to delete a message, including service messages, with the following limitations:\n- A message can only be deleted if it was sent less than 48 hours ago.\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n- Bots can delete incoming messages in private chats.\n- Bots granted can_post_messages permissions can delete outgoing messages in channels.\n- If the bot is an administrator of a group, it can delete any message there.\n- If the bot has can_delete_messages administrator right in a supergroup or a channel, it can delete any message there.\n- If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.\nReturns True on success.",
"html_description": "<p>Use this method to delete a message, including service messages, with the following limitations:<br/>\n- A message can only be deleted if it was sent less than 48 hours ago.<br/>\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.<br/>\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.<br/>\n- Bots can delete outgoing messages in private chats, groups, and supergroups.<br/>\n- Bots can delete incoming messages in private chats.<br/>\n- Bots granted <em>can_post_messages</em> permissions can delete outgoing messages in channels.<br/>\n- If the bot is an administrator of a group, it can delete any message there.<br/>\n- If the bot has <em>can_delete_messages</em> permission in a supergroup or a channel, it can delete any message there.<br/>\nReturns <em>True</em> on success.</p>", "html_description": "<p>Use this method to delete a message, including service messages, with the following limitations:<br/>\n- A message can only be deleted if it was sent less than 48 hours ago.<br/>\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.<br/>\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.<br/>\n- Bots can delete outgoing messages in private chats, groups, and supergroups.<br/>\n- Bots can delete incoming messages in private chats.<br/>\n- Bots granted <em>can_post_messages</em> permissions can delete outgoing messages in channels.<br/>\n- If the bot is an administrator of a group, it can delete any message there.<br/>\n- If the bot has <em>can_delete_messages</em> administrator right in a supergroup or a channel, it can delete any message there.<br/>\n- If the bot has <em>can_manage_direct_messages</em> administrator right in a channel, it can delete any message in the corresponding direct messages chat.<br/>\nReturns <em>True</em> on success.</p>",
"rst_description": "Use this method to delete a message, including service messages, with the following limitations:\n\n- A message can only be deleted if it was sent less than 48 hours ago.\n\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n\n- Bots can delete incoming messages in private chats.\n\n- Bots granted *can_post_messages* permissions can delete outgoing messages in channels.\n\n- If the bot is an administrator of a group, it can delete any message there.\n\n- If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there.\n\nReturns :code:`True` on success.", "rst_description": "Use this method to delete a message, including service messages, with the following limitations:\n\n- A message can only be deleted if it was sent less than 48 hours ago.\n\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n\n- Bots can delete incoming messages in private chats.\n\n- Bots granted *can_post_messages* permissions can delete outgoing messages in channels.\n\n- If the bot is an administrator of a group, it can delete any message there.\n\n- If the bot has *can_delete_messages* administrator right in a supergroup or a channel, it can delete any message there.\n\n- If the bot has *can_manage_direct_messages* administrator right in a channel, it can delete any message in the corresponding direct messages chat.\n\nReturns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer or String", "type": "Integer or String",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "deletestory", "anchor": "deletestory",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "editstory", "anchor": "editstory",

View file

@ -27,6 +27,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "Integer or String", "type": "Integer or String",
"required": true, "required": true,
@ -59,6 +67,14 @@
"rst_description": "Protects the contents of the forwarded message from forwarding and saving\n", "rst_description": "Protects the contents of the forwarded message from forwarding and saving\n",
"name": "protect_content" "name": "protect_content"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only",
"html_description": "<td>A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only</td>",
"rst_description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only\n",
"name": "suggested_post_parameters"
},
{ {
"type": "Integer", "type": "Integer",
"required": true, "required": true,

View file

@ -27,6 +27,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "Integer or String", "type": "Integer or String",
"required": true, "required": true,

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "getavailablegifts", "anchor": "getavailablegifts",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "getbusinessaccountgifts", "anchor": "getbusinessaccountgifts",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "getbusinessaccountstarbalance", "anchor": "getbusinessaccountstarbalance",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "giftpremiumsubscription", "anchor": "giftpremiumsubscription",

View file

@ -14,9 +14,9 @@
{ {
"type": "Integer or String", "type": "Integer or String",
"required": true, "required": true,
"description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername). Channel direct messages chats aren't supported; leave the corresponding channel instead.",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup or channel (in the format <code>@channelusername</code>)</td>", "html_description": "<td>Unique identifier for the target chat or username of the target supergroup or channel (in the format <code>@channelusername</code>). Channel direct messages chats aren't supported; leave the corresponding channel instead.</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`). Channel direct messages chats aren't supported; leave the corresponding channel instead.\n",
"name": "chat_id" "name": "chat_id"
} }
], ],

View file

@ -7,9 +7,9 @@
"object": { "object": {
"anchor": "pinchatmessage", "anchor": "pinchatmessage",
"name": "pinChatMessage", "name": "pinChatMessage",
"description": "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", "description": "Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns True on success.",
"html_description": "<p>Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns <em>True</em> on success.</p>", "html_description": "<p>Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", "rst_description": "Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "String", "type": "String",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "poststory", "anchor": "poststory",

View file

@ -146,6 +146,14 @@
"html_description": "<td>Pass <em>True</em> if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only</td>", "html_description": "<td>Pass <em>True</em> if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only</td>",
"rst_description": "Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only\n", "rst_description": "Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only\n",
"name": "can_manage_topics" "name": "can_manage_topics"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the administrator can manage direct messages within the channel and decline suggested posts; for channels only",
"html_description": "<td>Pass <em>True</em> if the administrator can manage direct messages within the channel and decline suggested posts; for channels only</td>",
"rst_description": "Pass :code:`True` if the administrator can manage direct messages within the channel and decline suggested posts; for channels only\n",
"name": "can_manage_direct_messages"
} }
], ],
"category": "methods" "category": "methods"

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "readbusinessmessage", "anchor": "readbusinessmessage",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "removebusinessaccountprofilephoto", "anchor": "removebusinessaccountprofilephoto",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "removechatverification", "anchor": "removechatverification",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "removeuserverification", "anchor": "removeuserverification",

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "InputFile or String", "type": "InputFile or String",
"required": true, "required": true,
@ -147,6 +155,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "InputFile or String", "type": "InputFile or String",
"required": true, "required": true,
@ -131,6 +139,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -22,9 +22,9 @@
{ {
"type": "Integer or String", "type": "Integer or String",
"required": true, "required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel chats and channel direct messages chats aren't supported.",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>", "html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>). Channel chats and channel direct messages chats aren't supported.</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", "rst_description": "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.\n",
"name": "chat_id" "name": "chat_id"
}, },
{ {

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "String", "type": "String",
"required": true, "required": true,
@ -99,6 +107,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "String", "type": "String",
"required": false, "required": false,
@ -75,6 +83,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "InputFile or String", "type": "InputFile or String",
"required": true, "required": true,
@ -115,6 +123,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -22,9 +22,9 @@
{ {
"type": "Integer", "type": "Integer",
"required": true, "required": true,
"description": "Unique identifier for the target chat", "description": "Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats.",
"html_description": "<td>Unique identifier for the target chat</td>", "html_description": "<td>Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats.</td>",
"rst_description": "Unique identifier for the target chat\n", "rst_description": "Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats.\n",
"name": "chat_id" "name": "chat_id"
}, },
{ {

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "sendgift", "anchor": "sendgift",

View file

@ -27,6 +27,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "String", "type": "String",
"required": true, "required": true,
@ -227,6 +235,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "Float", "type": "Float",
"required": true, "required": true,
@ -115,6 +123,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -7,9 +7,9 @@
"object": { "object": {
"anchor": "sendmediagroup", "anchor": "sendmediagroup",
"name": "sendMediaGroup", "name": "sendMediaGroup",
"description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.", "description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Message objects that were sent is returned.",
"html_description": "<p>Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of <a href=\"#message\">Messages</a> that were sent is returned.</p>", "html_description": "<p>Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of <a href=\"#message\">Message</a> objects that were sent is returned.</p>",
"rst_description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages <https://core.telegram.org/bots/api#message>`_ that were sent is returned.", "rst_description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of :class:`aiogram.types.message.Message` objects that were sent is returned.",
"annotations": [ "annotations": [
{ {
"type": "String", "type": "String",
@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "Array of InputMediaAudio, InputMediaDocument, InputMediaPhoto and InputMediaVideo", "type": "Array of InputMediaAudio, InputMediaDocument, InputMediaPhoto and InputMediaVideo",
"required": true, "required": true,

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "String", "type": "String",
"required": true, "required": true,
@ -99,6 +107,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -27,6 +27,22 @@
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.\n", "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.\n",
"name": "chat_id" "name": "chat_id"
}, },
{
"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",
"name": "message_thread_id"
},
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "Integer", "type": "Integer",
"required": true, "required": true,
@ -107,6 +123,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", "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" "name": "allow_paid_broadcast"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "InputFile or String", "type": "InputFile or String",
"required": true, "required": true,
@ -115,6 +123,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -22,9 +22,9 @@
{ {
"type": "Integer or String", "type": "Integer or String",
"required": true, "required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). Polls can't be sent to channel direct messages chats.",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>", "html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>). Polls can't be sent to channel direct messages chats.</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). Polls can't be sent to channel direct messages chats.\n",
"name": "chat_id" "name": "chat_id"
}, },
{ {

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "InputFile or String", "type": "InputFile or String",
"required": true, "required": true,
@ -83,6 +91,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "Float", "type": "Float",
"required": true, "required": true,
@ -131,6 +139,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "InputFile or String", "type": "InputFile or String",
"required": true, "required": true,
@ -171,6 +179,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "InputFile or String", "type": "InputFile or String",
"required": true, "required": true,
@ -99,6 +107,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
"name": "message_thread_id" "name": "message_thread_id"
}, },
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{ {
"type": "InputFile or String", "type": "InputFile or String",
"required": true, "required": true,
@ -107,6 +115,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id" "name": "message_effect_id"
}, },
{
"type": "SuggestedPostParameters",
"required": false,
"description": "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.",
"html_description": "<td>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.</td>",
"rst_description": "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.\n",
"name": "suggested_post_parameters"
},
{ {
"type": "ReplyParameters", "type": "ReplyParameters",
"required": false, "required": false,

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "setbusinessaccountbio", "anchor": "setbusinessaccountbio",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "setbusinessaccountgiftsettings", "anchor": "setbusinessaccountgiftsettings",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "setbusinessaccountname", "anchor": "setbusinessaccountname",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "setbusinessaccountprofilephoto", "anchor": "setbusinessaccountprofilephoto",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "setbusinessaccountusername", "anchor": "setbusinessaccountusername",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "transferbusinessaccountstars", "anchor": "transferbusinessaccountstars",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "transfergift", "anchor": "transfergift",

View file

@ -7,9 +7,9 @@
"object": { "object": {
"anchor": "unpinallchatmessages", "anchor": "unpinallchatmessages",
"name": "unpinAllChatMessages", "name": "unpinAllChatMessages",
"description": "Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", "description": "Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns True on success.",
"html_description": "<p>Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns <em>True</em> on success.</p>", "html_description": "<p>Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", "rst_description": "Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer or String", "type": "Integer or String",

View file

@ -7,9 +7,9 @@
"object": { "object": {
"anchor": "unpinchatmessage", "anchor": "unpinchatmessage",
"name": "unpinChatMessage", "name": "unpinChatMessage",
"description": "Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", "description": "Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin messages in groups and channels respectively. Returns True on success.",
"html_description": "<p>Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns <em>True</em> on success.</p>", "html_description": "<p>Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin messages in groups and channels respectively. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", "rst_description": "Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin messages in groups and channels respectively. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "String", "type": "String",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "upgradegift", "anchor": "upgradegift",

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "verifychat", "anchor": "verifychat",
@ -14,9 +14,9 @@
{ {
"type": "Integer or String", "type": "Integer or String",
"required": true, "required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). Channel direct messages chats can't be verified.",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>", "html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>). Channel direct messages chats can't be verified.</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). Channel direct messages chats can't be verified.\n",
"name": "chat_id" "name": "chat_id"
}, },
{ {

View file

@ -1,8 +1,8 @@
{ {
"meta": {}, "meta": {},
"group": { "group": {
"title": "Updating messages", "title": "Available methods",
"anchor": "updating-messages" "anchor": "available-methods"
}, },
"object": { "object": {
"anchor": "verifyuser", "anchor": "verifyuser",

File diff suppressed because it is too large Load diff

View file

@ -21,9 +21,9 @@
}, },
{ {
"type": "Integer or String", "type": "Integer or String",
"description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported.",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>", "html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>). Channel direct messages chats and channel chats aren't supported.</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`). Channel direct messages chats and channel chats aren't supported.\n",
"name": "chat_id", "name": "chat_id",
"required": true "required": true
} }

View file

@ -21,9 +21,9 @@
}, },
{ {
"type": "Integer or String", "type": "Integer or String",
"description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported.",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>", "html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>). Channel direct messages chats and channel chats aren't supported.</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`). Channel direct messages chats and channel chats aren't supported.\n",
"name": "chat_id", "name": "chat_id",
"required": true "required": true
} }

View file

@ -21,9 +21,9 @@
}, },
{ {
"type": "Integer or String", "type": "Integer or String",
"description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported.",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>", "html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>). Channel direct messages chats and channel chats aren't supported.</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`). Channel direct messages chats and channel chats aren't supported.\n",
"name": "chat_id", "name": "chat_id",
"required": true "required": true
}, },

View file

@ -67,6 +67,14 @@
"name": "is_forum", "name": "is_forum",
"required": false "required": false
}, },
{
"type": "True",
"description": "True, if the chat is the direct messages chat of a channel",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the chat is the direct messages chat of a channel</td>",
"rst_description": "*Optional*. :code:`True`, if the chat is the direct messages chat of a channel\n",
"name": "is_direct_messages",
"required": false
},
{ {
"type": "Integer", "type": "Integer",
"description": "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. Returned only in getChat. Always returned in getChat.", "description": "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. Returned only in getChat. Always returned in getChat.",

View file

@ -130,6 +130,14 @@
"rst_description": "*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only\n", "rst_description": "*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only\n",
"name": "can_manage_topics", "name": "can_manage_topics",
"required": false "required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only\n",
"name": "can_manage_direct_messages",
"required": false
} }
], ],
"category": "types" "category": "types"

View file

@ -67,6 +67,14 @@
"name": "is_forum", "name": "is_forum",
"required": false "required": false
}, },
{
"type": "True",
"description": "True, if the chat is the direct messages chat of a channel",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the chat is the direct messages chat of a channel</td>",
"rst_description": "*Optional*. :code:`True`, if the chat is the direct messages chat of a channel\n",
"name": "is_direct_messages",
"required": false
},
{ {
"type": "Integer", "type": "Integer",
"description": "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details.", "description": "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details.",
@ -139,6 +147,14 @@
"name": "personal_chat", "name": "personal_chat",
"required": false "required": false
}, },
{
"type": "Chat",
"description": "Information about the corresponding channel chat; for direct messages chats only",
"html_description": "<td><em>Optional</em>. Information about the corresponding channel chat; for direct messages chats only</td>",
"rst_description": "*Optional*. Information about the corresponding channel chat; for direct messages chats only\n",
"name": "parent_chat",
"required": false
},
{ {
"type": "Array of ReactionType", "type": "Array of ReactionType",
"description": "List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed.", "description": "List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed.",

View file

@ -155,6 +155,14 @@
"name": "can_manage_topics", "name": "can_manage_topics",
"required": false "required": false
}, },
{
"type": "Boolean",
"description": "True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only\n",
"name": "can_manage_direct_messages",
"required": false
},
{ {
"type": "String", "type": "String",
"description": "Custom title for this user", "description": "Custom title for this user",

View file

@ -14,8 +14,8 @@
{ {
"type": "Message", "type": "Message",
"description": "Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", "description": "Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the <em>reply_to_message</em> field even if it itself is a reply.</td>", "html_description": "<td><em>Optional</em>. Message containing the checklist to which the tasks were added. Note that the <a href=\"#message\">Message</a> object in this field will not contain the <em>reply_to_message</em> field even if it itself is a reply.</td>",
"rst_description": "*Optional*. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n", "rst_description": "*Optional*. Message containing the checklist to which the tasks were added. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n",
"name": "checklist_message", "name": "checklist_message",
"required": false "required": false
}, },

View file

@ -14,8 +14,8 @@
{ {
"type": "Message", "type": "Message",
"description": "Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", "description": "Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the <em>reply_to_message</em> field even if it itself is a reply.</td>", "html_description": "<td><em>Optional</em>. Message containing the checklist whose tasks were marked as done or not done. Note that the <a href=\"#message\">Message</a> object in this field will not contain the <em>reply_to_message</em> field even if it itself is a reply.</td>",
"rst_description": "*Optional*. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n", "rst_description": "*Optional*. Message containing the checklist whose tasks were marked as done or not done. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n",
"name": "checklist_message", "name": "checklist_message",
"required": false "required": false
}, },

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "directmessagestopic",
"name": "DirectMessagesTopic",
"description": "Describes a topic of a direct messages chat.",
"html_description": "<p>Describes a topic of a direct messages chat.</p>",
"rst_description": "Describes a topic of a direct messages chat.",
"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",
"name": "topic_id",
"required": true
},
{
"type": "User",
"description": "Information about the user that created the topic. Currently, it is always present",
"html_description": "<td><em>Optional</em>. Information about the user that created the topic. Currently, it is always present</td>",
"rst_description": "*Optional*. Information about the user that created the topic. Currently, it is always present\n",
"name": "user",
"required": false
}
],
"category": "types"
}
}

View file

@ -58,6 +58,14 @@
"rst_description": "*Optional*. The number of remaining gifts of this type that can be sent; for limited gifts only\n", "rst_description": "*Optional*. The number of remaining gifts of this type that can be sent; for limited gifts only\n",
"name": "remaining_count", "name": "remaining_count",
"required": false "required": false
},
{
"type": "Chat",
"description": "Information about the chat that published the gift",
"html_description": "<td><em>Optional</em>. Information about the chat that published the gift</td>",
"rst_description": "*Optional*. Information about the chat that published the gift\n",
"name": "publisher_chat",
"required": false
} }
], ],
"category": "types" "category": "types"

View file

@ -53,25 +53,25 @@
}, },
{ {
"type": "String", "type": "String",
"description": "If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.", "description": "If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account.",
"html_description": "<td><em>Optional</em>. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.</td>", "html_description": "<td><em>Optional</em>. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account.</td>",
"rst_description": "*Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.\n", "rst_description": "*Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account.\n",
"name": "switch_inline_query", "name": "switch_inline_query",
"required": false "required": false
}, },
{ {
"type": "String", "type": "String",
"description": "If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account.", "description": "If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account.",
"html_description": "<td><em>Optional</em>. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.<br/>\n<br/>\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account.</td>", "html_description": "<td><em>Optional</em>. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.<br/>\n<br/>\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account.</td>",
"rst_description": "*Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\n\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account.\n", "rst_description": "*Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\n\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account.\n",
"name": "switch_inline_query_current_chat", "name": "switch_inline_query_current_chat",
"required": false "required": false
}, },
{ {
"type": "SwitchInlineQueryChosenChat", "type": "SwitchInlineQueryChosenChat",
"description": "If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.", "description": "If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account.",
"html_description": "<td><em>Optional</em>. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.</td>", "html_description": "<td><em>Optional</em>. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account.</td>",
"rst_description": "*Optional*. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.\n", "rst_description": "*Optional*. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account.\n",
"name": "switch_inline_query_chosen_chat", "name": "switch_inline_query_chosen_chat",
"required": false "required": false
}, },

View file

@ -52,7 +52,7 @@
"required": false "required": false
}, },
{ {
"type": "True", "type": "Boolean",
"description": "Pass True if other users can mark tasks as done or not done in the checklist", "description": "Pass True if other users can mark tasks as done or not done in the checklist",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if other users can mark tasks as done or not done in the checklist</td>", "html_description": "<td><em>Optional</em>. Pass <em>True</em> if other users can mark tasks as done or not done in the checklist</td>",
"rst_description": "*Optional*. Pass :code:`True` if other users can mark tasks as done or not done in the checklist\n", "rst_description": "*Optional*. Pass :code:`True` if other users can mark tasks as done or not done in the checklist\n",

View file

@ -27,6 +27,14 @@
"name": "message_thread_id", "name": "message_thread_id",
"required": false "required": false
}, },
{
"type": "DirectMessagesTopic",
"description": "Information about the direct messages chat topic that contains the message",
"html_description": "<td><em>Optional</em>. Information about the direct messages chat topic that contains the message</td>",
"rst_description": "*Optional*. Information about the direct messages chat topic that contains the message\n",
"name": "direct_messages_topic",
"required": false
},
{ {
"type": "User", "type": "User",
"description": "Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats", "description": "Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats",
@ -110,8 +118,8 @@
{ {
"type": "Message", "type": "Message",
"description": "For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.", "description": "For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further <em>reply_to_message</em> fields even if it itself is a reply.</td>", "html_description": "<td><em>Optional</em>. For replies in the same chat and message thread, the original message. Note that the <a href=\"#message\">Message</a> object in this field will not contain further <em>reply_to_message</em> fields even if it itself is a reply.</td>",
"rst_description": "*Optional*. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further *reply_to_message* fields even if it itself is a reply.\n", "rst_description": "*Optional*. For replies in the same chat and message thread, the original message. Note that the :class:`aiogram.types.message.Message` object in this field will not contain further *reply_to_message* fields even if it itself is a reply.\n",
"name": "reply_to_message", "name": "reply_to_message",
"required": false "required": false
}, },
@ -139,6 +147,14 @@
"name": "reply_to_story", "name": "reply_to_story",
"required": false "required": false
}, },
{
"type": "Integer",
"description": "Identifier of the specific checklist task that is being replied to",
"html_description": "<td><em>Optional</em>. Identifier of the specific checklist task that is being replied to</td>",
"rst_description": "*Optional*. Identifier of the specific checklist task that is being replied to\n",
"name": "reply_to_checklist_task_id",
"required": false
},
{ {
"type": "User", "type": "User",
"description": "Bot through which the message was sent", "description": "Bot through which the message was sent",
@ -171,6 +187,14 @@
"name": "is_from_offline", "name": "is_from_offline",
"required": false "required": false
}, },
{
"type": "True",
"description": "True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited.",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited.</td>",
"rst_description": "*Optional*. :code:`True`, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited.\n",
"name": "is_paid_post",
"required": false
},
{ {
"type": "String", "type": "String",
"description": "The unique identifier of a media message group this message belongs to", "description": "The unique identifier of a media message group this message belongs to",
@ -219,6 +243,14 @@
"name": "link_preview_options", "name": "link_preview_options",
"required": false "required": false
}, },
{
"type": "SuggestedPostInfo",
"description": "Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited.",
"html_description": "<td><em>Optional</em>. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited.</td>",
"rst_description": "*Optional*. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited.\n",
"name": "suggested_post_info",
"required": false
},
{ {
"type": "String", "type": "String",
"description": "Unique identifier of the message effect added to the message", "description": "Unique identifier of the message effect added to the message",
@ -486,8 +518,8 @@
{ {
"type": "MaybeInaccessibleMessage", "type": "MaybeInaccessibleMessage",
"description": "Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.", "description": "Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. Specified message was pinned. Note that the Message object in this field will not contain further <em>reply_to_message</em> fields even if it itself is a reply.</td>", "html_description": "<td><em>Optional</em>. Specified message was pinned. Note that the <a href=\"#message\">Message</a> object in this field will not contain further <em>reply_to_message</em> fields even if it itself is a reply.</td>",
"rst_description": "*Optional*. Specified message was pinned. Note that the Message object in this field will not contain further *reply_to_message* fields even if it itself is a reply.\n", "rst_description": "*Optional*. Specified message was pinned. Note that the :class:`aiogram.types.message.Message` object in this field will not contain further *reply_to_message* fields even if it itself is a reply.\n",
"name": "pinned_message", "name": "pinned_message",
"required": false "required": false
}, },
@ -707,6 +739,46 @@
"name": "paid_message_price_changed", "name": "paid_message_price_changed",
"required": false "required": false
}, },
{
"type": "SuggestedPostApproved",
"description": "Service message: a suggested post was approved",
"html_description": "<td><em>Optional</em>. Service message: a suggested post was approved</td>",
"rst_description": "*Optional*. Service message: a suggested post was approved\n",
"name": "suggested_post_approved",
"required": false
},
{
"type": "SuggestedPostApprovalFailed",
"description": "Service message: approval of a suggested post has failed",
"html_description": "<td><em>Optional</em>. Service message: approval of a suggested post has failed</td>",
"rst_description": "*Optional*. Service message: approval of a suggested post has failed\n",
"name": "suggested_post_approval_failed",
"required": false
},
{
"type": "SuggestedPostDeclined",
"description": "Service message: a suggested post was declined",
"html_description": "<td><em>Optional</em>. Service message: a suggested post was declined</td>",
"rst_description": "*Optional*. Service message: a suggested post was declined\n",
"name": "suggested_post_declined",
"required": false
},
{
"type": "SuggestedPostPaid",
"description": "Service message: payment for a suggested post was received",
"html_description": "<td><em>Optional</em>. Service message: payment for a suggested post was received</td>",
"rst_description": "*Optional*. Service message: payment for a suggested post was received\n",
"name": "suggested_post_paid",
"required": false
},
{
"type": "SuggestedPostRefunded",
"description": "Service message: payment for a suggested post was refunded",
"html_description": "<td><em>Optional</em>. Service message: payment for a suggested post was refunded</td>",
"rst_description": "*Optional*. Service message: payment for a suggested post was refunded\n",
"name": "suggested_post_refunded",
"required": false
},
{ {
"type": "VideoChatScheduled", "type": "VideoChatScheduled",
"description": "Service message: video chat scheduled", "description": "Service message: video chat scheduled",

View file

@ -21,9 +21,9 @@
}, },
{ {
"type": "Integer or String", "type": "Integer or String",
"description": "If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account.", "description": "If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats.",
"html_description": "<td><em>Optional</em>. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format <code>@channelusername</code>). Not supported for messages sent on behalf of a business account.</td>", "html_description": "<td><em>Optional</em>. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format <code>@channelusername</code>). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats.</td>",
"rst_description": "*Optional*. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format :code:`@channelusername`). Not supported for messages sent on behalf of a business account.\n", "rst_description": "*Optional*. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format :code:`@channelusername`). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats.\n",
"name": "chat_id", "name": "chat_id",
"required": false "required": false
}, },
@ -66,6 +66,14 @@
"rst_description": "*Optional*. Position of the quote in the original message in UTF-16 code units\n", "rst_description": "*Optional*. Position of the quote in the original message in UTF-16 code units\n",
"name": "quote_position", "name": "quote_position",
"required": false "required": false
},
{
"type": "Integer",
"description": "Identifier of the specific checklist task to be replied to",
"html_description": "<td><em>Optional</em>. Identifier of the specific checklist task to be replied to</td>",
"rst_description": "*Optional*. Identifier of the specific checklist task to be replied to\n",
"name": "checklist_task_id",
"required": false
} }
], ],
"category": "types" "category": "types"

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "suggestedpostapprovalfailed",
"name": "SuggestedPostApprovalFailed",
"description": "Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval.",
"html_description": "<p>Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval.</p>",
"rst_description": "Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval.",
"annotations": [
{
"type": "Message",
"description": "Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. Message containing the suggested post whose approval has failed. Note that the <a href=\"#message\">Message</a> object in this field will not contain the <em>reply_to_message</em> field even if it itself is a reply.</td>",
"rst_description": "*Optional*. Message containing the suggested post whose approval has failed. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n",
"name": "suggested_post_message",
"required": false
},
{
"type": "SuggestedPostPrice",
"description": "Expected price of the post",
"html_description": "<td>Expected price of the post</td>",
"rst_description": "Expected price of the post\n",
"name": "price",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "suggestedpostapproved",
"name": "SuggestedPostApproved",
"description": "Describes a service message about the approval of a suggested post.",
"html_description": "<p>Describes a service message about the approval of a suggested post.</p>",
"rst_description": "Describes a service message about the approval of a suggested post.",
"annotations": [
{
"type": "Message",
"description": "Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. Message containing the suggested post. Note that the <a href=\"#message\">Message</a> object in this field will not contain the <em>reply_to_message</em> field even if it itself is a reply.</td>",
"rst_description": "*Optional*. Message containing the suggested post. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n",
"name": "suggested_post_message",
"required": false
},
{
"type": "SuggestedPostPrice",
"description": "Amount paid for the post",
"html_description": "<td><em>Optional</em>. Amount paid for the post</td>",
"rst_description": "*Optional*. Amount paid for the post\n",
"name": "price",
"required": false
},
{
"type": "Integer",
"description": "Date when the post will be published",
"html_description": "<td>Date when the post will be published</td>",
"rst_description": "Date when the post will be published\n",
"name": "send_date",
"required": true
}
],
"category": "types"
}
}

View file

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

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "suggestedpostdeclined",
"name": "SuggestedPostDeclined",
"description": "Describes a service message about the rejection of a suggested post.",
"html_description": "<p>Describes a service message about the rejection of a suggested post.</p>",
"rst_description": "Describes a service message about the rejection of a suggested post.",
"annotations": [
{
"type": "Message",
"description": "Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. Message containing the suggested post. Note that the <a href=\"#message\">Message</a> object in this field will not contain the <em>reply_to_message</em> field even if it itself is a reply.</td>",
"rst_description": "*Optional*. Message containing the suggested post. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n",
"name": "suggested_post_message",
"required": false
},
{
"type": "String",
"description": "Comment with which the post was declined",
"html_description": "<td><em>Optional</em>. Comment with which the post was declined</td>",
"rst_description": "*Optional*. Comment with which the post was declined\n",
"name": "comment",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "suggestedpostinfo",
"name": "SuggestedPostInfo",
"description": "Contains information about a suggested post.",
"html_description": "<p>Contains information about a suggested post.</p>",
"rst_description": "Contains information about a suggested post.",
"annotations": [
{
"type": "String",
"description": "State of the suggested post. Currently, it can be one of 'pending', 'approved', 'declined'.",
"html_description": "<td>State of the suggested post. Currently, it can be one of &#8220;pending&#8221;, &#8220;approved&#8221;, &#8220;declined&#8221;.</td>",
"rst_description": "State of the suggested post. Currently, it can be one of 'pending', 'approved', 'declined'.\n",
"name": "state",
"required": true
},
{
"type": "SuggestedPostPrice",
"description": "Proposed price of the post. If the field is omitted, then the post is unpaid.",
"html_description": "<td><em>Optional</em>. Proposed price of the post. If the field is omitted, then the post is unpaid.</td>",
"rst_description": "*Optional*. Proposed price of the post. If the field is omitted, then the post is unpaid.\n",
"name": "price",
"required": false
},
{
"type": "Integer",
"description": "Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it.",
"html_description": "<td><em>Optional</em>. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it.</td>",
"rst_description": "*Optional*. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it.\n",
"name": "send_date",
"required": false
}
],
"category": "types"
}
}

View file

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

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "suggestedpostpaid",
"name": "SuggestedPostPaid",
"description": "Describes a service message about a successful payment for a suggested post.",
"html_description": "<p>Describes a service message about a successful payment for a suggested post.</p>",
"rst_description": "Describes a service message about a successful payment for a suggested post.",
"annotations": [
{
"type": "Message",
"description": "Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. Message containing the suggested post. Note that the <a href=\"#message\">Message</a> object in this field will not contain the <em>reply_to_message</em> field even if it itself is a reply.</td>",
"rst_description": "*Optional*. Message containing the suggested post. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n",
"name": "suggested_post_message",
"required": false
},
{
"type": "String",
"description": "Currency in which the payment was made. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins",
"html_description": "<td>Currency in which the payment was made. Currently, one of &#8220;XTR&#8221; for Telegram Stars or &#8220;TON&#8221; for toncoins</td>",
"rst_description": "Currency in which the payment was made. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins\n",
"name": "currency",
"required": true
},
{
"type": "Integer",
"description": "The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only",
"html_description": "<td><em>Optional</em>. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only</td>",
"rst_description": "*Optional*. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only\n",
"name": "amount",
"required": false
},
{
"type": "StarAmount",
"description": "The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only",
"html_description": "<td><em>Optional</em>. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only</td>",
"rst_description": "*Optional*. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only\n",
"name": "star_amount",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "suggestedpostparameters",
"name": "SuggestedPostParameters",
"description": "Contains parameters of a post that is being suggested by the bot.",
"html_description": "<p>Contains parameters of a post that is being suggested by the bot.</p>",
"rst_description": "Contains parameters of a post that is being suggested by the bot.",
"annotations": [
{
"type": "SuggestedPostPrice",
"description": "Proposed price for the post. If the field is omitted, then the post is unpaid.",
"html_description": "<td><em>Optional</em>. Proposed price for the post. If the field is omitted, then the post is unpaid.</td>",
"rst_description": "*Optional*. Proposed price for the post. If the field is omitted, then the post is unpaid.\n",
"name": "price",
"required": false
},
{
"type": "Integer",
"description": "Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it.",
"html_description": "<td><em>Optional</em>. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it.</td>",
"rst_description": "*Optional*. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it.\n",
"name": "send_date",
"required": false
}
],
"category": "types"
}
}

View file

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

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"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.",
"annotations": [
{
"type": "String",
"description": "Currency in which the post will be paid. Currently, must be one of 'XTR' for Telegram Stars or 'TON' for toncoins",
"html_description": "<td>Currency in which the post will be paid. Currently, must be one of &#8220;XTR&#8221; for Telegram Stars or &#8220;TON&#8221; for toncoins</td>",
"rst_description": "Currency in which the post will be paid. Currently, must be one of 'XTR' for Telegram Stars or 'TON' for toncoins\n",
"name": "currency",
"required": true
},
{
"type": "Integer",
"description": "The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000.",
"html_description": "<td>The amount of the currency that will be paid for the post in the <em>smallest units</em> of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000.</td>",
"rst_description": "The amount of the currency that will be paid for the post in the *smallest units* of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000.\n",
"name": "amount",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "suggestedpostrefunded",
"name": "SuggestedPostRefunded",
"description": "Describes a service message about a payment refund for a suggested post.",
"html_description": "<p>Describes a service message about a payment refund for a suggested post.</p>",
"rst_description": "Describes a service message about a payment refund for a suggested post.",
"annotations": [
{
"type": "Message",
"description": "Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. Message containing the suggested post. Note that the <a href=\"#message\">Message</a> object in this field will not contain the <em>reply_to_message</em> field even if it itself is a reply.</td>",
"rst_description": "*Optional*. Message containing the suggested post. Note that the :class:`aiogram.types.message.Message` object in this field will not contain the *reply_to_message* field even if it itself is a reply.\n",
"name": "suggested_post_message",
"required": false
},
{
"type": "String",
"description": "Reason for the refund. Currently, one of 'post_deleted' if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or 'payment_refunded' if the payer refunded their payment.",
"html_description": "<td>Reason for the refund. Currently, one of &#8220;post_deleted&#8221; if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or &#8220;payment_refunded&#8221; if the payer refunded their payment.</td>",
"rst_description": "Reason for the refund. Currently, one of 'post_deleted' if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or 'payment_refunded' if the payer refunded their payment.\n",
"name": "reason",
"required": true
}
],
"category": "types"
}
}

View file

@ -58,6 +58,14 @@
"rst_description": "Backdrop of the gift\n", "rst_description": "Backdrop of the gift\n",
"name": "backdrop", "name": "backdrop",
"required": true "required": true
},
{
"type": "Chat",
"description": "Information about the chat that published the gift",
"html_description": "<td><em>Optional</em>. Information about the chat that published the gift</td>",
"rst_description": "*Optional*. Information about the chat that published the gift\n",
"name": "publisher_chat",
"required": false
} }
], ],
"category": "types" "category": "types"

6
.gitattributes vendored Normal file
View file

@ -0,0 +1,6 @@
# Mark code-generated files from butcher tool as generated
.butcher/**/*.json linguist-generated=true
# .butcher/**/*.yml linguist-generated=true
# These files are auto-generated and should be collapsed in PRs
# .butcher/ linguist-generated=true

39
CHANGES/1720.feature.rst Normal file
View file

@ -0,0 +1,39 @@
Added full support for the `Bot API 9.2 <https://core.telegram.org/bots/api-changelog#august-15-2025>`_:
**Direct Messages in Channels**
- Added the field :code:`is_direct_messages` to the classes :class:`aiogram.types.chat.Chat` and :class:`aiogram.types.chat_full_info.ChatFullInfo`, indicating whether the chat is a direct messages chat.
- Added the field :code:`parent_chat` to the class :class:`aiogram.types.chat_full_info.ChatFullInfo`, describing the parent channel for direct messages chats.
- Added the class :class:`aiogram.types.direct_messages_topic.DirectMessagesTopic` representing a direct messages topic.
- Added the field :code:`direct_messages_topic` to the class :class:`aiogram.types.message.Message`, describing the direct messages topic associated with a message.
- Added the parameter :code:`direct_messages_topic_id` to multiple sending methods for directing messages to specific direct message topics.
**Suggested Posts**
- Added the class :class:`aiogram.types.suggested_post_parameters.SuggestedPostParameters` representing parameters for suggested posts.
- Added the parameter :code:`suggested_post_parameters` to various sending methods, allowing bots to create suggested posts for channel approval.
- Added the method :class:`aiogram.methods.approve_suggested_post.ApproveSuggestedPost`, allowing bots to approve suggested posts in direct messages chats.
- Added the method :class:`aiogram.methods.decline_suggested_post.DeclineSuggestedPost`, allowing bots to decline suggested posts in direct messages chats.
- Added the field :code:`can_manage_direct_messages` to administrator-related classes :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` and :class:`aiogram.types.chat_member_administrator.ChatMemberAdministrator`.
- Added the class :class:`aiogram.types.suggested_post_info.SuggestedPostInfo` representing information about a suggested post.
- Added the class :class:`aiogram.types.suggested_post_price.SuggestedPostPrice` representing the price for a suggested post.
- Added service message classes for suggested post events:
- :class:`aiogram.types.suggested_post_approved.SuggestedPostApproved` and the field :code:`suggested_post_approved` to :class:`aiogram.types.message.Message`
- :class:`aiogram.types.suggested_post_approval_failed.SuggestedPostApprovalFailed` and the field :code:`suggested_post_approval_failed` to :class:`aiogram.types.message.Message`
- :class:`aiogram.types.suggested_post_declined.SuggestedPostDeclined` and the field :code:`suggested_post_declined` to :class:`aiogram.types.message.Message`
- :class:`aiogram.types.suggested_post_paid.SuggestedPostPaid` and the field :code:`suggested_post_paid` to :class:`aiogram.types.message.Message`
- :class:`aiogram.types.suggested_post_refunded.SuggestedPostRefunded` and the field :code:`suggested_post_refunded` to :class:`aiogram.types.message.Message`
**Enhanced Checklists**
- Added the field :code:`checklist_task_id` to the class :class:`aiogram.types.reply_parameters.ReplyParameters`, allowing replies to specific checklist tasks.
- Added the field :code:`reply_to_checklist_task_id` to the class :class:`aiogram.types.message.Message`, indicating which checklist task a message is replying to.
**Gifts Improvements**
- Added the field :code:`publisher_chat` to the classes :class:`aiogram.types.gift.Gift` and :class:`aiogram.types.unique_gift.UniqueGift`, describing the chat that published the gift.
**Additional Features**
- Added the field :code:`is_paid_post` to the class :class:`aiogram.types.message.Message`, indicating whether a message is a paid post.

View file

@ -28,6 +28,7 @@ from ..methods import (
AnswerShippingQuery, AnswerShippingQuery,
AnswerWebAppQuery, AnswerWebAppQuery,
ApproveChatJoinRequest, ApproveChatJoinRequest,
ApproveSuggestedPost,
BanChatMember, BanChatMember,
BanChatSenderChat, BanChatSenderChat,
Close, Close,
@ -42,6 +43,7 @@ from ..methods import (
CreateInvoiceLink, CreateInvoiceLink,
CreateNewStickerSet, CreateNewStickerSet,
DeclineChatJoinRequest, DeclineChatJoinRequest,
DeclineSuggestedPost,
DeleteBusinessMessages, DeleteBusinessMessages,
DeleteChatPhoto, DeleteChatPhoto,
DeleteChatStickerSet, DeleteChatStickerSet,
@ -235,6 +237,7 @@ from ..types import (
StickerSet, StickerSet,
Story, Story,
StoryArea, StoryArea,
SuggestedPostParameters,
Update, Update,
User, User,
UserChatBoosts, UserChatBoosts,
@ -801,6 +804,7 @@ class Bot:
from_chat_id: ChatIdUnion, from_chat_id: ChatIdUnion,
message_id: int, message_id: int,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
video_start_timestamp: Optional[DateTimeUnion] = None, video_start_timestamp: Optional[DateTimeUnion] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -811,6 +815,7 @@ class Bot:
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -826,6 +831,7 @@ class Bot:
:param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username 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_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 the forum; for forum supergroups 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 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 :param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
:param parse_mode: Mode for parsing entities in the new caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the new caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -834,6 +840,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 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 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 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 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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -847,6 +854,7 @@ class Bot:
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_id=message_id, message_id=message_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
video_start_timestamp=video_start_timestamp, video_start_timestamp=video_start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
@ -855,6 +863,7 @@ class Bot:
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -1153,7 +1162,9 @@ class Bot:
- If the bot is an administrator of a group, it can delete any message there. - If the bot is an administrator of a group, it can delete any message there.
- If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there. - If the bot has *can_delete_messages* administrator right in a supergroup or a channel, it can delete any message there.
- If the bot has *can_manage_direct_messages* administrator right in a channel, it can delete any message in the corresponding direct messages chat.
Returns :code:`True` on success. Returns :code:`True` on success.
@ -1540,9 +1551,11 @@ class Bot:
from_chat_id: ChatIdUnion, from_chat_id: ChatIdUnion,
message_id: int, message_id: int,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
video_start_timestamp: Optional[DateTimeUnion] = None, video_start_timestamp: Optional[DateTimeUnion] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> Message: ) -> Message:
""" """
@ -1554,9 +1567,11 @@ class Bot:
:param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username 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_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 the forum; for forum supergroups 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 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 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 protect_content: Protects the contents of the forwarded message from forwarding and saving
: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 :param request_timeout: Request timeout
:return: On success, the sent :class:`aiogram.types.message.Message` is returned. :return: On success, the sent :class:`aiogram.types.message.Message` is returned.
""" """
@ -1566,9 +1581,11 @@ class Bot:
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_id=message_id, message_id=message_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
video_start_timestamp=video_start_timestamp, video_start_timestamp=video_start_timestamp,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
suggested_post_parameters=suggested_post_parameters,
) )
return await self(call, request_timeout=request_timeout) return await self(call, request_timeout=request_timeout)
@ -1929,7 +1946,7 @@ class Bot:
Source: https://core.telegram.org/bots/api#leavechat Source: https://core.telegram.org/bots/api#leavechat
:param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`). Channel direct messages chats aren't supported; leave the corresponding channel instead.
:param request_timeout: Request timeout :param request_timeout: Request timeout
:return: Returns :code:`True` on success. :return: Returns :code:`True` on success.
""" """
@ -1964,7 +1981,7 @@ class Bot:
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> bool: ) -> bool:
""" """
Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#pinchatmessage Source: https://core.telegram.org/bots/api#pinchatmessage
@ -2003,6 +2020,7 @@ class Bot:
can_edit_messages: Optional[bool] = None, can_edit_messages: Optional[bool] = None,
can_pin_messages: Optional[bool] = None, can_pin_messages: Optional[bool] = None,
can_manage_topics: Optional[bool] = None, can_manage_topics: Optional[bool] = None,
can_manage_direct_messages: Optional[bool] = None,
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> bool: ) -> bool:
""" """
@ -2027,6 +2045,7 @@ class Bot:
:param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only :param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only :param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only
:param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only :param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only
:param can_manage_direct_messages: Pass :code:`True` if the administrator can manage direct messages within the channel and decline suggested posts; for channels only
:param request_timeout: Request timeout :param request_timeout: Request timeout
:return: Returns :code:`True` on success. :return: Returns :code:`True` on success.
""" """
@ -2049,6 +2068,7 @@ class Bot:
can_edit_messages=can_edit_messages, can_edit_messages=can_edit_messages,
can_pin_messages=can_pin_messages, can_pin_messages=can_pin_messages,
can_manage_topics=can_manage_topics, can_manage_topics=can_manage_topics,
can_manage_direct_messages=can_manage_direct_messages,
) )
return await self(call, request_timeout=request_timeout) return await self(call, request_timeout=request_timeout)
@ -2136,6 +2156,7 @@ class Bot:
animation: InputFileUnion, animation: InputFileUnion,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
duration: Optional[int] = None, duration: Optional[int] = None,
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
@ -2151,6 +2172,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -2166,6 +2188,7 @@ class Bot:
: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 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 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 the forum; for forum supergroups 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 duration: Duration of sent animation in seconds
:param width: Animation width :param width: Animation width
:param height: Animation height :param height: Animation height
@ -2179,6 +2202,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving :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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -2192,6 +2216,7 @@ class Bot:
animation=animation, animation=animation,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
duration=duration, duration=duration,
width=width, width=width,
height=height, height=height,
@ -2205,6 +2230,7 @@ class Bot:
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -2218,6 +2244,7 @@ class Bot:
audio: InputFileUnion, audio: InputFileUnion,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -2229,6 +2256,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -2245,6 +2273,7 @@ class Bot:
: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 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 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 the forum; for forum supergroups 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 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. :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.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2256,6 +2285,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving :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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -2269,6 +2299,7 @@ class Bot:
audio=audio, audio=audio,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,
@ -2280,6 +2311,7 @@ class Bot:
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -2304,7 +2336,7 @@ class Bot:
Source: https://core.telegram.org/bots/api#sendchataction Source: https://core.telegram.org/bots/api#sendchataction
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :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 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 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; for supergroups only
@ -2327,12 +2359,14 @@ class Bot:
first_name: str, first_name: str,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
last_name: Optional[str] = None, last_name: Optional[str] = None,
vcard: Optional[str] = None, vcard: Optional[str] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -2349,12 +2383,14 @@ class Bot:
:param first_name: Contact's first name :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 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 the forum; for forum supergroups 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 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 :param vcard: Additional data about the contact in the form of a `vCard <https://en.wikipedia.org/wiki/VCard>`_, 0-2048 bytes
: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 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 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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -2369,12 +2405,14 @@ class Bot:
first_name=first_name, first_name=first_name,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
last_name=last_name, last_name=last_name,
vcard=vcard, vcard=vcard,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -2387,11 +2425,13 @@ class Bot:
chat_id: ChatIdUnion, chat_id: ChatIdUnion,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
emoji: Optional[str] = None, emoji: Optional[str] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -2406,11 +2446,13 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :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 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 the forum; for forum supergroups 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 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. :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 :param protect_content: Protects the contents of the sent message from forwarding
: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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -2423,11 +2465,13 @@ class Bot:
chat_id=chat_id, chat_id=chat_id,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
emoji=emoji, emoji=emoji,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -2441,6 +2485,7 @@ class Bot:
document: InputFileUnion, document: InputFileUnion,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -2450,6 +2495,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -2465,6 +2511,7 @@ class Bot:
: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 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 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 the forum; for forum supergroups 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 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 :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the document caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the document caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -2474,6 +2521,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving :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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -2487,6 +2535,7 @@ class Bot:
document=document, document=document,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
thumbnail=thumbnail, thumbnail=thumbnail,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
@ -2496,6 +2545,7 @@ class Bot:
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -2524,7 +2574,7 @@ class Bot:
Source: https://core.telegram.org/bots/api#sendgame Source: https://core.telegram.org/bots/api#sendgame
:param chat_id: Unique identifier for the target chat :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 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 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 the forum; for forum supergroups only
@ -2565,6 +2615,7 @@ class Bot:
currency: str, currency: str,
prices: list[LabeledPrice], prices: list[LabeledPrice],
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
provider_token: Optional[str] = None, provider_token: Optional[str] = None,
max_tip_amount: Optional[int] = None, max_tip_amount: Optional[int] = None,
suggested_tip_amounts: Optional[list[int]] = None, suggested_tip_amounts: Optional[list[int]] = None,
@ -2585,6 +2636,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None, reply_markup: Optional[InlineKeyboardMarkup] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -2603,6 +2655,7 @@ class Bot:
: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 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 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 the forum; for forum supergroups 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 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>`_. :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>`_.
:param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*. :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*.
@ -2623,6 +2676,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving :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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_parameters: Description of the message to reply to
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button. :param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button.
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -2639,6 +2693,7 @@ class Bot:
currency=currency, currency=currency,
prices=prices, prices=prices,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
provider_token=provider_token, provider_token=provider_token,
max_tip_amount=max_tip_amount, max_tip_amount=max_tip_amount,
suggested_tip_amounts=suggested_tip_amounts, suggested_tip_amounts=suggested_tip_amounts,
@ -2659,6 +2714,7 @@ class Bot:
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -2673,6 +2729,7 @@ class Bot:
longitude: float, longitude: float,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
horizontal_accuracy: Optional[float] = None, horizontal_accuracy: Optional[float] = None,
live_period: Optional[int] = None, live_period: Optional[int] = None,
heading: Optional[int] = None, heading: Optional[int] = None,
@ -2681,6 +2738,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -2697,6 +2755,7 @@ class Bot:
:param longitude: Longitude 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 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 the forum; for forum supergroups 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 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. :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.
:param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
@ -2705,6 +2764,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving :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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -2719,6 +2779,7 @@ class Bot:
longitude=longitude, longitude=longitude,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
horizontal_accuracy=horizontal_accuracy, horizontal_accuracy=horizontal_accuracy,
live_period=live_period, live_period=live_period,
heading=heading, heading=heading,
@ -2727,6 +2788,7 @@ class Bot:
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -2740,6 +2802,7 @@ class Bot:
media: list[MediaUnion], media: list[MediaUnion],
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
@ -2750,7 +2813,7 @@ class Bot:
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> list[Message]: ) -> list[Message]:
""" """
Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages <https://core.telegram.org/bots/api#message>`_ that were sent is returned. Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of :class:`aiogram.types.message.Message` objects that were sent is returned.
Source: https://core.telegram.org/bots/api#sendmediagroup Source: https://core.telegram.org/bots/api#sendmediagroup
@ -2758,6 +2821,7 @@ class Bot:
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items :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 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 the forum; for forum supergroups 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 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 :param protect_content: Protects the contents of the sent messages 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 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
@ -2766,7 +2830,7 @@ class Bot:
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the messages are a reply, ID of the original message :param reply_to_message_id: If the messages are a reply, ID of the original message
:param request_timeout: Request timeout :param request_timeout: Request timeout
:return: On success, an array of `Messages <https://core.telegram.org/bots/api#message>`_ that were sent is returned. :return: On success, an array of :class:`aiogram.types.message.Message` objects that were sent is returned.
""" """
call = SendMediaGroup( call = SendMediaGroup(
@ -2774,6 +2838,7 @@ class Bot:
media=media, media=media,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
@ -2790,6 +2855,7 @@ class Bot:
text: str, text: str,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
entities: Optional[list[MessageEntity]] = None, entities: Optional[list[MessageEntity]] = None,
link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default( link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default(
@ -2799,6 +2865,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -2817,6 +2884,7 @@ class Bot:
:param text: Text of the message to be sent, 1-4096 characters after entities parsing :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 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 the forum; for forum supergroups 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 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 entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
:param link_preview_options: Link preview generation options for the message :param link_preview_options: Link preview generation options for the message
@ -2824,6 +2892,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving :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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -2838,6 +2907,7 @@ class Bot:
text=text, text=text,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
parse_mode=parse_mode, parse_mode=parse_mode,
entities=entities, entities=entities,
link_preview_options=link_preview_options, link_preview_options=link_preview_options,
@ -2845,6 +2915,7 @@ class Bot:
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -2859,6 +2930,7 @@ class Bot:
photo: InputFileUnion, photo: InputFileUnion,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -2870,6 +2942,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -2885,6 +2958,7 @@ class Bot:
: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 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 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 the forum; for forum supergroups 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 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. :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.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2894,6 +2968,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving :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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -2907,6 +2982,7 @@ class Bot:
photo=photo, photo=photo,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,
@ -2916,6 +2992,7 @@ class Bot:
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -2957,7 +3034,7 @@ class Bot:
Source: https://core.telegram.org/bots/api#sendpoll Source: https://core.telegram.org/bots/api#sendpoll
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). Polls can't be sent to channel direct messages chats.
:param question: Poll question, 1-300 characters :param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of 2-12 answer options :param options: A JSON-serialized list of 2-12 answer options
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
@ -3021,11 +3098,13 @@ class Bot:
sticker: InputFileUnion, sticker: InputFileUnion,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
emoji: Optional[str] = None, emoji: Optional[str] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -3041,11 +3120,13 @@ class Bot:
: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 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 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 the forum; for forum supergroups 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 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. :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 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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -3059,11 +3140,13 @@ class Bot:
sticker=sticker, sticker=sticker,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
emoji=emoji, emoji=emoji,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -3080,6 +3163,7 @@ class Bot:
address: str, address: str,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
foursquare_id: Optional[str] = None, foursquare_id: Optional[str] = None,
foursquare_type: Optional[str] = None, foursquare_type: Optional[str] = None,
google_place_id: Optional[str] = None, google_place_id: Optional[str] = None,
@ -3088,6 +3172,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -3106,6 +3191,7 @@ class Bot:
:param address: Address 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 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 the forum; for forum supergroups 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_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'.) :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
:param google_place_id: Google Places identifier of the venue :param google_place_id: Google Places identifier of the venue
@ -3114,6 +3200,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving :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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -3130,6 +3217,7 @@ class Bot:
address=address, address=address,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
foursquare_id=foursquare_id, foursquare_id=foursquare_id,
foursquare_type=foursquare_type, foursquare_type=foursquare_type,
google_place_id=google_place_id, google_place_id=google_place_id,
@ -3138,6 +3226,7 @@ class Bot:
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -3151,6 +3240,7 @@ class Bot:
video: InputFileUnion, video: InputFileUnion,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
duration: Optional[int] = None, duration: Optional[int] = None,
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
@ -3169,6 +3259,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -3184,6 +3275,7 @@ class Bot:
: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 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 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 the forum; for forum supergroups 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 duration: Duration of sent video in seconds
:param width: Video width :param width: Video width
:param height: Video height :param height: Video height
@ -3200,6 +3292,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving :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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -3213,6 +3306,7 @@ class Bot:
video=video, video=video,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
duration=duration, duration=duration,
width=width, width=width,
height=height, height=height,
@ -3229,6 +3323,7 @@ class Bot:
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -3242,6 +3337,7 @@ class Bot:
video_note: InputFileUnion, video_note: InputFileUnion,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
duration: Optional[int] = None, duration: Optional[int] = None,
length: Optional[int] = None, length: Optional[int] = None,
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
@ -3249,6 +3345,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -3264,6 +3361,7 @@ class Bot:
: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 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 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 the forum; for forum supergroups 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 duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message :param length: Video width and height, i.e. diameter of the video message
: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 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>`
@ -3271,6 +3369,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving :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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -3284,6 +3383,7 @@ class Bot:
video_note=video_note, video_note=video_note,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
duration=duration, duration=duration,
length=length, length=length,
thumbnail=thumbnail, thumbnail=thumbnail,
@ -3291,6 +3391,7 @@ class Bot:
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -3304,6 +3405,7 @@ class Bot:
voice: InputFileUnion, voice: InputFileUnion,
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -3312,6 +3414,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None, message_effect_id: Optional[str] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -3327,6 +3430,7 @@ class Bot:
: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 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 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 the forum; for forum supergroups 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 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. :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.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -3335,6 +3439,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving :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 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; for private chats only :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
: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_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 :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
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@ -3348,6 +3453,7 @@ class Bot:
voice=voice, voice=voice,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,
@ -3356,6 +3462,7 @@ class Bot:
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id, message_effect_id=message_effect_id,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,
@ -3828,7 +3935,7 @@ class Bot:
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> bool: ) -> bool:
""" """
Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#unpinallchatmessages Source: https://core.telegram.org/bots/api#unpinallchatmessages
@ -3873,7 +3980,7 @@ class Bot:
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> bool: ) -> bool:
""" """
Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin messages in groups and channels respectively. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#unpinchatmessage Source: https://core.telegram.org/bots/api#unpinchatmessage
@ -4339,6 +4446,7 @@ class Bot:
from_chat_id: ChatIdUnion, from_chat_id: ChatIdUnion,
message_ids: list[int], message_ids: list[int],
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None, protect_content: Optional[bool] = None,
remove_caption: Optional[bool] = None, remove_caption: Optional[bool] = None,
@ -4353,6 +4461,7 @@ class Bot:
:param from_chat_id: Unique identifier for the chat where the original messages were sent (or channel username 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_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 the forum; for forum supergroups 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 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 :param protect_content: Protects the contents of the sent messages from forwarding and saving
:param remove_caption: Pass :code:`True` to copy the messages without their captions :param remove_caption: Pass :code:`True` to copy the messages without their captions
@ -4365,6 +4474,7 @@ class Bot:
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_ids=message_ids, message_ids=message_ids,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
remove_caption=remove_caption, remove_caption=remove_caption,
@ -4400,6 +4510,7 @@ class Bot:
from_chat_id: ChatIdUnion, from_chat_id: ChatIdUnion,
message_ids: list[int], message_ids: list[int],
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None, protect_content: Optional[bool] = None,
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
@ -4413,6 +4524,7 @@ class Bot:
:param from_chat_id: Unique identifier for the chat where the original messages were sent (or channel username 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_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 the forum; for forum supergroups 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 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 :param protect_content: Protects the contents of the forwarded messages from forwarding and saving
:param request_timeout: Request timeout :param request_timeout: Request timeout
@ -4424,6 +4536,7 @@ class Bot:
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_ids=message_ids, message_ids=message_ids,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
) )
@ -4582,6 +4695,8 @@ class Bot:
star_count: int, star_count: int,
media: list[InputPaidMediaUnion], media: list[InputPaidMediaUnion],
business_connection_id: Optional[str] = None, business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
payload: Optional[str] = None, payload: Optional[str] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[str] = None, parse_mode: Optional[str] = None,
@ -4590,6 +4705,7 @@ class Bot:
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None, protect_content: Optional[bool] = None,
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
@ -4603,6 +4719,8 @@ class Bot:
: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-10000
:param media: A JSON-serialized array describing the media to be sent; up to 10 items :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 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 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 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 :param caption: Media caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the media caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the media caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -4611,6 +4729,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 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 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 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 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_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 :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
:param request_timeout: Request timeout :param request_timeout: Request timeout
@ -4622,6 +4741,8 @@ class Bot:
star_count=star_count, star_count=star_count,
media=media, media=media,
business_connection_id=business_connection_id, business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
payload=payload, payload=payload,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
@ -4630,6 +4751,7 @@ class Bot:
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
) )
@ -4882,7 +5004,7 @@ class Bot:
Source: https://core.telegram.org/bots/api#verifychat Source: https://core.telegram.org/bots/api#verifychat
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). Channel direct messages chats can't be verified.
:param custom_description: Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description. :param custom_description: Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.
:param request_timeout: Request timeout :param request_timeout: Request timeout
:return: Returns :code:`True` on success. :return: Returns :code:`True` on success.
@ -5509,3 +5631,55 @@ class Bot:
reply_markup=reply_markup, reply_markup=reply_markup,
) )
return await self(call, request_timeout=request_timeout) return await self(call, request_timeout=request_timeout)
async def approve_suggested_post(
self,
chat_id: int,
message_id: int,
send_date: Optional[DateTimeUnion] = None,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#approvesuggestedpost
:param chat_id: Unique identifier for the target direct messages chat
:param message_id: Identifier of a suggested post message to approve
:param send_date: Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = ApproveSuggestedPost(
chat_id=chat_id,
message_id=message_id,
send_date=send_date,
)
return await self(call, request_timeout=request_timeout)
async def decline_suggested_post(
self,
chat_id: int,
message_id: int,
comment: Optional[str] = None,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#declinesuggestedpost
:param chat_id: Unique identifier for the target direct messages chat
:param message_id: Identifier of a suggested post message to decline
:param comment: Comment for the creator of the suggested post; 0-128 characters
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = DeclineSuggestedPost(
chat_id=chat_id,
message_id=message_id,
comment=comment,
)
return await self(call, request_timeout=request_timeout)

View file

@ -65,6 +65,11 @@ class ContentType(str, Enum):
GIVEAWAY_WINNERS = "giveaway_winners" GIVEAWAY_WINNERS = "giveaway_winners"
GIVEAWAY_COMPLETED = "giveaway_completed" GIVEAWAY_COMPLETED = "giveaway_completed"
PAID_MESSAGE_PRICE_CHANGED = "paid_message_price_changed" PAID_MESSAGE_PRICE_CHANGED = "paid_message_price_changed"
SUGGESTED_POST_APPROVED = "suggested_post_approved"
SUGGESTED_POST_APPROVAL_FAILED = "suggested_post_approval_failed"
SUGGESTED_POST_DECLINED = "suggested_post_declined"
SUGGESTED_POST_PAID = "suggested_post_paid"
SUGGESTED_POST_REFUNDED = "suggested_post_refunded"
VIDEO_CHAT_SCHEDULED = "video_chat_scheduled" VIDEO_CHAT_SCHEDULED = "video_chat_scheduled"
VIDEO_CHAT_STARTED = "video_chat_started" VIDEO_CHAT_STARTED = "video_chat_started"
VIDEO_CHAT_ENDED = "video_chat_ended" VIDEO_CHAT_ENDED = "video_chat_ended"

View file

@ -5,6 +5,7 @@ from .answer_pre_checkout_query import AnswerPreCheckoutQuery
from .answer_shipping_query import AnswerShippingQuery from .answer_shipping_query import AnswerShippingQuery
from .answer_web_app_query import AnswerWebAppQuery from .answer_web_app_query import AnswerWebAppQuery
from .approve_chat_join_request import ApproveChatJoinRequest from .approve_chat_join_request import ApproveChatJoinRequest
from .approve_suggested_post import ApproveSuggestedPost
from .ban_chat_member import BanChatMember from .ban_chat_member import BanChatMember
from .ban_chat_sender_chat import BanChatSenderChat from .ban_chat_sender_chat import BanChatSenderChat
from .base import Request, Response, TelegramMethod from .base import Request, Response, TelegramMethod
@ -20,6 +21,7 @@ from .create_forum_topic import CreateForumTopic
from .create_invoice_link import CreateInvoiceLink from .create_invoice_link import CreateInvoiceLink
from .create_new_sticker_set import CreateNewStickerSet from .create_new_sticker_set import CreateNewStickerSet
from .decline_chat_join_request import DeclineChatJoinRequest from .decline_chat_join_request import DeclineChatJoinRequest
from .decline_suggested_post import DeclineSuggestedPost
from .delete_business_messages import DeleteBusinessMessages from .delete_business_messages import DeleteBusinessMessages
from .delete_chat_photo import DeleteChatPhoto from .delete_chat_photo import DeleteChatPhoto
from .delete_chat_sticker_set import DeleteChatStickerSet from .delete_chat_sticker_set import DeleteChatStickerSet
@ -164,6 +166,7 @@ __all__ = (
"AnswerShippingQuery", "AnswerShippingQuery",
"AnswerWebAppQuery", "AnswerWebAppQuery",
"ApproveChatJoinRequest", "ApproveChatJoinRequest",
"ApproveSuggestedPost",
"BanChatMember", "BanChatMember",
"BanChatSenderChat", "BanChatSenderChat",
"Close", "Close",
@ -178,6 +181,7 @@ __all__ = (
"CreateInvoiceLink", "CreateInvoiceLink",
"CreateNewStickerSet", "CreateNewStickerSet",
"DeclineChatJoinRequest", "DeclineChatJoinRequest",
"DeclineSuggestedPost",
"DeleteBusinessMessages", "DeleteBusinessMessages",
"DeleteChatPhoto", "DeleteChatPhoto",
"DeleteChatStickerSet", "DeleteChatStickerSet",

View file

@ -0,0 +1,44 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from ..types import DateTimeUnion
from .base import TelegramMethod
class ApproveSuggestedPost(TelegramMethod[bool]):
"""
Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#approvesuggestedpost
"""
__returning__ = bool
__api_method__ = "approveSuggestedPost"
chat_id: int
"""Unique identifier for the target direct messages chat"""
message_id: int
"""Identifier of a suggested post message to approve"""
send_date: Optional[DateTimeUnion] = None
"""Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: int,
message_id: int,
send_date: Optional[DateTimeUnion] = 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, message_id=message_id, send_date=send_date, **__pydantic_kwargs
)

View file

@ -12,6 +12,7 @@ from ..types import (
MessageId, MessageId,
ReplyMarkupUnion, ReplyMarkupUnion,
ReplyParameters, ReplyParameters,
SuggestedPostParameters,
) )
from .base import TelegramMethod from .base import TelegramMethod
@ -34,6 +35,8 @@ class CopyMessage(TelegramMethod[MessageId]):
"""Message identifier in the chat specified in *from_chat_id*""" """Message identifier in the chat specified in *from_chat_id*"""
message_thread_id: Optional[int] = None 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 the forum; for forum supergroups 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 video_start_timestamp: Optional[DateTimeUnion] = None
"""New start timestamp for the copied video in the message""" """New start timestamp for the copied video in the message"""
caption: Optional[str] = None caption: Optional[str] = None
@ -50,6 +53,8 @@ class CopyMessage(TelegramMethod[MessageId]):
"""Protects the contents of the sent message from forwarding and saving""" """Protects the contents of the sent message from forwarding and saving"""
allow_paid_broadcast: Optional[bool] = None 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""" """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"""
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 reply_parameters: Optional[ReplyParameters] = None
"""Description of the message to reply to""" """Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None reply_markup: Optional[ReplyMarkupUnion] = None
@ -78,6 +83,7 @@ class CopyMessage(TelegramMethod[MessageId]):
from_chat_id: ChatIdUnion, from_chat_id: ChatIdUnion,
message_id: int, message_id: int,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
video_start_timestamp: Optional[DateTimeUnion] = None, video_start_timestamp: Optional[DateTimeUnion] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -88,6 +94,7 @@ class CopyMessage(TelegramMethod[MessageId]):
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None,
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None, reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None, reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None,
@ -103,6 +110,7 @@ class CopyMessage(TelegramMethod[MessageId]):
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_id=message_id, message_id=message_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
video_start_timestamp=video_start_timestamp, video_start_timestamp=video_start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
@ -111,6 +119,7 @@ class CopyMessage(TelegramMethod[MessageId]):
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast, allow_paid_broadcast=allow_paid_broadcast,
suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters, reply_parameters=reply_parameters,
reply_markup=reply_markup, reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply, allow_sending_without_reply=allow_sending_without_reply,

View file

@ -22,6 +22,8 @@ class CopyMessages(TelegramMethod[list[MessageId]]):
"""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.""" """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 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 the forum; for forum supergroups 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 disable_notification: Optional[bool] = None
"""Sends the messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.""" """Sends the messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
protect_content: Optional[bool] = None protect_content: Optional[bool] = None
@ -40,6 +42,7 @@ class CopyMessages(TelegramMethod[list[MessageId]]):
from_chat_id: ChatIdUnion, from_chat_id: ChatIdUnion,
message_ids: list[int], message_ids: list[int],
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None, protect_content: Optional[bool] = None,
remove_caption: Optional[bool] = None, remove_caption: Optional[bool] = None,
@ -54,6 +57,7 @@ class CopyMessages(TelegramMethod[list[MessageId]]):
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_ids=message_ids, message_ids=message_ids,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
remove_caption=remove_caption, remove_caption=remove_caption,

View file

@ -0,0 +1,43 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramMethod
class DeclineSuggestedPost(TelegramMethod[bool]):
"""
Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#declinesuggestedpost
"""
__returning__ = bool
__api_method__ = "declineSuggestedPost"
chat_id: int
"""Unique identifier for the target direct messages chat"""
message_id: int
"""Identifier of a suggested post message to decline"""
comment: Optional[str] = None
"""Comment for the creator of the suggested post; 0-128 characters"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: int,
message_id: int,
comment: Optional[str] = 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, message_id=message_id, comment=comment, **__pydantic_kwargs
)

View file

@ -24,7 +24,9 @@ class DeleteMessage(TelegramMethod[bool]):
- If the bot is an administrator of a group, it can delete any message there. - If the bot is an administrator of a group, it can delete any message there.
- If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there. - If the bot has *can_delete_messages* administrator right in a supergroup or a channel, it can delete any message there.
- If the bot has *can_manage_direct_messages* administrator right in a channel, it can delete any message in the corresponding direct messages chat.
Returns :code:`True` on success. Returns :code:`True` on success.

View file

@ -3,7 +3,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..client.default import Default from ..client.default import Default
from ..types import ChatIdUnion, DateTimeUnion, Message from ..types import ChatIdUnion, DateTimeUnion, Message, SuggestedPostParameters
from .base import TelegramMethod from .base import TelegramMethod
@ -25,12 +25,16 @@ class ForwardMessage(TelegramMethod[Message]):
"""Message identifier in the chat specified in *from_chat_id*""" """Message identifier in the chat specified in *from_chat_id*"""
message_thread_id: Optional[int] = None 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 the forum; for forum supergroups 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 video_start_timestamp: Optional[DateTimeUnion] = None
"""New start timestamp for the forwarded video in the message""" """New start timestamp for the forwarded video in the message"""
disable_notification: Optional[bool] = None 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.""" """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") protect_content: Optional[Union[bool, Default]] = Default("protect_content")
"""Protects the contents of the forwarded message from forwarding and saving""" """Protects the contents of the forwarded message from forwarding and saving"""
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 TYPE_CHECKING: if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!! # DO NOT EDIT MANUALLY!!!
@ -43,9 +47,11 @@ class ForwardMessage(TelegramMethod[Message]):
from_chat_id: ChatIdUnion, from_chat_id: ChatIdUnion,
message_id: int, message_id: int,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
video_start_timestamp: Optional[DateTimeUnion] = None, video_start_timestamp: Optional[DateTimeUnion] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
suggested_post_parameters: Optional[SuggestedPostParameters] = None,
**__pydantic_kwargs: Any, **__pydantic_kwargs: Any,
) -> None: ) -> None:
# DO NOT EDIT MANUALLY!!! # DO NOT EDIT MANUALLY!!!
@ -57,8 +63,10 @@ class ForwardMessage(TelegramMethod[Message]):
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_id=message_id, message_id=message_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
video_start_timestamp=video_start_timestamp, video_start_timestamp=video_start_timestamp,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
suggested_post_parameters=suggested_post_parameters,
**__pydantic_kwargs, **__pydantic_kwargs,
) )

View file

@ -22,6 +22,8 @@ class ForwardMessages(TelegramMethod[list[MessageId]]):
"""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.""" """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 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 the forum; for forum supergroups 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 disable_notification: Optional[bool] = None
"""Sends the messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.""" """Sends the messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
protect_content: Optional[bool] = None protect_content: Optional[bool] = None
@ -38,6 +40,7 @@ class ForwardMessages(TelegramMethod[list[MessageId]]):
from_chat_id: ChatIdUnion, from_chat_id: ChatIdUnion,
message_ids: list[int], message_ids: list[int],
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None, protect_content: Optional[bool] = None,
**__pydantic_kwargs: Any, **__pydantic_kwargs: Any,
@ -51,6 +54,7 @@ class ForwardMessages(TelegramMethod[list[MessageId]]):
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_ids=message_ids, message_ids=message_ids,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
**__pydantic_kwargs, **__pydantic_kwargs,

View file

@ -17,7 +17,7 @@ class LeaveChat(TelegramMethod[bool]):
__api_method__ = "leaveChat" __api_method__ = "leaveChat"
chat_id: ChatIdUnion chat_id: ChatIdUnion
"""Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`). Channel direct messages chats aren't supported; leave the corresponding channel instead."""
if TYPE_CHECKING: if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!! # DO NOT EDIT MANUALLY!!!

View file

@ -8,7 +8,7 @@ from .base import TelegramMethod
class PinChatMessage(TelegramMethod[bool]): class PinChatMessage(TelegramMethod[bool]):
""" """
Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#pinchatmessage Source: https://core.telegram.org/bots/api#pinchatmessage
""" """

View file

@ -50,6 +50,8 @@ class PromoteChatMember(TelegramMethod[bool]):
"""Pass :code:`True` if the administrator can pin messages; for supergroups only""" """Pass :code:`True` if the administrator can pin messages; for supergroups only"""
can_manage_topics: Optional[bool] = None can_manage_topics: Optional[bool] = None
"""Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only""" """Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"""
can_manage_direct_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can manage direct messages within the channel and decline suggested posts; for channels only"""
if TYPE_CHECKING: if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!! # DO NOT EDIT MANUALLY!!!
@ -75,6 +77,7 @@ class PromoteChatMember(TelegramMethod[bool]):
can_edit_messages: Optional[bool] = None, can_edit_messages: Optional[bool] = None,
can_pin_messages: Optional[bool] = None, can_pin_messages: Optional[bool] = None,
can_manage_topics: Optional[bool] = None, can_manage_topics: Optional[bool] = None,
can_manage_direct_messages: Optional[bool] = None,
**__pydantic_kwargs: Any, **__pydantic_kwargs: Any,
) -> None: ) -> None:
# DO NOT EDIT MANUALLY!!! # DO NOT EDIT MANUALLY!!!
@ -99,5 +102,6 @@ class PromoteChatMember(TelegramMethod[bool]):
can_edit_messages=can_edit_messages, can_edit_messages=can_edit_messages,
can_pin_messages=can_pin_messages, can_pin_messages=can_pin_messages,
can_manage_topics=can_manage_topics, can_manage_topics=can_manage_topics,
can_manage_direct_messages=can_manage_direct_messages,
**__pydantic_kwargs, **__pydantic_kwargs,
) )

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