diff --git a/.butcher/enums/ContentType.yml b/.butcher/enums/ContentType.yml index d4848e37..8d70ad16 100644 --- a/.butcher/enums/ContentType.yml +++ b/.butcher/enums/ContentType.yml @@ -44,3 +44,7 @@ extract: - effect_id - show_caption_above_media - paid_star_count + - direct_messages_topic + - reply_to_checklist_task_id + - suggested_post_info + - is_paid_post diff --git a/.butcher/methods/approveSuggestedPost/entity.json b/.butcher/methods/approveSuggestedPost/entity.json new file mode 100644 index 00000000..3dfde242 --- /dev/null +++ b/.butcher/methods/approveSuggestedPost/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "approvesuggestedpost", + "name": "approveSuggestedPost", + "description": "Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success.", + "html_description": "

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" + } +} diff --git a/.butcher/methods/approveSuggestedPost/replace.yml b/.butcher/methods/approveSuggestedPost/replace.yml new file mode 100644 index 00000000..f0d8ab5b --- /dev/null +++ b/.butcher/methods/approveSuggestedPost/replace.yml @@ -0,0 +1,11 @@ +annotations: + send_date: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/methods/convertGiftToStars/entity.json b/.butcher/methods/convertGiftToStars/entity.json index 9ab07b66..701d4707 100644 --- a/.butcher/methods/convertGiftToStars/entity.json +++ b/.butcher/methods/convertGiftToStars/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "convertgifttostars", diff --git a/.butcher/methods/copyMessage/entity.json b/.butcher/methods/copyMessage/entity.json index 9a6132e0..2a68a358 100644 --- a/.butcher/methods/copyMessage/entity.json +++ b/.butcher/methods/copyMessage/entity.json @@ -27,6 +27,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": "Integer or String", "required": true, @@ -107,6 +115,14 @@ "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", "name": "allow_paid_broadcast" }, + { + "type": "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, diff --git a/.butcher/methods/copyMessages/entity.json b/.butcher/methods/copyMessages/entity.json index 2d7340fe..28fde87e 100644 --- a/.butcher/methods/copyMessages/entity.json +++ b/.butcher/methods/copyMessages/entity.json @@ -27,6 +27,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 messages will be sent; required if the messages are sent to a direct messages chat", + "html_description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat", + "rst_description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat\n", + "name": "direct_messages_topic_id" + }, { "type": "Integer or String", "required": true, diff --git a/.butcher/methods/declineSuggestedPost/entity.json b/.butcher/methods/declineSuggestedPost/entity.json new file mode 100644 index 00000000..d29246f9 --- /dev/null +++ b/.butcher/methods/declineSuggestedPost/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "declinesuggestedpost", + "name": "declineSuggestedPost", + "description": "Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success.", + "html_description": "

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" + } +} diff --git a/.butcher/methods/deleteBusinessMessages/entity.json b/.butcher/methods/deleteBusinessMessages/entity.json index 42659b6a..93f9c05e 100644 --- a/.butcher/methods/deleteBusinessMessages/entity.json +++ b/.butcher/methods/deleteBusinessMessages/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "deletebusinessmessages", diff --git a/.butcher/methods/deleteMessage/entity.json b/.butcher/methods/deleteMessage/entity.json index 945c67ac..45a81fd5 100644 --- a/.butcher/methods/deleteMessage/entity.json +++ b/.butcher/methods/deleteMessage/entity.json @@ -7,9 +7,9 @@ "object": { "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 permission in a supergroup or a channel, it can delete any message there.\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 permission in a supergroup or a channel, it can delete any message there.
\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* permission in a supergroup or a channel, it can delete any message there.\n\nReturns :code:`True` on success.", + "description": "Use this method to delete a message, including service messages, with the following limitations:\n- A message can only be deleted if it was sent less than 48 hours ago.\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n- Bots can delete incoming messages in private chats.\n- Bots granted can_post_messages permissions can delete outgoing messages in channels.\n- If the bot is an administrator of a group, it can delete any message there.\n- If the bot has can_delete_messages administrator right in a supergroup or a channel, it can delete any message there.\n- If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.\nReturns True on success.", + "html_description": "

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", diff --git a/.butcher/methods/deleteStory/entity.json b/.butcher/methods/deleteStory/entity.json index b874a259..c857a907 100644 --- a/.butcher/methods/deleteStory/entity.json +++ b/.butcher/methods/deleteStory/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "deletestory", diff --git a/.butcher/methods/editStory/entity.json b/.butcher/methods/editStory/entity.json index 112ba693..4e6c88c2 100644 --- a/.butcher/methods/editStory/entity.json +++ b/.butcher/methods/editStory/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "editstory", diff --git a/.butcher/methods/forwardMessage/entity.json b/.butcher/methods/forwardMessage/entity.json index 7c5a688a..5237d730 100644 --- a/.butcher/methods/forwardMessage/entity.json +++ b/.butcher/methods/forwardMessage/entity.json @@ -27,6 +27,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 forwarded; required if the message is forwarded to a direct messages chat", + "html_description": "Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat", + "rst_description": "Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat\n", + "name": "direct_messages_topic_id" + }, { "type": "Integer or String", "required": true, @@ -59,6 +67,14 @@ "rst_description": "Protects the contents of the forwarded message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "SuggestedPostParameters", + "required": false, + "description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only", + "html_description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only", + "rst_description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only\n", + "name": "suggested_post_parameters" + }, { "type": "Integer", "required": true, diff --git a/.butcher/methods/forwardMessages/entity.json b/.butcher/methods/forwardMessages/entity.json index 9ae3024a..8e4fe1c7 100644 --- a/.butcher/methods/forwardMessages/entity.json +++ b/.butcher/methods/forwardMessages/entity.json @@ -27,6 +27,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 messages will be forwarded; required if the messages are forwarded to a direct messages chat", + "html_description": "Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat", + "rst_description": "Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat\n", + "name": "direct_messages_topic_id" + }, { "type": "Integer or String", "required": true, diff --git a/.butcher/methods/getAvailableGifts/entity.json b/.butcher/methods/getAvailableGifts/entity.json index 01884670..665ab79b 100644 --- a/.butcher/methods/getAvailableGifts/entity.json +++ b/.butcher/methods/getAvailableGifts/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "getavailablegifts", diff --git a/.butcher/methods/getBusinessAccountGifts/entity.json b/.butcher/methods/getBusinessAccountGifts/entity.json index db228d53..1d61c1f3 100644 --- a/.butcher/methods/getBusinessAccountGifts/entity.json +++ b/.butcher/methods/getBusinessAccountGifts/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "getbusinessaccountgifts", diff --git a/.butcher/methods/getBusinessAccountStarBalance/entity.json b/.butcher/methods/getBusinessAccountStarBalance/entity.json index cf740ab6..d955a230 100644 --- a/.butcher/methods/getBusinessAccountStarBalance/entity.json +++ b/.butcher/methods/getBusinessAccountStarBalance/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "getbusinessaccountstarbalance", diff --git a/.butcher/methods/giftPremiumSubscription/entity.json b/.butcher/methods/giftPremiumSubscription/entity.json index ea9716bf..b2275147 100644 --- a/.butcher/methods/giftPremiumSubscription/entity.json +++ b/.butcher/methods/giftPremiumSubscription/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "giftpremiumsubscription", diff --git a/.butcher/methods/leaveChat/entity.json b/.butcher/methods/leaveChat/entity.json index 2b5e0efc..676bdcf7 100644 --- a/.butcher/methods/leaveChat/entity.json +++ b/.butcher/methods/leaveChat/entity.json @@ -14,9 +14,9 @@ { "type": "Integer or String", "required": true, - "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", - "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", - "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername). Channel direct messages chats aren't supported; leave the corresponding channel instead.", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername). Channel direct messages chats aren't supported; leave the corresponding channel instead.", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`). Channel direct messages chats aren't supported; leave the corresponding channel instead.\n", "name": "chat_id" } ], diff --git a/.butcher/methods/pinChatMessage/entity.json b/.butcher/methods/pinChatMessage/entity.json index 1dede200..f7d0b00f 100644 --- a/.butcher/methods/pinChatMessage/entity.json +++ b/.butcher/methods/pinChatMessage/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "pinchatmessage", "name": "pinChatMessage", - "description": "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", - "html_description": "

Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", - "rst_description": "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "description": "Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns True on success.", + "html_description": "

Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns True on success.

", + "rst_description": "Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns :code:`True` on success.", "annotations": [ { "type": "String", diff --git a/.butcher/methods/postStory/entity.json b/.butcher/methods/postStory/entity.json index 22d8fef1..fe66a91c 100644 --- a/.butcher/methods/postStory/entity.json +++ b/.butcher/methods/postStory/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "poststory", diff --git a/.butcher/methods/promoteChatMember/entity.json b/.butcher/methods/promoteChatMember/entity.json index 840f3a20..fc12f7a1 100644 --- a/.butcher/methods/promoteChatMember/entity.json +++ b/.butcher/methods/promoteChatMember/entity.json @@ -146,6 +146,14 @@ "html_description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", "rst_description": "Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only\n", "name": "can_manage_topics" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can manage direct messages within the channel and decline suggested posts; for channels only", + "html_description": "Pass True if the administrator can manage direct messages within the channel and decline suggested posts; for channels only", + "rst_description": "Pass :code:`True` if the administrator can manage direct messages within the channel and decline suggested posts; for channels only\n", + "name": "can_manage_direct_messages" } ], "category": "methods" diff --git a/.butcher/methods/readBusinessMessage/entity.json b/.butcher/methods/readBusinessMessage/entity.json index c3ed874e..cdb7ac97 100644 --- a/.butcher/methods/readBusinessMessage/entity.json +++ b/.butcher/methods/readBusinessMessage/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "readbusinessmessage", diff --git a/.butcher/methods/removeBusinessAccountProfilePhoto/entity.json b/.butcher/methods/removeBusinessAccountProfilePhoto/entity.json index f16a1ec1..7b6e3597 100644 --- a/.butcher/methods/removeBusinessAccountProfilePhoto/entity.json +++ b/.butcher/methods/removeBusinessAccountProfilePhoto/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "removebusinessaccountprofilephoto", diff --git a/.butcher/methods/removeChatVerification/entity.json b/.butcher/methods/removeChatVerification/entity.json index f04a4730..7c5f31c1 100644 --- a/.butcher/methods/removeChatVerification/entity.json +++ b/.butcher/methods/removeChatVerification/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "removechatverification", diff --git a/.butcher/methods/removeUserVerification/entity.json b/.butcher/methods/removeUserVerification/entity.json index 51f14e99..36dcc597 100644 --- a/.butcher/methods/removeUserVerification/entity.json +++ b/.butcher/methods/removeUserVerification/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "removeuserverification", diff --git a/.butcher/methods/sendAnimation/entity.json b/.butcher/methods/sendAnimation/entity.json index 28b9b828..5e9c2fff 100644 --- a/.butcher/methods/sendAnimation/entity.json +++ b/.butcher/methods/sendAnimation/entity.json @@ -35,6 +35,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, @@ -147,6 +155,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, diff --git a/.butcher/methods/sendAudio/entity.json b/.butcher/methods/sendAudio/entity.json index fd4b4b99..5f336ce2 100644 --- a/.butcher/methods/sendAudio/entity.json +++ b/.butcher/methods/sendAudio/entity.json @@ -35,6 +35,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, @@ -131,6 +139,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, diff --git a/.butcher/methods/sendChatAction/entity.json b/.butcher/methods/sendChatAction/entity.json index 180e1df5..b56b1211 100644 --- a/.butcher/methods/sendChatAction/entity.json +++ b/.butcher/methods/sendChatAction/entity.json @@ -22,9 +22,9 @@ { "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", + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel chats and channel direct messages chats aren't supported.", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel chats and channel direct messages chats aren't supported.", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`). Channel chats and channel direct messages chats aren't supported.\n", "name": "chat_id" }, { diff --git a/.butcher/methods/sendContact/entity.json b/.butcher/methods/sendContact/entity.json index fb8e3715..f9d13d40 100644 --- a/.butcher/methods/sendContact/entity.json +++ b/.butcher/methods/sendContact/entity.json @@ -35,6 +35,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, @@ -99,6 +107,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, diff --git a/.butcher/methods/sendDice/entity.json b/.butcher/methods/sendDice/entity.json index 32d07276..35afa97d 100644 --- a/.butcher/methods/sendDice/entity.json +++ b/.butcher/methods/sendDice/entity.json @@ -35,6 +35,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": false, @@ -75,6 +83,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, diff --git a/.butcher/methods/sendDocument/entity.json b/.butcher/methods/sendDocument/entity.json index 812aeb2e..11b6c8fe 100644 --- a/.butcher/methods/sendDocument/entity.json +++ b/.butcher/methods/sendDocument/entity.json @@ -35,6 +35,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, @@ -115,6 +123,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, diff --git a/.butcher/methods/sendGame/entity.json b/.butcher/methods/sendGame/entity.json index 4c39988f..6a2e71bc 100644 --- a/.butcher/methods/sendGame/entity.json +++ b/.butcher/methods/sendGame/entity.json @@ -22,9 +22,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/methods/sendGift/entity.json b/.butcher/methods/sendGift/entity.json index a424d520..10006635 100644 --- a/.butcher/methods/sendGift/entity.json +++ b/.butcher/methods/sendGift/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "sendgift", diff --git a/.butcher/methods/sendInvoice/entity.json b/.butcher/methods/sendInvoice/entity.json index b28c37b3..fb79ac29 100644 --- a/.butcher/methods/sendInvoice/entity.json +++ b/.butcher/methods/sendInvoice/entity.json @@ -27,6 +27,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, @@ -227,6 +235,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, diff --git a/.butcher/methods/sendLocation/entity.json b/.butcher/methods/sendLocation/entity.json index 9ecfa2bc..8385b971 100644 --- a/.butcher/methods/sendLocation/entity.json +++ b/.butcher/methods/sendLocation/entity.json @@ -35,6 +35,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": "Float", "required": true, @@ -115,6 +123,14 @@ "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "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, diff --git a/.butcher/methods/sendMediaGroup/entity.json b/.butcher/methods/sendMediaGroup/entity.json index 00e76db1..4ed462cb 100644 --- a/.butcher/methods/sendMediaGroup/entity.json +++ b/.butcher/methods/sendMediaGroup/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "sendmediagroup", "name": "sendMediaGroup", - "description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.", - "html_description": "

Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.

", - "rst_description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned.", + "description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Message objects that were sent is returned.", + "html_description": "

Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Message objects that were sent is returned.

", + "rst_description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of :class:`aiogram.types.message.Message` objects that were sent is returned.", "annotations": [ { "type": "String", @@ -35,6 +35,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 messages will be sent; required if the messages are sent to a direct messages chat", + "html_description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat", + "rst_description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat\n", + "name": "direct_messages_topic_id" + }, { "type": "Array of InputMediaAudio, InputMediaDocument, InputMediaPhoto and InputMediaVideo", "required": true, diff --git a/.butcher/methods/sendMessage/entity.json b/.butcher/methods/sendMessage/entity.json index d8a2c5af..8e9db029 100644 --- a/.butcher/methods/sendMessage/entity.json +++ b/.butcher/methods/sendMessage/entity.json @@ -35,6 +35,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, @@ -99,6 +107,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, diff --git a/.butcher/methods/sendPaidMedia/entity.json b/.butcher/methods/sendPaidMedia/entity.json index 10d070e8..69a7a0cc 100644 --- a/.butcher/methods/sendPaidMedia/entity.json +++ b/.butcher/methods/sendPaidMedia/entity.json @@ -27,6 +27,22 @@ "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.\n", "name": "chat_id" }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "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": "Integer", "required": true, @@ -107,6 +123,14 @@ "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", "name": "allow_paid_broadcast" }, + { + "type": "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, diff --git a/.butcher/methods/sendPhoto/entity.json b/.butcher/methods/sendPhoto/entity.json index 08fd33ec..5d967505 100644 --- a/.butcher/methods/sendPhoto/entity.json +++ b/.butcher/methods/sendPhoto/entity.json @@ -35,6 +35,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, @@ -115,6 +123,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, diff --git a/.butcher/methods/sendPoll/entity.json b/.butcher/methods/sendPoll/entity.json index 8d91e768..604586c9 100644 --- a/.butcher/methods/sendPoll/entity.json +++ b/.butcher/methods/sendPoll/entity.json @@ -22,9 +22,9 @@ { "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", + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). Polls can't be sent to channel direct messages chats.", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). Polls can't be sent to channel direct messages chats.", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). Polls can't be sent to channel direct messages chats.\n", "name": "chat_id" }, { diff --git a/.butcher/methods/sendSticker/entity.json b/.butcher/methods/sendSticker/entity.json index e882b083..d16594d4 100644 --- a/.butcher/methods/sendSticker/entity.json +++ b/.butcher/methods/sendSticker/entity.json @@ -35,6 +35,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, @@ -83,6 +91,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, diff --git a/.butcher/methods/sendVenue/entity.json b/.butcher/methods/sendVenue/entity.json index fc488a6d..058afebf 100644 --- a/.butcher/methods/sendVenue/entity.json +++ b/.butcher/methods/sendVenue/entity.json @@ -35,6 +35,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": "Float", "required": true, @@ -131,6 +139,14 @@ "rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n", "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, diff --git a/.butcher/methods/sendVideo/entity.json b/.butcher/methods/sendVideo/entity.json index 991e84e9..ff25ddc7 100644 --- a/.butcher/methods/sendVideo/entity.json +++ b/.butcher/methods/sendVideo/entity.json @@ -35,6 +35,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, @@ -171,6 +179,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, diff --git a/.butcher/methods/sendVideoNote/entity.json b/.butcher/methods/sendVideoNote/entity.json index 323e0905..8e8eed5f 100644 --- a/.butcher/methods/sendVideoNote/entity.json +++ b/.butcher/methods/sendVideoNote/entity.json @@ -35,6 +35,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, @@ -99,6 +107,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, diff --git a/.butcher/methods/sendVoice/entity.json b/.butcher/methods/sendVoice/entity.json index ea16856a..e7c1ddfc 100644 --- a/.butcher/methods/sendVoice/entity.json +++ b/.butcher/methods/sendVoice/entity.json @@ -35,6 +35,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, @@ -107,6 +115,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, diff --git a/.butcher/methods/setBusinessAccountBio/entity.json b/.butcher/methods/setBusinessAccountBio/entity.json index 69e00aab..f57fa89b 100644 --- a/.butcher/methods/setBusinessAccountBio/entity.json +++ b/.butcher/methods/setBusinessAccountBio/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "setbusinessaccountbio", diff --git a/.butcher/methods/setBusinessAccountGiftSettings/entity.json b/.butcher/methods/setBusinessAccountGiftSettings/entity.json index e9ca751b..7eee629a 100644 --- a/.butcher/methods/setBusinessAccountGiftSettings/entity.json +++ b/.butcher/methods/setBusinessAccountGiftSettings/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "setbusinessaccountgiftsettings", diff --git a/.butcher/methods/setBusinessAccountName/entity.json b/.butcher/methods/setBusinessAccountName/entity.json index cc02f733..17ca94ac 100644 --- a/.butcher/methods/setBusinessAccountName/entity.json +++ b/.butcher/methods/setBusinessAccountName/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "setbusinessaccountname", diff --git a/.butcher/methods/setBusinessAccountProfilePhoto/entity.json b/.butcher/methods/setBusinessAccountProfilePhoto/entity.json index 5195f7d4..f9acf75e 100644 --- a/.butcher/methods/setBusinessAccountProfilePhoto/entity.json +++ b/.butcher/methods/setBusinessAccountProfilePhoto/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "setbusinessaccountprofilephoto", diff --git a/.butcher/methods/setBusinessAccountUsername/entity.json b/.butcher/methods/setBusinessAccountUsername/entity.json index fe0971ef..fde1e5db 100644 --- a/.butcher/methods/setBusinessAccountUsername/entity.json +++ b/.butcher/methods/setBusinessAccountUsername/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "setbusinessaccountusername", diff --git a/.butcher/methods/transferBusinessAccountStars/entity.json b/.butcher/methods/transferBusinessAccountStars/entity.json index 18dcf0a1..c85d98a0 100644 --- a/.butcher/methods/transferBusinessAccountStars/entity.json +++ b/.butcher/methods/transferBusinessAccountStars/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "transferbusinessaccountstars", diff --git a/.butcher/methods/transferGift/entity.json b/.butcher/methods/transferGift/entity.json index 6de2ab9c..16601cb2 100644 --- a/.butcher/methods/transferGift/entity.json +++ b/.butcher/methods/transferGift/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "transfergift", diff --git a/.butcher/methods/unpinAllChatMessages/entity.json b/.butcher/methods/unpinAllChatMessages/entity.json index 19587ff8..103cd21b 100644 --- a/.butcher/methods/unpinAllChatMessages/entity.json +++ b/.butcher/methods/unpinAllChatMessages/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "unpinallchatmessages", "name": "unpinAllChatMessages", - "description": "Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", - "html_description": "

Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", - "rst_description": "Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "description": "Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns True on success.", + "html_description": "

Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns True on success.

", + "rst_description": "Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", diff --git a/.butcher/methods/unpinChatMessage/entity.json b/.butcher/methods/unpinChatMessage/entity.json index 273ffeac..93f9d8b8 100644 --- a/.butcher/methods/unpinChatMessage/entity.json +++ b/.butcher/methods/unpinChatMessage/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "unpinchatmessage", "name": "unpinChatMessage", - "description": "Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", - "html_description": "

Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", - "rst_description": "Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "description": "Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin messages in groups and channels respectively. Returns True on success.", + "html_description": "

Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin messages in groups and channels respectively. Returns True on success.

", + "rst_description": "Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin messages in groups and channels respectively. Returns :code:`True` on success.", "annotations": [ { "type": "String", diff --git a/.butcher/methods/upgradeGift/entity.json b/.butcher/methods/upgradeGift/entity.json index 9a6230f8..97115110 100644 --- a/.butcher/methods/upgradeGift/entity.json +++ b/.butcher/methods/upgradeGift/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "upgradegift", diff --git a/.butcher/methods/verifyChat/entity.json b/.butcher/methods/verifyChat/entity.json index fe6ba2f0..bee984b9 100644 --- a/.butcher/methods/verifyChat/entity.json +++ b/.butcher/methods/verifyChat/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "verifychat", @@ -14,9 +14,9 @@ { "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", + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). Channel direct messages chats can't be verified.", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). Channel direct messages chats can't be verified.", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). Channel direct messages chats can't be verified.\n", "name": "chat_id" }, { diff --git a/.butcher/methods/verifyUser/entity.json b/.butcher/methods/verifyUser/entity.json index e9faa10a..61a57c6b 100644 --- a/.butcher/methods/verifyUser/entity.json +++ b/.butcher/methods/verifyUser/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Updating messages", - "anchor": "updating-messages" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "verifyuser", diff --git a/.butcher/schema/schema.json b/.butcher/schema/schema.json index b8ae6300..a88e681a 100644 --- a/.butcher/schema/schema.json +++ b/.butcher/schema/schema.json @@ -1,7 +1,7 @@ { "api": { - "version": "9.1", - "release_date": "2025-07-03" + "version": "9.2", + "release_date": "2025-08-15" }, "items": [ { @@ -610,6 +610,14 @@ "rst_description": "*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)\n", "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 } ], "category": "types" @@ -677,6 +685,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.", @@ -749,6 +765,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.", @@ -1007,6 +1031,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", @@ -1090,8 +1122,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 }, @@ -1119,6 +1151,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", @@ -1151,6 +1191,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", @@ -1199,6 +1247,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", @@ -1466,8 +1522,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 }, @@ -1687,6 +1743,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", @@ -2134,9 +2230,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 }, @@ -2179,6 +2275,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" @@ -3483,7 +3587,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", @@ -3503,8 +3607,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 }, @@ -3537,8 +3641,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 }, @@ -4434,6 +4538,160 @@ ], "category": "types" }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, { "anchor": "giveawaycreated", "name": "GiveawayCreated", @@ -4732,6 +4990,118 @@ ], "category": "types" }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, { "anchor": "userprofilephotos", "name": "UserProfilePhotos", @@ -5217,25 +5587,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 }, @@ -5742,6 +6112,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" @@ -6022,6 +6400,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", @@ -7255,6 +7641,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" @@ -7475,6 +7869,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" @@ -8042,9 +8444,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 } @@ -8068,9 +8470,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 } @@ -8094,9 +8496,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 }, @@ -9511,6 +9913,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, @@ -9575,6 +9985,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, @@ -9617,6 +10035,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 forwarded; required if the message is forwarded to a direct messages chat", + "html_description": "Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat", + "rst_description": "Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat\n", + "name": "direct_messages_topic_id" + }, { "type": "Integer or String", "required": true, @@ -9649,6 +10075,14 @@ "rst_description": "Protects the contents of the forwarded message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "SuggestedPostParameters", + "required": false, + "description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only", + "html_description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only", + "rst_description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only\n", + "name": "suggested_post_parameters" + }, { "type": "Integer", "required": true, @@ -9683,6 +10117,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 messages will be forwarded; required if the messages are forwarded to a direct messages chat", + "html_description": "Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat", + "rst_description": "Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat\n", + "name": "direct_messages_topic_id" + }, { "type": "Integer or String", "required": true, @@ -9741,6 +10183,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": "Integer or String", "required": true, @@ -9821,6 +10271,14 @@ "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", "name": "allow_paid_broadcast" }, + { + "type": "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, @@ -9863,6 +10321,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 messages will be sent; required if the messages are sent to a direct messages chat", + "html_description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat", + "rst_description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat\n", + "name": "direct_messages_topic_id" + }, { "type": "Integer or String", "required": true, @@ -9937,6 +10403,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, @@ -10017,6 +10491,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, @@ -10067,6 +10549,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, @@ -10163,6 +10653,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, @@ -10213,6 +10711,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, @@ -10293,6 +10799,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, @@ -10343,6 +10857,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, @@ -10479,6 +11001,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, @@ -10529,6 +11059,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, @@ -10641,6 +11179,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, @@ -10691,6 +11237,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, @@ -10763,6 +11317,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, @@ -10813,6 +11375,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, @@ -10877,6 +11447,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, @@ -10919,6 +11497,22 @@ "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.\n", "name": "chat_id" }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "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": "Integer", "required": true, @@ -10999,6 +11593,14 @@ "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", "name": "allow_paid_broadcast" }, + { + "type": "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, @@ -11021,9 +11623,9 @@ { "anchor": "sendmediagroup", "name": "sendMediaGroup", - "description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.", - "html_description": "

Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.

", - "rst_description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned.", + "description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Message objects that were sent is returned.", + "html_description": "

Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Message objects that were sent is returned.

", + "rst_description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of :class:`aiogram.types.message.Message` objects that were sent is returned.", "annotations": [ { "type": "String", @@ -11049,6 +11651,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 messages will be sent; required if the messages are sent to a direct messages chat", + "html_description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat", + "rst_description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat\n", + "name": "direct_messages_topic_id" + }, { "type": "Array of InputMediaAudio, InputMediaDocument, InputMediaPhoto and InputMediaVideo", "required": true, @@ -11131,6 +11741,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": "Float", "required": true, @@ -11211,6 +11829,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, @@ -11261,6 +11887,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": "Float", "required": true, @@ -11357,6 +11991,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, @@ -11407,6 +12049,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, @@ -11471,6 +12121,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, @@ -11508,9 +12166,9 @@ { "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", + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). Polls can't be sent to channel direct messages chats.", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). Polls can't be sent to channel direct messages chats.", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). Polls can't be sent to channel direct messages chats.\n", "name": "chat_id" }, { @@ -11789,6 +12447,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": false, @@ -11829,6 +12495,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, @@ -11866,9 +12540,9 @@ { "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", + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel chats and channel direct messages chats aren't supported.", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel chats and channel direct messages chats aren't supported.", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`). Channel chats and channel direct messages chats aren't supported.\n", "name": "chat_id" }, { @@ -12286,6 +12960,14 @@ "html_description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", "rst_description": "Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only\n", "name": "can_manage_topics" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can manage direct messages within the channel and decline suggested posts; for channels only", + "html_description": "Pass True if the administrator can manage direct messages within the channel and decline suggested posts; for channels only", + "rst_description": "Pass :code:`True` if the administrator can manage direct messages within the channel and decline suggested posts; for channels only\n", + "name": "can_manage_direct_messages" } ], "category": "methods" @@ -12789,9 +13471,9 @@ { "anchor": "pinchatmessage", "name": "pinChatMessage", - "description": "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", - "html_description": "

Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", - "rst_description": "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "description": "Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns True on success.", + "html_description": "

Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns True on success.

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

Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", - "rst_description": "Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "description": "Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin messages in groups and channels respectively. Returns True on success.", + "html_description": "

Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin messages in groups and channels respectively. Returns True on success.

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

Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", - "rst_description": "Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "description": "Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns True on success.", + "html_description": "

Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns True on success.

", + "rst_description": "Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", @@ -12890,9 +13572,9 @@ { "type": "Integer or String", "required": true, - "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", - "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", - "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername). Channel direct messages chats aren't supported; leave the corresponding channel instead.", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername). Channel direct messages chats aren't supported; leave the corresponding channel instead.", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`). Channel direct messages chats aren't supported; leave the corresponding channel instead.\n", "name": "chat_id" } ], @@ -13734,577 +14416,6 @@ } ], "category": "methods" - } - ], - "description": "All methods in the Bot API are case-insensitive. We support GET and POST HTTP methods. Use either URL query string or application/json or application/x-www-form-urlencoded or multipart/form-data for passing parameters in Bot API requests.\nOn successful call, a JSON-object containing the result will be returned." - }, - { - "title": "Updating messages", - "anchor": "updating-messages", - "children": [ - { - "anchor": "editmessagetext", - "name": "editMessageText", - "description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", - "html_description": "

Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

", - "rst_description": "Use this method to edit text and `game `_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", - "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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", - "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", - "name": "business_connection_id" - }, - { - "type": "Integer or String", - "required": false, - "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", - "name": "chat_id" - }, - { - "type": "Integer", - "required": false, - "description": "Required if inline_message_id is not specified. Identifier of the message to edit", - "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", - "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", - "name": "message_id" - }, - { - "type": "String", - "required": false, - "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", - "name": "inline_message_id" - }, - { - "type": "String", - "required": true, - "description": "New text of the message, 1-4096 characters after entities parsing", - "html_description": "New text of the message, 1-4096 characters after entities parsing", - "rst_description": "New text of the message, 1-4096 characters after entities parsing\n", - "name": "text" - }, - { - "type": "String", - "required": false, - "description": "Mode for parsing entities in the message text. See formatting options for more details.", - "html_description": "Mode for parsing entities in the message text. See formatting options for more details.", - "rst_description": "Mode for parsing entities in the message text. See `formatting options `_ for more details.\n", - "name": "parse_mode" - }, - { - "type": "Array of MessageEntity", - "required": false, - "description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", - "html_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", - "rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n", - "name": "entities" - }, - { - "type": "LinkPreviewOptions", - "required": false, - "description": "Link preview generation options for the message", - "html_description": "Link preview generation options for the message", - "rst_description": "Link preview generation options for the message\n", - "name": "link_preview_options" - }, - { - "type": "InlineKeyboardMarkup", - "required": false, - "description": "A JSON-serialized object for an inline keyboard.", - "html_description": "A JSON-serialized object for an inline keyboard.", - "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", - "name": "reply_markup" - } - ], - "category": "methods" - }, - { - "anchor": "editmessagecaption", - "name": "editMessageCaption", - "description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", - "html_description": "

Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

", - "rst_description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", - "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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", - "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", - "name": "business_connection_id" - }, - { - "type": "Integer or String", - "required": false, - "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", - "name": "chat_id" - }, - { - "type": "Integer", - "required": false, - "description": "Required if inline_message_id is not specified. Identifier of the message to edit", - "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", - "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", - "name": "message_id" - }, - { - "type": "String", - "required": false, - "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", - "name": "inline_message_id" - }, - { - "type": "String", - "required": false, - "description": "New caption of the message, 0-1024 characters after entities parsing", - "html_description": "New caption of the message, 0-1024 characters after entities parsing", - "rst_description": "New caption of the message, 0-1024 characters after entities parsing\n", - "name": "caption" - }, - { - "type": "String", - "required": false, - "description": "Mode for parsing entities in the message caption. See formatting options for more details.", - "html_description": "Mode for parsing entities in the message caption. See formatting options for more details.", - "rst_description": "Mode for parsing entities in the message caption. See `formatting options `_ for more details.\n", - "name": "parse_mode" - }, - { - "type": "Array of MessageEntity", - "required": false, - "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", - "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", - "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", - "name": "caption_entities" - }, - { - "type": "Boolean", - "required": false, - "description": "Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.", - "html_description": "Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.", - "rst_description": "Pass :code:`True`, if the caption must be shown above the message media. Supported only for animation, photo and video messages.\n", - "name": "show_caption_above_media" - }, - { - "type": "InlineKeyboardMarkup", - "required": false, - "description": "A JSON-serialized object for an inline keyboard.", - "html_description": "A JSON-serialized object for an inline keyboard.", - "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", - "name": "reply_markup" - } - ], - "category": "methods" - }, - { - "anchor": "editmessagemedia", - "name": "editMessageMedia", - "description": "Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", - "html_description": "

Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

", - "rst_description": "Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", - "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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", - "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", - "name": "business_connection_id" - }, - { - "type": "Integer or String", - "required": false, - "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", - "name": "chat_id" - }, - { - "type": "Integer", - "required": false, - "description": "Required if inline_message_id is not specified. Identifier of the message to edit", - "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", - "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", - "name": "message_id" - }, - { - "type": "String", - "required": false, - "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", - "name": "inline_message_id" - }, - { - "type": "InputMedia", - "required": true, - "description": "A JSON-serialized object for a new media content of the message", - "html_description": "A JSON-serialized object for a new media content of the message", - "rst_description": "A JSON-serialized object for a new media content of the message\n", - "name": "media" - }, - { - "type": "InlineKeyboardMarkup", - "required": false, - "description": "A JSON-serialized object for a new inline keyboard.", - "html_description": "A JSON-serialized object for a new inline keyboard.", - "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", - "name": "reply_markup" - } - ], - "category": "methods" - }, - { - "anchor": "editmessagelivelocation", - "name": "editMessageLiveLocation", - "description": "Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", - "html_description": "

Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", - "rst_description": "Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` 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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", - "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", - "name": "business_connection_id" - }, - { - "type": "Integer or String", - "required": false, - "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", - "name": "chat_id" - }, - { - "type": "Integer", - "required": false, - "description": "Required if inline_message_id is not specified. Identifier of the message to edit", - "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", - "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", - "name": "message_id" - }, - { - "type": "String", - "required": false, - "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", - "name": "inline_message_id" - }, - { - "type": "Float", - "required": true, - "description": "Latitude of new location", - "html_description": "Latitude of new location", - "rst_description": "Latitude of new location\n", - "name": "latitude" - }, - { - "type": "Float", - "required": true, - "description": "Longitude of new location", - "html_description": "Longitude of new location", - "rst_description": "Longitude of new location\n", - "name": "longitude" - }, - { - "type": "Integer", - "required": false, - "description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged", - "html_description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged", - "rst_description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current *live_period* by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then *live_period* remains unchanged\n", - "name": "live_period" - }, - { - "type": "Float", - "required": false, - "description": "The radius of uncertainty for the location, measured in meters; 0-1500", - "html_description": "The radius of uncertainty for the location, measured in meters; 0-1500", - "rst_description": "The radius of uncertainty for the location, measured in meters; 0-1500\n", - "name": "horizontal_accuracy" - }, - { - "type": "Integer", - "required": false, - "description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", - "html_description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", - "rst_description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", - "name": "heading" - }, - { - "type": "Integer", - "required": false, - "description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", - "html_description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", - "rst_description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", - "name": "proximity_alert_radius" - }, - { - "type": "InlineKeyboardMarkup", - "required": false, - "description": "A JSON-serialized object for a new inline keyboard.", - "html_description": "A JSON-serialized object for a new inline keyboard.", - "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", - "name": "reply_markup" - } - ], - "category": "methods" - }, - { - "anchor": "stopmessagelivelocation", - "name": "stopMessageLiveLocation", - "description": "Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.", - "html_description": "

Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.

", - "rst_description": "Use this method to stop updating a live location message before *live_period* expires. On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` 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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", - "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", - "name": "business_connection_id" - }, - { - "type": "Integer or String", - "required": false, - "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", - "name": "chat_id" - }, - { - "type": "Integer", - "required": false, - "description": "Required if inline_message_id is not specified. Identifier of the message with live location to stop", - "html_description": "Required if inline_message_id is not specified. Identifier of the message with live location to stop", - "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message with live location to stop\n", - "name": "message_id" - }, - { - "type": "String", - "required": false, - "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", - "name": "inline_message_id" - }, - { - "type": "InlineKeyboardMarkup", - "required": false, - "description": "A JSON-serialized object for a new inline keyboard.", - "html_description": "A JSON-serialized object for a new inline keyboard.", - "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", - "name": "reply_markup" - } - ], - "category": "methods" - }, - { - "anchor": "editmessagechecklist", - "name": "editMessageChecklist", - "description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.", - "html_description": "

Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.

", - "rst_description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited :class:`aiogram.types.message.Message` is returned.", - "annotations": [ - { - "type": "String", - "required": true, - "description": "Unique identifier of the business connection on behalf of which the message will be sent", - "html_description": "Unique identifier of the business connection on behalf of which the message will be sent", - "rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n", - "name": "business_connection_id" - }, - { - "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", - "name": "chat_id" - }, - { - "type": "Integer", - "required": true, - "description": "Unique identifier for the target message", - "html_description": "Unique identifier for the target message", - "rst_description": "Unique identifier for the target message\n", - "name": "message_id" - }, - { - "type": "InputChecklist", - "required": true, - "description": "A JSON-serialized object for the new checklist", - "html_description": "A JSON-serialized object for the new checklist", - "rst_description": "A JSON-serialized object for the new checklist\n", - "name": "checklist" - }, - { - "type": "InlineKeyboardMarkup", - "required": false, - "description": "A JSON-serialized object for the new inline keyboard for the message", - "html_description": "A JSON-serialized object for the new inline keyboard for the message", - "rst_description": "A JSON-serialized object for the new inline keyboard for the message\n", - "name": "reply_markup" - } - ], - "category": "methods" - }, - { - "anchor": "editmessagereplymarkup", - "name": "editMessageReplyMarkup", - "description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", - "html_description": "

Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

", - "rst_description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", - "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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", - "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", - "name": "business_connection_id" - }, - { - "type": "Integer or String", - "required": false, - "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", - "name": "chat_id" - }, - { - "type": "Integer", - "required": false, - "description": "Required if inline_message_id is not specified. Identifier of the message to edit", - "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", - "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", - "name": "message_id" - }, - { - "type": "String", - "required": false, - "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", - "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", - "name": "inline_message_id" - }, - { - "type": "InlineKeyboardMarkup", - "required": false, - "description": "A JSON-serialized object for an inline keyboard.", - "html_description": "A JSON-serialized object for an inline keyboard.", - "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", - "name": "reply_markup" - } - ], - "category": "methods" - }, - { - "anchor": "stoppoll", - "name": "stopPoll", - "description": "Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.", - "html_description": "

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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", - "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", - "name": "business_connection_id" - }, - { - "type": "Integer or String", - "required": true, - "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", - "html_description": "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 original message with the poll", - "html_description": "Identifier of the original message with the poll", - "rst_description": "Identifier of the original message with the poll\n", - "name": "message_id" - }, - { - "type": "InlineKeyboardMarkup", - "required": false, - "description": "A JSON-serialized object for a new message inline keyboard.", - "html_description": "A JSON-serialized object for a new message inline keyboard.", - "rst_description": "A JSON-serialized object for a new message `inline keyboard `_.\n", - "name": "reply_markup" - } - ], - "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 permission in a supergroup or a channel, it can delete any message there.\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 permission in a supergroup or a channel, it can delete any message there.
\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* permission in a supergroup or a channel, it can delete any message there.\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" }, { "anchor": "getavailablegifts", @@ -14475,9 +14586,9 @@ { "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", + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). Channel direct messages chats can't be verified.", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). Channel direct messages chats can't be verified.", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). Channel direct messages chats can't be verified.\n", "name": "chat_id" }, { @@ -15178,6 +15289,645 @@ "category": "methods" } ], + "description": "All methods in the Bot API are case-insensitive. We support GET and POST HTTP methods. Use either URL query string or application/json or application/x-www-form-urlencoded or multipart/form-data for passing parameters in Bot API requests.\nOn successful call, a JSON-object containing the result will be returned." + }, + { + "title": "Updating messages", + "anchor": "updating-messages", + "children": [ + { + "anchor": "editmessagetext", + "name": "editMessageText", + "description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", + "html_description": "

Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

", + "rst_description": "Use this method to edit text and `game `_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", + "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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "String", + "required": true, + "description": "New text of the message, 1-4096 characters after entities parsing", + "html_description": "New text of the message, 1-4096 characters after entities parsing", + "rst_description": "New text of the message, 1-4096 characters after entities parsing\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message text. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities" + }, + { + "type": "LinkPreviewOptions", + "required": false, + "description": "Link preview generation options for the message", + "html_description": "Link preview generation options for the message", + "rst_description": "Link preview generation options for the message\n", + "name": "link_preview_options" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "editmessagecaption", + "name": "editMessageCaption", + "description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", + "html_description": "

Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

", + "rst_description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", + "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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "String", + "required": false, + "description": "New caption of the message, 0-1024 characters after entities parsing", + "html_description": "New caption of the message, 0-1024 characters after entities parsing", + "rst_description": "New caption of the message, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.", + "html_description": "Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.", + "rst_description": "Pass :code:`True`, if the caption must be shown above the message media. Supported only for animation, photo and video messages.\n", + "name": "show_caption_above_media" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "editmessagemedia", + "name": "editMessageMedia", + "description": "Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", + "html_description": "

Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

", + "rst_description": "Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", + "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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InputMedia", + "required": true, + "description": "A JSON-serialized object for a new media content of the message", + "html_description": "A JSON-serialized object for a new media content of the message", + "rst_description": "A JSON-serialized object for a new media content of the message\n", + "name": "media" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "editmessagelivelocation", + "name": "editMessageLiveLocation", + "description": "Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` 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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "Float", + "required": true, + "description": "Latitude of new location", + "html_description": "Latitude of new location", + "rst_description": "Latitude of new location\n", + "name": "latitude" + }, + { + "type": "Float", + "required": true, + "description": "Longitude of new location", + "html_description": "Longitude of new location", + "rst_description": "Longitude of new location\n", + "name": "longitude" + }, + { + "type": "Integer", + "required": false, + "description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged", + "html_description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged", + "rst_description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current *live_period* by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then *live_period* remains unchanged\n", + "name": "live_period" + }, + { + "type": "Float", + "required": false, + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy" + }, + { + "type": "Integer", + "required": false, + "description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "stopmessagelivelocation", + "name": "stopMessageLiveLocation", + "description": "Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to stop updating a live location message before *live_period* expires. On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` 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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message with live location to stop", + "html_description": "Required if inline_message_id is not specified. Identifier of the message with live location to stop", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message with live location to stop\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "editmessagechecklist", + "name": "editMessageChecklist", + "description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.", + "html_description": "

Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.

", + "rst_description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent", + "html_description": "Unique identifier of the business connection on behalf of which the message will be sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n", + "name": "business_connection_id" + }, + { + "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", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message", + "html_description": "Unique identifier for the target message", + "rst_description": "Unique identifier for the target message\n", + "name": "message_id" + }, + { + "type": "InputChecklist", + "required": true, + "description": "A JSON-serialized object for the new checklist", + "html_description": "A JSON-serialized object for the new checklist", + "rst_description": "A JSON-serialized object for the new checklist\n", + "name": "checklist" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for the new inline keyboard for the message", + "html_description": "A JSON-serialized object for the new inline keyboard for the message", + "rst_description": "A JSON-serialized object for the new inline keyboard for the message\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "editmessagereplymarkup", + "name": "editMessageReplyMarkup", + "description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", + "html_description": "

Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

", + "rst_description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.", + "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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "stoppoll", + "name": "stopPoll", + "description": "Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.", + "html_description": "

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": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n", + "name": "business_connection_id" + }, + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "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 original message with the poll", + "html_description": "Identifier of the original message with the poll", + "rst_description": "Identifier of the original message with the poll\n", + "name": "message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new message inline keyboard.", + "html_description": "A JSON-serialized object for a new message inline keyboard.", + "rst_description": "A JSON-serialized object for a new message `inline keyboard `_.\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 `_, 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 @@ -1593,6 +1688,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -1602,6 +1698,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, @@ -1614,6 +1711,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, @@ -1625,6 +1723,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, @@ -1644,6 +1743,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* @@ -1653,6 +1753,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 @@ -1669,6 +1770,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -1678,6 +1780,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, @@ -1885,11 +1988,13 @@ class ChatJoinRequest(TelegramObject): self, 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, @@ -1908,11 +2013,13 @@ class ChatJoinRequest(TelegramObject): :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 @@ -1928,11 +2035,13 @@ class ChatJoinRequest(TelegramObject): chat_id=self.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, @@ -1944,11 +2053,13 @@ class ChatJoinRequest(TelegramObject): self, 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, @@ -1967,11 +2078,13 @@ class ChatJoinRequest(TelegramObject): :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 @@ -1987,11 +2100,13 @@ class ChatJoinRequest(TelegramObject): chat_id=self.user_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, @@ -2004,11 +2119,13 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2028,11 +2145,13 @@ class ChatJoinRequest(TelegramObject): :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -2049,11 +2168,13 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2066,11 +2187,13 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2090,11 +2213,13 @@ class ChatJoinRequest(TelegramObject): :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -2111,11 +2236,13 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2131,6 +2258,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2139,6 +2267,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, @@ -2161,6 +2290,7 @@ class ChatJoinRequest(TelegramObject): :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 @@ -2169,6 +2299,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 @@ -2188,6 +2319,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2196,6 +2328,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, @@ -2211,6 +2344,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2219,6 +2353,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, @@ -2241,6 +2376,7 @@ class ChatJoinRequest(TelegramObject): :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 @@ -2249,6 +2385,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 @@ -2268,6 +2405,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2276,6 +2414,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, @@ -2288,6 +2427,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2306,6 +2446,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, @@ -2325,6 +2466,7 @@ class ChatJoinRequest(TelegramObject): :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -2341,6 +2483,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 @@ -2357,6 +2500,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2373,6 +2517,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, @@ -2385,6 +2530,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2403,6 +2549,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, @@ -2422,6 +2569,7 @@ class ChatJoinRequest(TelegramObject): :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -2438,6 +2586,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 @@ -2454,6 +2603,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2470,6 +2620,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, @@ -2482,6 +2633,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2489,6 +2641,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, @@ -2508,6 +2661,7 @@ class ChatJoinRequest(TelegramObject): :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 » ` @@ -2515,6 +2669,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 @@ -2531,6 +2686,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2538,6 +2694,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, @@ -2550,6 +2707,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2557,6 +2715,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, @@ -2576,6 +2735,7 @@ class ChatJoinRequest(TelegramObject): :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 » ` @@ -2583,6 +2743,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 @@ -2599,6 +2760,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2606,6 +2768,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, @@ -2618,6 +2781,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2626,6 +2790,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, @@ -2645,6 +2810,7 @@ class ChatJoinRequest(TelegramObject): :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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* @@ -2653,6 +2819,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 @@ -2669,6 +2836,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2677,6 +2845,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, @@ -2689,6 +2858,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2697,6 +2867,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, @@ -2716,6 +2887,7 @@ class ChatJoinRequest(TelegramObject): :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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* @@ -2724,6 +2896,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 @@ -2740,6 +2913,7 @@ class ChatJoinRequest(TelegramObject): 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, @@ -2748,6 +2922,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, diff --git a/aiogram/types/chat_member_administrator.py b/aiogram/types/chat_member_administrator.py index 27dc8757..87846e8c 100644 --- a/aiogram/types/chat_member_administrator.py +++ b/aiogram/types/chat_member_administrator.py @@ -52,6 +52,8 @@ class ChatMemberAdministrator(ChatMember): """*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""" custom_title: Optional[str] = None """*Optional*. Custom title for this user""" @@ -80,6 +82,7 @@ class ChatMemberAdministrator(ChatMember): 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, custom_title: Optional[str] = None, **__pydantic_kwargs: Any, ) -> None: @@ -106,6 +109,7 @@ class ChatMemberAdministrator(ChatMember): 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, custom_title=custom_title, **__pydantic_kwargs, ) diff --git a/aiogram/types/chat_member_updated.py b/aiogram/types/chat_member_updated.py index 9c08776d..48d62a6b 100644 --- a/aiogram/types/chat_member_updated.py +++ b/aiogram/types/chat_member_updated.py @@ -42,6 +42,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 @@ -107,6 +108,7 @@ class ChatMemberUpdated(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( @@ -116,6 +118,7 @@ class ChatMemberUpdated(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, @@ -138,6 +141,7 @@ class ChatMemberUpdated(TelegramObject): :param text: Text of the message to be sent, 1-4096 characters after entities parsing :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -145,6 +149,7 @@ class ChatMemberUpdated(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 @@ -162,6 +167,7 @@ class ChatMemberUpdated(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, @@ -169,6 +175,7 @@ class ChatMemberUpdated(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, @@ -182,6 +189,7 @@ class ChatMemberUpdated(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, @@ -197,6 +205,7 @@ class ChatMemberUpdated(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, @@ -216,6 +225,7 @@ class ChatMemberUpdated(TelegramObject): :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -229,6 +239,7 @@ class ChatMemberUpdated(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 @@ -245,6 +256,7 @@ class ChatMemberUpdated(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, @@ -258,6 +270,7 @@ class ChatMemberUpdated(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, @@ -270,6 +283,7 @@ class ChatMemberUpdated(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, @@ -281,6 +295,7 @@ class ChatMemberUpdated(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, @@ -301,6 +316,7 @@ class ChatMemberUpdated(TelegramObject): :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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* @@ -312,6 +328,7 @@ class ChatMemberUpdated(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 @@ -328,6 +345,7 @@ class ChatMemberUpdated(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, @@ -339,6 +357,7 @@ class ChatMemberUpdated(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, @@ -352,12 +371,14 @@ class ChatMemberUpdated(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, @@ -378,12 +399,14 @@ class ChatMemberUpdated(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 @@ -401,12 +424,14 @@ class ChatMemberUpdated(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, @@ -419,6 +444,7 @@ class ChatMemberUpdated(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"), @@ -428,6 +454,7 @@ class ChatMemberUpdated(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, @@ -447,6 +474,7 @@ class ChatMemberUpdated(TelegramObject): :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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. @@ -456,6 +484,7 @@ class ChatMemberUpdated(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 @@ -472,6 +501,7 @@ class ChatMemberUpdated(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, @@ -481,6 +511,7 @@ class ChatMemberUpdated(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, @@ -555,6 +586,7 @@ class ChatMemberUpdated(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, @@ -575,6 +607,7 @@ class ChatMemberUpdated(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, @@ -597,6 +630,7 @@ class ChatMemberUpdated(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*. @@ -617,6 +651,7 @@ class ChatMemberUpdated(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 @@ -636,6 +671,7 @@ class ChatMemberUpdated(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, @@ -656,6 +692,7 @@ class ChatMemberUpdated(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, @@ -669,6 +706,7 @@ class ChatMemberUpdated(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, @@ -677,6 +715,7 @@ class ChatMemberUpdated(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, @@ -697,6 +736,7 @@ class ChatMemberUpdated(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. @@ -705,6 +745,7 @@ class ChatMemberUpdated(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 @@ -722,6 +763,7 @@ class ChatMemberUpdated(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, @@ -730,6 +772,7 @@ class ChatMemberUpdated(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, @@ -742,6 +785,7 @@ class ChatMemberUpdated(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, @@ -757,13 +801,14 @@ class ChatMemberUpdated(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 @@ -783,6 +828,7 @@ class ChatMemberUpdated(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, @@ -798,6 +844,7 @@ class ChatMemberUpdated(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, @@ -809,6 +856,7 @@ class ChatMemberUpdated(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, @@ -828,6 +876,7 @@ class ChatMemberUpdated(TelegramObject): :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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* @@ -837,6 +886,7 @@ class ChatMemberUpdated(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 @@ -853,6 +903,7 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -862,6 +913,7 @@ class ChatMemberUpdated(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, @@ -971,11 +1023,13 @@ class ChatMemberUpdated(TelegramObject): self, 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, @@ -994,11 +1048,13 @@ class ChatMemberUpdated(TelegramObject): :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 @@ -1014,11 +1070,13 @@ class ChatMemberUpdated(TelegramObject): chat_id=self.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, @@ -1031,11 +1089,13 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -1055,11 +1115,13 @@ class ChatMemberUpdated(TelegramObject): :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -1076,11 +1138,13 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -1096,6 +1160,7 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -1104,6 +1169,7 @@ class ChatMemberUpdated(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, @@ -1126,6 +1192,7 @@ class ChatMemberUpdated(TelegramObject): :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 @@ -1134,6 +1201,7 @@ class ChatMemberUpdated(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 @@ -1153,6 +1221,7 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -1161,6 +1230,7 @@ class ChatMemberUpdated(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, @@ -1173,6 +1243,7 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -1191,6 +1262,7 @@ class ChatMemberUpdated(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, @@ -1210,6 +1282,7 @@ class ChatMemberUpdated(TelegramObject): :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -1226,6 +1299,7 @@ class ChatMemberUpdated(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 @@ -1242,6 +1316,7 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -1258,6 +1333,7 @@ class ChatMemberUpdated(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, @@ -1270,6 +1346,7 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -1277,6 +1354,7 @@ class ChatMemberUpdated(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, @@ -1296,6 +1374,7 @@ class ChatMemberUpdated(TelegramObject): :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 » ` @@ -1303,6 +1382,7 @@ class ChatMemberUpdated(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 @@ -1319,6 +1399,7 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -1326,6 +1407,7 @@ class ChatMemberUpdated(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, @@ -1338,6 +1420,7 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -1346,6 +1429,7 @@ class ChatMemberUpdated(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, @@ -1365,6 +1449,7 @@ class ChatMemberUpdated(TelegramObject): :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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* @@ -1373,6 +1458,7 @@ class ChatMemberUpdated(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 @@ -1389,6 +1475,7 @@ class ChatMemberUpdated(TelegramObject): 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, @@ -1397,6 +1484,7 @@ class ChatMemberUpdated(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, diff --git a/aiogram/types/checklist_tasks_added.py b/aiogram/types/checklist_tasks_added.py index 50a78679..234b08ae 100644 --- a/aiogram/types/checklist_tasks_added.py +++ b/aiogram/types/checklist_tasks_added.py @@ -19,7 +19,7 @@ class ChecklistTasksAdded(TelegramObject): tasks: list[ChecklistTask] """List of tasks added to the checklist""" checklist_message: Optional[Message] = None - """*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.""" + """*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.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/checklist_tasks_done.py b/aiogram/types/checklist_tasks_done.py index 22ede538..ba480445 100644 --- a/aiogram/types/checklist_tasks_done.py +++ b/aiogram/types/checklist_tasks_done.py @@ -16,7 +16,7 @@ class ChecklistTasksDone(TelegramObject): """ checklist_message: Optional[Message] = None - """*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.""" + """*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.""" marked_as_done_task_ids: Optional[list[int]] = None """*Optional*. Identifiers of the tasks that were marked as done""" marked_as_not_done_task_ids: Optional[list[int]] = None diff --git a/aiogram/types/direct_messages_topic.py b/aiogram/types/direct_messages_topic.py new file mode 100644 index 00000000..4dab4fac --- /dev/null +++ b/aiogram/types/direct_messages_topic.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: + from .user import User + + +class DirectMessagesTopic(TelegramObject): + """ + Describes a topic of a direct messages chat. + + Source: https://core.telegram.org/bots/api#directmessagestopic + """ + + topic_id: int + """Unique identifier of the topic""" + user: Optional[User] = None + """*Optional*. Information about the user that created the topic. Currently, it is always present""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + topic_id: int, + user: Optional[User] = 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__(topic_id=topic_id, user=user, **__pydantic_kwargs) diff --git a/aiogram/types/gift.py b/aiogram/types/gift.py index 77be63ad..3379be7d 100644 --- a/aiogram/types/gift.py +++ b/aiogram/types/gift.py @@ -5,6 +5,7 @@ from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject if TYPE_CHECKING: + from .chat import Chat from .sticker import Sticker @@ -27,6 +28,8 @@ class Gift(TelegramObject): """*Optional*. The total number of the gifts of this type that can be sent; for limited gifts only""" remaining_count: Optional[int] = None """*Optional*. The number of remaining gifts of this type that can be sent; for limited gifts only""" + publisher_chat: Optional[Chat] = None + """*Optional*. Information about the chat that published the gift""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -41,6 +44,7 @@ class Gift(TelegramObject): upgrade_star_count: Optional[int] = None, total_count: Optional[int] = None, remaining_count: Optional[int] = None, + publisher_chat: Optional[Chat] = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -54,5 +58,6 @@ class Gift(TelegramObject): upgrade_star_count=upgrade_star_count, total_count=total_count, remaining_count=remaining_count, + publisher_chat=publisher_chat, **__pydantic_kwargs, ) diff --git a/aiogram/types/inaccessible_message.py b/aiogram/types/inaccessible_message.py index 13debc3b..796c2e66 100644 --- a/aiogram/types/inaccessible_message.py +++ b/aiogram/types/inaccessible_message.py @@ -40,6 +40,7 @@ if TYPE_CHECKING: from .media_union import MediaUnion from .message_entity import MessageEntity from .reply_markup_union import ReplyMarkupUnion + from .suggested_post_parameters import SuggestedPostParameters class InaccessibleMessage(MaybeInaccessibleMessage): @@ -79,6 +80,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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( @@ -88,6 +90,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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 +113,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param text: Text of the message to be sent, 1-4096 characters after entities parsing :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -117,6 +121,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -138,6 +143,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -145,6 +151,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -158,6 +165,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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( @@ -167,6 +175,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, disable_web_page_preview: Optional[Union[bool, Default]] = Default( @@ -188,6 +197,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param text: Text of the message to be sent, 1-4096 characters after entities parsing :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -195,6 +205,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :param disable_web_page_preview: Disables link previews for links in this message @@ -215,6 +226,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -222,6 +234,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, disable_web_page_preview=disable_web_page_preview, @@ -233,6 +246,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -248,6 +262,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -267,6 +282,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -280,6 +296,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -300,6 +317,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -313,6 +331,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -325,6 +344,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -340,6 +360,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -358,6 +379,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -371,6 +393,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_animation.SendAnimation` @@ -390,6 +413,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -403,6 +427,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -413,6 +438,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -424,6 +450,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -444,6 +471,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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* @@ -455,6 +483,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -475,6 +504,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -486,6 +516,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -498,6 +529,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -509,6 +541,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -528,6 +561,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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* @@ -539,6 +573,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_audio.SendAudio` @@ -558,6 +593,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -569,6 +605,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -580,12 +617,14 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -606,12 +645,14 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -633,12 +674,14 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -652,12 +695,14 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -677,12 +722,14 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_contact.SendContact` @@ -703,12 +750,14 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -719,6 +768,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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"), @@ -728,6 +778,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -747,6 +798,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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. @@ -756,6 +808,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -776,6 +829,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -785,6 +839,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -797,6 +852,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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"), @@ -806,6 +862,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -824,6 +881,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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. @@ -833,6 +891,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_document.SendDocument` @@ -852,6 +911,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -861,6 +921,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -996,6 +1057,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1016,6 +1078,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1038,6 +1101,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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*. @@ -1058,6 +1122,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -1081,6 +1146,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1101,6 +1167,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1116,6 +1183,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1136,6 +1204,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[InlineKeyboardMarkup] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -1157,6 +1226,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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*. @@ -1177,6 +1247,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_invoice.SendInvoice` @@ -1199,6 +1270,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1219,6 +1291,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1230,6 +1303,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1238,6 +1312,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1258,6 +1333,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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. @@ -1266,6 +1342,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -1287,6 +1364,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1295,6 +1373,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1308,6 +1387,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1316,6 +1396,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -1335,6 +1416,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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. @@ -1343,6 +1425,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_location.SendLocation` @@ -1363,6 +1446,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1371,6 +1455,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1381,6 +1466,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1396,13 +1482,14 @@ class InaccessibleMessage(MaybeInaccessibleMessage): - :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 @@ -1426,6 +1513,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1441,6 +1529,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1455,13 +1544,14 @@ class InaccessibleMessage(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`reply_parameters` - 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 @@ -1484,6 +1574,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1497,6 +1588,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1508,6 +1600,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1527,6 +1620,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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* @@ -1536,6 +1630,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -1556,6 +1651,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1565,6 +1661,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1577,6 +1674,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1588,6 +1686,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -1606,6 +1705,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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* @@ -1615,6 +1715,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_photo.SendPhoto` @@ -1634,6 +1735,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1643,6 +1745,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1852,11 +1955,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): self, 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, @@ -1875,11 +1980,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -1899,11 +2006,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): chat_id=self.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, @@ -1915,11 +2024,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): self, 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -1937,11 +2048,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_dice.SendDice` @@ -1960,11 +2073,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): reply_parameters=self.as_reply_parameters(), 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_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1975,11 +2090,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -1999,11 +2116,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -2024,11 +2143,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2041,11 +2162,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -2064,11 +2187,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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_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 :return: instance of method :class:`aiogram.methods.send_sticker.SendSticker` @@ -2088,11 +2213,13 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2106,6 +2233,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2114,6 +2242,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2136,6 +2265,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -2144,6 +2274,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -2167,6 +2298,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2175,6 +2307,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2190,6 +2323,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2198,6 +2332,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -2219,6 +2354,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -2227,6 +2363,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_venue.SendVenue` @@ -2249,6 +2386,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2257,6 +2395,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2267,6 +2406,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2285,6 +2425,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2304,6 +2445,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -2320,6 +2462,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -2340,6 +2483,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2356,6 +2500,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2368,6 +2513,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2386,6 +2532,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -2404,6 +2551,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 @@ -2420,6 +2568,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_video.SendVideo` @@ -2439,6 +2588,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2455,6 +2605,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2465,6 +2616,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2472,6 +2624,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2491,6 +2644,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 » ` @@ -2498,6 +2652,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -2518,6 +2673,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2525,6 +2681,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2537,6 +2694,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2544,6 +2702,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -2562,6 +2721,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 » ` @@ -2569,6 +2729,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote` @@ -2588,6 +2749,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2595,6 +2757,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2605,6 +2768,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2613,6 +2777,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2632,6 +2797,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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* @@ -2640,6 +2806,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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 @@ -2660,6 +2827,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2668,6 +2836,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2680,6 +2849,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2688,6 +2858,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -2706,6 +2877,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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* @@ -2714,6 +2886,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_voice.SendVoice` @@ -2733,6 +2906,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2741,6 +2915,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2751,6 +2926,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2759,6 +2936,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, **kwargs: Any, @@ -2776,6 +2954,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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. @@ -2784,6 +2964,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance + :param 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 :return: instance of method :class:`aiogram.methods.send_paid_media.SendPaidMedia` @@ -2802,6 +2983,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2810,6 +2993,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, **kwargs, @@ -2820,6 +3004,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2828,6 +3014,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None, + suggested_post_parameters: Optional[SuggestedPostParameters] = None, reply_markup: Optional[ReplyMarkupUnion] = None, **kwargs: Any, ) -> SendPaidMedia: @@ -2845,6 +3032,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :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. @@ -2853,6 +3042,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance + :param 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_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 :return: instance of method :class:`aiogram.methods.send_paid_media.SendPaidMedia` """ @@ -2871,6 +3061,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage): 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, @@ -2879,6 +3071,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage): disable_notification=disable_notification, protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, **kwargs, ).as_(self._bot) diff --git a/aiogram/types/inline_keyboard_button.py b/aiogram/types/inline_keyboard_button.py index 21d72de5..abe688f6 100644 --- a/aiogram/types/inline_keyboard_button.py +++ b/aiogram/types/inline_keyboard_button.py @@ -30,11 +30,11 @@ class InlineKeyboardButton(MutableTelegramObject): login_url: Optional[LoginUrl] = None """*Optional*. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the `Telegram Login Widget `_.""" switch_inline_query: Optional[str] = None - """*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.""" + """*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.""" switch_inline_query_current_chat: Optional[str] = None """*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.""" switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat] = None - """*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.""" + """*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.""" copy_text: Optional[CopyTextButton] = None """*Optional*. Description of the button that copies the specified text to the clipboard.""" callback_game: Optional[CallbackGame] = None diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 89a7002d..7dbf612a 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -63,6 +63,7 @@ if TYPE_CHECKING: 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 .external_reply_info import ExternalReplyInfo from .forum_topic_closed import ForumTopicClosed @@ -105,6 +106,13 @@ if TYPE_CHECKING: from .sticker import Sticker from .story import Story 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_refunded import SuggestedPostRefunded from .text_quote import TextQuote from .unique_gift_info import UniqueGiftInfo from .user import User @@ -137,6 +145,8 @@ class Message(MaybeInaccessibleMessage): """Chat the message belongs to""" message_thread_id: Optional[int] = None """*Optional*. Unique identifier of a message thread to which the message belongs; for supergroups only""" + direct_messages_topic: Optional[DirectMessagesTopic] = None + """*Optional*. Information about the direct messages chat topic that contains the message""" from_user: Optional[User] = Field(None, alias="from") """*Optional*. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats""" sender_chat: Optional[Chat] = None @@ -154,13 +164,15 @@ class Message(MaybeInaccessibleMessage): is_automatic_forward: Optional[bool] = None """*Optional*. :code:`True`, if the message is a channel post that was automatically forwarded to the connected discussion group""" reply_to_message: Optional[Message] = None - """*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.""" + """*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.""" external_reply: Optional[ExternalReplyInfo] = None """*Optional*. Information about the message that is being replied to, which may come from another chat or forum topic""" quote: Optional[TextQuote] = None """*Optional*. For replies that quote part of the original message, the quoted part of the message""" reply_to_story: Optional[Story] = None """*Optional*. For replies to a story, the original story""" + reply_to_checklist_task_id: Optional[int] = None + """*Optional*. Identifier of the specific checklist task that is being replied to""" via_bot: Optional[User] = None """*Optional*. Bot through which the message was sent""" edit_date: Optional[int] = None @@ -169,6 +181,8 @@ class Message(MaybeInaccessibleMessage): """*Optional*. :code:`True`, if the message can't be forwarded""" is_from_offline: Optional[bool] = None """*Optional*. :code:`True`, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message""" + is_paid_post: Optional[bool] = None + """*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.""" media_group_id: Optional[str] = None """*Optional*. The unique identifier of a media message group this message belongs to""" author_signature: Optional[str] = None @@ -181,6 +195,8 @@ class Message(MaybeInaccessibleMessage): """*Optional*. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text""" link_preview_options: Optional[LinkPreviewOptions] = None """*Optional*. Options used for link preview generation for the message, if it is a text message and link preview options were changed""" + suggested_post_info: Optional[SuggestedPostInfo] = None + """*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.""" effect_id: Optional[str] = None """*Optional*. Unique identifier of the message effect added to the message""" animation: Optional[Animation] = None @@ -248,7 +264,7 @@ class Message(MaybeInaccessibleMessage): migrate_from_chat_id: Optional[int] = None """*Optional*. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.""" pinned_message: Optional[MaybeInaccessibleMessageUnion] = None - """*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.""" + """*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.""" invoice: Optional[Invoice] = None """*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments » `_""" successful_payment: Optional[SuccessfulPayment] = None @@ -303,6 +319,16 @@ class Message(MaybeInaccessibleMessage): """*Optional*. Service message: a giveaway without public winners was completed""" paid_message_price_changed: Optional[PaidMessagePriceChanged] = None """*Optional*. Service message: the price for paid messages has changed in the chat""" + suggested_post_approved: Optional[SuggestedPostApproved] = None + """*Optional*. Service message: a suggested post was approved""" + suggested_post_approval_failed: Optional[SuggestedPostApprovalFailed] = None + """*Optional*. Service message: approval of a suggested post has failed""" + suggested_post_declined: Optional[SuggestedPostDeclined] = None + """*Optional*. Service message: a suggested post was declined""" + suggested_post_paid: Optional[SuggestedPostPaid] = None + """*Optional*. Service message: payment for a suggested post was received""" + suggested_post_refunded: Optional[SuggestedPostRefunded] = None + """*Optional*. Service message: payment for a suggested post was refunded""" video_chat_scheduled: Optional[VideoChatScheduled] = None """*Optional*. Service message: video chat scheduled""" video_chat_started: Optional[VideoChatStarted] = None @@ -362,6 +388,7 @@ class Message(MaybeInaccessibleMessage): date: DateTime, chat: Chat, message_thread_id: Optional[int] = None, + direct_messages_topic: Optional[DirectMessagesTopic] = None, from_user: Optional[User] = None, sender_chat: Optional[Chat] = None, sender_boost_count: Optional[int] = None, @@ -374,16 +401,19 @@ class Message(MaybeInaccessibleMessage): external_reply: Optional[ExternalReplyInfo] = None, quote: Optional[TextQuote] = None, reply_to_story: Optional[Story] = None, + reply_to_checklist_task_id: Optional[int] = None, via_bot: Optional[User] = None, edit_date: Optional[int] = None, has_protected_content: Optional[bool] = None, is_from_offline: Optional[bool] = None, + is_paid_post: Optional[bool] = None, media_group_id: Optional[str] = None, author_signature: Optional[str] = None, paid_star_count: Optional[int] = None, text: Optional[str] = None, entities: Optional[list[MessageEntity]] = None, link_preview_options: Optional[LinkPreviewOptions] = None, + suggested_post_info: Optional[SuggestedPostInfo] = None, effect_id: Optional[str] = None, animation: Optional[Animation] = None, audio: Optional[Audio] = None, @@ -445,6 +475,11 @@ class Message(MaybeInaccessibleMessage): giveaway_winners: Optional[GiveawayWinners] = None, giveaway_completed: Optional[GiveawayCompleted] = None, paid_message_price_changed: Optional[PaidMessagePriceChanged] = None, + suggested_post_approved: Optional[SuggestedPostApproved] = None, + suggested_post_approval_failed: Optional[SuggestedPostApprovalFailed] = None, + suggested_post_declined: Optional[SuggestedPostDeclined] = None, + suggested_post_paid: Optional[SuggestedPostPaid] = None, + suggested_post_refunded: Optional[SuggestedPostRefunded] = None, video_chat_scheduled: Optional[VideoChatScheduled] = None, video_chat_started: Optional[VideoChatStarted] = None, video_chat_ended: Optional[VideoChatEnded] = None, @@ -469,6 +504,7 @@ class Message(MaybeInaccessibleMessage): date=date, chat=chat, message_thread_id=message_thread_id, + direct_messages_topic=direct_messages_topic, from_user=from_user, sender_chat=sender_chat, sender_boost_count=sender_boost_count, @@ -481,16 +517,19 @@ class Message(MaybeInaccessibleMessage): external_reply=external_reply, quote=quote, reply_to_story=reply_to_story, + reply_to_checklist_task_id=reply_to_checklist_task_id, via_bot=via_bot, edit_date=edit_date, has_protected_content=has_protected_content, is_from_offline=is_from_offline, + is_paid_post=is_paid_post, media_group_id=media_group_id, author_signature=author_signature, paid_star_count=paid_star_count, text=text, entities=entities, link_preview_options=link_preview_options, + suggested_post_info=suggested_post_info, effect_id=effect_id, animation=animation, audio=audio, @@ -552,6 +591,11 @@ class Message(MaybeInaccessibleMessage): 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, @@ -696,6 +740,16 @@ class Message(MaybeInaccessibleMessage): return ContentType.UNIQUE_GIFT if self.paid_message_price_changed: return ContentType.PAID_MESSAGE_PRICE_CHANGED + if self.suggested_post_approved: + return ContentType.SUGGESTED_POST_APPROVED + if self.suggested_post_approval_failed: + return ContentType.SUGGESTED_POST_APPROVAL_FAILED + if self.suggested_post_declined: + return ContentType.SUGGESTED_POST_DECLINED + if self.suggested_post_paid: + return ContentType.SUGGESTED_POST_PAID + if self.suggested_post_refunded: + return ContentType.SUGGESTED_POST_REFUNDED return ContentType.UNKNOWN def _unparse_entities(self, text_decoration: TextDecoration) -> str: @@ -734,6 +788,7 @@ class Message(MaybeInaccessibleMessage): def reply_animation( self, animation: InputFileUnion, + direct_messages_topic_id: Optional[int] = None, duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, @@ -749,6 +804,7 @@ class Message(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -767,6 +823,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendanimation :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 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 @@ -780,6 +837,7 @@ class Message(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_animation.SendAnimation` @@ -799,6 +857,7 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, reply_parameters=self.as_reply_parameters(), animation=animation, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, width=width, height=height, @@ -812,6 +871,7 @@ class Message(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -820,6 +880,7 @@ class Message(MaybeInaccessibleMessage): def answer_animation( self, animation: InputFileUnion, + direct_messages_topic_id: Optional[int] = None, duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, @@ -835,6 +896,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -854,6 +916,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendanimation :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 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 @@ -867,6 +930,7 @@ class Message(MaybeInaccessibleMessage): :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 @@ -887,6 +951,7 @@ class Message(MaybeInaccessibleMessage): message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_id, animation=animation, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, width=width, height=height, @@ -900,6 +965,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -910,6 +976,7 @@ class Message(MaybeInaccessibleMessage): def reply_audio( self, audio: InputFileUnion, + 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, @@ -921,6 +988,7 @@ class Message(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -940,6 +1008,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendaudio :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 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* @@ -951,6 +1020,7 @@ class Message(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_audio.SendAudio` @@ -970,6 +1040,7 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, reply_parameters=self.as_reply_parameters(), audio=audio, + direct_messages_topic_id=direct_messages_topic_id, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -981,6 +1052,7 @@ class Message(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -989,6 +1061,7 @@ class Message(MaybeInaccessibleMessage): def answer_audio( self, audio: InputFileUnion, + 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, @@ -1000,6 +1073,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -1020,6 +1094,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendaudio :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 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* @@ -1031,6 +1106,7 @@ class Message(MaybeInaccessibleMessage): :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 @@ -1051,6 +1127,7 @@ class Message(MaybeInaccessibleMessage): message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_id, audio=audio, + direct_messages_topic_id=direct_messages_topic_id, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -1062,6 +1139,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -1073,12 +1151,14 @@ class Message(MaybeInaccessibleMessage): self, phone_number: str, first_name: str, + 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -1098,12 +1178,14 @@ class Message(MaybeInaccessibleMessage): :param phone_number: Contact's phone number :param first_name: Contact's first name + :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_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 :return: instance of method :class:`aiogram.methods.send_contact.SendContact` @@ -1124,12 +1206,14 @@ class Message(MaybeInaccessibleMessage): reply_parameters=self.as_reply_parameters(), phone_number=phone_number, first_name=first_name, + 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_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1139,12 +1223,14 @@ class Message(MaybeInaccessibleMessage): self, phone_number: str, first_name: str, + 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, @@ -1165,12 +1251,14 @@ class Message(MaybeInaccessibleMessage): :param phone_number: Contact's phone number :param first_name: Contact's first name + :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 @@ -1192,12 +1280,14 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, phone_number=phone_number, first_name=first_name, + 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, @@ -1208,6 +1298,7 @@ class Message(MaybeInaccessibleMessage): def reply_document( self, document: InputFileUnion, + direct_messages_topic_id: Optional[int] = None, thumbnail: Optional[InputFile] = None, caption: Optional[str] = None, parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), @@ -1217,6 +1308,7 @@ class Message(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -1235,6 +1327,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#senddocument :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 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. @@ -1244,6 +1337,7 @@ class Message(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_document.SendDocument` @@ -1263,6 +1357,7 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, reply_parameters=self.as_reply_parameters(), document=document, + direct_messages_topic_id=direct_messages_topic_id, thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, @@ -1272,6 +1367,7 @@ class Message(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1280,6 +1376,7 @@ class Message(MaybeInaccessibleMessage): def answer_document( self, document: InputFileUnion, + direct_messages_topic_id: Optional[int] = None, thumbnail: Optional[InputFile] = None, caption: Optional[str] = None, parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), @@ -1289,6 +1386,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -1308,6 +1406,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#senddocument :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 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. @@ -1317,6 +1416,7 @@ class Message(MaybeInaccessibleMessage): :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 @@ -1337,6 +1437,7 @@ class Message(MaybeInaccessibleMessage): message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_id, document=document, + direct_messages_topic_id=direct_messages_topic_id, thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, @@ -1346,6 +1447,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -1478,6 +1580,7 @@ class Message(MaybeInaccessibleMessage): payload: str, currency: str, prices: list[LabeledPrice], + 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, @@ -1498,6 +1601,7 @@ class Message(MaybeInaccessibleMessage): 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_markup: Optional[InlineKeyboardMarkup] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -1520,6 +1624,7 @@ class Message(MaybeInaccessibleMessage): :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. + :param 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*. @@ -1540,6 +1645,7 @@ class Message(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_invoice.SendInvoice` @@ -1563,6 +1669,7 @@ class Message(MaybeInaccessibleMessage): payload=payload, currency=currency, prices=prices, + direct_messages_topic_id=direct_messages_topic_id, provider_token=provider_token, max_tip_amount=max_tip_amount, suggested_tip_amounts=suggested_tip_amounts, @@ -1583,6 +1690,7 @@ class Message(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1595,6 +1703,7 @@ class Message(MaybeInaccessibleMessage): payload: str, currency: str, prices: list[LabeledPrice], + 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, @@ -1615,6 +1724,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -1638,6 +1748,7 @@ class Message(MaybeInaccessibleMessage): :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. + :param 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*. @@ -1658,6 +1769,7 @@ class Message(MaybeInaccessibleMessage): :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 @@ -1682,6 +1794,7 @@ class Message(MaybeInaccessibleMessage): payload=payload, currency=currency, prices=prices, + direct_messages_topic_id=direct_messages_topic_id, provider_token=provider_token, max_tip_amount=max_tip_amount, suggested_tip_amounts=suggested_tip_amounts, @@ -1702,6 +1815,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -1713,6 +1827,7 @@ class Message(MaybeInaccessibleMessage): self, latitude: float, longitude: float, + direct_messages_topic_id: Optional[int] = None, horizontal_accuracy: Optional[float] = None, live_period: Optional[int] = None, heading: Optional[int] = None, @@ -1721,6 +1836,7 @@ class Message(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -1740,6 +1856,7 @@ class Message(MaybeInaccessibleMessage): :param latitude: Latitude of the location :param longitude: Longitude of the location + :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. @@ -1748,6 +1865,7 @@ class Message(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_location.SendLocation` @@ -1768,6 +1886,7 @@ class Message(MaybeInaccessibleMessage): reply_parameters=self.as_reply_parameters(), latitude=latitude, longitude=longitude, + direct_messages_topic_id=direct_messages_topic_id, horizontal_accuracy=horizontal_accuracy, live_period=live_period, heading=heading, @@ -1776,6 +1895,7 @@ class Message(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1785,6 +1905,7 @@ class Message(MaybeInaccessibleMessage): self, latitude: float, longitude: float, + direct_messages_topic_id: Optional[int] = None, horizontal_accuracy: Optional[float] = None, live_period: Optional[int] = None, heading: Optional[int] = None, @@ -1793,6 +1914,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -1813,6 +1935,7 @@ class Message(MaybeInaccessibleMessage): :param latitude: Latitude of the location :param longitude: Longitude of the location + :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. @@ -1821,6 +1944,7 @@ class Message(MaybeInaccessibleMessage): :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 @@ -1842,6 +1966,7 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, latitude=latitude, longitude=longitude, + direct_messages_topic_id=direct_messages_topic_id, horizontal_accuracy=horizontal_accuracy, live_period=live_period, heading=heading, @@ -1850,6 +1975,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -1860,6 +1986,7 @@ class Message(MaybeInaccessibleMessage): def reply_media_group( self, media: list[MediaUnion], + 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, @@ -1876,11 +2003,12 @@ class Message(MaybeInaccessibleMessage): - :code:`business_connection_id` - :code:`reply_parameters` - 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 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 @@ -1903,6 +2031,7 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, reply_parameters=self.as_reply_parameters(), media=media, + direct_messages_topic_id=direct_messages_topic_id, disable_notification=disable_notification, protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, @@ -1914,6 +2043,7 @@ class Message(MaybeInaccessibleMessage): def answer_media_group( self, media: list[MediaUnion], + 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, @@ -1931,11 +2061,12 @@ class Message(MaybeInaccessibleMessage): - :code:`message_thread_id` - :code:`business_connection_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 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 @@ -1959,6 +2090,7 @@ class Message(MaybeInaccessibleMessage): message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_id, media=media, + direct_messages_topic_id=direct_messages_topic_id, disable_notification=disable_notification, protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, @@ -1972,6 +2104,7 @@ class Message(MaybeInaccessibleMessage): def reply( self, text: str, + 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( @@ -1981,6 +2114,7 @@ class Message(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, disable_web_page_preview: Optional[Union[bool, Default]] = Default( @@ -2002,6 +2136,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendmessage :param text: Text of the message to be sent, 1-4096 characters after entities parsing + :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 @@ -2009,6 +2144,7 @@ class Message(MaybeInaccessibleMessage): :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_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 :param disable_web_page_preview: Disables link previews for links in this message @@ -2029,6 +2165,7 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, reply_parameters=self.as_reply_parameters(), text=text, + direct_messages_topic_id=direct_messages_topic_id, parse_mode=parse_mode, entities=entities, link_preview_options=link_preview_options, @@ -2036,6 +2173,7 @@ class Message(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, disable_web_page_preview=disable_web_page_preview, @@ -2045,6 +2183,7 @@ class Message(MaybeInaccessibleMessage): def answer( self, text: str, + 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( @@ -2054,6 +2193,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -2076,6 +2216,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendmessage :param text: Text of the message to be sent, 1-4096 characters after entities parsing + :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 @@ -2083,6 +2224,7 @@ class Message(MaybeInaccessibleMessage): :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 @@ -2104,6 +2246,7 @@ class Message(MaybeInaccessibleMessage): message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_id, text=text, + direct_messages_topic_id=direct_messages_topic_id, parse_mode=parse_mode, entities=entities, link_preview_options=link_preview_options, @@ -2111,6 +2254,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -2122,6 +2266,7 @@ class Message(MaybeInaccessibleMessage): def reply_photo( self, photo: InputFileUnion, + 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, @@ -2133,6 +2278,7 @@ class Message(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -2151,6 +2297,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendphoto :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 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* @@ -2160,6 +2307,7 @@ class Message(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_photo.SendPhoto` @@ -2179,6 +2327,7 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, reply_parameters=self.as_reply_parameters(), photo=photo, + direct_messages_topic_id=direct_messages_topic_id, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2188,6 +2337,7 @@ class Message(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2196,6 +2346,7 @@ class Message(MaybeInaccessibleMessage): def answer_photo( self, photo: InputFileUnion, + 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, @@ -2207,6 +2358,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -2226,6 +2378,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendphoto :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 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* @@ -2235,6 +2388,7 @@ class Message(MaybeInaccessibleMessage): :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 @@ -2255,6 +2409,7 @@ class Message(MaybeInaccessibleMessage): message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_id, photo=photo, + direct_messages_topic_id=direct_messages_topic_id, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2264,6 +2419,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -2469,11 +2625,13 @@ class Message(MaybeInaccessibleMessage): def reply_dice( self, + 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -2491,11 +2649,13 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#senddice + :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_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 :return: instance of method :class:`aiogram.methods.send_dice.SendDice` @@ -2514,11 +2674,13 @@ class Message(MaybeInaccessibleMessage): message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_id, reply_parameters=self.as_reply_parameters(), + 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_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2526,11 +2688,13 @@ class Message(MaybeInaccessibleMessage): def answer_dice( self, + 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, @@ -2549,11 +2713,13 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#senddice + :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 @@ -2573,11 +2739,13 @@ class Message(MaybeInaccessibleMessage): chat_id=self.chat.id, message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_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, @@ -2588,11 +2756,13 @@ class Message(MaybeInaccessibleMessage): def reply_sticker( self, sticker: InputFileUnion, + 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -2611,11 +2781,13 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendsticker :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 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_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 :return: instance of method :class:`aiogram.methods.send_sticker.SendSticker` @@ -2635,11 +2807,13 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, reply_parameters=self.as_reply_parameters(), sticker=sticker, + 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_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2648,11 +2822,13 @@ class Message(MaybeInaccessibleMessage): def answer_sticker( self, sticker: InputFileUnion, + 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, @@ -2672,11 +2848,13 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendsticker :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 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 @@ -2697,11 +2875,13 @@ class Message(MaybeInaccessibleMessage): message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_id, sticker=sticker, + 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, @@ -2715,6 +2895,7 @@ class Message(MaybeInaccessibleMessage): longitude: float, title: str, address: str, + direct_messages_topic_id: Optional[int] = None, foursquare_id: Optional[str] = None, foursquare_type: Optional[str] = None, google_place_id: Optional[str] = None, @@ -2723,6 +2904,7 @@ class Message(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -2744,6 +2926,7 @@ class Message(MaybeInaccessibleMessage): :param longitude: Longitude of the venue :param title: Name of the venue :param address: Address of the venue + :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 @@ -2752,6 +2935,7 @@ class Message(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_venue.SendVenue` @@ -2774,6 +2958,7 @@ class Message(MaybeInaccessibleMessage): longitude=longitude, title=title, address=address, + direct_messages_topic_id=direct_messages_topic_id, foursquare_id=foursquare_id, foursquare_type=foursquare_type, google_place_id=google_place_id, @@ -2782,6 +2967,7 @@ class Message(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2793,6 +2979,7 @@ class Message(MaybeInaccessibleMessage): longitude: float, title: str, address: str, + direct_messages_topic_id: Optional[int] = None, foursquare_id: Optional[str] = None, foursquare_type: Optional[str] = None, google_place_id: Optional[str] = None, @@ -2801,6 +2988,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -2823,6 +3011,7 @@ class Message(MaybeInaccessibleMessage): :param longitude: Longitude of the venue :param title: Name of the venue :param address: Address of the venue + :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 @@ -2831,6 +3020,7 @@ class Message(MaybeInaccessibleMessage): :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 @@ -2854,6 +3044,7 @@ class Message(MaybeInaccessibleMessage): longitude=longitude, title=title, address=address, + direct_messages_topic_id=direct_messages_topic_id, foursquare_id=foursquare_id, foursquare_type=foursquare_type, google_place_id=google_place_id, @@ -2862,6 +3053,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -2872,6 +3064,7 @@ class Message(MaybeInaccessibleMessage): def reply_video( self, video: InputFileUnion, + direct_messages_topic_id: Optional[int] = None, duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, @@ -2890,6 +3083,7 @@ class Message(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -2908,6 +3102,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendvideo :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 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 @@ -2924,6 +3119,7 @@ class Message(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_video.SendVideo` @@ -2943,6 +3139,7 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, reply_parameters=self.as_reply_parameters(), video=video, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, width=width, height=height, @@ -2959,6 +3156,7 @@ class Message(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2967,6 +3165,7 @@ class Message(MaybeInaccessibleMessage): def answer_video( self, video: InputFileUnion, + direct_messages_topic_id: Optional[int] = None, duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, @@ -2985,6 +3184,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -3004,6 +3204,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendvideo :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 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 @@ -3020,6 +3221,7 @@ class Message(MaybeInaccessibleMessage): :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 @@ -3040,6 +3242,7 @@ class Message(MaybeInaccessibleMessage): message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_id, video=video, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, width=width, height=height, @@ -3056,6 +3259,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -3066,6 +3270,7 @@ class Message(MaybeInaccessibleMessage): def reply_video_note( self, video_note: InputFileUnion, + direct_messages_topic_id: Optional[int] = None, duration: Optional[int] = None, length: Optional[int] = None, thumbnail: Optional[InputFile] = None, @@ -3073,6 +3278,7 @@ class Message(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -3091,6 +3297,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendvideonote :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 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 » ` @@ -3098,6 +3305,7 @@ class Message(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote` @@ -3117,6 +3325,7 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, reply_parameters=self.as_reply_parameters(), video_note=video_note, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, length=length, thumbnail=thumbnail, @@ -3124,6 +3333,7 @@ class Message(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -3132,6 +3342,7 @@ class Message(MaybeInaccessibleMessage): def answer_video_note( self, video_note: InputFileUnion, + direct_messages_topic_id: Optional[int] = None, duration: Optional[int] = None, length: Optional[int] = None, thumbnail: Optional[InputFile] = None, @@ -3139,6 +3350,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -3158,6 +3370,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendvideonote :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 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 » ` @@ -3165,6 +3378,7 @@ class Message(MaybeInaccessibleMessage): :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 @@ -3185,6 +3399,7 @@ class Message(MaybeInaccessibleMessage): message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_id, video_note=video_note, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, length=length, thumbnail=thumbnail, @@ -3192,6 +3407,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -3202,6 +3418,7 @@ class Message(MaybeInaccessibleMessage): def reply_voice( self, voice: InputFileUnion, + 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, @@ -3210,6 +3427,7 @@ class Message(MaybeInaccessibleMessage): 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_markup: Optional[ReplyMarkupUnion] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -3228,6 +3446,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendvoice :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 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* @@ -3236,6 +3455,7 @@ class Message(MaybeInaccessibleMessage): :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_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 :return: instance of method :class:`aiogram.methods.send_voice.SendVoice` @@ -3255,6 +3475,7 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, reply_parameters=self.as_reply_parameters(), voice=voice, + direct_messages_topic_id=direct_messages_topic_id, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -3263,6 +3484,7 @@ class Message(MaybeInaccessibleMessage): protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -3271,6 +3493,7 @@ class Message(MaybeInaccessibleMessage): def answer_voice( self, voice: InputFileUnion, + 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, @@ -3279,6 +3502,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -3298,6 +3522,7 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendvoice :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 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* @@ -3306,6 +3531,7 @@ class Message(MaybeInaccessibleMessage): :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 @@ -3326,6 +3552,7 @@ class Message(MaybeInaccessibleMessage): message_thread_id=self.message_thread_id if self.is_topic_message else None, business_connection_id=self.business_connection_id, voice=voice, + direct_messages_topic_id=direct_messages_topic_id, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -3334,6 +3561,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -3542,6 +3770,7 @@ class Message(MaybeInaccessibleMessage): self, chat_id: ChatIdUnion, 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"), @@ -3552,6 +3781,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -3571,6 +3801,7 @@ class Message(MaybeInaccessibleMessage): :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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. @@ -3579,6 +3810,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance + :param 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 @@ -3599,6 +3831,7 @@ class Message(MaybeInaccessibleMessage): message_id=self.message_id, chat_id=chat_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, @@ -3607,6 +3840,7 @@ class Message(MaybeInaccessibleMessage): 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, @@ -3677,9 +3911,11 @@ class Message(MaybeInaccessibleMessage): self, chat_id: ChatIdUnion, 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, **kwargs: Any, ) -> ForwardMessage: """ @@ -3695,9 +3931,11 @@ class Message(MaybeInaccessibleMessage): :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param 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 :return: instance of method :class:`aiogram.methods.forward_message.ForwardMessage` """ # DO NOT EDIT MANUALLY!!! @@ -3714,9 +3952,11 @@ class Message(MaybeInaccessibleMessage): message_id=self.message_id, chat_id=chat_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, **kwargs, ).as_(self._bot) @@ -4022,7 +4262,9 @@ class Message(MaybeInaccessibleMessage): - 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. @@ -4059,7 +4301,7 @@ class Message(MaybeInaccessibleMessage): - :code:`message_id` - :code:`business_connection_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 @@ -4095,7 +4337,7 @@ class Message(MaybeInaccessibleMessage): - :code:`message_id` - :code:`business_connection_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 @@ -4190,6 +4432,7 @@ class Message(MaybeInaccessibleMessage): self, star_count: int, media: list[InputPaidMediaUnion], + direct_messages_topic_id: Optional[int] = None, payload: Optional[str] = None, caption: Optional[str] = None, parse_mode: Optional[str] = None, @@ -4198,6 +4441,7 @@ class Message(MaybeInaccessibleMessage): 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, **kwargs: Any, @@ -4216,6 +4460,7 @@ class Message(MaybeInaccessibleMessage): :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 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. @@ -4224,6 +4469,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance + :param 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 :return: instance of method :class:`aiogram.methods.send_paid_media.SendPaidMedia` @@ -4243,6 +4489,7 @@ class Message(MaybeInaccessibleMessage): business_connection_id=self.business_connection_id, star_count=star_count, media=media, + direct_messages_topic_id=direct_messages_topic_id, payload=payload, caption=caption, parse_mode=parse_mode, @@ -4251,6 +4498,7 @@ class Message(MaybeInaccessibleMessage): 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, **kwargs, @@ -4260,6 +4508,7 @@ class Message(MaybeInaccessibleMessage): self, star_count: int, media: list[InputPaidMediaUnion], + direct_messages_topic_id: Optional[int] = None, payload: Optional[str] = None, caption: Optional[str] = None, parse_mode: Optional[str] = None, @@ -4268,6 +4517,7 @@ class Message(MaybeInaccessibleMessage): disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, allow_paid_broadcast: Optional[bool] = None, + suggested_post_parameters: Optional[SuggestedPostParameters] = None, reply_markup: Optional[ReplyMarkupUnion] = None, **kwargs: Any, ) -> SendPaidMedia: @@ -4286,6 +4536,7 @@ class Message(MaybeInaccessibleMessage): :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 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. @@ -4294,6 +4545,7 @@ class Message(MaybeInaccessibleMessage): :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance + :param 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_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 :return: instance of method :class:`aiogram.methods.send_paid_media.SendPaidMedia` """ @@ -4313,6 +4565,7 @@ class Message(MaybeInaccessibleMessage): reply_parameters=self.as_reply_parameters(), star_count=star_count, media=media, + direct_messages_topic_id=direct_messages_topic_id, payload=payload, caption=caption, parse_mode=parse_mode, @@ -4321,6 +4574,7 @@ class Message(MaybeInaccessibleMessage): disable_notification=disable_notification, protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, **kwargs, ).as_(self._bot) diff --git a/aiogram/types/reply_parameters.py b/aiogram/types/reply_parameters.py index 2ce1940d..807a6d89 100644 --- a/aiogram/types/reply_parameters.py +++ b/aiogram/types/reply_parameters.py @@ -20,7 +20,7 @@ class ReplyParameters(TelegramObject): message_id: int """Identifier of the message that will be replied to in the current chat, or in the chat *chat_id* if it is specified""" chat_id: Optional[ChatIdUnion] = None - """*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.""" + """*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.""" allow_sending_without_reply: Optional[Union[bool, Default]] = Default( "allow_sending_without_reply" ) @@ -33,6 +33,8 @@ class ReplyParameters(TelegramObject): """*Optional*. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of *quote_parse_mode*.""" quote_position: Optional[int] = None """*Optional*. Position of the quote in the original message in UTF-16 code units""" + checklist_task_id: Optional[int] = None + """*Optional*. Identifier of the specific checklist task to be replied to""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -50,6 +52,7 @@ class ReplyParameters(TelegramObject): quote_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), quote_entities: Optional[list[MessageEntity]] = None, quote_position: Optional[int] = None, + checklist_task_id: Optional[int] = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -64,5 +67,6 @@ class ReplyParameters(TelegramObject): quote_parse_mode=quote_parse_mode, quote_entities=quote_entities, quote_position=quote_position, + checklist_task_id=checklist_task_id, **__pydantic_kwargs, ) diff --git a/aiogram/types/suggested_post_approval_failed.py b/aiogram/types/suggested_post_approval_failed.py new file mode 100644 index 00000000..97d5a166 --- /dev/null +++ b/aiogram/types/suggested_post_approval_failed.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: + from .message import Message + from .suggested_post_price import SuggestedPostPrice + + +class SuggestedPostApprovalFailed(TelegramObject): + """ + Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval. + + Source: https://core.telegram.org/bots/api#suggestedpostapprovalfailed + """ + + price: SuggestedPostPrice + """Expected price of the post""" + suggested_post_message: Optional[Message] = None + """*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.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + price: SuggestedPostPrice, + suggested_post_message: Optional[Message] = 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__( + price=price, suggested_post_message=suggested_post_message, **__pydantic_kwargs + ) diff --git a/aiogram/types/suggested_post_approved.py b/aiogram/types/suggested_post_approved.py new file mode 100644 index 00000000..8d582f60 --- /dev/null +++ b/aiogram/types/suggested_post_approved.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject +from .custom import DateTime + +if TYPE_CHECKING: + from .message import Message + from .suggested_post_price import SuggestedPostPrice + + +class SuggestedPostApproved(TelegramObject): + """ + Describes a service message about the approval of a suggested post. + + Source: https://core.telegram.org/bots/api#suggestedpostapproved + """ + + send_date: DateTime + """Date when the post will be published""" + suggested_post_message: Optional[Message] = None + """*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.""" + price: Optional[SuggestedPostPrice] = None + """*Optional*. Amount paid for the post""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + send_date: DateTime, + suggested_post_message: Optional[Message] = None, + price: Optional[SuggestedPostPrice] = 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__( + send_date=send_date, + suggested_post_message=suggested_post_message, + price=price, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/suggested_post_declined.py b/aiogram/types/suggested_post_declined.py new file mode 100644 index 00000000..1fb0cd3b --- /dev/null +++ b/aiogram/types/suggested_post_declined.py @@ -0,0 +1,40 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: + from .message import Message + + +class SuggestedPostDeclined(TelegramObject): + """ + Describes a service message about the rejection of a suggested post. + + Source: https://core.telegram.org/bots/api#suggestedpostdeclined + """ + + suggested_post_message: Optional[Message] = None + """*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.""" + comment: Optional[str] = None + """*Optional*. Comment with which the post was declined""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + suggested_post_message: Optional[Message] = None, + 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__( + suggested_post_message=suggested_post_message, comment=comment, **__pydantic_kwargs + ) diff --git a/aiogram/types/suggested_post_info.py b/aiogram/types/suggested_post_info.py new file mode 100644 index 00000000..79d51bff --- /dev/null +++ b/aiogram/types/suggested_post_info.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject +from .custom import DateTime + +if TYPE_CHECKING: + from .suggested_post_price import SuggestedPostPrice + + +class SuggestedPostInfo(TelegramObject): + """ + Contains information about a suggested post. + + Source: https://core.telegram.org/bots/api#suggestedpostinfo + """ + + state: str + """State of the suggested post. Currently, it can be one of 'pending', 'approved', 'declined'.""" + price: Optional[SuggestedPostPrice] = None + """*Optional*. Proposed price of the post. If the field is omitted, then the post is unpaid.""" + send_date: Optional[DateTime] = None + """*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.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + state: str, + price: Optional[SuggestedPostPrice] = None, + send_date: Optional[DateTime] = 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__(state=state, price=price, send_date=send_date, **__pydantic_kwargs) diff --git a/aiogram/types/suggested_post_paid.py b/aiogram/types/suggested_post_paid.py new file mode 100644 index 00000000..0bfacaca --- /dev/null +++ b/aiogram/types/suggested_post_paid.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: + from .message import Message + from .star_amount import StarAmount + + +class SuggestedPostPaid(TelegramObject): + """ + Describes a service message about a successful payment for a suggested post. + + Source: https://core.telegram.org/bots/api#suggestedpostpaid + """ + + currency: str + """Currency in which the payment was made. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins""" + suggested_post_message: Optional[Message] = None + """*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.""" + amount: Optional[int] = None + """*Optional*. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only""" + star_amount: Optional[StarAmount] = None + """*Optional*. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + currency: str, + suggested_post_message: Optional[Message] = None, + amount: Optional[int] = None, + star_amount: Optional[StarAmount] = 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__( + currency=currency, + suggested_post_message=suggested_post_message, + amount=amount, + star_amount=star_amount, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/suggested_post_parameters.py b/aiogram/types/suggested_post_parameters.py new file mode 100644 index 00000000..b48dbb98 --- /dev/null +++ b/aiogram/types/suggested_post_parameters.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject +from .custom import DateTime + +if TYPE_CHECKING: + from .suggested_post_price import SuggestedPostPrice + + +class SuggestedPostParameters(TelegramObject): + """ + Contains parameters of a post that is being suggested by the bot. + + Source: https://core.telegram.org/bots/api#suggestedpostparameters + """ + + price: Optional[SuggestedPostPrice] = None + """*Optional*. Proposed price for the post. If the field is omitted, then the post is unpaid.""" + send_date: Optional[DateTime] = None + """*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.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + price: Optional[SuggestedPostPrice] = None, + send_date: Optional[DateTime] = 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__(price=price, send_date=send_date, **__pydantic_kwargs) diff --git a/aiogram/types/suggested_post_price.py b/aiogram/types/suggested_post_price.py new file mode 100644 index 00000000..0fc0ae4c --- /dev/null +++ b/aiogram/types/suggested_post_price.py @@ -0,0 +1,31 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class SuggestedPostPrice(TelegramObject): + """ + Desribes price of a suggested post. + + Source: https://core.telegram.org/bots/api#suggestedpostprice + """ + + currency: str + """Currency in which the post will be paid. Currently, must be one of 'XTR' for Telegram Stars or 'TON' for toncoins""" + amount: int + """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.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, currency: str, amount: int, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(currency=currency, amount=amount, **__pydantic_kwargs) diff --git a/aiogram/types/suggested_post_refunded.py b/aiogram/types/suggested_post_refunded.py new file mode 100644 index 00000000..7fd57a57 --- /dev/null +++ b/aiogram/types/suggested_post_refunded.py @@ -0,0 +1,40 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: + from .message import Message + + +class SuggestedPostRefunded(TelegramObject): + """ + Describes a service message about a payment refund for a suggested post. + + Source: https://core.telegram.org/bots/api#suggestedpostrefunded + """ + + reason: str + """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.""" + suggested_post_message: Optional[Message] = None + """*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.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + reason: str, + suggested_post_message: Optional[Message] = 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__( + reason=reason, suggested_post_message=suggested_post_message, **__pydantic_kwargs + ) diff --git a/aiogram/types/unique_gift.py b/aiogram/types/unique_gift.py index cecfac00..9f3f0f5a 100644 --- a/aiogram/types/unique_gift.py +++ b/aiogram/types/unique_gift.py @@ -1,10 +1,11 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, Optional from .base import TelegramObject if TYPE_CHECKING: + from .chat import Chat from .unique_gift_backdrop import UniqueGiftBackdrop from .unique_gift_model import UniqueGiftModel from .unique_gift_symbol import UniqueGiftSymbol @@ -29,6 +30,8 @@ class UniqueGift(TelegramObject): """Symbol of the gift""" backdrop: UniqueGiftBackdrop """Backdrop of the gift""" + publisher_chat: Optional[Chat] = None + """*Optional*. Information about the chat that published the gift""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -43,6 +46,7 @@ class UniqueGift(TelegramObject): model: UniqueGiftModel, symbol: UniqueGiftSymbol, backdrop: UniqueGiftBackdrop, + publisher_chat: Optional[Chat] = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -56,5 +60,6 @@ class UniqueGift(TelegramObject): model=model, symbol=symbol, backdrop=backdrop, + publisher_chat=publisher_chat, **__pydantic_kwargs, ) diff --git a/docs/api/methods/approve_suggested_post.rst b/docs/api/methods/approve_suggested_post.rst new file mode 100644 index 00000000..8901f998 --- /dev/null +++ b/docs/api/methods/approve_suggested_post.rst @@ -0,0 +1,45 @@ +#################### +approveSuggestedPost +#################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.approve_suggested_post + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.approve_suggested_post(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.approve_suggested_post import ApproveSuggestedPost` +- alias: :code:`from aiogram.methods import ApproveSuggestedPost` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(ApproveSuggestedPost(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return ApproveSuggestedPost(...) diff --git a/docs/api/methods/decline_suggested_post.rst b/docs/api/methods/decline_suggested_post.rst new file mode 100644 index 00000000..f1d20a94 --- /dev/null +++ b/docs/api/methods/decline_suggested_post.rst @@ -0,0 +1,45 @@ +#################### +declineSuggestedPost +#################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.decline_suggested_post + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.decline_suggested_post(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.decline_suggested_post import DeclineSuggestedPost` +- alias: :code:`from aiogram.methods import DeclineSuggestedPost` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(DeclineSuggestedPost(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return DeclineSuggestedPost(...) diff --git a/docs/api/methods/index.rst b/docs/api/methods/index.rst index 45431f19..270234e1 100644 --- a/docs/api/methods/index.rst +++ b/docs/api/methods/index.rst @@ -41,23 +41,30 @@ Available methods close close_forum_topic close_general_forum_topic + convert_gift_to_stars copy_message copy_messages create_chat_invite_link create_chat_subscription_invite_link create_forum_topic decline_chat_join_request + delete_business_messages delete_chat_photo delete_chat_sticker_set delete_forum_topic delete_my_commands + delete_story edit_chat_invite_link edit_chat_subscription_invite_link edit_forum_topic edit_general_forum_topic + edit_story export_chat_invite_link forward_message forward_messages + get_available_gifts + get_business_account_gifts + get_business_account_star_balance get_business_connection get_chat get_chat_administrators @@ -74,11 +81,17 @@ Available methods get_my_short_description get_user_chat_boosts get_user_profile_photos + gift_premium_subscription hide_general_forum_topic leave_chat log_out pin_chat_message + post_story promote_chat_member + read_business_message + remove_business_account_profile_photo + remove_chat_verification + remove_user_verification reopen_forum_topic reopen_general_forum_topic restrict_chat_member @@ -90,6 +103,7 @@ Available methods send_contact send_dice send_document + send_gift send_location send_media_group send_message @@ -100,6 +114,11 @@ Available methods send_video send_video_note send_voice + set_business_account_bio + set_business_account_gift_settings + set_business_account_name + set_business_account_profile_photo + set_business_account_username set_chat_administrator_custom_title set_chat_description set_chat_menu_button @@ -114,6 +133,8 @@ Available methods set_my_name set_my_short_description set_user_emoji_status + transfer_business_account_stars + transfer_gift unban_chat_member unban_chat_sender_chat unhide_general_forum_topic @@ -121,6 +142,9 @@ Available methods unpin_all_forum_topic_messages unpin_all_general_forum_topic_messages unpin_chat_message + upgrade_gift + verify_chat + verify_user Updating messages ================= @@ -128,40 +152,18 @@ Updating messages .. toctree:: :maxdepth: 1 - convert_gift_to_stars - delete_business_messages + approve_suggested_post + decline_suggested_post delete_message delete_messages - delete_story edit_message_caption edit_message_checklist edit_message_live_location edit_message_media edit_message_reply_markup edit_message_text - edit_story - get_available_gifts - get_business_account_gifts - get_business_account_star_balance - gift_premium_subscription - post_story - read_business_message - remove_business_account_profile_photo - remove_chat_verification - remove_user_verification - send_gift - set_business_account_bio - set_business_account_gift_settings - set_business_account_name - set_business_account_profile_photo - set_business_account_username stop_message_live_location stop_poll - transfer_business_account_stars - transfer_gift - upgrade_gift - verify_chat - verify_user Inline mode =========== diff --git a/docs/api/types/direct_messages_topic.rst b/docs/api/types/direct_messages_topic.rst new file mode 100644 index 00000000..ab4d107d --- /dev/null +++ b/docs/api/types/direct_messages_topic.rst @@ -0,0 +1,10 @@ +################### +DirectMessagesTopic +################### + + +.. automodule:: aiogram.types.direct_messages_topic + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/index.rst b/docs/api/types/index.rst index 626c4145..f6fb9bc6 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -78,6 +78,7 @@ Available types copy_text_button dice direct_message_price_changed + direct_messages_topic document external_reply_info file @@ -178,6 +179,14 @@ Available types story_area_type_suggested_reaction story_area_type_unique_gift story_area_type_weather + suggested_post_approval_failed + suggested_post_approved + suggested_post_declined + suggested_post_info + suggested_post_paid + suggested_post_parameters + suggested_post_price + suggested_post_refunded switch_inline_query_chosen_chat text_quote unique_gift diff --git a/docs/api/types/suggested_post_approval_failed.rst b/docs/api/types/suggested_post_approval_failed.rst new file mode 100644 index 00000000..0e3f638e --- /dev/null +++ b/docs/api/types/suggested_post_approval_failed.rst @@ -0,0 +1,10 @@ +########################### +SuggestedPostApprovalFailed +########################### + + +.. automodule:: aiogram.types.suggested_post_approval_failed + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/suggested_post_approved.rst b/docs/api/types/suggested_post_approved.rst new file mode 100644 index 00000000..16c7d4b8 --- /dev/null +++ b/docs/api/types/suggested_post_approved.rst @@ -0,0 +1,10 @@ +##################### +SuggestedPostApproved +##################### + + +.. automodule:: aiogram.types.suggested_post_approved + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/suggested_post_declined.rst b/docs/api/types/suggested_post_declined.rst new file mode 100644 index 00000000..9e7cc3b4 --- /dev/null +++ b/docs/api/types/suggested_post_declined.rst @@ -0,0 +1,10 @@ +##################### +SuggestedPostDeclined +##################### + + +.. automodule:: aiogram.types.suggested_post_declined + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/suggested_post_info.rst b/docs/api/types/suggested_post_info.rst new file mode 100644 index 00000000..de11f9e8 --- /dev/null +++ b/docs/api/types/suggested_post_info.rst @@ -0,0 +1,10 @@ +################# +SuggestedPostInfo +################# + + +.. automodule:: aiogram.types.suggested_post_info + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/suggested_post_paid.rst b/docs/api/types/suggested_post_paid.rst new file mode 100644 index 00000000..495c1da6 --- /dev/null +++ b/docs/api/types/suggested_post_paid.rst @@ -0,0 +1,10 @@ +################# +SuggestedPostPaid +################# + + +.. automodule:: aiogram.types.suggested_post_paid + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/suggested_post_parameters.rst b/docs/api/types/suggested_post_parameters.rst new file mode 100644 index 00000000..c6310c77 --- /dev/null +++ b/docs/api/types/suggested_post_parameters.rst @@ -0,0 +1,10 @@ +####################### +SuggestedPostParameters +####################### + + +.. automodule:: aiogram.types.suggested_post_parameters + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/suggested_post_price.rst b/docs/api/types/suggested_post_price.rst new file mode 100644 index 00000000..5361fe2e --- /dev/null +++ b/docs/api/types/suggested_post_price.rst @@ -0,0 +1,10 @@ +################## +SuggestedPostPrice +################## + + +.. automodule:: aiogram.types.suggested_post_price + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/suggested_post_refunded.rst b/docs/api/types/suggested_post_refunded.rst new file mode 100644 index 00000000..73e27be5 --- /dev/null +++ b/docs/api/types/suggested_post_refunded.rst @@ -0,0 +1,10 @@ +##################### +SuggestedPostRefunded +##################### + + +.. automodule:: aiogram.types.suggested_post_refunded + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/tests/test_api/test_methods/test_approve_suggested_post.py b/tests/test_api/test_methods/test_approve_suggested_post.py new file mode 100644 index 00000000..e652c47d --- /dev/null +++ b/tests/test_api/test_methods/test_approve_suggested_post.py @@ -0,0 +1,14 @@ +from aiogram.methods import ApproveSuggestedPost +from tests.mocked_bot import MockedBot + + +class TestApproveSuggestedPost: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(ApproveSuggestedPost, ok=True, result=True) + + response: bool = await bot.approve_suggested_post( + chat_id=-42, + message_id=42, + ) + request = bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_decline_suggested_post.py b/tests/test_api/test_methods/test_decline_suggested_post.py new file mode 100644 index 00000000..6edb190b --- /dev/null +++ b/tests/test_api/test_methods/test_decline_suggested_post.py @@ -0,0 +1,14 @@ +from aiogram.methods import DeclineSuggestedPost +from tests.mocked_bot import MockedBot + + +class TestDeclineSuggestedPost: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(DeclineSuggestedPost, ok=True, result=True) + + response: bool = await bot.decline_suggested_post( + chat_id=-42, + message_id=42, + ) + request = bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_types/test_message.py b/tests/test_api/test_types/test_message.py index cd7fbd43..4648117b 100644 --- a/tests/test_api/test_types/test_message.py +++ b/tests/test_api/test_types/test_message.py @@ -91,6 +91,12 @@ from aiogram.types import ( Sticker, Story, SuccessfulPayment, + SuggestedPostApprovalFailed, + SuggestedPostApproved, + SuggestedPostDeclined, + SuggestedPostPaid, + SuggestedPostPrice, + SuggestedPostRefunded, UniqueGift, UniqueGiftBackdrop, UniqueGiftBackdropColors, @@ -759,6 +765,45 @@ TEST_MESSAGE_PAID_MESSAGE_PRICE_CHANGED = Message( paid_message_star_count=100, ), ) +TEST_MESSAGE_SUGGESTED_POST_APPROVED = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + suggested_post_approved=SuggestedPostApproved( + send_date=1234567890, + ), +) +TEST_MESSAGE_SUGGESTED_POST_APPROVAL_FAILED = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + suggested_post_approval_failed=SuggestedPostApprovalFailed( + price=SuggestedPostPrice(currency="XTR", amount=100), + ), +) +TEST_MESSAGE_SUGGESTED_POST_DECLINED = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + suggested_post_declined=SuggestedPostDeclined(), +) +TEST_MESSAGE_SUGGESTED_POST_PAID = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + suggested_post_paid=SuggestedPostPaid(currency="XTR"), +) +TEST_MESSAGE_SUGGESTED_POST_REFUNDED = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + suggested_post_refunded=SuggestedPostRefunded(reason="post_deleted"), +) MESSAGES_AND_CONTENT_TYPES = [ [TEST_MESSAGE_TEXT, ContentType.TEXT], @@ -830,6 +875,11 @@ MESSAGES_AND_CONTENT_TYPES = [ [TEST_MESSAGE_GIFT, ContentType.GIFT], [TEST_MESSAGE_UNIQUE_GIFT, ContentType.UNIQUE_GIFT], [TEST_MESSAGE_PAID_MESSAGE_PRICE_CHANGED, ContentType.PAID_MESSAGE_PRICE_CHANGED], + [TEST_MESSAGE_SUGGESTED_POST_APPROVED, ContentType.SUGGESTED_POST_APPROVED], + [TEST_MESSAGE_SUGGESTED_POST_APPROVAL_FAILED, ContentType.SUGGESTED_POST_APPROVAL_FAILED], + [TEST_MESSAGE_SUGGESTED_POST_DECLINED, ContentType.SUGGESTED_POST_DECLINED], + [TEST_MESSAGE_SUGGESTED_POST_PAID, ContentType.SUGGESTED_POST_PAID], + [TEST_MESSAGE_SUGGESTED_POST_REFUNDED, ContentType.SUGGESTED_POST_REFUNDED], [TEST_MESSAGE_UNKNOWN, ContentType.UNKNOWN], ] @@ -898,6 +948,11 @@ MESSAGES_AND_COPY_METHODS = [ [TEST_MESSAGE_GIFT, None], [TEST_MESSAGE_UNIQUE_GIFT, None], [TEST_MESSAGE_PAID_MESSAGE_PRICE_CHANGED, None], + [TEST_MESSAGE_SUGGESTED_POST_APPROVED, None], + [TEST_MESSAGE_SUGGESTED_POST_APPROVAL_FAILED, None], + [TEST_MESSAGE_SUGGESTED_POST_DECLINED, None], + [TEST_MESSAGE_SUGGESTED_POST_PAID, None], + [TEST_MESSAGE_SUGGESTED_POST_REFUNDED, None], [TEST_MESSAGE_UNKNOWN, None], ]