Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
",
+ "rst_description": "Use this method to stop a poll which was sent by the bot. On success, the stopped :class:`aiogram.types.poll.Poll` is returned.",
+ "annotations": [
+ {
+ "type": "String",
+ "required": false,
+ "description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
+ "html_description": "`_.\n",
+ "name": "reply_markup"
+ }
+ ],
+ "category": "methods"
+ },
+ {
+ "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": "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.
",
+ "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": "Unique identifier for the target direct messages chat | ",
+ "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": "Identifier of a suggested post message to approve | ",
+ "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": "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 | ",
+ "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"
+ },
+ {
+ "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": "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.
",
+ "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": "Unique identifier for the target direct messages chat | ",
+ "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": "Identifier of a suggested post message to decline | ",
+ "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": "Comment for the creator of the suggested post; 0-128 characters | ",
+ "rst_description": "Comment for the creator of the suggested post; 0-128 characters\n",
+ "name": "comment"
+ }
+ ],
+ "category": "methods"
+ },
+ {
+ "anchor": "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 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": "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.
",
+ "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": [
+ {
+ "type": "Integer or String",
+ "required": true,
+ "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
+ "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername) | ",
+ "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
+ "name": "chat_id"
+ },
+ {
+ "type": "Integer",
+ "required": true,
+ "description": "Identifier of the message to delete",
+ "html_description": "Identifier of the message to delete | ",
+ "rst_description": "Identifier of the message to delete\n",
+ "name": "message_id"
+ }
+ ],
+ "category": "methods"
+ },
+ {
+ "anchor": "deletemessages",
+ "name": "deleteMessages",
+ "description": "Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success.",
+ "html_description": "Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success.
",
+ "rst_description": "Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns :code:`True` on success.",
+ "annotations": [
+ {
+ "type": "Integer or String",
+ "required": true,
+ "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
+ "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername) | ",
+ "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
+ "name": "chat_id"
+ },
+ {
+ "type": "Array of Integer",
+ "required": true,
+ "description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted",
+ "html_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted | ",
+ "rst_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted\n",
+ "name": "message_ids"
+ }
+ ],
+ "category": "methods"
+ }
+ ],
"description": "The following methods allow you to change an existing message in the message history instead of sending a new one with a result of an action. This is most useful for messages with inline keyboards using callback queries, but can also help reduce clutter in conversations with regular chat bots.\nPlease note, that it is currently only possible to edit messages without reply_markup or with inline keyboards."
},
{
@@ -15487,6 +16237,14 @@
"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": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat | ",
+ "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",
"required": true,
@@ -15535,6 +16293,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"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": "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. | ",
+ "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",
"required": false,
@@ -18745,6 +19511,14 @@
"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": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat | ",
+ "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",
"required": true,
@@ -18945,6 +19719,14 @@
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"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": "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. | ",
+ "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",
"required": false,
@@ -20910,9 +21692,9 @@
{
"type": "Integer",
"required": true,
- "description": "Unique identifier for the target chat",
- "html_description": "Unique identifier for the target chat | ",
- "rst_description": "Unique identifier for the target chat\n",
+ "description": "Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats.",
+ "html_description": "Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats. | ",
+ "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"
},
{
diff --git a/.butcher/types/BotCommandScopeChat/entity.json b/.butcher/types/BotCommandScopeChat/entity.json
index 09990c4a..bf5abb13 100644
--- a/.butcher/types/BotCommandScopeChat/entity.json
+++ b/.butcher/types/BotCommandScopeChat/entity.json
@@ -21,9 +21,9 @@
},
{
"type": "Integer or String",
- "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
- "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) | ",
- "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n",
+ "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": "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. | ",
+ "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",
"required": true
}
diff --git a/.butcher/types/BotCommandScopeChatAdministrators/entity.json b/.butcher/types/BotCommandScopeChatAdministrators/entity.json
index 06c96964..5e68cc7f 100644
--- a/.butcher/types/BotCommandScopeChatAdministrators/entity.json
+++ b/.butcher/types/BotCommandScopeChatAdministrators/entity.json
@@ -21,9 +21,9 @@
},
{
"type": "Integer or String",
- "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
- "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) | ",
- "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n",
+ "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": "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. | ",
+ "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",
"required": true
}
diff --git a/.butcher/types/BotCommandScopeChatMember/entity.json b/.butcher/types/BotCommandScopeChatMember/entity.json
index 6d75e7d6..12e4471e 100644
--- a/.butcher/types/BotCommandScopeChatMember/entity.json
+++ b/.butcher/types/BotCommandScopeChatMember/entity.json
@@ -21,9 +21,9 @@
},
{
"type": "Integer or String",
- "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
- "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) | ",
- "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n",
+ "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": "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. | ",
+ "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",
"required": true
},
diff --git a/.butcher/types/Chat/entity.json b/.butcher/types/Chat/entity.json
index df2e25b1..e06b2291 100644
--- a/.butcher/types/Chat/entity.json
+++ b/.butcher/types/Chat/entity.json
@@ -67,6 +67,14 @@
"name": "is_forum",
"required": false
},
+ {
+ "type": "True",
+ "description": "True, if the chat is the direct messages chat of a channel",
+ "html_description": "Optional. True, if the chat is the direct messages chat of a channel | ",
+ "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",
"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.",
diff --git a/.butcher/types/ChatAdministratorRights/entity.json b/.butcher/types/ChatAdministratorRights/entity.json
index 77e09e49..45ebc3b5 100644
--- a/.butcher/types/ChatAdministratorRights/entity.json
+++ b/.butcher/types/ChatAdministratorRights/entity.json
@@ -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",
"name": "can_manage_topics",
"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": "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only | ",
+ "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"
diff --git a/.butcher/types/ChatFullInfo/entity.json b/.butcher/types/ChatFullInfo/entity.json
index 11b0c738..228bfc9b 100644
--- a/.butcher/types/ChatFullInfo/entity.json
+++ b/.butcher/types/ChatFullInfo/entity.json
@@ -67,6 +67,14 @@
"name": "is_forum",
"required": false
},
+ {
+ "type": "True",
+ "description": "True, if the chat is the direct messages chat of a channel",
+ "html_description": "Optional. True, if the chat is the direct messages chat of a channel | ",
+ "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",
"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",
"required": false
},
+ {
+ "type": "Chat",
+ "description": "Information about the corresponding channel chat; for direct messages chats only",
+ "html_description": "Optional. Information about the corresponding channel chat; for direct messages chats only | ",
+ "rst_description": "*Optional*. Information about the corresponding channel chat; for direct messages chats only\n",
+ "name": "parent_chat",
+ "required": false
+ },
{
"type": "Array of ReactionType",
"description": "List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed.",
diff --git a/.butcher/types/ChatMemberAdministrator/entity.json b/.butcher/types/ChatMemberAdministrator/entity.json
index 2e14b4ce..f1278554 100644
--- a/.butcher/types/ChatMemberAdministrator/entity.json
+++ b/.butcher/types/ChatMemberAdministrator/entity.json
@@ -155,6 +155,14 @@
"name": "can_manage_topics",
"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": "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only | ",
+ "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",
"description": "Custom title for this user",
diff --git a/.butcher/types/ChecklistTasksAdded/entity.json b/.butcher/types/ChecklistTasksAdded/entity.json
index 9593e5ad..08767562 100644
--- a/.butcher/types/ChecklistTasksAdded/entity.json
+++ b/.butcher/types/ChecklistTasksAdded/entity.json
@@ -14,8 +14,8 @@
{
"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.",
- "html_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. | ",
- "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",
+ "html_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. | ",
+ "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",
"required": false
},
diff --git a/.butcher/types/ChecklistTasksDone/entity.json b/.butcher/types/ChecklistTasksDone/entity.json
index 73ac9e8b..7949b8ff 100644
--- a/.butcher/types/ChecklistTasksDone/entity.json
+++ b/.butcher/types/ChecklistTasksDone/entity.json
@@ -14,8 +14,8 @@
{
"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.",
- "html_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. | ",
- "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",
+ "html_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. | ",
+ "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",
"required": false
},
diff --git a/.butcher/types/DirectMessagesTopic/entity.json b/.butcher/types/DirectMessagesTopic/entity.json
new file mode 100644
index 00000000..975449d4
--- /dev/null
+++ b/.butcher/types/DirectMessagesTopic/entity.json
@@ -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": "Describes a topic of a direct messages chat.
",
+ "rst_description": "Describes a topic of a direct messages chat.",
+ "annotations": [
+ {
+ "type": "Integer",
+ "description": "Unique identifier of the topic",
+ "html_description": "Unique identifier of the topic | ",
+ "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": "Optional. Information about the user that created the topic. Currently, it is always present | ",
+ "rst_description": "*Optional*. Information about the user that created the topic. Currently, it is always present\n",
+ "name": "user",
+ "required": false
+ }
+ ],
+ "category": "types"
+ }
+}
diff --git a/.butcher/types/Gift/entity.json b/.butcher/types/Gift/entity.json
index 45426822..baabd8ba 100644
--- a/.butcher/types/Gift/entity.json
+++ b/.butcher/types/Gift/entity.json
@@ -58,6 +58,14 @@
"rst_description": "*Optional*. The number of remaining gifts of this type that can be sent; for limited gifts only\n",
"name": "remaining_count",
"required": false
+ },
+ {
+ "type": "Chat",
+ "description": "Information about the chat that published the gift",
+ "html_description": "Optional. Information about the chat that published the gift | ",
+ "rst_description": "*Optional*. Information about the chat that published the gift\n",
+ "name": "publisher_chat",
+ "required": false
}
],
"category": "types"
diff --git a/.butcher/types/InlineKeyboardButton/entity.json b/.butcher/types/InlineKeyboardButton/entity.json
index 036fc7de..6279c8e6 100644
--- a/.butcher/types/InlineKeyboardButton/entity.json
+++ b/.butcher/types/InlineKeyboardButton/entity.json
@@ -53,25 +53,25 @@
},
{
"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.",
- "html_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. | ",
- "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",
+ "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": "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. | ",
+ "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",
"required": false
},
{
"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.",
- "html_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 \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. | ",
- "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",
+ "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": "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 \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. | ",
+ "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",
"required": false
},
{
"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.",
- "html_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. | ",
- "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",
+ "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": "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. | ",
+ "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",
"required": false
},
diff --git a/.butcher/types/InputChecklist/entity.json b/.butcher/types/InputChecklist/entity.json
index 706f52dd..dd1dc8d5 100644
--- a/.butcher/types/InputChecklist/entity.json
+++ b/.butcher/types/InputChecklist/entity.json
@@ -52,7 +52,7 @@
"required": false
},
{
- "type": "True",
+ "type": "Boolean",
"description": "Pass True if other users can mark tasks as done or not done in the checklist",
"html_description": "Optional. Pass True if other users can mark tasks as done or not done in the checklist | ",
"rst_description": "*Optional*. Pass :code:`True` if other users can mark tasks as done or not done in the checklist\n",
diff --git a/.butcher/types/Message/entity.json b/.butcher/types/Message/entity.json
index 1c8d8f16..0fbb922b 100644
--- a/.butcher/types/Message/entity.json
+++ b/.butcher/types/Message/entity.json
@@ -27,6 +27,14 @@
"name": "message_thread_id",
"required": false
},
+ {
+ "type": "DirectMessagesTopic",
+ "description": "Information about the direct messages chat topic that contains the message",
+ "html_description": "Optional. Information about the direct messages chat topic that contains the message | ",
+ "rst_description": "*Optional*. Information about the direct messages chat topic that contains the message\n",
+ "name": "direct_messages_topic",
+ "required": false
+ },
{
"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",
@@ -110,8 +118,8 @@
{
"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.",
- "html_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. | ",
- "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",
+ "html_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. | ",
+ "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",
"required": false
},
@@ -139,6 +147,14 @@
"name": "reply_to_story",
"required": false
},
+ {
+ "type": "Integer",
+ "description": "Identifier of the specific checklist task that is being replied to",
+ "html_description": "Optional. Identifier of the specific checklist task that is being replied to | ",
+ "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",
"description": "Bot through which the message was sent",
@@ -171,6 +187,14 @@
"name": "is_from_offline",
"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": "Optional. 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. | ",
+ "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",
"description": "The unique identifier of a media message group this message belongs to",
@@ -219,6 +243,14 @@
"name": "link_preview_options",
"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": "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. | ",
+ "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",
"description": "Unique identifier of the message effect added to the message",
@@ -486,8 +518,8 @@
{
"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.",
- "html_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. | ",
- "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",
+ "html_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. | ",
+ "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",
"required": false
},
@@ -707,6 +739,46 @@
"name": "paid_message_price_changed",
"required": false
},
+ {
+ "type": "SuggestedPostApproved",
+ "description": "Service message: a suggested post was approved",
+ "html_description": "Optional. Service message: a suggested post was approved | ",
+ "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": "Optional. Service message: approval of a suggested post has failed | ",
+ "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": "Optional. Service message: a suggested post was declined | ",
+ "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": "Optional. Service message: payment for a suggested post was received | ",
+ "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": "Optional. Service message: payment for a suggested post was refunded | ",
+ "rst_description": "*Optional*. Service message: payment for a suggested post was refunded\n",
+ "name": "suggested_post_refunded",
+ "required": false
+ },
{
"type": "VideoChatScheduled",
"description": "Service message: video chat scheduled",
diff --git a/.butcher/types/ReplyParameters/entity.json b/.butcher/types/ReplyParameters/entity.json
index 94a43e43..b479d0bd 100644
--- a/.butcher/types/ReplyParameters/entity.json
+++ b/.butcher/types/ReplyParameters/entity.json
@@ -21,9 +21,9 @@
},
{
"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.",
- "html_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 @channelusername). Not supported for messages sent on behalf of a business account. | ",
- "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",
+ "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": "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 @channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats. | ",
+ "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",
"required": false
},
@@ -66,6 +66,14 @@
"rst_description": "*Optional*. Position of the quote in the original message in UTF-16 code units\n",
"name": "quote_position",
"required": false
+ },
+ {
+ "type": "Integer",
+ "description": "Identifier of the specific checklist task to be replied to",
+ "html_description": "Optional. Identifier of the specific checklist task to be replied to | ",
+ "rst_description": "*Optional*. Identifier of the specific checklist task to be replied to\n",
+ "name": "checklist_task_id",
+ "required": false
}
],
"category": "types"
diff --git a/.butcher/types/SuggestedPostApprovalFailed/entity.json b/.butcher/types/SuggestedPostApprovalFailed/entity.json
new file mode 100644
index 00000000..d5d8bd6b
--- /dev/null
+++ b/.butcher/types/SuggestedPostApprovalFailed/entity.json
@@ -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": "Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval.
",
+ "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": "Optional. 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. | ",
+ "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": "Expected price of the post | ",
+ "rst_description": "Expected price of the post\n",
+ "name": "price",
+ "required": true
+ }
+ ],
+ "category": "types"
+ }
+}
diff --git a/.butcher/types/SuggestedPostApproved/entity.json b/.butcher/types/SuggestedPostApproved/entity.json
new file mode 100644
index 00000000..3472ad3b
--- /dev/null
+++ b/.butcher/types/SuggestedPostApproved/entity.json
@@ -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": "Describes a service message about the approval of a suggested post.
",
+ "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": "Optional. 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. | ",
+ "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": "Optional. Amount paid for the post | ",
+ "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": "Date when the post will be published | ",
+ "rst_description": "Date when the post will be published\n",
+ "name": "send_date",
+ "required": true
+ }
+ ],
+ "category": "types"
+ }
+}
diff --git a/.butcher/types/SuggestedPostApproved/replace.yml b/.butcher/types/SuggestedPostApproved/replace.yml
new file mode 100644
index 00000000..26ef9ec3
--- /dev/null
+++ b/.butcher/types/SuggestedPostApproved/replace.yml
@@ -0,0 +1,5 @@
+annotations:
+ send_date:
+ parsed_type:
+ type: std
+ name: DateTime
diff --git a/.butcher/types/SuggestedPostDeclined/entity.json b/.butcher/types/SuggestedPostDeclined/entity.json
new file mode 100644
index 00000000..c1426421
--- /dev/null
+++ b/.butcher/types/SuggestedPostDeclined/entity.json
@@ -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": "Describes a service message about the rejection of a suggested post.
",
+ "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": "Optional. 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. | ",
+ "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": "Optional. Comment with which the post was declined | ",
+ "rst_description": "*Optional*. Comment with which the post was declined\n",
+ "name": "comment",
+ "required": false
+ }
+ ],
+ "category": "types"
+ }
+}
diff --git a/.butcher/types/SuggestedPostInfo/entity.json b/.butcher/types/SuggestedPostInfo/entity.json
new file mode 100644
index 00000000..0a26de70
--- /dev/null
+++ b/.butcher/types/SuggestedPostInfo/entity.json
@@ -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": "Contains information about a suggested post.
",
+ "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": "State of the suggested post. Currently, it can be one of “pending”, “approved”, “declined”. | ",
+ "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": "Optional. Proposed price of the post. If the field is omitted, then the post is unpaid. | ",
+ "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": "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. | ",
+ "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"
+ }
+}
diff --git a/.butcher/types/SuggestedPostInfo/replace.yml b/.butcher/types/SuggestedPostInfo/replace.yml
new file mode 100644
index 00000000..26ef9ec3
--- /dev/null
+++ b/.butcher/types/SuggestedPostInfo/replace.yml
@@ -0,0 +1,5 @@
+annotations:
+ send_date:
+ parsed_type:
+ type: std
+ name: DateTime
diff --git a/.butcher/types/SuggestedPostPaid/entity.json b/.butcher/types/SuggestedPostPaid/entity.json
new file mode 100644
index 00000000..9cdb2143
--- /dev/null
+++ b/.butcher/types/SuggestedPostPaid/entity.json
@@ -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": "Describes a service message about a successful payment for a suggested post.
",
+ "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": "Optional. 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. | ",
+ "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": "Currency in which the payment was made. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins | ",
+ "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": "Optional. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only | ",
+ "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": "Optional. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only | ",
+ "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"
+ }
+}
diff --git a/.butcher/types/SuggestedPostParameters/entity.json b/.butcher/types/SuggestedPostParameters/entity.json
new file mode 100644
index 00000000..a4d49f98
--- /dev/null
+++ b/.butcher/types/SuggestedPostParameters/entity.json
@@ -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": "Contains parameters of a post that is being suggested by the bot.
",
+ "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": "Optional. Proposed price for the post. If the field is omitted, then the post is unpaid. | ",
+ "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": "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. | ",
+ "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"
+ }
+}
diff --git a/.butcher/types/SuggestedPostParameters/replace.yml b/.butcher/types/SuggestedPostParameters/replace.yml
new file mode 100644
index 00000000..26ef9ec3
--- /dev/null
+++ b/.butcher/types/SuggestedPostParameters/replace.yml
@@ -0,0 +1,5 @@
+annotations:
+ send_date:
+ parsed_type:
+ type: std
+ name: DateTime
diff --git a/.butcher/types/SuggestedPostPrice/entity.json b/.butcher/types/SuggestedPostPrice/entity.json
new file mode 100644
index 00000000..3234077d
--- /dev/null
+++ b/.butcher/types/SuggestedPostPrice/entity.json
@@ -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": "Desribes price of a suggested post.
",
+ "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": "Currency in which the post will be paid. Currently, must be one of “XTR” for Telegram Stars or “TON” for toncoins | ",
+ "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": "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. | ",
+ "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"
+ }
+}
diff --git a/.butcher/types/SuggestedPostRefunded/entity.json b/.butcher/types/SuggestedPostRefunded/entity.json
new file mode 100644
index 00000000..4345f227
--- /dev/null
+++ b/.butcher/types/SuggestedPostRefunded/entity.json
@@ -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": "Describes a service message about a payment refund for a suggested post.
",
+ "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": "Optional. 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. | ",
+ "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": "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. | ",
+ "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"
+ }
+}
diff --git a/.butcher/types/UniqueGift/entity.json b/.butcher/types/UniqueGift/entity.json
index bd49f076..edb104ab 100644
--- a/.butcher/types/UniqueGift/entity.json
+++ b/.butcher/types/UniqueGift/entity.json
@@ -58,6 +58,14 @@
"rst_description": "Backdrop of the gift\n",
"name": "backdrop",
"required": true
+ },
+ {
+ "type": "Chat",
+ "description": "Information about the chat that published the gift",
+ "html_description": "Optional. Information about the chat that published the gift | ",
+ "rst_description": "*Optional*. Information about the chat that published the gift\n",
+ "name": "publisher_chat",
+ "required": false
}
],
"category": "types"
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..d6cc9715
--- /dev/null
+++ b/.gitattributes
@@ -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
diff --git a/CHANGES/1720.feature.rst b/CHANGES/1720.feature.rst
new file mode 100644
index 00000000..ee63bc65
--- /dev/null
+++ b/CHANGES/1720.feature.rst
@@ -0,0 +1,39 @@
+Added full support for the `Bot API 9.2 `_:
+
+**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.
diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py
index 908a20ba..10ac1477 100644
--- a/aiogram/client/bot.py
+++ b/aiogram/client/bot.py
@@ -28,6 +28,7 @@ from ..methods import (
AnswerShippingQuery,
AnswerWebAppQuery,
ApproveChatJoinRequest,
+ ApproveSuggestedPost,
BanChatMember,
BanChatSenderChat,
Close,
@@ -42,6 +43,7 @@ from ..methods import (
CreateInvoiceLink,
CreateNewStickerSet,
DeclineChatJoinRequest,
+ DeclineSuggestedPost,
DeleteBusinessMessages,
DeleteChatPhoto,
DeleteChatStickerSet,
@@ -235,6 +237,7 @@ from ..types import (
StickerSet,
Story,
StoryArea,
+ SuggestedPostParameters,
Update,
User,
UserChatBoosts,
@@ -801,6 +804,7 @@ class Bot:
from_chat_id: ChatIdUnion,
message_id: int,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
video_start_timestamp: Optional[DateTimeUnion] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@@ -811,6 +815,7 @@ class Bot:
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = 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 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 direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param video_start_timestamp: New start timestamp for the copied video in the message
:param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
:param parse_mode: Mode for parsing entities in the new caption. See `formatting options `_ for more details.
@@ -834,6 +840,7 @@ class Bot:
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
message_id=message_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
video_start_timestamp=video_start_timestamp,
caption=caption,
parse_mode=parse_mode,
@@ -855,6 +863,7 @@ class Bot:
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
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 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.
@@ -1540,9 +1551,11 @@ class Bot:
from_chat_id: ChatIdUnion,
message_id: int,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
video_start_timestamp: Optional[DateTimeUnion] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
request_timeout: Optional[int] = None,
) -> 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 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 direct_messages_topic_id: Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat
:param video_start_timestamp: New start timestamp for the forwarded video in the message
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the forwarded message from forwarding and saving
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only
:param request_timeout: Request timeout
:return: On success, the sent :class:`aiogram.types.message.Message` is returned.
"""
@@ -1566,9 +1581,11 @@ class Bot:
from_chat_id=from_chat_id,
message_id=message_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
video_start_timestamp=video_start_timestamp,
disable_notification=disable_notification,
protect_content=protect_content,
+ suggested_post_parameters=suggested_post_parameters,
)
return await self(call, request_timeout=request_timeout)
@@ -1929,7 +1946,7 @@ class Bot:
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
:return: Returns :code:`True` on success.
"""
@@ -1964,7 +1981,7 @@ class Bot:
request_timeout: Optional[int] = None,
) -> 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
@@ -2003,6 +2020,7 @@ class Bot:
can_edit_messages: Optional[bool] = None,
can_pin_messages: Optional[bool] = None,
can_manage_topics: Optional[bool] = None,
+ can_manage_direct_messages: Optional[bool] = None,
request_timeout: Optional[int] = None,
) -> 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_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_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
:return: Returns :code:`True` on success.
"""
@@ -2049,6 +2068,7 @@ class Bot:
can_edit_messages=can_edit_messages,
can_pin_messages=can_pin_messages,
can_manage_topics=can_manage_topics,
+ can_manage_direct_messages=can_manage_direct_messages,
)
return await self(call, request_timeout=request_timeout)
@@ -2136,6 +2156,7 @@ class Bot:
animation: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
@@ -2151,6 +2172,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
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 » `
: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 duration: Duration of sent animation in seconds
:param width: Animation width
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
duration=duration,
width=width,
height=height,
@@ -2205,6 +2230,7 @@ class Bot:
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -2218,6 +2244,7 @@ class Bot:
audio: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None,
@@ -2229,6 +2256,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
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 » `
: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 caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details.
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@@ -2280,6 +2311,7 @@ class Bot:
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -2304,7 +2336,7 @@ class Bot:
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 `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_.
:param business_connection_id: Unique identifier of the business connection on behalf of which the action will be sent
:param message_thread_id: Unique identifier for the target message thread; for supergroups only
@@ -2327,12 +2359,14 @@ class Bot:
first_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
last_name: Optional[str] = None,
vcard: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -2349,12 +2383,14 @@ class Bot:
:param first_name: Contact's first name
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
last_name=last_name,
vcard=vcard,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -2387,11 +2425,13 @@ class Bot:
chat_id: ChatIdUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
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 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 emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲'
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
: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 `_ 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 suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
emoji=emoji,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -2441,6 +2485,7 @@ class Bot:
document: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
thumbnail: Optional[InputFile] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@@ -2450,6 +2495,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
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 » `
: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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the document caption. See `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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
@@ -2496,6 +2545,7 @@ class Bot:
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -2524,7 +2574,7 @@ class Bot:
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 `_.
: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
@@ -2565,6 +2615,7 @@ class Bot:
currency: str,
prices: list[LabeledPrice],
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
provider_token: Optional[str] = None,
max_tip_amount: Optional[int] = None,
suggested_tip_amounts: Optional[list[int]] = None,
@@ -2585,6 +2636,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[InlineKeyboardMarkup] = 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 `_. Pass 'XTR' for payments in `Telegram Stars `_.
:param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.
:param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_.
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: A JSON-serialized object for an `inline keyboard `_. 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
@@ -2639,6 +2693,7 @@ class Bot:
currency=currency,
prices=prices,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
provider_token=provider_token,
max_tip_amount=max_tip_amount,
suggested_tip_amounts=suggested_tip_amounts,
@@ -2659,6 +2714,7 @@ class Bot:
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -2673,6 +2729,7 @@ class Bot:
longitude: float,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
horizontal_accuracy: Optional[float] = None,
live_period: Optional[int] = None,
heading: Optional[int] = None,
@@ -2681,6 +2738,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -2697,6 +2755,7 @@ class Bot:
:param longitude: Longitude of the location
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
horizontal_accuracy=horizontal_accuracy,
live_period=live_period,
heading=heading,
@@ -2727,6 +2788,7 @@ class Bot:
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -2740,6 +2802,7 @@ class Bot:
media: list[MediaUnion],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
@@ -2750,7 +2813,7 @@ class Bot:
request_timeout: Optional[int] = None,
) -> 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 `_ 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
@@ -2758,6 +2821,7 @@ class Bot:
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat
:param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
@@ -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 reply_to_message_id: If the messages are a reply, ID of the original message
:param request_timeout: Request timeout
- :return: On success, an array of `Messages `_ that were sent is returned.
+ :return: On success, an array of :class:`aiogram.types.message.Message` objects that were sent is returned.
"""
call = SendMediaGroup(
@@ -2774,6 +2838,7 @@ class Bot:
media=media,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
@@ -2790,6 +2855,7 @@ class Bot:
text: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
entities: Optional[list[MessageEntity]] = None,
link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default(
@@ -2799,6 +2865,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
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 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 parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
:param 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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
parse_mode=parse_mode,
entities=entities,
link_preview_options=link_preview_options,
@@ -2845,6 +2915,7 @@ class Bot:
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -2859,6 +2930,7 @@ class Bot:
photo: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None,
@@ -2870,6 +2942,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
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 » `
: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 caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details.
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@@ -2916,6 +2992,7 @@ class Bot:
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -2957,7 +3034,7 @@ class Bot:
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 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
@@ -3021,11 +3098,13 @@ class Bot:
sticker: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
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 » `. Video and animated stickers can't be sent via an HTTP URL.
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
emoji=emoji,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -3080,6 +3163,7 @@ class Bot:
address: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
foursquare_id: Optional[str] = None,
foursquare_type: Optional[str] = None,
google_place_id: Optional[str] = None,
@@ -3088,6 +3172,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -3106,6 +3191,7 @@ class Bot:
:param address: Address of the venue
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param foursquare_id: Foursquare identifier of the venue
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
foursquare_id=foursquare_id,
foursquare_type=foursquare_type,
google_place_id=google_place_id,
@@ -3138,6 +3226,7 @@ class Bot:
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -3151,6 +3240,7 @@ class Bot:
video: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
@@ -3169,6 +3259,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
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 » `
: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 duration: Duration of sent video in seconds
:param width: Video width
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
duration=duration,
width=width,
height=height,
@@ -3229,6 +3323,7 @@ class Bot:
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -3242,6 +3337,7 @@ class Bot:
video_note: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
duration: Optional[int] = None,
length: Optional[int] = None,
thumbnail: Optional[InputFile] = None,
@@ -3249,6 +3345,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
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 video notes by a URL is currently unsupported
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `
@@ -3271,6 +3369,7 @@ class Bot:
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
duration=duration,
length=length,
thumbnail=thumbnail,
@@ -3291,6 +3391,7 @@ class Bot:
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -3304,6 +3405,7 @@ class Bot:
voice: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None,
@@ -3312,6 +3414,7 @@ class Bot:
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
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 » `
: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 caption: Voice message caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.
: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 allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
: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,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@@ -3356,6 +3462,7 @@ class Bot:
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -3828,7 +3935,7 @@ class Bot:
request_timeout: Optional[int] = None,
) -> 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
@@ -3873,7 +3980,7 @@ class Bot:
request_timeout: Optional[int] = None,
) -> 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
@@ -4339,6 +4446,7 @@ class Bot:
from_chat_id: ChatIdUnion,
message_ids: list[int],
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: 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 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 direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat
:param disable_notification: Sends the messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
: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,
message_ids=message_ids,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification,
protect_content=protect_content,
remove_caption=remove_caption,
@@ -4400,6 +4510,7 @@ class Bot:
from_chat_id: ChatIdUnion,
message_ids: list[int],
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = 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 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 direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat
:param disable_notification: Sends the messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the forwarded messages from forwarding and saving
:param request_timeout: Request timeout
@@ -4424,6 +4536,7 @@ class Bot:
from_chat_id=from_chat_id,
message_ids=message_ids,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification,
protect_content=protect_content,
)
@@ -4582,6 +4695,8 @@ class Bot:
star_count: int,
media: list[InputPaidMediaUnion],
business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
payload: Optional[str] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = None,
@@ -4590,6 +4705,7 @@ class Bot:
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
allow_paid_broadcast: Optional[bool] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = 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 media: A JSON-serialized array describing the media to be sent; up to 10 items
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
+ :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.
:param caption: Media caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the media caption. See `formatting options `_ for more details.
@@ -4611,6 +4729,7 @@ class Bot:
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param request_timeout: Request timeout
@@ -4622,6 +4741,8 @@ class Bot:
star_count=star_count,
media=media,
business_connection_id=business_connection_id,
+ message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
payload=payload,
caption=caption,
parse_mode=parse_mode,
@@ -4630,6 +4751,7 @@ class Bot:
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
)
@@ -4882,7 +5004,7 @@ class Bot:
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 request_timeout: Request timeout
:return: Returns :code:`True` on success.
@@ -5509,3 +5631,55 @@ class Bot:
reply_markup=reply_markup,
)
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)
diff --git a/aiogram/enums/content_type.py b/aiogram/enums/content_type.py
index 1647ab25..a08919d5 100644
--- a/aiogram/enums/content_type.py
+++ b/aiogram/enums/content_type.py
@@ -65,6 +65,11 @@ class ContentType(str, Enum):
GIVEAWAY_WINNERS = "giveaway_winners"
GIVEAWAY_COMPLETED = "giveaway_completed"
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_STARTED = "video_chat_started"
VIDEO_CHAT_ENDED = "video_chat_ended"
diff --git a/aiogram/methods/__init__.py b/aiogram/methods/__init__.py
index c8956c7e..766c18e8 100644
--- a/aiogram/methods/__init__.py
+++ b/aiogram/methods/__init__.py
@@ -5,6 +5,7 @@ from .answer_pre_checkout_query import AnswerPreCheckoutQuery
from .answer_shipping_query import AnswerShippingQuery
from .answer_web_app_query import AnswerWebAppQuery
from .approve_chat_join_request import ApproveChatJoinRequest
+from .approve_suggested_post import ApproveSuggestedPost
from .ban_chat_member import BanChatMember
from .ban_chat_sender_chat import BanChatSenderChat
from .base import Request, Response, TelegramMethod
@@ -20,6 +21,7 @@ from .create_forum_topic import CreateForumTopic
from .create_invoice_link import CreateInvoiceLink
from .create_new_sticker_set import CreateNewStickerSet
from .decline_chat_join_request import DeclineChatJoinRequest
+from .decline_suggested_post import DeclineSuggestedPost
from .delete_business_messages import DeleteBusinessMessages
from .delete_chat_photo import DeleteChatPhoto
from .delete_chat_sticker_set import DeleteChatStickerSet
@@ -164,6 +166,7 @@ __all__ = (
"AnswerShippingQuery",
"AnswerWebAppQuery",
"ApproveChatJoinRequest",
+ "ApproveSuggestedPost",
"BanChatMember",
"BanChatSenderChat",
"Close",
@@ -178,6 +181,7 @@ __all__ = (
"CreateInvoiceLink",
"CreateNewStickerSet",
"DeclineChatJoinRequest",
+ "DeclineSuggestedPost",
"DeleteBusinessMessages",
"DeleteChatPhoto",
"DeleteChatStickerSet",
diff --git a/aiogram/methods/approve_suggested_post.py b/aiogram/methods/approve_suggested_post.py
new file mode 100644
index 00000000..5fd36981
--- /dev/null
+++ b/aiogram/methods/approve_suggested_post.py
@@ -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
+ )
diff --git a/aiogram/methods/copy_message.py b/aiogram/methods/copy_message.py
index 416fa44f..7cab7ce9 100644
--- a/aiogram/methods/copy_message.py
+++ b/aiogram/methods/copy_message.py
@@ -12,6 +12,7 @@ from ..types import (
MessageId,
ReplyMarkupUnion,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -34,6 +35,8 @@ class CopyMessage(TelegramMethod[MessageId]):
"""Message identifier in the chat specified in *from_chat_id*"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ 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
"""New start timestamp for the copied video in the message"""
caption: Optional[str] = None
@@ -50,6 +53,8 @@ class CopyMessage(TelegramMethod[MessageId]):
"""Protects the contents of the sent message from forwarding and saving"""
allow_paid_broadcast: Optional[bool] = None
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -78,6 +83,7 @@ class CopyMessage(TelegramMethod[MessageId]):
from_chat_id: ChatIdUnion,
message_id: int,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
video_start_timestamp: Optional[DateTimeUnion] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@@ -88,6 +94,7 @@ class CopyMessage(TelegramMethod[MessageId]):
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -103,6 +110,7 @@ class CopyMessage(TelegramMethod[MessageId]):
from_chat_id=from_chat_id,
message_id=message_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
video_start_timestamp=video_start_timestamp,
caption=caption,
parse_mode=parse_mode,
@@ -111,6 +119,7 @@ class CopyMessage(TelegramMethod[MessageId]):
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/copy_messages.py b/aiogram/methods/copy_messages.py
index 41f224d3..61215335 100644
--- a/aiogram/methods/copy_messages.py
+++ b/aiogram/methods/copy_messages.py
@@ -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."""
message_thread_id: Optional[int] = None
"""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
"""Sends the messages `silently `_. Users will receive a notification with no sound."""
protect_content: Optional[bool] = None
@@ -40,6 +42,7 @@ class CopyMessages(TelegramMethod[list[MessageId]]):
from_chat_id: ChatIdUnion,
message_ids: list[int],
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
remove_caption: Optional[bool] = None,
@@ -54,6 +57,7 @@ class CopyMessages(TelegramMethod[list[MessageId]]):
from_chat_id=from_chat_id,
message_ids=message_ids,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification,
protect_content=protect_content,
remove_caption=remove_caption,
diff --git a/aiogram/methods/decline_suggested_post.py b/aiogram/methods/decline_suggested_post.py
new file mode 100644
index 00000000..56f2fb99
--- /dev/null
+++ b/aiogram/methods/decline_suggested_post.py
@@ -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
+ )
diff --git a/aiogram/methods/delete_message.py b/aiogram/methods/delete_message.py
index e3402744..b564f34d 100644
--- a/aiogram/methods/delete_message.py
+++ b/aiogram/methods/delete_message.py
@@ -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 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.
diff --git a/aiogram/methods/forward_message.py b/aiogram/methods/forward_message.py
index 7ccae892..d8b51d8e 100644
--- a/aiogram/methods/forward_message.py
+++ b/aiogram/methods/forward_message.py
@@ -3,7 +3,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional, Union
from ..client.default import Default
-from ..types import ChatIdUnion, DateTimeUnion, Message
+from ..types import ChatIdUnion, DateTimeUnion, Message, SuggestedPostParameters
from .base import TelegramMethod
@@ -25,12 +25,16 @@ class ForwardMessage(TelegramMethod[Message]):
"""Message identifier in the chat specified in *from_chat_id*"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ 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
"""New start timestamp for the forwarded video in the message"""
disable_notification: Optional[bool] = None
"""Sends the message `silently `_. Users will receive a notification with no sound."""
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
"""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:
# DO NOT EDIT MANUALLY!!!
@@ -43,9 +47,11 @@ class ForwardMessage(TelegramMethod[Message]):
from_chat_id: ChatIdUnion,
message_id: int,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
video_start_timestamp: Optional[DateTimeUnion] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@@ -57,8 +63,10 @@ class ForwardMessage(TelegramMethod[Message]):
from_chat_id=from_chat_id,
message_id=message_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
video_start_timestamp=video_start_timestamp,
disable_notification=disable_notification,
protect_content=protect_content,
+ suggested_post_parameters=suggested_post_parameters,
**__pydantic_kwargs,
)
diff --git a/aiogram/methods/forward_messages.py b/aiogram/methods/forward_messages.py
index 51d6bde7..2d74f5aa 100644
--- a/aiogram/methods/forward_messages.py
+++ b/aiogram/methods/forward_messages.py
@@ -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."""
message_thread_id: Optional[int] = None
"""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
"""Sends the messages `silently `_. Users will receive a notification with no sound."""
protect_content: Optional[bool] = None
@@ -38,6 +40,7 @@ class ForwardMessages(TelegramMethod[list[MessageId]]):
from_chat_id: ChatIdUnion,
message_ids: list[int],
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
**__pydantic_kwargs: Any,
@@ -51,6 +54,7 @@ class ForwardMessages(TelegramMethod[list[MessageId]]):
from_chat_id=from_chat_id,
message_ids=message_ids,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification,
protect_content=protect_content,
**__pydantic_kwargs,
diff --git a/aiogram/methods/leave_chat.py b/aiogram/methods/leave_chat.py
index ec1d10eb..7ee0a3c2 100644
--- a/aiogram/methods/leave_chat.py
+++ b/aiogram/methods/leave_chat.py
@@ -17,7 +17,7 @@ class LeaveChat(TelegramMethod[bool]):
__api_method__ = "leaveChat"
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:
# DO NOT EDIT MANUALLY!!!
diff --git a/aiogram/methods/pin_chat_message.py b/aiogram/methods/pin_chat_message.py
index 92154f10..cc68ebc9 100644
--- a/aiogram/methods/pin_chat_message.py
+++ b/aiogram/methods/pin_chat_message.py
@@ -8,7 +8,7 @@ from .base import TelegramMethod
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
"""
diff --git a/aiogram/methods/promote_chat_member.py b/aiogram/methods/promote_chat_member.py
index 2e501590..dc3fbbd8 100644
--- a/aiogram/methods/promote_chat_member.py
+++ b/aiogram/methods/promote_chat_member.py
@@ -50,6 +50,8 @@ class PromoteChatMember(TelegramMethod[bool]):
"""Pass :code:`True` if the administrator can pin messages; for supergroups only"""
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"""
+ 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:
# DO NOT EDIT MANUALLY!!!
@@ -75,6 +77,7 @@ class PromoteChatMember(TelegramMethod[bool]):
can_edit_messages: Optional[bool] = None,
can_pin_messages: Optional[bool] = None,
can_manage_topics: Optional[bool] = None,
+ can_manage_direct_messages: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@@ -99,5 +102,6 @@ class PromoteChatMember(TelegramMethod[bool]):
can_edit_messages=can_edit_messages,
can_pin_messages=can_pin_messages,
can_manage_topics=can_manage_topics,
+ can_manage_direct_messages=can_manage_direct_messages,
**__pydantic_kwargs,
)
diff --git a/aiogram/methods/send_animation.py b/aiogram/methods/send_animation.py
index 4d63b9b9..62997db1 100644
--- a/aiogram/methods/send_animation.py
+++ b/aiogram/methods/send_animation.py
@@ -13,6 +13,7 @@ from ..types import (
MessageEntity,
ReplyMarkupUnion,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -35,6 +36,8 @@ class SendAnimation(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
duration: Optional[int] = None
"""Duration of sent animation in seconds"""
width: Optional[int] = None
@@ -61,6 +64,8 @@ class SendAnimation(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -89,6 +94,7 @@ class SendAnimation(TelegramMethod[Message]):
animation: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
@@ -104,6 +110,7 @@ class SendAnimation(TelegramMethod[Message]):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -119,6 +126,7 @@ class SendAnimation(TelegramMethod[Message]):
animation=animation,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
duration=duration,
width=width,
height=height,
@@ -132,6 +140,7 @@ class SendAnimation(TelegramMethod[Message]):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_audio.py b/aiogram/methods/send_audio.py
index f5c8b14f..2e88ea6f 100644
--- a/aiogram/methods/send_audio.py
+++ b/aiogram/methods/send_audio.py
@@ -13,6 +13,7 @@ from ..types import (
MessageEntity,
ReplyMarkupUnion,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -36,6 +37,8 @@ class SendAudio(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
caption: Optional[str] = None
"""Audio caption, 0-1024 characters after entities parsing"""
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
@@ -58,6 +61,8 @@ class SendAudio(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -86,6 +91,7 @@ class SendAudio(TelegramMethod[Message]):
audio: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None,
@@ -97,6 +103,7 @@ class SendAudio(TelegramMethod[Message]):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -112,6 +119,7 @@ class SendAudio(TelegramMethod[Message]):
audio=audio,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@@ -123,6 +131,7 @@ class SendAudio(TelegramMethod[Message]):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_chat_action.py b/aiogram/methods/send_chat_action.py
index ac9cecca..6e5ed5ab 100644
--- a/aiogram/methods/send_chat_action.py
+++ b/aiogram/methods/send_chat_action.py
@@ -21,7 +21,7 @@ class SendChatAction(TelegramMethod[bool]):
__api_method__ = "sendChatAction"
chat_id: ChatIdUnion
- """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
+ """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."""
action: str
"""Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_."""
business_connection_id: Optional[str] = None
diff --git a/aiogram/methods/send_contact.py b/aiogram/methods/send_contact.py
index c257a6b3..73a81698 100644
--- a/aiogram/methods/send_contact.py
+++ b/aiogram/methods/send_contact.py
@@ -5,7 +5,13 @@ from typing import TYPE_CHECKING, Any, Optional, Union
from pydantic import Field
from ..client.default import Default
-from ..types import ChatIdUnion, Message, ReplyMarkupUnion, ReplyParameters
+from ..types import (
+ ChatIdUnion,
+ Message,
+ ReplyMarkupUnion,
+ ReplyParameters,
+ SuggestedPostParameters,
+)
from .base import TelegramMethod
@@ -29,6 +35,8 @@ class SendContact(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
last_name: Optional[str] = None
"""Contact's last name"""
vcard: Optional[str] = None
@@ -41,6 +49,8 @@ class SendContact(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -70,12 +80,14 @@ class SendContact(TelegramMethod[Message]):
first_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
last_name: Optional[str] = None,
vcard: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -92,12 +104,14 @@ class SendContact(TelegramMethod[Message]):
first_name=first_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
last_name=last_name,
vcard=vcard,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_dice.py b/aiogram/methods/send_dice.py
index de091ae9..356822d2 100644
--- a/aiogram/methods/send_dice.py
+++ b/aiogram/methods/send_dice.py
@@ -5,7 +5,13 @@ from typing import TYPE_CHECKING, Any, Optional, Union
from pydantic import Field
from ..client.default import Default
-from ..types import ChatIdUnion, Message, ReplyMarkupUnion, ReplyParameters
+from ..types import (
+ ChatIdUnion,
+ Message,
+ ReplyMarkupUnion,
+ ReplyParameters,
+ SuggestedPostParameters,
+)
from .base import TelegramMethod
@@ -25,6 +31,8 @@ class SendDice(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
emoji: Optional[str] = None
"""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 '🎲'"""
disable_notification: Optional[bool] = None
@@ -35,6 +43,8 @@ class SendDice(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -62,11 +72,13 @@ class SendDice(TelegramMethod[Message]):
chat_id: ChatIdUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -81,11 +93,13 @@ class SendDice(TelegramMethod[Message]):
chat_id=chat_id,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
emoji=emoji,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_document.py b/aiogram/methods/send_document.py
index aef25c4c..fdb58431 100644
--- a/aiogram/methods/send_document.py
+++ b/aiogram/methods/send_document.py
@@ -13,6 +13,7 @@ from ..types import (
MessageEntity,
ReplyMarkupUnion,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -35,6 +36,8 @@ class SendDocument(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
thumbnail: Optional[InputFile] = None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `"""
caption: Optional[str] = None
@@ -53,6 +56,8 @@ class SendDocument(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -81,6 +86,7 @@ class SendDocument(TelegramMethod[Message]):
document: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
thumbnail: Optional[InputFile] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@@ -90,6 +96,7 @@ class SendDocument(TelegramMethod[Message]):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -105,6 +112,7 @@ class SendDocument(TelegramMethod[Message]):
document=document,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
@@ -114,6 +122,7 @@ class SendDocument(TelegramMethod[Message]):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_game.py b/aiogram/methods/send_game.py
index 02190ca2..2d69e8a9 100644
--- a/aiogram/methods/send_game.py
+++ b/aiogram/methods/send_game.py
@@ -20,7 +20,7 @@ class SendGame(TelegramMethod[Message]):
__api_method__ = "sendGame"
chat_id: int
- """Unique identifier for the target chat"""
+ """Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats."""
game_short_name: str
"""Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_."""
business_connection_id: Optional[str] = None
diff --git a/aiogram/methods/send_invoice.py b/aiogram/methods/send_invoice.py
index fe54e9ec..f1e83926 100644
--- a/aiogram/methods/send_invoice.py
+++ b/aiogram/methods/send_invoice.py
@@ -11,6 +11,7 @@ from ..types import (
LabeledPrice,
Message,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -39,6 +40,8 @@ class SendInvoice(TelegramMethod[Message]):
"""Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_."""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
provider_token: Optional[str] = None
"""Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_."""
max_tip_amount: Optional[int] = None
@@ -79,6 +82,8 @@ class SendInvoice(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[InlineKeyboardMarkup] = None
@@ -110,6 +115,7 @@ class SendInvoice(TelegramMethod[Message]):
currency: str,
prices: list[LabeledPrice],
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
provider_token: Optional[str] = None,
max_tip_amount: Optional[int] = None,
suggested_tip_amounts: Optional[list[int]] = None,
@@ -130,6 +136,7 @@ class SendInvoice(TelegramMethod[Message]):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -148,6 +155,7 @@ class SendInvoice(TelegramMethod[Message]):
currency=currency,
prices=prices,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
provider_token=provider_token,
max_tip_amount=max_tip_amount,
suggested_tip_amounts=suggested_tip_amounts,
@@ -168,6 +176,7 @@ class SendInvoice(TelegramMethod[Message]):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_location.py b/aiogram/methods/send_location.py
index f5dba433..f058b49e 100644
--- a/aiogram/methods/send_location.py
+++ b/aiogram/methods/send_location.py
@@ -5,7 +5,13 @@ from typing import TYPE_CHECKING, Any, Optional, Union
from pydantic import Field
from ..client.default import Default
-from ..types import ChatIdUnion, Message, ReplyMarkupUnion, ReplyParameters
+from ..types import (
+ ChatIdUnion,
+ Message,
+ ReplyMarkupUnion,
+ ReplyParameters,
+ SuggestedPostParameters,
+)
from .base import TelegramMethod
@@ -29,6 +35,8 @@ class SendLocation(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
horizontal_accuracy: Optional[float] = None
"""The radius of uncertainty for the location, measured in meters; 0-1500"""
live_period: Optional[int] = None
@@ -45,6 +53,8 @@ class SendLocation(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -74,6 +84,7 @@ class SendLocation(TelegramMethod[Message]):
longitude: float,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
horizontal_accuracy: Optional[float] = None,
live_period: Optional[int] = None,
heading: Optional[int] = None,
@@ -82,6 +93,7 @@ class SendLocation(TelegramMethod[Message]):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -98,6 +110,7 @@ class SendLocation(TelegramMethod[Message]):
longitude=longitude,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
horizontal_accuracy=horizontal_accuracy,
live_period=live_period,
heading=heading,
@@ -106,6 +119,7 @@ class SendLocation(TelegramMethod[Message]):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_media_group.py b/aiogram/methods/send_media_group.py
index 214c8af8..5b7bff0d 100644
--- a/aiogram/methods/send_media_group.py
+++ b/aiogram/methods/send_media_group.py
@@ -11,7 +11,7 @@ from .base import TelegramMethod
class SendMediaGroup(TelegramMethod[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 `_ 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
"""
@@ -27,6 +27,8 @@ class SendMediaGroup(TelegramMethod[list[Message]]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ 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
"""Sends messages `silently `_. Users will receive a notification with no sound."""
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
@@ -61,6 +63,7 @@ class SendMediaGroup(TelegramMethod[list[Message]]):
media: list[MediaUnion],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
@@ -79,6 +82,7 @@ class SendMediaGroup(TelegramMethod[list[Message]]):
media=media,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
diff --git a/aiogram/methods/send_message.py b/aiogram/methods/send_message.py
index db053a45..223da039 100644
--- a/aiogram/methods/send_message.py
+++ b/aiogram/methods/send_message.py
@@ -12,6 +12,7 @@ from ..types import (
MessageEntity,
ReplyMarkupUnion,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -34,6 +35,8 @@ class SendMessage(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
"""Mode for parsing entities in the message text. See `formatting options `_ for more details."""
entities: Optional[list[MessageEntity]] = None
@@ -48,6 +51,8 @@ class SendMessage(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -83,6 +88,7 @@ class SendMessage(TelegramMethod[Message]):
text: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
entities: Optional[list[MessageEntity]] = None,
link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default(
@@ -92,6 +98,7 @@ class SendMessage(TelegramMethod[Message]):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -110,6 +117,7 @@ class SendMessage(TelegramMethod[Message]):
text=text,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
parse_mode=parse_mode,
entities=entities,
link_preview_options=link_preview_options,
@@ -117,6 +125,7 @@ class SendMessage(TelegramMethod[Message]):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_paid_media.py b/aiogram/methods/send_paid_media.py
index cf3a8b1b..ef89d2c0 100644
--- a/aiogram/methods/send_paid_media.py
+++ b/aiogram/methods/send_paid_media.py
@@ -9,6 +9,7 @@ from ..types import (
MessageEntity,
ReplyMarkupUnion,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -31,6 +32,10 @@ class SendPaidMedia(TelegramMethod[Message]):
"""A JSON-serialized array describing the media to be sent; up to 10 items"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
+ message_thread_id: Optional[int] = None
+ """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
payload: Optional[str] = None
"""Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes."""
caption: Optional[str] = None
@@ -47,6 +52,8 @@ class SendPaidMedia(TelegramMethod[Message]):
"""Protects the contents of the sent message from forwarding and saving"""
allow_paid_broadcast: Optional[bool] = None
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -63,6 +70,8 @@ class SendPaidMedia(TelegramMethod[Message]):
star_count: int,
media: list[InputPaidMediaUnion],
business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
payload: Optional[str] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = None,
@@ -71,6 +80,7 @@ class SendPaidMedia(TelegramMethod[Message]):
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = None,
allow_paid_broadcast: Optional[bool] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
**__pydantic_kwargs: Any,
@@ -84,6 +94,8 @@ class SendPaidMedia(TelegramMethod[Message]):
star_count=star_count,
media=media,
business_connection_id=business_connection_id,
+ message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
payload=payload,
caption=caption,
parse_mode=parse_mode,
@@ -92,6 +104,7 @@ class SendPaidMedia(TelegramMethod[Message]):
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
**__pydantic_kwargs,
diff --git a/aiogram/methods/send_photo.py b/aiogram/methods/send_photo.py
index 8a0ef798..e7028462 100644
--- a/aiogram/methods/send_photo.py
+++ b/aiogram/methods/send_photo.py
@@ -12,6 +12,7 @@ from ..types import (
MessageEntity,
ReplyMarkupUnion,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -34,6 +35,8 @@ class SendPhoto(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
caption: Optional[str] = None
"""Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing"""
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
@@ -52,6 +55,8 @@ class SendPhoto(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -80,6 +85,7 @@ class SendPhoto(TelegramMethod[Message]):
photo: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None,
@@ -91,6 +97,7 @@ class SendPhoto(TelegramMethod[Message]):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -106,6 +113,7 @@ class SendPhoto(TelegramMethod[Message]):
photo=photo,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@@ -115,6 +123,7 @@ class SendPhoto(TelegramMethod[Message]):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_poll.py b/aiogram/methods/send_poll.py
index c4a511f2..56c48acb 100644
--- a/aiogram/methods/send_poll.py
+++ b/aiogram/methods/send_poll.py
@@ -28,7 +28,7 @@ class SendPoll(TelegramMethod[Message]):
__api_method__ = "sendPoll"
chat_id: ChatIdUnion
- """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
+ """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."""
question: str
"""Poll question, 1-300 characters"""
options: list[InputPollOptionUnion]
diff --git a/aiogram/methods/send_sticker.py b/aiogram/methods/send_sticker.py
index ac9c8815..6f44f990 100644
--- a/aiogram/methods/send_sticker.py
+++ b/aiogram/methods/send_sticker.py
@@ -11,6 +11,7 @@ from ..types import (
Message,
ReplyMarkupUnion,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -33,6 +34,8 @@ class SendSticker(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
emoji: Optional[str] = None
"""Emoji associated with the sticker; only for just uploaded stickers"""
disable_notification: Optional[bool] = None
@@ -43,6 +46,8 @@ class SendSticker(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -71,11 +76,13 @@ class SendSticker(TelegramMethod[Message]):
sticker: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -91,11 +98,13 @@ class SendSticker(TelegramMethod[Message]):
sticker=sticker,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
emoji=emoji,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_venue.py b/aiogram/methods/send_venue.py
index d0ed16fb..dd2b92ed 100644
--- a/aiogram/methods/send_venue.py
+++ b/aiogram/methods/send_venue.py
@@ -5,7 +5,13 @@ from typing import TYPE_CHECKING, Any, Optional, Union
from pydantic import Field
from ..client.default import Default
-from ..types import ChatIdUnion, Message, ReplyMarkupUnion, ReplyParameters
+from ..types import (
+ ChatIdUnion,
+ Message,
+ ReplyMarkupUnion,
+ ReplyParameters,
+ SuggestedPostParameters,
+)
from .base import TelegramMethod
@@ -33,6 +39,8 @@ class SendVenue(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
foursquare_id: Optional[str] = None
"""Foursquare identifier of the venue"""
foursquare_type: Optional[str] = None
@@ -49,6 +57,8 @@ class SendVenue(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -80,6 +90,7 @@ class SendVenue(TelegramMethod[Message]):
address: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
foursquare_id: Optional[str] = None,
foursquare_type: Optional[str] = None,
google_place_id: Optional[str] = None,
@@ -88,6 +99,7 @@ class SendVenue(TelegramMethod[Message]):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -106,6 +118,7 @@ class SendVenue(TelegramMethod[Message]):
address=address,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
foursquare_id=foursquare_id,
foursquare_type=foursquare_type,
google_place_id=google_place_id,
@@ -114,6 +127,7 @@ class SendVenue(TelegramMethod[Message]):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_video.py b/aiogram/methods/send_video.py
index 585c4c5b..a09d17e7 100644
--- a/aiogram/methods/send_video.py
+++ b/aiogram/methods/send_video.py
@@ -14,6 +14,7 @@ from ..types import (
MessageEntity,
ReplyMarkupUnion,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -36,6 +37,8 @@ class SendVideo(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
duration: Optional[int] = None
"""Duration of sent video in seconds"""
width: Optional[int] = None
@@ -68,6 +71,8 @@ class SendVideo(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -96,6 +101,7 @@ class SendVideo(TelegramMethod[Message]):
video: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
@@ -114,6 +120,7 @@ class SendVideo(TelegramMethod[Message]):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -129,6 +136,7 @@ class SendVideo(TelegramMethod[Message]):
video=video,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
duration=duration,
width=width,
height=height,
@@ -145,6 +153,7 @@ class SendVideo(TelegramMethod[Message]):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_video_note.py b/aiogram/methods/send_video_note.py
index 0506b162..ec036ca6 100644
--- a/aiogram/methods/send_video_note.py
+++ b/aiogram/methods/send_video_note.py
@@ -12,6 +12,7 @@ from ..types import (
Message,
ReplyMarkupUnion,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -34,6 +35,8 @@ class SendVideoNote(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
duration: Optional[int] = None
"""Duration of sent video in seconds"""
length: Optional[int] = None
@@ -48,6 +51,8 @@ class SendVideoNote(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -76,6 +81,7 @@ class SendVideoNote(TelegramMethod[Message]):
video_note: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
duration: Optional[int] = None,
length: Optional[int] = None,
thumbnail: Optional[InputFile] = None,
@@ -83,6 +89,7 @@ class SendVideoNote(TelegramMethod[Message]):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -98,6 +105,7 @@ class SendVideoNote(TelegramMethod[Message]):
video_note=video_note,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
duration=duration,
length=length,
thumbnail=thumbnail,
@@ -105,6 +113,7 @@ class SendVideoNote(TelegramMethod[Message]):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/send_voice.py b/aiogram/methods/send_voice.py
index 05247a8f..d47f208a 100644
--- a/aiogram/methods/send_voice.py
+++ b/aiogram/methods/send_voice.py
@@ -12,6 +12,7 @@ from ..types import (
MessageEntity,
ReplyMarkupUnion,
ReplyParameters,
+ SuggestedPostParameters,
)
from .base import TelegramMethod
@@ -34,6 +35,8 @@ class SendVoice(TelegramMethod[Message]):
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
+ direct_messages_topic_id: Optional[int] = None
+ """Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat"""
caption: Optional[str] = None
"""Voice message caption, 0-1024 characters after entities parsing"""
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
@@ -50,6 +53,8 @@ class SendVoice(TelegramMethod[Message]):
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
message_effect_id: Optional[str] = None
"""Unique identifier of the message effect to be added to the message; for private chats only"""
+ 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
"""Description of the message to reply to"""
reply_markup: Optional[ReplyMarkupUnion] = None
@@ -78,6 +83,7 @@ class SendVoice(TelegramMethod[Message]):
voice: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None,
@@ -86,6 +92,7 @@ class SendVoice(TelegramMethod[Message]):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -101,6 +108,7 @@ class SendVoice(TelegramMethod[Message]):
voice=voice,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@@ -109,6 +117,7 @@ class SendVoice(TelegramMethod[Message]):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
diff --git a/aiogram/methods/unpin_all_chat_messages.py b/aiogram/methods/unpin_all_chat_messages.py
index 03f35390..558ff2b5 100644
--- a/aiogram/methods/unpin_all_chat_messages.py
+++ b/aiogram/methods/unpin_all_chat_messages.py
@@ -8,7 +8,7 @@ from .base import TelegramMethod
class UnpinAllChatMessages(TelegramMethod[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
"""
diff --git a/aiogram/methods/unpin_chat_message.py b/aiogram/methods/unpin_chat_message.py
index 17e246f2..69d9e2d5 100644
--- a/aiogram/methods/unpin_chat_message.py
+++ b/aiogram/methods/unpin_chat_message.py
@@ -8,7 +8,7 @@ from .base import TelegramMethod
class UnpinChatMessage(TelegramMethod[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
"""
diff --git a/aiogram/methods/verify_chat.py b/aiogram/methods/verify_chat.py
index fc389022..4c443579 100644
--- a/aiogram/methods/verify_chat.py
+++ b/aiogram/methods/verify_chat.py
@@ -17,7 +17,7 @@ class VerifyChat(TelegramMethod[bool]):
__api_method__ = "verifyChat"
chat_id: ChatIdUnion
- """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
+ """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."""
custom_description: Optional[str] = None
"""Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description."""
diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py
index 9bf6c74f..ce8db89b 100644
--- a/aiogram/types/__init__.py
+++ b/aiogram/types/__init__.py
@@ -81,6 +81,7 @@ from .custom import DateTime
from .date_time_union import DateTimeUnion
from .dice import Dice
from .direct_message_price_changed import DirectMessagePriceChanged
+from .direct_messages_topic import DirectMessagesTopic
from .document import Document
from .downloadable import Downloadable
from .encrypted_credentials import EncryptedCredentials
@@ -273,6 +274,14 @@ from .story_area_type_union import StoryAreaTypeUnion
from .story_area_type_unique_gift import StoryAreaTypeUniqueGift
from .story_area_type_weather import StoryAreaTypeWeather
from .successful_payment import SuccessfulPayment
+from .suggested_post_approval_failed import SuggestedPostApprovalFailed
+from .suggested_post_approved import SuggestedPostApproved
+from .suggested_post_declined import SuggestedPostDeclined
+from .suggested_post_info import SuggestedPostInfo
+from .suggested_post_paid import SuggestedPostPaid
+from .suggested_post_parameters import SuggestedPostParameters
+from .suggested_post_price import SuggestedPostPrice
+from .suggested_post_refunded import SuggestedPostRefunded
from .switch_inline_query_chosen_chat import SwitchInlineQueryChosenChat
from .text_quote import TextQuote
from .transaction_partner import TransactionPartner
@@ -390,6 +399,7 @@ __all__ = (
"DateTimeUnion",
"Dice",
"DirectMessagePriceChanged",
+ "DirectMessagesTopic",
"Document",
"Downloadable",
"EncryptedCredentials",
@@ -581,6 +591,14 @@ __all__ = (
"StoryAreaTypeUniqueGift",
"StoryAreaTypeWeather",
"SuccessfulPayment",
+ "SuggestedPostApprovalFailed",
+ "SuggestedPostApproved",
+ "SuggestedPostDeclined",
+ "SuggestedPostInfo",
+ "SuggestedPostPaid",
+ "SuggestedPostParameters",
+ "SuggestedPostPrice",
+ "SuggestedPostRefunded",
"SwitchInlineQueryChosenChat",
"TelegramObject",
"TextQuote",
diff --git a/aiogram/types/bot_command_scope_chat.py b/aiogram/types/bot_command_scope_chat.py
index 037e2d26..9ea26e67 100644
--- a/aiogram/types/bot_command_scope_chat.py
+++ b/aiogram/types/bot_command_scope_chat.py
@@ -19,7 +19,7 @@ class BotCommandScopeChat(BotCommandScope):
type: Literal[BotCommandScopeType.CHAT] = BotCommandScopeType.CHAT
"""Scope type, must be *chat*"""
chat_id: ChatIdUnion
- """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
+ """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."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
diff --git a/aiogram/types/bot_command_scope_chat_administrators.py b/aiogram/types/bot_command_scope_chat_administrators.py
index 0562bc62..8a7ff631 100644
--- a/aiogram/types/bot_command_scope_chat_administrators.py
+++ b/aiogram/types/bot_command_scope_chat_administrators.py
@@ -21,7 +21,7 @@ class BotCommandScopeChatAdministrators(BotCommandScope):
)
"""Scope type, must be *chat_administrators*"""
chat_id: ChatIdUnion
- """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
+ """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."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
diff --git a/aiogram/types/bot_command_scope_chat_member.py b/aiogram/types/bot_command_scope_chat_member.py
index b8405f6a..4dd096cf 100644
--- a/aiogram/types/bot_command_scope_chat_member.py
+++ b/aiogram/types/bot_command_scope_chat_member.py
@@ -19,7 +19,7 @@ class BotCommandScopeChatMember(BotCommandScope):
type: Literal[BotCommandScopeType.CHAT_MEMBER] = BotCommandScopeType.CHAT_MEMBER
"""Scope type, must be *chat_member*"""
chat_id: ChatIdUnion
- """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
+ """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."""
user_id: int
"""Unique identifier of the target user"""
diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py
index 16382076..fca6b427 100644
--- a/aiogram/types/chat.py
+++ b/aiogram/types/chat.py
@@ -72,6 +72,8 @@ class Chat(TelegramObject):
"""*Optional*. Last name of the other party in a private chat"""
is_forum: Optional[bool] = None
"""*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)"""
+ is_direct_messages: Optional[bool] = None
+ """*Optional*. :code:`True`, if the chat is the direct messages chat of a channel"""
accent_color_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True})
"""*Optional*. 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 :class:`aiogram.methods.get_chat.GetChat`. Always returned in :class:`aiogram.methods.get_chat.GetChat`.
@@ -280,6 +282,7 @@ class Chat(TelegramObject):
first_name: Optional[str] = None,
last_name: Optional[str] = None,
is_forum: Optional[bool] = None,
+ is_direct_messages: Optional[bool] = None,
accent_color_id: Optional[int] = None,
active_usernames: Optional[list[str]] = None,
available_reactions: Optional[list[ReactionTypeUnion]] = None,
@@ -329,6 +332,7 @@ class Chat(TelegramObject):
first_name=first_name,
last_name=last_name,
is_forum=is_forum,
+ is_direct_messages=is_direct_messages,
accent_color_id=accent_color_id,
active_usernames=active_usernames,
available_reactions=available_reactions,
@@ -509,7 +513,9 @@ class Chat(TelegramObject):
- 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.
@@ -850,7 +856,7 @@ class Chat(TelegramObject):
- :code:`chat_id`
- 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
@@ -878,7 +884,7 @@ class Chat(TelegramObject):
- :code:`chat_id`
- 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
@@ -911,7 +917,7 @@ class Chat(TelegramObject):
- :code:`chat_id`
- 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
@@ -1015,6 +1021,7 @@ class Chat(TelegramObject):
can_edit_messages: Optional[bool] = None,
can_pin_messages: Optional[bool] = None,
can_manage_topics: Optional[bool] = None,
+ can_manage_direct_messages: Optional[bool] = None,
**kwargs: Any,
) -> PromoteChatMember:
"""
@@ -1043,6 +1050,7 @@ class Chat(TelegramObject):
: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_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
:return: instance of method :class:`aiogram.methods.promote_chat_member.PromoteChatMember`
"""
# DO NOT EDIT MANUALLY!!!
@@ -1068,6 +1076,7 @@ class Chat(TelegramObject):
can_edit_messages=can_edit_messages,
can_pin_messages=can_pin_messages,
can_manage_topics=can_manage_topics,
+ can_manage_direct_messages=can_manage_direct_messages,
**kwargs,
).as_(self._bot)
diff --git a/aiogram/types/chat_administrator_rights.py b/aiogram/types/chat_administrator_rights.py
index fc069261..a822fdf2 100644
--- a/aiogram/types/chat_administrator_rights.py
+++ b/aiogram/types/chat_administrator_rights.py
@@ -45,6 +45,8 @@ class ChatAdministratorRights(TelegramObject):
"""*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only"""
can_manage_topics: Optional[bool] = None
"""*Optional*. :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
+ """*Optional*. :code:`True`, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@@ -68,6 +70,7 @@ class ChatAdministratorRights(TelegramObject):
can_edit_messages: Optional[bool] = None,
can_pin_messages: Optional[bool] = None,
can_manage_topics: Optional[bool] = None,
+ can_manage_direct_messages: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@@ -90,5 +93,6 @@ class ChatAdministratorRights(TelegramObject):
can_edit_messages=can_edit_messages,
can_pin_messages=can_pin_messages,
can_manage_topics=can_manage_topics,
+ can_manage_direct_messages=can_manage_direct_messages,
**__pydantic_kwargs,
)
diff --git a/aiogram/types/chat_full_info.py b/aiogram/types/chat_full_info.py
index 8c057b1f..5d79b5f3 100644
--- a/aiogram/types/chat_full_info.py
+++ b/aiogram/types/chat_full_info.py
@@ -47,6 +47,8 @@ class ChatFullInfo(Chat):
"""*Optional*. Last name of the other party in a private chat"""
is_forum: Optional[bool] = None
"""*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)"""
+ is_direct_messages: Optional[bool] = None
+ """*Optional*. :code:`True`, if the chat is the direct messages chat of a channel"""
photo: Optional[ChatPhoto] = None
"""*Optional*. Chat photo"""
active_usernames: Optional[list[str]] = None
@@ -61,6 +63,8 @@ class ChatFullInfo(Chat):
"""*Optional*. For private chats with business accounts, the opening hours of the business"""
personal_chat: Optional[Chat] = None
"""*Optional*. For private chats, the personal channel of the user"""
+ parent_chat: Optional[Chat] = None
+ """*Optional*. Information about the corresponding channel chat; for direct messages chats only"""
available_reactions: Optional[list[ReactionTypeUnion]] = None
"""*Optional*. List of available reactions allowed in the chat. If omitted, then all `emoji reactions `_ are allowed."""
background_custom_emoji_id: Optional[str] = None
@@ -140,6 +144,7 @@ class ChatFullInfo(Chat):
first_name: Optional[str] = None,
last_name: Optional[str] = None,
is_forum: Optional[bool] = None,
+ is_direct_messages: Optional[bool] = None,
photo: Optional[ChatPhoto] = None,
active_usernames: Optional[list[str]] = None,
birthdate: Optional[Birthdate] = None,
@@ -147,6 +152,7 @@ class ChatFullInfo(Chat):
business_location: Optional[BusinessLocation] = None,
business_opening_hours: Optional[BusinessOpeningHours] = None,
personal_chat: Optional[Chat] = None,
+ parent_chat: Optional[Chat] = None,
available_reactions: Optional[list[ReactionTypeUnion]] = None,
background_custom_emoji_id: Optional[str] = None,
profile_accent_color_id: Optional[int] = None,
@@ -193,6 +199,7 @@ class ChatFullInfo(Chat):
first_name=first_name,
last_name=last_name,
is_forum=is_forum,
+ is_direct_messages=is_direct_messages,
photo=photo,
active_usernames=active_usernames,
birthdate=birthdate,
@@ -200,6 +207,7 @@ class ChatFullInfo(Chat):
business_location=business_location,
business_opening_hours=business_opening_hours,
personal_chat=personal_chat,
+ parent_chat=parent_chat,
available_reactions=available_reactions,
background_custom_emoji_id=background_custom_emoji_id,
profile_accent_color_id=profile_accent_color_id,
diff --git a/aiogram/types/chat_join_request.py b/aiogram/types/chat_join_request.py
index 769d1b26..3446990c 100644
--- a/aiogram/types/chat_join_request.py
+++ b/aiogram/types/chat_join_request.py
@@ -43,6 +43,7 @@ if TYPE_CHECKING:
from .message_entity import MessageEntity
from .reply_markup_union import ReplyMarkupUnion
from .reply_parameters import ReplyParameters
+ from .suggested_post_parameters import SuggestedPostParameters
from .user import User
@@ -156,6 +157,7 @@ class ChatJoinRequest(TelegramObject):
text: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
entities: Optional[list[MessageEntity]] = None,
link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default(
@@ -165,6 +167,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -187,6 +190,7 @@ class ChatJoinRequest(TelegramObject):
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
:param link_preview_options: Link preview generation options for the message
@@ -194,6 +198,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -211,6 +216,7 @@ class ChatJoinRequest(TelegramObject):
text=text,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
parse_mode=parse_mode,
entities=entities,
link_preview_options=link_preview_options,
@@ -218,6 +224,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -231,6 +238,7 @@ class ChatJoinRequest(TelegramObject):
text: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
entities: Optional[list[MessageEntity]] = None,
link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default(
@@ -240,6 +248,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -262,6 +271,7 @@ class ChatJoinRequest(TelegramObject):
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
:param link_preview_options: Link preview generation options for the message
@@ -269,6 +279,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -286,6 +297,7 @@ class ChatJoinRequest(TelegramObject):
text=text,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
parse_mode=parse_mode,
entities=entities,
link_preview_options=link_preview_options,
@@ -293,6 +305,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -306,6 +319,7 @@ class ChatJoinRequest(TelegramObject):
animation: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
@@ -321,6 +335,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -340,6 +355,7 @@ class ChatJoinRequest(TelegramObject):
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » `
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent animation in seconds
:param width: Animation width
:param height: Animation height
@@ -353,6 +369,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -369,6 +386,7 @@ class ChatJoinRequest(TelegramObject):
animation=animation,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
duration=duration,
width=width,
height=height,
@@ -382,6 +400,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -394,6 +413,7 @@ class ChatJoinRequest(TelegramObject):
animation: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
@@ -409,6 +429,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -428,6 +449,7 @@ class ChatJoinRequest(TelegramObject):
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » `
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param duration: Duration of sent animation in seconds
:param width: Animation width
:param height: Animation height
@@ -441,6 +463,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -457,6 +480,7 @@ class ChatJoinRequest(TelegramObject):
animation=animation,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
duration=duration,
width=width,
height=height,
@@ -470,6 +494,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -482,6 +507,7 @@ class ChatJoinRequest(TelegramObject):
audio: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None,
@@ -493,6 +519,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -513,6 +540,7 @@ class ChatJoinRequest(TelegramObject):
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@@ -524,6 +552,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -540,6 +569,7 @@ class ChatJoinRequest(TelegramObject):
audio=audio,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@@ -551,6 +581,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -563,6 +594,7 @@ class ChatJoinRequest(TelegramObject):
audio: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None,
@@ -574,6 +606,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -594,6 +627,7 @@ class ChatJoinRequest(TelegramObject):
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@@ -605,6 +639,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -621,6 +656,7 @@ class ChatJoinRequest(TelegramObject):
audio=audio,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
@@ -632,6 +668,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -645,12 +682,14 @@ class ChatJoinRequest(TelegramObject):
first_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
last_name: Optional[str] = None,
vcard: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -671,12 +710,14 @@ class ChatJoinRequest(TelegramObject):
:param first_name: Contact's first name
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -694,12 +735,14 @@ class ChatJoinRequest(TelegramObject):
first_name=first_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
last_name=last_name,
vcard=vcard,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -713,12 +756,14 @@ class ChatJoinRequest(TelegramObject):
first_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
last_name: Optional[str] = None,
vcard: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -739,12 +784,14 @@ class ChatJoinRequest(TelegramObject):
:param first_name: Contact's first name
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes
:param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -762,12 +809,14 @@ class ChatJoinRequest(TelegramObject):
first_name=first_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
last_name=last_name,
vcard=vcard,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -780,6 +829,7 @@ class ChatJoinRequest(TelegramObject):
document: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
thumbnail: Optional[InputFile] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@@ -789,6 +839,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -808,6 +859,7 @@ class ChatJoinRequest(TelegramObject):
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details.
@@ -817,6 +869,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -833,6 +886,7 @@ class ChatJoinRequest(TelegramObject):
document=document,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
@@ -842,6 +896,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -854,6 +909,7 @@ class ChatJoinRequest(TelegramObject):
document: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
thumbnail: Optional[InputFile] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@@ -863,6 +919,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -882,6 +939,7 @@ class ChatJoinRequest(TelegramObject):
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details.
@@ -891,6 +949,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -907,6 +966,7 @@ class ChatJoinRequest(TelegramObject):
document=document,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
@@ -916,6 +976,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -1049,6 +1110,7 @@ class ChatJoinRequest(TelegramObject):
currency: str,
prices: list[LabeledPrice],
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
provider_token: Optional[str] = None,
max_tip_amount: Optional[int] = None,
suggested_tip_amounts: Optional[list[int]] = None,
@@ -1069,6 +1131,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -1091,6 +1154,7 @@ class ChatJoinRequest(TelegramObject):
:param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.
:param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.
:param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_.
: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*.
@@ -1111,6 +1175,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: A JSON-serialized object for an `inline keyboard `_. 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
@@ -1130,6 +1195,7 @@ class ChatJoinRequest(TelegramObject):
currency=currency,
prices=prices,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
provider_token=provider_token,
max_tip_amount=max_tip_amount,
suggested_tip_amounts=suggested_tip_amounts,
@@ -1150,6 +1216,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -1165,6 +1232,7 @@ class ChatJoinRequest(TelegramObject):
currency: str,
prices: list[LabeledPrice],
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
provider_token: Optional[str] = None,
max_tip_amount: Optional[int] = None,
suggested_tip_amounts: Optional[list[int]] = None,
@@ -1185,6 +1253,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -1207,6 +1276,7 @@ class ChatJoinRequest(TelegramObject):
:param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.
:param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.
:param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_.
: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*.
@@ -1227,6 +1297,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: A JSON-serialized object for an `inline keyboard `_. 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
@@ -1246,6 +1317,7 @@ class ChatJoinRequest(TelegramObject):
currency=currency,
prices=prices,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
provider_token=provider_token,
max_tip_amount=max_tip_amount,
suggested_tip_amounts=suggested_tip_amounts,
@@ -1266,6 +1338,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -1279,6 +1352,7 @@ class ChatJoinRequest(TelegramObject):
longitude: float,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
horizontal_accuracy: Optional[float] = None,
live_period: Optional[int] = None,
heading: Optional[int] = None,
@@ -1287,6 +1361,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -1307,6 +1382,7 @@ class ChatJoinRequest(TelegramObject):
:param longitude: Longitude of the location
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
:param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
@@ -1315,6 +1391,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -1332,6 +1409,7 @@ class ChatJoinRequest(TelegramObject):
longitude=longitude,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
horizontal_accuracy=horizontal_accuracy,
live_period=live_period,
heading=heading,
@@ -1340,6 +1418,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -1353,6 +1432,7 @@ class ChatJoinRequest(TelegramObject):
longitude: float,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
horizontal_accuracy: Optional[float] = None,
live_period: Optional[int] = None,
heading: Optional[int] = None,
@@ -1361,6 +1441,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -1381,6 +1462,7 @@ class ChatJoinRequest(TelegramObject):
:param longitude: Longitude of the location
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
:param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
@@ -1389,6 +1471,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
@@ -1406,6 +1489,7 @@ class ChatJoinRequest(TelegramObject):
longitude=longitude,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
horizontal_accuracy=horizontal_accuracy,
live_period=live_period,
heading=heading,
@@ -1414,6 +1498,7 @@ class ChatJoinRequest(TelegramObject):
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
message_effect_id=message_effect_id,
+ suggested_post_parameters=suggested_post_parameters,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
allow_sending_without_reply=allow_sending_without_reply,
@@ -1426,6 +1511,7 @@ class ChatJoinRequest(TelegramObject):
media: list[MediaUnion],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
@@ -1441,13 +1527,14 @@ class ChatJoinRequest(TelegramObject):
- :code:`chat_id`
- 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.
+ 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
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat
:param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
@@ -1467,6 +1554,7 @@ class ChatJoinRequest(TelegramObject):
media=media,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
@@ -1482,6 +1570,7 @@ class ChatJoinRequest(TelegramObject):
media: list[MediaUnion],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
@@ -1497,13 +1586,14 @@ class ChatJoinRequest(TelegramObject):
- :code:`chat_id`
- 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.
+ 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
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat
:param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
@@ -1523,6 +1613,7 @@ class ChatJoinRequest(TelegramObject):
media=media,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
+ direct_messages_topic_id=direct_messages_topic_id,
disable_notification=disable_notification,
protect_content=protect_content,
allow_paid_broadcast=allow_paid_broadcast,
@@ -1538,6 +1629,7 @@ class ChatJoinRequest(TelegramObject):
photo: InputFileUnion,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
+ direct_messages_topic_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None,
@@ -1549,6 +1641,7 @@ class ChatJoinRequest(TelegramObject):
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
allow_paid_broadcast: Optional[bool] = None,
message_effect_id: Optional[str] = None,
+ suggested_post_parameters: Optional[SuggestedPostParameters] = None,
reply_parameters: Optional[ReplyParameters] = None,
reply_markup: Optional[ReplyMarkupUnion] = None,
allow_sending_without_reply: Optional[bool] = None,
@@ -1568,6 +1661,7 @@ class ChatJoinRequest(TelegramObject):
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » `
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@@ -1577,6 +1671,7 @@ class ChatJoinRequest(TelegramObject):
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
:param message_effect_id: Unique identifier of the message effect to be added to the message; 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_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard