diff --git a/.apiversion b/.apiversion index 38abeb20..c026ac82 100644 --- a/.apiversion +++ b/.apiversion @@ -1 +1 @@ -7.6 +9.6 diff --git a/.butcher/enums/ButtonStyle.yml b/.butcher/enums/ButtonStyle.yml new file mode 100644 index 00000000..12833dde --- /dev/null +++ b/.butcher/enums/ButtonStyle.yml @@ -0,0 +1,12 @@ +name: ButtonStyle +description: | + This object represents a button style (inline- or reply-keyboard). + + Sources: + * https://core.telegram.org/bots/api#inlinekeyboardbutton + * https://core.telegram.org/bots/api#keyboardbutton + +parse: + entity: InlineKeyboardButton + attribute: style + regexp: "'([a-z]+)'" diff --git a/.butcher/enums/ContentType.yml b/.butcher/enums/ContentType.yml index 321d6b92..8f7ec557 100644 --- a/.butcher/enums/ContentType.yml +++ b/.butcher/enums/ContentType.yml @@ -39,7 +39,14 @@ extract: - reply_to_story - business_connection_id - sender_business_bot + - sender_tag - is_from_offline - has_media_spoiler - effect_id - show_caption_above_media + - paid_star_count + - direct_messages_topic + - reply_to_checklist_task_id + - suggested_post_info + - is_paid_post + - reply_to_poll_option_id diff --git a/.butcher/enums/InputProfileType.yml b/.butcher/enums/InputProfileType.yml new file mode 100644 index 00000000..4128aa83 --- /dev/null +++ b/.butcher/enums/InputProfileType.yml @@ -0,0 +1,11 @@ +name: InputProfilePhotoType +description: | + This object represents input profile photo type + + Source: https://core.telegram.org/bots/api#inputprofilephoto +multi_parse: + attribute: type + regexp: "must be *([a-z_]+)*" + entities: + - InputProfilePhotoStatic + - InputProfilePhotoAnimated diff --git a/.butcher/enums/InputStoryContentPhotoType.yml b/.butcher/enums/InputStoryContentPhotoType.yml new file mode 100644 index 00000000..1e3792bd --- /dev/null +++ b/.butcher/enums/InputStoryContentPhotoType.yml @@ -0,0 +1,11 @@ +name: InputStoryContentType +description: | + This object represents input story content photo type. + + Source: https://core.telegram.org/bots/api#inputstorycontentphoto +multi_parse: + attribute: type + regexp: "must be *([a-z_]+)*" + entities: + - InputStoryContentPhoto + - InputStoryContentVideo diff --git a/.butcher/enums/OwnedGiftType.yml b/.butcher/enums/OwnedGiftType.yml new file mode 100644 index 00000000..3b161775 --- /dev/null +++ b/.butcher/enums/OwnedGiftType.yml @@ -0,0 +1,11 @@ +name: OwnedGiftType +description: | + This object represents owned gift type + + Source: https://core.telegram.org/bots/api#ownedgift +multi_parse: + attribute: type + regexp: "'([a-z_]+)'" + entities: + - OwnedGiftRegular + - OwnedGiftUnique diff --git a/.butcher/enums/ReactionTypeType.yml b/.butcher/enums/ReactionTypeType.yml index 10e97c8d..d1c46cc1 100644 --- a/.butcher/enums/ReactionTypeType.yml +++ b/.butcher/enums/ReactionTypeType.yml @@ -9,3 +9,4 @@ multi_parse: entities: - ReactionTypeEmoji - ReactionTypeCustomEmoji + - ReactionTypePaid diff --git a/.butcher/enums/StoryAreaTypeType.yml b/.butcher/enums/StoryAreaTypeType.yml new file mode 100644 index 00000000..6e4e899f --- /dev/null +++ b/.butcher/enums/StoryAreaTypeType.yml @@ -0,0 +1,14 @@ +name: StoryAreaTypeType +description: | + This object represents input profile photo type + + Source: https://core.telegram.org/bots/api#storyareatype +multi_parse: + attribute: type + regexp: "'([a-z_]+)'" + entities: + - StoryAreaTypeLocation + - StoryAreaTypeSuggestedReaction + - StoryAreaTypeLink + - StoryAreaTypeWeather + - StoryAreaTypeUniqueGift diff --git a/.butcher/enums/TransactionPartnerType.yml b/.butcher/enums/TransactionPartnerType.yml index 5e52ef79..26250867 100644 --- a/.butcher/enums/TransactionPartnerType.yml +++ b/.butcher/enums/TransactionPartnerType.yml @@ -11,3 +11,6 @@ multi_parse: - TransactionPartnerOther - TransactionPartnerUser - TransactionPartnerTelegramAds + - TransactionPartnerTelegramApi + - TransactionPartnerAffiliateProgram + - TransactionPartnerChat diff --git a/.butcher/enums/TransactionPartnerUserTransactionType.yml b/.butcher/enums/TransactionPartnerUserTransactionType.yml new file mode 100644 index 00000000..cd787f3a --- /dev/null +++ b/.butcher/enums/TransactionPartnerUserTransactionType.yml @@ -0,0 +1,10 @@ +name: TransactionPartnerUserTransactionTypeEnum +description: | + This object represents type of the transaction that were made by partner user. + + Source: https://core.telegram.org/bots/api#transactionpartneruser +parse: + entity: TransactionPartnerUser + category: types + attribute: transaction_type + regexp: "'([a-z_]+)'" diff --git a/.butcher/methods/answerShippingQuery/entity.json b/.butcher/methods/answerShippingQuery/entity.json index 906f38ab..6320349c 100644 --- a/.butcher/methods/answerShippingQuery/entity.json +++ b/.butcher/methods/answerShippingQuery/entity.json @@ -38,9 +38,9 @@ { "type": "String", "required": false, - "description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", - "html_description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", - "rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.\n", + "description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", + "html_description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. “Sorry, delivery to your desired address is unavailable”). Telegram will display this message to the user.", + "rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.\n", "name": "error_message" } ], diff --git a/.butcher/methods/answerWebAppQuery/entity.json b/.butcher/methods/answerWebAppQuery/entity.json index cff0b491..82ae4124 100644 --- a/.butcher/methods/answerWebAppQuery/entity.json +++ b/.butcher/methods/answerWebAppQuery/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Inline mode", - "anchor": "inline-mode" + "title": "Available methods", + "anchor": "available-methods" }, "object": { "anchor": "answerwebappquery", 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 new file mode 100644 index 00000000..701d4707 --- /dev/null +++ b/.butcher/methods/convertGiftToStars/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "convertgifttostars", + "name": "convertGiftToStars", + "description": "Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right. Returns True on success.", + "html_description": "

Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right. Returns True on success.

", + "rst_description": "Converts a given regular gift to Telegram Stars. Requires the *can_convert_gifts_to_stars* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": true, + "description": "Unique identifier of the regular gift that should be converted to Telegram Stars", + "html_description": "Unique identifier of the regular gift that should be converted to Telegram Stars", + "rst_description": "Unique identifier of the regular gift that should be converted to Telegram Stars\n", + "name": "owned_gift_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/copyMessage/entity.json b/.butcher/methods/copyMessage/entity.json index 72ddbc3c..3818a19b 100644 --- a/.butcher/methods/copyMessage/entity.json +++ b/.butcher/methods/copyMessage/entity.json @@ -22,11 +22,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -43,6 +51,14 @@ "rst_description": "Message identifier in the chat specified in *from_chat_id*\n", "name": "message_id" }, + { + "type": "Integer", + "required": false, + "description": "New start timestamp for the copied video in the message", + "html_description": "New start timestamp for the copied video in the message", + "rst_description": "New start timestamp for the copied video in the message\n", + "name": "video_start_timestamp" + }, { "type": "String", "required": false, @@ -91,6 +107,30 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats", + "html_description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats", + "rst_description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats\n", + "name": "message_effect_id" + }, + { + "type": "SuggestedPostParameters", + "required": false, + "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/copyMessage/replace.yml b/.butcher/methods/copyMessage/replace.yml new file mode 100644 index 00000000..52a3e0be --- /dev/null +++ b/.butcher/methods/copyMessage/replace.yml @@ -0,0 +1,11 @@ +annotations: + video_start_timestamp: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/methods/copyMessages/entity.json b/.butcher/methods/copyMessages/entity.json index 2d7340fe..c6b38dc8 100644 --- a/.butcher/methods/copyMessages/entity.json +++ b/.butcher/methods/copyMessages/entity.json @@ -22,11 +22,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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/createChatSubscriptionInviteLink/entity.json b/.butcher/methods/createChatSubscriptionInviteLink/entity.json new file mode 100644 index 00000000..2b77775e --- /dev/null +++ b/.butcher/methods/createChatSubscriptionInviteLink/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "createchatsubscriptioninvitelink", + "name": "createChatSubscriptionInviteLink", + "description": "Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.", + "html_description": "

Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.

", + "rst_description": "Use this method to create a `subscription invite link `_ for a channel chat. The bot must have the *can_invite_users* administrator rights. The link can be edited using the method :class:`aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink` or revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target channel chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": false, + "description": "Invite link name; 0-32 characters", + "html_description": "Invite link name; 0-32 characters", + "rst_description": "Invite link name; 0-32 characters\n", + "name": "name" + }, + { + "type": "Integer", + "required": true, + "description": "The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).", + "html_description": "The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).", + "rst_description": "The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).\n", + "name": "subscription_period" + }, + { + "type": "Integer", + "required": true, + "description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000", + "html_description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000", + "rst_description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000\n", + "name": "subscription_price" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/createChatSubscriptionInviteLink/replace.yml b/.butcher/methods/createChatSubscriptionInviteLink/replace.yml new file mode 100644 index 00000000..c9af8218 --- /dev/null +++ b/.butcher/methods/createChatSubscriptionInviteLink/replace.yml @@ -0,0 +1,11 @@ +annotations: + subscription_period: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/methods/createForumTopic/entity.json b/.butcher/methods/createForumTopic/entity.json index c10317c1..e3f744b3 100644 --- a/.butcher/methods/createForumTopic/entity.json +++ b/.butcher/methods/createForumTopic/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "createforumtopic", "name": "createForumTopic", - "description": "Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.", - "html_description": "

Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.

", - "rst_description": "Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object.", + "description": "Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator right. Returns information about the created topic as a ForumTopic object.", + "html_description": "

Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator right. Returns information about the created topic as a ForumTopic object.

", + "rst_description": "Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator right. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object.", "annotations": [ { "type": "Integer or String", diff --git a/.butcher/methods/createInvoiceLink/entity.json b/.butcher/methods/createInvoiceLink/entity.json index 0bd239b0..daa2da71 100644 --- a/.butcher/methods/createInvoiceLink/entity.json +++ b/.butcher/methods/createInvoiceLink/entity.json @@ -11,6 +11,14 @@ "html_description": "

Use this method to create a link for an invoice. Returns the created invoice link as String on success.

", "rst_description": "Use this method to create a link for an invoice. Returns the created invoice link as *String* on success.", "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the link will be created. For payments in Telegram Stars only.", + "html_description": "Unique identifier of the business connection on behalf of which the link will be created. For payments in Telegram Stars only.", + "rst_description": "Unique identifier of the business connection on behalf of which the link will be created. For payments in `Telegram Stars `_ only.\n", + "name": "business_connection_id" + }, { "type": "String", "required": true, @@ -30,9 +38,9 @@ { "type": "String", "required": true, - "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.\n", "name": "payload" }, { @@ -59,6 +67,14 @@ "rst_description": "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 `_.\n", "name": "prices" }, + { + "type": "Integer", + "required": false, + "description": "The number of seconds the subscription will be active for before the next payment. The currency must be set to 'XTR' (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.", + "html_description": "The number of seconds the subscription will be active for before the next payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.", + "rst_description": "The number of seconds the subscription will be active for before the next payment. The currency must be set to 'XTR' (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.\n", + "name": "subscription_period" + }, { "type": "Integer", "required": false, 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 new file mode 100644 index 00000000..93f9c05e --- /dev/null +++ b/.butcher/methods/deleteBusinessMessages/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "deletebusinessmessages", + "name": "deleteBusinessMessages", + "description": "Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.", + "html_description": "

Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.

", + "rst_description": "Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection on behalf of which to delete the messages", + "html_description": "Unique identifier of the business connection on behalf of which to delete the messages", + "rst_description": "Unique identifier of the business connection on behalf of which to delete the messages\n", + "name": "business_connection_id" + }, + { + "type": "Array of Integer", + "required": true, + "description": "A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted", + "html_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted", + "rst_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted\n", + "name": "message_ids" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteForumTopic/entity.json b/.butcher/methods/deleteForumTopic/entity.json index 4e231d5b..5afe09b0 100644 --- a/.butcher/methods/deleteForumTopic/entity.json +++ b/.butcher/methods/deleteForumTopic/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "deleteforumtopic", "name": "deleteForumTopic", - "description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.", - "html_description": "

Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.

", - "rst_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.", + "description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.", + "html_description": "

Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.

", + "rst_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", diff --git a/.butcher/methods/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 new file mode 100644 index 00000000..c857a907 --- /dev/null +++ b/.butcher/methods/deleteStory/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "deletestory", + "name": "deleteStory", + "description": "Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success.", + "html_description": "

Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success.

", + "rst_description": "Deletes a story previously posted by the bot on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the story to delete", + "html_description": "Unique identifier of the story to delete", + "rst_description": "Unique identifier of the story to delete\n", + "name": "story_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editChatSubscriptionInviteLink/entity.json b/.butcher/methods/editChatSubscriptionInviteLink/entity.json new file mode 100644 index 00000000..0e3747bc --- /dev/null +++ b/.butcher/methods/editChatSubscriptionInviteLink/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "editchatsubscriptioninvitelink", + "name": "editChatSubscriptionInviteLink", + "description": "Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.", + "html_description": "

Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.

", + "rst_description": "Use this method to edit a subscription invite link created by the bot. The bot must have the *can_invite_users* administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.", + "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": "String", + "required": true, + "description": "The invite link to edit", + "html_description": "The invite link to edit", + "rst_description": "The invite link to edit\n", + "name": "invite_link" + }, + { + "type": "String", + "required": false, + "description": "Invite link name; 0-32 characters", + "html_description": "Invite link name; 0-32 characters", + "rst_description": "Invite link name; 0-32 characters\n", + "name": "name" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editForumTopic/entity.json b/.butcher/methods/editForumTopic/entity.json index c76f2157..ebbdfbe3 100644 --- a/.butcher/methods/editForumTopic/entity.json +++ b/.butcher/methods/editForumTopic/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "editforumtopic", "name": "editForumTopic", - "description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.", - "html_description": "

Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

", - "rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.", + "description": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.", + "html_description": "

Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

", + "rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", diff --git a/.butcher/methods/editGeneralForumTopic/entity.json b/.butcher/methods/editGeneralForumTopic/entity.json index 6bc78e96..64065e3a 100644 --- a/.butcher/methods/editGeneralForumTopic/entity.json +++ b/.butcher/methods/editGeneralForumTopic/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "editgeneralforumtopic", "name": "editGeneralForumTopic", - "description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.", - "html_description": "

Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.

", - "rst_description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights. Returns :code:`True` on success.", + "description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.", + "html_description": "

Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.

", + "rst_description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", diff --git a/.butcher/methods/editMessageChecklist/entity.json b/.butcher/methods/editMessageChecklist/entity.json new file mode 100644 index 00000000..1c75a0bd --- /dev/null +++ b/.butcher/methods/editMessageChecklist/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "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" + } +} diff --git a/.butcher/methods/editMessageMedia/entity.json b/.butcher/methods/editMessageMedia/entity.json index 95d72dfb..6910b3c7 100644 --- a/.butcher/methods/editMessageMedia/entity.json +++ b/.butcher/methods/editMessageMedia/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "editmessagemedia", "name": "editMessageMedia", - "description": "Use this method to edit animation, audio, document, photo, or video 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. 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. 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.", + "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", diff --git a/.butcher/methods/editMessageText/default.yml b/.butcher/methods/editMessageText/default.yml index becd35ac..f549c63d 100644 --- a/.butcher/methods/editMessageText/default.yml +++ b/.butcher/methods/editMessageText/default.yml @@ -1,2 +1,3 @@ disable_web_page_preview: link_preview_is_disabled +link_preview_options: link_preview parse_mode: parse_mode diff --git a/.butcher/methods/editStory/entity.json b/.butcher/methods/editStory/entity.json new file mode 100644 index 00000000..4e6c88c2 --- /dev/null +++ b/.butcher/methods/editStory/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "editstory", + "name": "editStory", + "description": "Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.", + "html_description": "

Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.

", + "rst_description": "Edits a story previously posted by the bot on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :class:`aiogram.types.story.Story` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the story to edit", + "html_description": "Unique identifier of the story to edit", + "rst_description": "Unique identifier of the story to edit\n", + "name": "story_id" + }, + { + "type": "InputStoryContent", + "required": true, + "description": "Content of the story", + "html_description": "Content of the story", + "rst_description": "Content of the story\n", + "name": "content" + }, + { + "type": "String", + "required": false, + "description": "Caption of the story, 0-2048 characters after entities parsing", + "html_description": "Caption of the story, 0-2048 characters after entities parsing", + "rst_description": "Caption of the story, 0-2048 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the story caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the story caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the story 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": "Array of StoryArea", + "required": false, + "description": "A JSON-serialized list of clickable areas to be shown on the story", + "html_description": "A JSON-serialized list of clickable areas to be shown on the story", + "rst_description": "A JSON-serialized list of clickable areas to be shown on the story\n", + "name": "areas" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editUserStarSubscription/entity.json b/.butcher/methods/editUserStarSubscription/entity.json new file mode 100644 index 00000000..9cc74993 --- /dev/null +++ b/.butcher/methods/editUserStarSubscription/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "edituserstarsubscription", + "name": "editUserStarSubscription", + "description": "Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.", + "html_description": "

Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.

", + "rst_description": "Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Identifier of the user whose subscription will be edited", + "html_description": "Identifier of the user whose subscription will be edited", + "rst_description": "Identifier of the user whose subscription will be edited\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Telegram payment identifier for the subscription", + "html_description": "Telegram payment identifier for the subscription", + "rst_description": "Telegram payment identifier for the subscription\n", + "name": "telegram_payment_charge_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.", + "html_description": "Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.", + "rst_description": "Pass :code:`True` to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass :code:`False` to allow the user to re-enable a subscription that was previously canceled by the bot.\n", + "name": "is_canceled" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/forwardMessage/entity.json b/.butcher/methods/forwardMessage/entity.json index 2af7b0b4..13bd8cb4 100644 --- a/.butcher/methods/forwardMessage/entity.json +++ b/.butcher/methods/forwardMessage/entity.json @@ -22,11 +22,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -35,6 +43,14 @@ "rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n", "name": "from_chat_id" }, + { + "type": "Integer", + "required": false, + "description": "New start timestamp for the forwarded video in the message", + "html_description": "New start timestamp for the forwarded video in the message", + "rst_description": "New start timestamp for the forwarded video in the message\n", + "name": "video_start_timestamp" + }, { "type": "Boolean", "required": false, @@ -51,6 +67,22 @@ "rst_description": "Protects the contents of the forwarded message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats", + "html_description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats", + "rst_description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats\n", + "name": "message_effect_id" + }, + { + "type": "SuggestedPostParameters", + "required": false, + "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/forwardMessage/replace.yml b/.butcher/methods/forwardMessage/replace.yml new file mode 100644 index 00000000..52a3e0be --- /dev/null +++ b/.butcher/methods/forwardMessage/replace.yml @@ -0,0 +1,11 @@ +annotations: + video_start_timestamp: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/methods/forwardMessages/entity.json b/.butcher/methods/forwardMessages/entity.json index 9ae3024a..c08b6722 100644 --- a/.butcher/methods/forwardMessages/entity.json +++ b/.butcher/methods/forwardMessages/entity.json @@ -22,11 +22,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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 new file mode 100644 index 00000000..665ab79b --- /dev/null +++ b/.butcher/methods/getAvailableGifts/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getavailablegifts", + "name": "getAvailableGifts", + "description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.", + "html_description": "

Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.

", + "rst_description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/getBusinessAccountGifts/entity.json b/.butcher/methods/getBusinessAccountGifts/entity.json new file mode 100644 index 00000000..0ff3d056 --- /dev/null +++ b/.butcher/methods/getBusinessAccountGifts/entity.json @@ -0,0 +1,117 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getbusinessaccountgifts", + "name": "getBusinessAccountGifts", + "description": "Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns OwnedGifts on success.", + "html_description": "

Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns OwnedGifts on success.

", + "rst_description": "Returns the gifts received and owned by a managed business account. Requires the *can_view_gifts_and_stars* business bot right. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that aren't saved to the account's profile page", + "html_description": "Pass True to exclude gifts that aren't saved to the account's profile page", + "rst_description": "Pass :code:`True` to exclude gifts that aren't saved to the account's profile page\n", + "name": "exclude_unsaved" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that are saved to the account's profile page", + "html_description": "Pass True to exclude gifts that are saved to the account's profile page", + "rst_description": "Pass :code:`True` to exclude gifts that are saved to the account's profile page\n", + "name": "exclude_saved" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n", + "name": "exclude_unlimited" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n", + "name": "exclude_limited_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n", + "name": "exclude_limited_non_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude unique gifts", + "html_description": "Pass True to exclude unique gifts", + "rst_description": "Pass :code:`True` to exclude unique gifts\n", + "name": "exclude_unique" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n", + "name": "exclude_from_blockchain" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "html_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n", + "name": "sort_by_price" + }, + { + "type": "String", + "required": false, + "description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results", + "html_description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results", + "rst_description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "html_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n", + "name": "limit" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times\n", + "name": "exclude_limited", + "deprecated": { + "version": "9.3", + "release_date": "2025-12-31" + } + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getBusinessAccountStarBalance/entity.json b/.butcher/methods/getBusinessAccountStarBalance/entity.json new file mode 100644 index 00000000..d955a230 --- /dev/null +++ b/.butcher/methods/getBusinessAccountStarBalance/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getbusinessaccountstarbalance", + "name": "getBusinessAccountStarBalance", + "description": "Returns the amount of Telegram Stars owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns StarAmount on success.", + "html_description": "

Returns the amount of Telegram Stars owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns StarAmount on success.

", + "rst_description": "Returns the amount of Telegram Stars owned by a managed business account. Requires the *can_view_gifts_and_stars* business bot right. Returns :class:`aiogram.types.star_amount.StarAmount` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatGifts/entity.json b/.butcher/methods/getChatGifts/entity.json new file mode 100644 index 00000000..e3c13c21 --- /dev/null +++ b/.butcher/methods/getChatGifts/entity.json @@ -0,0 +1,105 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getchatgifts", + "name": "getChatGifts", + "description": "Returns the gifts owned by a chat. Returns OwnedGifts on success.", + "html_description": "

Returns the gifts owned by a chat. Returns OwnedGifts on success.

", + "rst_description": "Returns the gifts owned by a chat. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that aren't saved to the chat's profile page. Always True, unless the bot has the can_post_messages administrator right in the channel.", + "html_description": "Pass True to exclude gifts that aren't saved to the chat's profile page. Always True, unless the bot has the can_post_messages administrator right in the channel.", + "rst_description": "Pass :code:`True` to exclude gifts that aren't saved to the chat's profile page. Always :code:`True`, unless the bot has the *can_post_messages* administrator right in the channel.\n", + "name": "exclude_unsaved" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that are saved to the chat's profile page. Always False, unless the bot has the can_post_messages administrator right in the channel.", + "html_description": "Pass True to exclude gifts that are saved to the chat's profile page. Always False, unless the bot has the can_post_messages administrator right in the channel.", + "rst_description": "Pass :code:`True` to exclude gifts that are saved to the chat's profile page. Always :code:`False`, unless the bot has the *can_post_messages* administrator right in the channel.\n", + "name": "exclude_saved" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n", + "name": "exclude_unlimited" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n", + "name": "exclude_limited_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n", + "name": "exclude_limited_non_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n", + "name": "exclude_from_blockchain" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude unique gifts", + "html_description": "Pass True to exclude unique gifts", + "rst_description": "Pass :code:`True` to exclude unique gifts\n", + "name": "exclude_unique" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "html_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n", + "name": "sort_by_price" + }, + { + "type": "String", + "required": false, + "description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results", + "html_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results", + "rst_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "html_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n", + "name": "limit" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getManagedBotToken/entity.json b/.butcher/methods/getManagedBotToken/entity.json new file mode 100644 index 00000000..bf831d7a --- /dev/null +++ b/.butcher/methods/getManagedBotToken/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getmanagedbottoken", + "name": "getManagedBotToken", + "description": "Use this method to get the token of a managed bot. Returns the token as String on success.", + "html_description": "

Use this method to get the token of a managed bot. Returns the token as String on success.

", + "rst_description": "Use this method to get the token of a managed bot. Returns the token as *String* on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of the managed bot whose token will be returned", + "html_description": "User identifier of the managed bot whose token will be returned", + "rst_description": "User identifier of the managed bot whose token will be returned\n", + "name": "user_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getMyStarBalance/entity.json b/.butcher/methods/getMyStarBalance/entity.json new file mode 100644 index 00000000..813cbb7f --- /dev/null +++ b/.butcher/methods/getMyStarBalance/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "getmystarbalance", + "name": "getMyStarBalance", + "description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.", + "html_description": "

A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.

", + "rst_description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a :class:`aiogram.types.star_amount.StarAmount` object.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/getUpdates/entity.json b/.butcher/methods/getUpdates/entity.json index 0c2f1299..dc9cbad1 100644 --- a/.butcher/methods/getUpdates/entity.json +++ b/.butcher/methods/getUpdates/entity.json @@ -38,9 +38,9 @@ { "type": "Array of String", "required": false, - "description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\"message\", \"edited_channel_post\", \"callback_query\"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.\n\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.", - "html_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\"message\", \"edited_channel_post\", \"callback_query\"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.
\n
\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.", - "rst_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`[\"message\", \"edited_channel_post\", \"callback_query\"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used.\n\n\n\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.\n", + "description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\"message\", \"edited_channel_post\", \"callback_query\"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.\n\nPlease note that this parameter doesn't affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time.", + "html_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\"message\", \"edited_channel_post\", \"callback_query\"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.
\n
\nPlease note that this parameter doesn't affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time.", + "rst_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`[\"message\", \"edited_channel_post\", \"callback_query\"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used.\n\n\n\nPlease note that this parameter doesn't affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time.\n", "name": "allowed_updates" } ], diff --git a/.butcher/methods/getUserGifts/entity.json b/.butcher/methods/getUserGifts/entity.json new file mode 100644 index 00000000..87b76f34 --- /dev/null +++ b/.butcher/methods/getUserGifts/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getusergifts", + "name": "getUserGifts", + "description": "Returns the gifts owned and hosted by a user. Returns OwnedGifts on success.", + "html_description": "

Returns the gifts owned and hosted by a user. Returns OwnedGifts on success.

", + "rst_description": "Returns the gifts owned and hosted by a user. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the user", + "html_description": "Unique identifier of the user", + "rst_description": "Unique identifier of the user\n", + "name": "user_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n", + "name": "exclude_unlimited" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n", + "name": "exclude_limited_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n", + "name": "exclude_limited_non_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n", + "name": "exclude_from_blockchain" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude unique gifts", + "html_description": "Pass True to exclude unique gifts", + "rst_description": "Pass :code:`True` to exclude unique gifts\n", + "name": "exclude_unique" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "html_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n", + "name": "sort_by_price" + }, + { + "type": "String", + "required": false, + "description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results", + "html_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results", + "rst_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "html_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n", + "name": "limit" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getUserProfileAudios/entity.json b/.butcher/methods/getUserProfileAudios/entity.json new file mode 100644 index 00000000..89fa4466 --- /dev/null +++ b/.butcher/methods/getUserProfileAudios/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getuserprofileaudios", + "name": "getUserProfileAudios", + "description": "Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object.", + "html_description": "

Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object.

", + "rst_description": "Use this method to get a list of profile audios for a user. Returns a :class:`aiogram.types.user_profile_audios.UserProfileAudios` object.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": false, + "description": "Sequential number of the first audio to be returned. By default, all audios are returned.", + "html_description": "Sequential number of the first audio to be returned. By default, all audios are returned.", + "rst_description": "Sequential number of the first audio to be returned. By default, all audios are returned.\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/giftPremiumSubscription/entity.json b/.butcher/methods/giftPremiumSubscription/entity.json new file mode 100644 index 00000000..1a1f7867 --- /dev/null +++ b/.butcher/methods/giftPremiumSubscription/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "giftpremiumsubscription", + "name": "giftPremiumSubscription", + "description": "Gifts a Telegram Premium subscription to the given user. Returns True on success.", + "html_description": "

Gifts a Telegram Premium subscription to the given user. Returns True on success.

", + "rst_description": "Gifts a Telegram Premium subscription to the given user. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user who will receive a Telegram Premium subscription", + "html_description": "Unique identifier of the target user who will receive a Telegram Premium subscription", + "rst_description": "Unique identifier of the target user who will receive a Telegram Premium subscription\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": true, + "description": "Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12", + "html_description": "Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12", + "rst_description": "Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12\n", + "name": "month_count" + }, + { + "type": "Integer", + "required": true, + "description": "Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months", + "html_description": "Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months", + "rst_description": "Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months\n", + "name": "star_count" + }, + { + "type": "String", + "required": false, + "description": "Text that will be shown along with the service message about the subscription; 0-128 characters", + "html_description": "Text that will be shown along with the service message about the subscription; 0-128 characters", + "rst_description": "Text that will be shown along with the service message about the subscription; 0-128 characters\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.", + "html_description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.", + "rst_description": "Mode for parsing entities in the text. See `formatting options `_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n", + "name": "text_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.", + "html_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.", + "rst_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n", + "name": "text_entities" + } + ], + "category": "methods" + } +} 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 dd6e7609..f7d0b00f 100644 --- a/.butcher/methods/pinChatMessage/entity.json +++ b/.butcher/methods/pinChatMessage/entity.json @@ -7,10 +7,18 @@ "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", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message will be pinned", + "html_description": "Unique identifier of the business connection on behalf of which the message will be pinned", + "rst_description": "Unique identifier of the business connection on behalf of which the message will be pinned\n", + "name": "business_connection_id" + }, { "type": "Integer or String", "required": true, diff --git a/.butcher/methods/postStory/entity.json b/.butcher/methods/postStory/entity.json new file mode 100644 index 00000000..fe66a91c --- /dev/null +++ b/.butcher/methods/postStory/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "poststory", + "name": "postStory", + "description": "Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.", + "html_description": "

Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.

", + "rst_description": "Posts a story on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :class:`aiogram.types.story.Story` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "InputStoryContent", + "required": true, + "description": "Content of the story", + "html_description": "Content of the story", + "rst_description": "Content of the story\n", + "name": "content" + }, + { + "type": "Integer", + "required": true, + "description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400", + "html_description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400", + "rst_description": "Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400`\n", + "name": "active_period" + }, + { + "type": "String", + "required": false, + "description": "Caption of the story, 0-2048 characters after entities parsing", + "html_description": "Caption of the story, 0-2048 characters after entities parsing", + "rst_description": "Caption of the story, 0-2048 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the story caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the story caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the story 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": "Array of StoryArea", + "required": false, + "description": "A JSON-serialized list of clickable areas to be shown on the story", + "html_description": "A JSON-serialized list of clickable areas to be shown on the story", + "rst_description": "A JSON-serialized list of clickable areas to be shown on the story\n", + "name": "areas" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to keep the story accessible after it expires", + "html_description": "Pass True to keep the story accessible after it expires", + "rst_description": "Pass :code:`True` to keep the story accessible after it expires\n", + "name": "post_to_chat_page" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the content of the story must be protected from forwarding and screenshotting", + "html_description": "Pass True if the content of the story must be protected from forwarding and screenshotting", + "rst_description": "Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting\n", + "name": "protect_content" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/promoteChatMember/entity.json b/.butcher/methods/promoteChatMember/entity.json index 3203b082..5495c781 100644 --- a/.butcher/methods/promoteChatMember/entity.json +++ b/.butcher/methods/promoteChatMember/entity.json @@ -38,9 +38,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": "Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": "Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat" }, { @@ -62,9 +62,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics", - "html_description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics", - "rst_description": "Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics\n", + "description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to True for promotions of channel administrators", + "html_description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to True for promotions of channel administrators", + "rst_description": "Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to :code:`True` for promotions of channel administrators\n", "name": "can_restrict_members" }, { @@ -118,9 +118,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages" }, { @@ -146,6 +146,22 @@ "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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can edit the tags of regular members; for groups and supergroups only", + "html_description": "Pass True if the administrator can edit the tags of regular members; for groups and supergroups only", + "rst_description": "Pass :code:`True` if the administrator can edit the tags of regular members; for groups and supergroups only\n", + "name": "can_manage_tags" } ], "category": "methods" diff --git a/.butcher/methods/readBusinessMessage/entity.json b/.butcher/methods/readBusinessMessage/entity.json new file mode 100644 index 00000000..cdb7ac97 --- /dev/null +++ b/.butcher/methods/readBusinessMessage/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "readbusinessmessage", + "name": "readBusinessMessage", + "description": "Marks incoming message as read on behalf of a business account. Requires the can_read_messages business bot right. Returns True on success.", + "html_description": "

Marks incoming message as read on behalf of a business account. Requires the can_read_messages business bot right. Returns True on success.

", + "rst_description": "Marks incoming message as read on behalf of a business account. Requires the *can_read_messages* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection on behalf of which to read the message", + "html_description": "Unique identifier of the business connection on behalf of which to read the message", + "rst_description": "Unique identifier of the business connection on behalf of which to read the message\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.", + "html_description": "Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.", + "rst_description": "Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the message to mark as read", + "html_description": "Unique identifier of the message to mark as read", + "rst_description": "Unique identifier of the message to mark as read\n", + "name": "message_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/removeBusinessAccountProfilePhoto/entity.json b/.butcher/methods/removeBusinessAccountProfilePhoto/entity.json new file mode 100644 index 00000000..7b6e3597 --- /dev/null +++ b/.butcher/methods/removeBusinessAccountProfilePhoto/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "removebusinessaccountprofilephoto", + "name": "removeBusinessAccountProfilePhoto", + "description": "Removes the current profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.", + "html_description": "

Removes the current profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.

", + "rst_description": "Removes the current profile photo of a managed business account. Requires the *can_edit_profile_photo* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.", + "html_description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.", + "rst_description": "Pass :code:`True` to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.\n", + "name": "is_public" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/removeChatVerification/entity.json b/.butcher/methods/removeChatVerification/entity.json new file mode 100644 index 00000000..7c5f31c1 --- /dev/null +++ b/.butcher/methods/removeChatVerification/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "removechatverification", + "name": "removeChatVerification", + "description": "Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.", + "html_description": "

Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.

", + "rst_description": "Removes verification from a chat that is currently verified `on behalf of the organization `_ represented by the bot. 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" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/removeMyProfilePhoto/entity.json b/.butcher/methods/removeMyProfilePhoto/entity.json new file mode 100644 index 00000000..e24d04bc --- /dev/null +++ b/.butcher/methods/removeMyProfilePhoto/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "removemyprofilephoto", + "name": "removeMyProfilePhoto", + "description": "Removes the profile photo of the bot. Requires no parameters. Returns True on success.", + "html_description": "

Removes the profile photo of the bot. Requires no parameters. Returns True on success.

", + "rst_description": "Removes the profile photo of the bot. Requires no parameters. Returns :code:`True` on success.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/removeUserVerification/entity.json b/.butcher/methods/removeUserVerification/entity.json new file mode 100644 index 00000000..36dcc597 --- /dev/null +++ b/.butcher/methods/removeUserVerification/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "removeuserverification", + "name": "removeUserVerification", + "description": "Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.", + "html_description": "

Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.

", + "rst_description": "Removes verification from a user who is currently verified `on behalf of the organization `_ represented by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/replaceManagedBotToken/entity.json b/.butcher/methods/replaceManagedBotToken/entity.json new file mode 100644 index 00000000..050f0958 --- /dev/null +++ b/.butcher/methods/replaceManagedBotToken/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "replacemanagedbottoken", + "name": "replaceManagedBotToken", + "description": "Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as String on success.", + "html_description": "

Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as String on success.

", + "rst_description": "Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as *String* on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of the managed bot whose token will be replaced", + "html_description": "User identifier of the managed bot whose token will be replaced", + "rst_description": "User identifier of the managed bot whose token will be replaced\n", + "name": "user_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/repostStory/entity.json b/.butcher/methods/repostStory/entity.json new file mode 100644 index 00000000..198c0779 --- /dev/null +++ b/.butcher/methods/repostStory/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "repoststory", + "name": "repostStory", + "description": "Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success.", + "html_description": "

Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success.

", + "rst_description": "Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the *can_manage_stories* business bot right for both business accounts. Returns :class:`aiogram.types.story.Story` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the chat which posted the story that should be reposted", + "html_description": "Unique identifier of the chat which posted the story that should be reposted", + "rst_description": "Unique identifier of the chat which posted the story that should be reposted\n", + "name": "from_chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the story that should be reposted", + "html_description": "Unique identifier of the story that should be reposted", + "rst_description": "Unique identifier of the story that should be reposted\n", + "name": "from_story_id" + }, + { + "type": "Integer", + "required": true, + "description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400", + "html_description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400", + "rst_description": "Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400`\n", + "name": "active_period" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to keep the story accessible after it expires", + "html_description": "Pass True to keep the story accessible after it expires", + "rst_description": "Pass :code:`True` to keep the story accessible after it expires\n", + "name": "post_to_chat_page" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the content of the story must be protected from forwarding and screenshotting", + "html_description": "Pass True if the content of the story must be protected from forwarding and screenshotting", + "rst_description": "Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting\n", + "name": "protect_content" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/savePreparedInlineMessage/entity.json b/.butcher/methods/savePreparedInlineMessage/entity.json new file mode 100644 index 00000000..fc6ee1b6 --- /dev/null +++ b/.butcher/methods/savePreparedInlineMessage/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "savepreparedinlinemessage", + "name": "savePreparedInlineMessage", + "description": "Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.", + "html_description": "

Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.

", + "rst_description": "Stores a message that can be sent by a user of a Mini App. Returns a :class:`aiogram.types.prepared_inline_message.PreparedInlineMessage` object.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user that can use the prepared message", + "html_description": "Unique identifier of the target user that can use the prepared message", + "rst_description": "Unique identifier of the target user that can use the prepared message\n", + "name": "user_id" + }, + { + "type": "InlineQueryResult", + "required": true, + "description": "A JSON-serialized object describing the message to be sent", + "html_description": "A JSON-serialized object describing the message to be sent", + "rst_description": "A JSON-serialized object describing the message to be sent\n", + "name": "result" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message can be sent to private chats with users", + "html_description": "Pass True if the message can be sent to private chats with users", + "rst_description": "Pass :code:`True` if the message can be sent to private chats with users\n", + "name": "allow_user_chats" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message can be sent to private chats with bots", + "html_description": "Pass True if the message can be sent to private chats with bots", + "rst_description": "Pass :code:`True` if the message can be sent to private chats with bots\n", + "name": "allow_bot_chats" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message can be sent to group and supergroup chats", + "html_description": "Pass True if the message can be sent to group and supergroup chats", + "rst_description": "Pass :code:`True` if the message can be sent to group and supergroup chats\n", + "name": "allow_group_chats" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message can be sent to channel chats", + "html_description": "Pass True if the message can be sent to channel chats", + "rst_description": "Pass :code:`True` if the message can be sent to channel chats\n", + "name": "allow_channel_chats" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/savePreparedKeyboardButton/entity.json b/.butcher/methods/savePreparedKeyboardButton/entity.json new file mode 100644 index 00000000..b31dcd00 --- /dev/null +++ b/.butcher/methods/savePreparedKeyboardButton/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "savepreparedkeyboardbutton", + "name": "savePreparedKeyboardButton", + "description": "Stores a keyboard button that can be used by a user within a Mini App. Returns a PreparedKeyboardButton object.", + "html_description": "

Stores a keyboard button that can be used by a user within a Mini App. Returns a PreparedKeyboardButton object.

", + "rst_description": "Stores a keyboard button that can be used by a user within a Mini App. Returns a :class:`aiogram.types.prepared_keyboard_button.PreparedKeyboardButton` object.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user that can use the button", + "html_description": "Unique identifier of the target user that can use the button", + "rst_description": "Unique identifier of the target user that can use the button\n", + "name": "user_id" + }, + { + "type": "KeyboardButton", + "required": true, + "description": "A JSON-serialized object describing the button to be saved. The button must be of the type request_users, request_chat, or request_managed_bot", + "html_description": "A JSON-serialized object describing the button to be saved. The button must be of the type request_users, request_chat, or request_managed_bot", + "rst_description": "A JSON-serialized object describing the button to be saved. The button must be of the type *request_users*, *request_chat*, or *request_managed_bot*\n", + "name": "button" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendAnimation/entity.json b/.butcher/methods/sendAnimation/entity.json index 987e6fec..38435475 100644 --- a/.butcher/methods/sendAnimation/entity.json +++ b/.butcher/methods/sendAnimation/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -139,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 bc81c541..9886f752 100644 --- a/.butcher/methods/sendAudio/entity.json +++ b/.butcher/methods/sendAudio/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -123,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..80ef4215 100644 --- a/.butcher/methods/sendChatAction/entity.json +++ b/.butcher/methods/sendChatAction/entity.json @@ -22,17 +22,17 @@ { "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" }, { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread; for supergroups only", - "html_description": "Unique identifier for the target message thread; for supergroups only", - "rst_description": "Unique identifier for the target message thread; for supergroups only\n", + "description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, { diff --git a/.butcher/methods/sendChecklist/entity.json b/.butcher/methods/sendChecklist/entity.json new file mode 100644 index 00000000..31161ac7 --- /dev/null +++ b/.butcher/methods/sendChecklist/entity.json @@ -0,0 +1,81 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendchecklist", + "name": "sendChecklist", + "description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.", + "html_description": "

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

", + "rst_description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent :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": "InputChecklist", + "required": true, + "description": "A JSON-serialized object for the checklist to send", + "html_description": "A JSON-serialized object for the checklist to send", + "rst_description": "A JSON-serialized object for the checklist to send\n", + "name": "checklist" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message silently. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the message effect to be added to the message", + "html_description": "Unique identifier of the message effect to be added to the message", + "rst_description": "Unique identifier of the message effect to be added to the message\n", + "name": "message_effect_id" + }, + { + "type": "ReplyParameters", + "required": false, + "description": "A JSON-serialized object for description of the message to reply to", + "html_description": "A JSON-serialized object for description of the message to reply to", + "rst_description": "A JSON-serialized object for description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "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" + } +} diff --git a/.butcher/methods/sendContact/entity.json b/.butcher/methods/sendContact/entity.json index 315b35b9..d713e739 100644 --- a/.butcher/methods/sendContact/entity.json +++ b/.butcher/methods/sendContact/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -83,6 +91,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -91,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 d2faf000..0d001776 100644 --- a/.butcher/methods/sendDice/entity.json +++ b/.butcher/methods/sendDice/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -59,6 +67,14 @@ "rst_description": "Protects the contents of the sent message from forwarding\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -67,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 ca887f8e..320f1d54 100644 --- a/.butcher/methods/sendDocument/entity.json +++ b/.butcher/methods/sendDocument/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -107,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 0d83c915..594ed09f 100644 --- a/.butcher/methods/sendGame/entity.json +++ b/.butcher/methods/sendGame/entity.json @@ -22,17 +22,17 @@ { "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" }, { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, { @@ -59,6 +59,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, diff --git a/.butcher/methods/sendGift/entity.json b/.butcher/methods/sendGift/entity.json new file mode 100644 index 00000000..f8125fe1 --- /dev/null +++ b/.butcher/methods/sendGift/entity.json @@ -0,0 +1,73 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendgift", + "name": "sendGift", + "description": "Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.", + "html_description": "

Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.

", + "rst_description": "Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.", + "html_description": "Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.", + "rst_description": "Required if *chat_id* is not specified. Unique identifier of the target user who will receive the gift.\n", + "name": "user_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.", + "html_description": "Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.", + "rst_description": "Required if *user_id* is not specified. Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`) that will receive the gift.\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "Identifier of the gift; limited gifts can't be sent to channel chats", + "html_description": "Identifier of the gift; limited gifts can't be sent to channel chats", + "rst_description": "Identifier of the gift; limited gifts can't be sent to channel chats\n", + "name": "gift_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver", + "html_description": "Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver", + "rst_description": "Pass :code:`True` to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver\n", + "name": "pay_for_upgrade" + }, + { + "type": "String", + "required": false, + "description": "Text that will be shown along with the gift; 0-128 characters", + "html_description": "Text that will be shown along with the gift; 0-128 characters", + "rst_description": "Text that will be shown along with the gift; 0-128 characters\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.", + "html_description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.", + "rst_description": "Mode for parsing entities in the text. See `formatting options `_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n", + "name": "text_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.", + "html_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.", + "rst_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n", + "name": "text_entities" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendInvoice/entity.json b/.butcher/methods/sendInvoice/entity.json index 23eaaca8..99612e23 100644 --- a/.butcher/methods/sendInvoice/entity.json +++ b/.butcher/methods/sendInvoice/entity.json @@ -22,11 +22,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -46,9 +54,9 @@ { "type": "String", "required": true, - "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.\n", "name": "payload" }, { @@ -211,6 +219,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -219,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 0685980e..ede4fdbf 100644 --- a/.butcher/methods/sendLocation/entity.json +++ b/.butcher/methods/sendLocation/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -99,6 +107,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -107,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 91734565..841f9b77 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", @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -59,6 +67,14 @@ "rst_description": "Protects the contents of the sent messages from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, diff --git a/.butcher/methods/sendMessage/entity.json b/.butcher/methods/sendMessage/entity.json index 60ec3634..d4eff7f7 100644 --- a/.butcher/methods/sendMessage/entity.json +++ b/.butcher/methods/sendMessage/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -83,6 +91,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -91,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/sendMessageDraft/entity.json b/.butcher/methods/sendMessageDraft/entity.json new file mode 100644 index 00000000..b84bc368 --- /dev/null +++ b/.butcher/methods/sendMessageDraft/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendmessagedraft", + "name": "sendMessageDraft", + "description": "Use this method to stream a partial message to a user while the message is being generated. Returns True on success.", + "html_description": "

Use this method to stream a partial message to a user while the message is being generated. Returns True on success.

", + "rst_description": "Use this method to stream a partial message to a user while the message is being generated. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target private chat", + "html_description": "Unique identifier for the target private chat", + "rst_description": "Unique identifier for the target private chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread", + "html_description": "Unique identifier for the target message thread", + "rst_description": "Unique identifier for the target message thread\n", + "name": "message_thread_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated", + "html_description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated", + "rst_description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated\n", + "name": "draft_id" + }, + { + "type": "String", + "required": true, + "description": "Text of the message to be sent, 1-4096 characters after entities parsing", + "html_description": "Text of the message to be sent, 1-4096 characters after entities parsing", + "rst_description": "Text of the message to be sent, 1-4096 characters after entities parsing\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message text. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendPaidMedia/entity.json b/.butcher/methods/sendPaidMedia/entity.json index 4031c0ff..708eb6cd 100644 --- a/.butcher/methods/sendPaidMedia/entity.json +++ b/.butcher/methods/sendPaidMedia/entity.json @@ -7,24 +7,48 @@ "object": { "anchor": "sendpaidmedia", "name": "sendPaidMedia", - "description": "Use this method to send paid media to channel chats. On success, the sent Message is returned.", - "html_description": "

Use this method to send paid media to channel chats. On success, the sent Message is returned.

", - "rst_description": "Use this method to send paid media to channel chats. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "description": "Use this method to send paid media. On success, the sent Message is returned.", + "html_description": "

Use this method to send paid media. On success, the sent Message is returned.

", + "rst_description": "Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned.", "annotations": [ + { + "type": "String", + "required": false, + "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 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). 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.", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @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.", + "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 a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", + "name": "message_thread_id" + }, + { + "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, - "description": "The number of Telegram Stars that must be paid to buy access to the media", - "html_description": "The number of Telegram Stars that must be paid to buy access to the media", - "rst_description": "The number of Telegram Stars that must be paid to buy access to the media\n", + "description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000", + "html_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000", + "rst_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000\n", "name": "star_count" }, { @@ -35,6 +59,14 @@ "rst_description": "A JSON-serialized array describing the media to be sent; up to 10 items\n", "name": "media" }, + { + "type": "String", + "required": false, + "description": "Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "html_description": "Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "rst_description": "Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.\n", + "name": "payload" + }, { "type": "String", "required": false, @@ -83,6 +115,22 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "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 b7c6cdff..594f00e2 100644 --- a/.butcher/methods/sendPhoto/entity.json +++ b/.butcher/methods/sendPhoto/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -107,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/default.yml b/.butcher/methods/sendPoll/default.yml index 26ac273c..de1aec36 100644 --- a/.butcher/methods/sendPoll/default.yml +++ b/.butcher/methods/sendPoll/default.yml @@ -1,3 +1,4 @@ explanation_parse_mode: parse_mode question_parse_mode: parse_mode +description_parse_mode: parse_mode protect_content: protect_content diff --git a/.butcher/methods/sendPoll/entity.json b/.butcher/methods/sendPoll/entity.json index 106a6eac..39afab83 100644 --- a/.butcher/methods/sendPoll/entity.json +++ b/.butcher/methods/sendPoll/entity.json @@ -22,17 +22,17 @@ { "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" }, { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, { @@ -62,9 +62,9 @@ { "type": "Array of InputPollOption", "required": true, - "description": "A JSON-serialized list of 2-10 answer options", - "html_description": "A JSON-serialized list of 2-10 answer options", - "rst_description": "A JSON-serialized list of 2-10 answer options\n", + "description": "A JSON-serialized list of 2-12 answer options", + "html_description": "A JSON-serialized list of 2-12 answer options", + "rst_description": "A JSON-serialized list of 2-12 answer options\n", "name": "options" }, { @@ -86,18 +86,50 @@ { "type": "Boolean", "required": false, - "description": "True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False", - "html_description": "True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False", - "rst_description": ":code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False`\n", + "description": "Pass True, if the poll allows multiple answers, defaults to False", + "html_description": "Pass True, if the poll allows multiple answers, defaults to False", + "rst_description": "Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False`\n", "name": "allows_multiple_answers" }, { - "type": "Integer", + "type": "Boolean", "required": false, - "description": "0-based identifier of the correct answer option, required for polls in quiz mode", - "html_description": "0-based identifier of the correct answer option, required for polls in quiz mode", - "rst_description": "0-based identifier of the correct answer option, required for polls in quiz mode\n", - "name": "correct_option_id" + "description": "Pass True, if the poll allows to change chosen answer options, defaults to False for quizzes and to True for regular polls", + "html_description": "Pass True, if the poll allows to change chosen answer options, defaults to False for quizzes and to True for regular polls", + "rst_description": "Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls\n", + "name": "allows_revoting" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the poll options must be shown in random order", + "html_description": "Pass True, if the poll options must be shown in random order", + "rst_description": "Pass :code:`True`, if the poll options must be shown in random order\n", + "name": "shuffle_options" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes", + "html_description": "Pass True, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes", + "rst_description": "Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes\n", + "name": "allow_adding_options" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if poll results must be shown only after the poll closes", + "html_description": "Pass True, if poll results must be shown only after the poll closes", + "rst_description": "Pass :code:`True`, if poll results must be shown only after the poll closes\n", + "name": "hide_results_until_closes" + }, + { + "type": "Array of Integer", + "required": false, + "description": "A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode", + "html_description": "A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode", + "rst_description": "A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode\n", + "name": "correct_option_ids" }, { "type": "String", @@ -126,17 +158,17 @@ { "type": "Integer", "required": false, - "description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.", - "html_description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.", - "rst_description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*.\n", + "description": "Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with close_date.", + "html_description": "Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with close_date.", + "rst_description": "Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*.\n", "name": "open_period" }, { "type": "Integer", "required": false, - "description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.", - "html_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.", - "rst_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*.\n", + "description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with open_period.", + "html_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with open_period.", + "rst_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*.\n", "name": "close_date" }, { @@ -147,6 +179,30 @@ "rst_description": "Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview.\n", "name": "is_closed" }, + { + "type": "String", + "required": false, + "description": "Description of the poll to be sent, 0-1024 characters after entities parsing", + "html_description": "Description of the poll to be sent, 0-1024 characters after entities parsing", + "rst_description": "Description of the poll to be sent, 0-1024 characters after entities parsing\n", + "name": "description" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the poll description. See formatting options for more details.", + "html_description": "Mode for parsing entities in the poll description. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the poll description. See `formatting options `_ for more details.\n", + "name": "description_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of description_parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of description_parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode*\n", + "name": "description_entities" + }, { "type": "Boolean", "required": false, @@ -163,6 +219,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -199,6 +263,18 @@ "release_date": "2023-12-29" } }, + { + "type": "Integer", + "required": false, + "description": "0-based identifier of the correct answer option, required for polls in quiz mode", + "html_description": "0-based identifier of the correct answer option, required for polls in quiz mode", + "rst_description": "0-based identifier of the correct answer option, required for polls in quiz mode\n", + "name": "correct_option_id", + "deprecated": { + "version": "9.6", + "release_date": "2026-04-03" + } + }, { "type": "Integer", "required": false, diff --git a/.butcher/methods/sendSticker/entity.json b/.butcher/methods/sendSticker/entity.json index e14bac32..b922d274 100644 --- a/.butcher/methods/sendSticker/entity.json +++ b/.butcher/methods/sendSticker/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -67,6 +75,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -75,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 18b869d1..6475e4b4 100644 --- a/.butcher/methods/sendVenue/entity.json +++ b/.butcher/methods/sendVenue/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -123,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 b6f21f09..68391db5 100644 --- a/.butcher/methods/sendVideo/entity.json +++ b/.butcher/methods/sendVideo/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -75,6 +83,22 @@ "rst_description": "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 » `\n", "name": "thumbnail" }, + { + "type": "InputFile or String", + "required": false, + "description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `\n", + "name": "cover" + }, + { + "type": "Integer", + "required": false, + "description": "Start timestamp for the video in the message", + "html_description": "Start timestamp for the video in the message", + "rst_description": "Start timestamp for the video in the message\n", + "name": "start_timestamp" + }, { "type": "String", "required": false, @@ -139,6 +163,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -147,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/sendVideo/replace.yml b/.butcher/methods/sendVideo/replace.yml index ef7db8ff..044eceda 100644 --- a/.butcher/methods/sendVideo/replace.yml +++ b/.butcher/methods/sendVideo/replace.yml @@ -5,3 +5,13 @@ annotations: references: category: types name: InputFile + start_timestamp: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/methods/sendVideoNote/entity.json b/.butcher/methods/sendVideoNote/entity.json index a9529783..5f15f5e8 100644 --- a/.butcher/methods/sendVideoNote/entity.json +++ b/.butcher/methods/sendVideoNote/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -91,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 e3464acd..fa28daad 100644 --- a/.butcher/methods/sendVoice/entity.json +++ b/.butcher/methods/sendVoice/entity.json @@ -30,11 +30,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -91,6 +99,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -99,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 new file mode 100644 index 00000000..f57fa89b --- /dev/null +++ b/.butcher/methods/setBusinessAccountBio/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setbusinessaccountbio", + "name": "setBusinessAccountBio", + "description": "Changes the bio of a managed business account. Requires the can_change_bio business bot right. Returns True on success.", + "html_description": "

Changes the bio of a managed business account. Requires the can_change_bio business bot right. Returns True on success.

", + "rst_description": "Changes the bio of a managed business account. Requires the *can_change_bio* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": false, + "description": "The new value of the bio for the business account; 0-140 characters", + "html_description": "The new value of the bio for the business account; 0-140 characters", + "rst_description": "The new value of the bio for the business account; 0-140 characters\n", + "name": "bio" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setBusinessAccountGiftSettings/entity.json b/.butcher/methods/setBusinessAccountGiftSettings/entity.json new file mode 100644 index 00000000..7eee629a --- /dev/null +++ b/.butcher/methods/setBusinessAccountGiftSettings/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setbusinessaccountgiftsettings", + "name": "setBusinessAccountGiftSettings", + "description": "Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the can_change_gift_settings business bot right. Returns True on success.", + "html_description": "

Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the can_change_gift_settings business bot right. Returns True on success.

", + "rst_description": "Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the *can_change_gift_settings* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field", + "html_description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field", + "rst_description": "Pass :code:`True`, if a button for sending a gift to the user or by the business account must always be shown in the input field\n", + "name": "show_gift_button" + }, + { + "type": "AcceptedGiftTypes", + "required": true, + "description": "Types of gifts accepted by the business account", + "html_description": "Types of gifts accepted by the business account", + "rst_description": "Types of gifts accepted by the business account\n", + "name": "accepted_gift_types" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setBusinessAccountName/entity.json b/.butcher/methods/setBusinessAccountName/entity.json new file mode 100644 index 00000000..17ca94ac --- /dev/null +++ b/.butcher/methods/setBusinessAccountName/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setbusinessaccountname", + "name": "setBusinessAccountName", + "description": "Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.", + "html_description": "

Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.

", + "rst_description": "Changes the first and last name of a managed business account. Requires the *can_change_name* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": true, + "description": "The new value of the first name for the business account; 1-64 characters", + "html_description": "The new value of the first name for the business account; 1-64 characters", + "rst_description": "The new value of the first name for the business account; 1-64 characters\n", + "name": "first_name" + }, + { + "type": "String", + "required": false, + "description": "The new value of the last name for the business account; 0-64 characters", + "html_description": "The new value of the last name for the business account; 0-64 characters", + "rst_description": "The new value of the last name for the business account; 0-64 characters\n", + "name": "last_name" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setBusinessAccountProfilePhoto/entity.json b/.butcher/methods/setBusinessAccountProfilePhoto/entity.json new file mode 100644 index 00000000..f9acf75e --- /dev/null +++ b/.butcher/methods/setBusinessAccountProfilePhoto/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setbusinessaccountprofilephoto", + "name": "setBusinessAccountProfilePhoto", + "description": "Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.", + "html_description": "

Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.

", + "rst_description": "Changes the profile photo of a managed business account. Requires the *can_edit_profile_photo* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "InputProfilePhoto", + "required": true, + "description": "The new profile photo to set", + "html_description": "The new profile photo to set", + "rst_description": "The new profile photo to set\n", + "name": "photo" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.", + "html_description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.", + "rst_description": "Pass :code:`True` to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.\n", + "name": "is_public" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setBusinessAccountUsername/entity.json b/.butcher/methods/setBusinessAccountUsername/entity.json new file mode 100644 index 00000000..fde1e5db --- /dev/null +++ b/.butcher/methods/setBusinessAccountUsername/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setbusinessaccountusername", + "name": "setBusinessAccountUsername", + "description": "Changes the username of a managed business account. Requires the can_change_username business bot right. Returns True on success.", + "html_description": "

Changes the username of a managed business account. Requires the can_change_username business bot right. Returns True on success.

", + "rst_description": "Changes the username of a managed business account. Requires the *can_change_username* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": false, + "description": "The new value of the username for the business account; 0-32 characters", + "html_description": "The new value of the username for the business account; 0-32 characters", + "rst_description": "The new value of the username for the business account; 0-32 characters\n", + "name": "username" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatMemberTag/entity.json b/.butcher/methods/setChatMemberTag/entity.json new file mode 100644 index 00000000..5de6b59f --- /dev/null +++ b/.butcher/methods/setChatMemberTag/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatmembertag", + "name": "setChatMemberTag", + "description": "Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the can_manage_tags administrator right. Returns True on success.", + "html_description": "

Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the can_manage_tags administrator right. Returns True on success.

", + "rst_description": "Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the *can_manage_tags* administrator right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "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", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "String", + "required": false, + "description": "New tag for the member; 0-16 characters, emoji are not allowed", + "html_description": "New tag for the member; 0-16 characters, emoji are not allowed", + "rst_description": "New tag for the member; 0-16 characters, emoji are not allowed\n", + "name": "tag" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setMessageReaction/entity.json b/.butcher/methods/setMessageReaction/entity.json index e26f914c..98c0ebe1 100644 --- a/.butcher/methods/setMessageReaction/entity.json +++ b/.butcher/methods/setMessageReaction/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "setmessagereaction", "name": "setMessageReaction", - "description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.", - "html_description": "

Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.

", - "rst_description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns :code:`True` on success.", + "description": "Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.", + "html_description": "

Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.

", + "rst_description": "Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", @@ -30,9 +30,9 @@ { "type": "Array of ReactionType", "required": false, - "description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.", - "html_description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.", - "rst_description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.\n", + "description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.", + "html_description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.", + "rst_description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.\n", "name": "reaction" }, { diff --git a/.butcher/methods/setMyProfilePhoto/entity.json b/.butcher/methods/setMyProfilePhoto/entity.json new file mode 100644 index 00000000..53f4ab44 --- /dev/null +++ b/.butcher/methods/setMyProfilePhoto/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setmyprofilephoto", + "name": "setMyProfilePhoto", + "description": "Changes the profile photo of the bot. Returns True on success.", + "html_description": "

Changes the profile photo of the bot. Returns True on success.

", + "rst_description": "Changes the profile photo of the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "InputProfilePhoto", + "required": true, + "description": "The new profile photo to set", + "html_description": "The new profile photo to set", + "rst_description": "The new profile photo to set\n", + "name": "photo" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerSetThumbnail/entity.json b/.butcher/methods/setStickerSetThumbnail/entity.json index aa49f0de..4d2e6add 100644 --- a/.butcher/methods/setStickerSetThumbnail/entity.json +++ b/.butcher/methods/setStickerSetThumbnail/entity.json @@ -30,17 +30,17 @@ { "type": "InputFile or String", "required": false, - "description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, 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. More information on Sending Files. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", - "html_description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, 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. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", - "rst_description": "A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, 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 » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.\n", + "description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animation-requirements for animated sticker technical requirements), or a .WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, 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. More information on Sending Files. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", + "html_description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animation-requirements for animated sticker technical requirements), or a .WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, 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. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", + "rst_description": "A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animation-requirements `_`https://core.telegram.org/stickers#animation-requirements `_ for animated sticker technical requirements), or a **.WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-requirements `_`https://core.telegram.org/stickers#video-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, 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 » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.\n", "name": "thumbnail" }, { "type": "String", "required": true, - "description": "Format of the thumbnail, must be one of 'static' for a .WEBP or .PNG image, 'animated' for a .TGS animation, or 'video' for a WEBM video", - "html_description": "Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a WEBM video", - "rst_description": "Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **WEBM** video\n", + "description": "Format of the thumbnail, must be one of 'static' for a .WEBP or .PNG image, 'animated' for a .TGS animation, or 'video' for a .WEBM video", + "html_description": "Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a .WEBM video", + "rst_description": "Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **.WEBM** video\n", "name": "format" } ], diff --git a/.butcher/methods/setUserEmojiStatus/entity.json b/.butcher/methods/setUserEmojiStatus/entity.json new file mode 100644 index 00000000..b7dd1ab6 --- /dev/null +++ b/.butcher/methods/setUserEmojiStatus/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setuseremojistatus", + "name": "setUserEmojiStatus", + "description": "Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.", + "html_description": "

Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.

", + "rst_description": "Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method `requestEmojiStatusAccess `_. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "String", + "required": false, + "description": "Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.", + "html_description": "Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.", + "rst_description": "Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.\n", + "name": "emoji_status_custom_emoji_id" + }, + { + "type": "Integer", + "required": false, + "description": "Expiration date of the emoji status, if any", + "html_description": "Expiration date of the emoji status, if any", + "rst_description": "Expiration date of the emoji status, if any\n", + "name": "emoji_status_expiration_date" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setUserEmojiStatus/replace.yml b/.butcher/methods/setUserEmojiStatus/replace.yml new file mode 100644 index 00000000..0507a6df --- /dev/null +++ b/.butcher/methods/setUserEmojiStatus/replace.yml @@ -0,0 +1,11 @@ +annotations: + emoji_status_expiration_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/setWebhook/entity.json b/.butcher/methods/setWebhook/entity.json index 7233fec6..0532b3de 100644 --- a/.butcher/methods/setWebhook/entity.json +++ b/.butcher/methods/setWebhook/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "setwebhook", "name": "setWebhook", - "description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\nNotes\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.\nIf you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.", - "html_description": "

Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.

If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.

\n

Notes
\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.
\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.

\n

If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.

\n
", - "rst_description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\n\n **Notes**\n \n **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up.\n \n **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work.\n \n **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**.\n If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_.", + "description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request (a request with response HTTP status code different from 2XY), we will repeat the request and give up after a reasonable amount of attempts. Returns True on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\nNotes\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.\nIf you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.", + "html_description": "

Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request (a request with response HTTP status code different from 2XY), we will repeat the request and give up after a reasonable amount of attempts. Returns True on success.

If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.

\n

Notes
\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.
\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.

\n

If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.

\n
", + "rst_description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request (a request with response `HTTP status code `_ different from :code:`2XY`), we will repeat the request and give up after a reasonable amount of attempts. Returns :code:`True` on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\n\n **Notes**\n \n **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up.\n \n **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work.\n \n **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**.\n If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_.", "annotations": [ { "type": "String", diff --git a/.butcher/methods/transferBusinessAccountStars/entity.json b/.butcher/methods/transferBusinessAccountStars/entity.json new file mode 100644 index 00000000..c85d98a0 --- /dev/null +++ b/.butcher/methods/transferBusinessAccountStars/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "transferbusinessaccountstars", + "name": "transferBusinessAccountStars", + "description": "Transfers Telegram Stars from the business account balance to the bot's balance. Requires the can_transfer_stars business bot right. Returns True on success.", + "html_description": "

Transfers Telegram Stars from the business account balance to the bot's balance. Requires the can_transfer_stars business bot right. Returns True on success.

", + "rst_description": "Transfers Telegram Stars from the business account balance to the bot's balance. Requires the *can_transfer_stars* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Number of Telegram Stars to transfer; 1-10000", + "html_description": "Number of Telegram Stars to transfer; 1-10000", + "rst_description": "Number of Telegram Stars to transfer; 1-10000\n", + "name": "star_count" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/transferGift/entity.json b/.butcher/methods/transferGift/entity.json new file mode 100644 index 00000000..16601cb2 --- /dev/null +++ b/.butcher/methods/transferGift/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "transfergift", + "name": "transferGift", + "description": "Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business bot right. Requires can_transfer_stars business bot right if the transfer is paid. Returns True on success.", + "html_description": "

Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business bot right. Requires can_transfer_stars business bot right if the transfer is paid. Returns True on success.

", + "rst_description": "Transfers an owned unique gift to another user. Requires the *can_transfer_and_upgrade_gifts* business bot right. Requires *can_transfer_stars* business bot right if the transfer is paid. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": true, + "description": "Unique identifier of the regular gift that should be transferred", + "html_description": "Unique identifier of the regular gift that should be transferred", + "rst_description": "Unique identifier of the regular gift that should be transferred\n", + "name": "owned_gift_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours.", + "html_description": "Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours.", + "rst_description": "Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours.\n", + "name": "new_owner_chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the can_transfer_stars business bot right is required.", + "html_description": "The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the can_transfer_stars business bot right is required.", + "rst_description": "The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the *can_transfer_stars* business bot right is required.\n", + "name": "star_count" + } + ], + "category": "methods" + } +} 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/unpinAllForumTopicMessages/entity.json b/.butcher/methods/unpinAllForumTopicMessages/entity.json index dc46ec72..b3b32d03 100644 --- a/.butcher/methods/unpinAllForumTopicMessages/entity.json +++ b/.butcher/methods/unpinAllForumTopicMessages/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "unpinallforumtopicmessages", "name": "unpinAllForumTopicMessages", - "description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.", - "html_description": "

Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.

", - "rst_description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.", + "description": "Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.", + "html_description": "

Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.

", + "rst_description": "Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", diff --git a/.butcher/methods/unpinChatMessage/entity.json b/.butcher/methods/unpinChatMessage/entity.json index 90c2dc11..93f9d8b8 100644 --- a/.butcher/methods/unpinChatMessage/entity.json +++ b/.butcher/methods/unpinChatMessage/entity.json @@ -7,10 +7,18 @@ "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", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message will be unpinned", + "html_description": "Unique identifier of the business connection on behalf of which the message will be unpinned", + "rst_description": "Unique identifier of the business connection on behalf of which the message will be unpinned\n", + "name": "business_connection_id" + }, { "type": "Integer or String", "required": true, @@ -22,9 +30,9 @@ { "type": "Integer", "required": false, - "description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.", - "html_description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.", - "rst_description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.\n", + "description": "Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.", + "html_description": "Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.", + "rst_description": "Identifier of the message to unpin. Required if *business_connection_id* is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.\n", "name": "message_id" } ], diff --git a/.butcher/methods/upgradeGift/entity.json b/.butcher/methods/upgradeGift/entity.json new file mode 100644 index 00000000..97115110 --- /dev/null +++ b/.butcher/methods/upgradeGift/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "upgradegift", + "name": "upgradeGift", + "description": "Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right. Additionally requires the can_transfer_stars business bot right if the upgrade is paid. Returns True on success.", + "html_description": "

Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right. Additionally requires the can_transfer_stars business bot right if the upgrade is paid. Returns True on success.

", + "rst_description": "Upgrades a given regular gift to a unique gift. Requires the *can_transfer_and_upgrade_gifts* business bot right. Additionally requires the *can_transfer_stars* business bot right if the upgrade is paid. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": true, + "description": "Unique identifier of the regular gift that should be upgraded to a unique one", + "html_description": "Unique identifier of the regular gift that should be upgraded to a unique one", + "rst_description": "Unique identifier of the regular gift that should be upgraded to a unique one\n", + "name": "owned_gift_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift", + "html_description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift", + "rst_description": "Pass :code:`True` to keep the original gift text, sender and receiver in the upgraded gift\n", + "name": "keep_original_details" + }, + { + "type": "Integer", + "required": false, + "description": "The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If gift.prepaid_upgrade_star_count > 0, then pass 0, otherwise, the can_transfer_stars business bot right is required and gift.upgrade_star_count must be passed.", + "html_description": "The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If gift.prepaid_upgrade_star_count > 0, then pass 0, otherwise, the can_transfer_stars business bot right is required and gift.upgrade_star_count must be passed.", + "rst_description": "The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If :code:`gift.prepaid_upgrade_star_count > 0`, then pass 0, otherwise, the *can_transfer_stars* business bot right is required and :code:`gift.upgrade_star_count` must be passed.\n", + "name": "star_count" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/verifyChat/entity.json b/.butcher/methods/verifyChat/entity.json new file mode 100644 index 00000000..bee984b9 --- /dev/null +++ b/.butcher/methods/verifyChat/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "verifychat", + "name": "verifyChat", + "description": "Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.", + "html_description": "

Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.

", + "rst_description": "Verifies a chat `on behalf of the organization `_ which is represented by the bot. 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). 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" + }, + { + "type": "String", + "required": false, + "description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.", + "html_description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.", + "rst_description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.\n", + "name": "custom_description" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/verifyUser/entity.json b/.butcher/methods/verifyUser/entity.json new file mode 100644 index 00000000..61a57c6b --- /dev/null +++ b/.butcher/methods/verifyUser/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "verifyuser", + "name": "verifyUser", + "description": "Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.", + "html_description": "

Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.

", + "rst_description": "Verifies a user `on behalf of the organization `_ which is represented by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "String", + "required": false, + "description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.", + "html_description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.", + "rst_description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.\n", + "name": "custom_description" + } + ], + "category": "methods" + } +} diff --git a/.butcher/schema/schema.json b/.butcher/schema/schema.json index 11b2712c..1d64c596 100644 --- a/.butcher/schema/schema.json +++ b/.butcher/schema/schema.json @@ -1,7 +1,7 @@ { "api": { - "version": "7.6", - "release_date": "2024-07-01" + "version": "9.6", + "release_date": "2026-04-03" }, "items": [ { @@ -143,6 +143,14 @@ "name": "pre_checkout_query", "required": false }, + { + "type": "PaidMediaPurchased", + "description": "A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat", + "html_description": "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat", + "rst_description": "*Optional*. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat\n", + "name": "purchased_paid_media", + "required": false + }, { "type": "Poll", "description": "New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot", @@ -198,6 +206,14 @@ "rst_description": "*Optional*. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.\n", "name": "removed_chat_boost", "required": false + }, + { + "type": "ManagedBotUpdated", + "description": "A new bot was created to be managed by the bot or token of a bot was changed", + "html_description": "Optional. A new bot was created to be managed by the bot or token of a bot was changed", + "rst_description": "*Optional*. A new bot was created to be managed by the bot or token of a bot was changed\n", + "name": "managed_bot", + "required": false } ], "category": "types" @@ -236,9 +252,9 @@ { "type": "Array of String", "required": false, - "description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\"message\", \"edited_channel_post\", \"callback_query\"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.\n\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.", - "html_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\"message\", \"edited_channel_post\", \"callback_query\"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.
\n
\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.", - "rst_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`[\"message\", \"edited_channel_post\", \"callback_query\"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used.\n\n\n\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.\n", + "description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\"message\", \"edited_channel_post\", \"callback_query\"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.\n\nPlease note that this parameter doesn't affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time.", + "html_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\"message\", \"edited_channel_post\", \"callback_query\"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.
\n
\nPlease note that this parameter doesn't affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time.", + "rst_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`[\"message\", \"edited_channel_post\", \"callback_query\"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used.\n\n\n\nPlease note that this parameter doesn't affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time.\n", "name": "allowed_updates" } ], @@ -247,9 +263,9 @@ { "anchor": "setwebhook", "name": "setWebhook", - "description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\nNotes\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.\nIf you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.", - "html_description": "

Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.

If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.

\n

Notes
\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.
\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.

\n

If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.

\n
", - "rst_description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\n\n **Notes**\n \n **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up.\n \n **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work.\n \n **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**.\n If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_.", + "description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request (a request with response HTTP status code different from 2XY), we will repeat the request and give up after a reasonable amount of attempts. Returns True on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\nNotes\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.\nIf you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.", + "html_description": "

Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request (a request with response HTTP status code different from 2XY), we will repeat the request and give up after a reasonable amount of attempts. Returns True on success.

If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.

\n

Notes
\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.
\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.

\n

If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.

\n
", + "rst_description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request (a request with response `HTTP status code `_ different from :code:`2XY`), we will repeat the request and give up after a reasonable amount of attempts. Returns :code:`True` on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\n\n **Notes**\n \n **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up.\n \n **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work.\n \n **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**.\n If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_.", "annotations": [ { "type": "String", @@ -528,6 +544,38 @@ "rst_description": "*Optional*. :code:`True`, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", "name": "can_connect_to_business", "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot has a main Web App. Returned only in getMe.", + "html_description": "Optional. True, if the bot has a main Web App. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot has a main Web App. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "has_main_web_app", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.", + "html_description": "Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot has forum topic mode enabled in private chats. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "has_topics_enabled", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.", + "html_description": "Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot allows users to create and delete topics in private chats. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "allows_users_to_create_topics", + "required": false + }, + { + "type": "Boolean", + "description": "True, if other bots can be created to be controlled by the bot. Returned only in getMe.", + "html_description": "Optional. True, if other bots can be created to be controlled by the bot. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if other bots can be created to be controlled by the bot. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "can_manage_bots", + "required": false } ], "category": "types" @@ -594,6 +642,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" @@ -661,6 +717,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.", @@ -733,6 +797,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.", @@ -853,6 +925,14 @@ "name": "permissions", "required": false }, + { + "type": "AcceptedGiftTypes", + "description": "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats", + "html_description": "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats", + "rst_description": "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats\n", + "name": "accepted_gift_types", + "required": true + }, { "type": "True", "description": "True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.", @@ -956,6 +1036,38 @@ "rst_description": "*Optional*. For supergroups, the location to which the supergroup is connected\n", "name": "location", "required": false + }, + { + "type": "UserRating", + "description": "For private chats, the rating of the user if any", + "html_description": "Optional. For private chats, the rating of the user if any", + "rst_description": "*Optional*. For private chats, the rating of the user if any\n", + "name": "rating", + "required": false + }, + { + "type": "Audio", + "description": "For private chats, the first audio added to the profile of the user", + "html_description": "Optional. For private chats, the first audio added to the profile of the user", + "rst_description": "*Optional*. For private chats, the first audio added to the profile of the user\n", + "name": "first_profile_audio", + "required": false + }, + { + "type": "UniqueGiftColors", + "description": "The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews", + "html_description": "Optional. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews", + "rst_description": "*Optional*. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews\n", + "name": "unique_gift_colors", + "required": false + }, + { + "type": "Integer", + "description": "The number of Telegram Stars a general user have to pay to send a message to the chat", + "html_description": "Optional. The number of Telegram Stars a general user have to pay to send a message to the chat", + "rst_description": "*Optional*. The number of Telegram Stars a general user have to pay to send a message to the chat\n", + "name": "paid_message_star_count", + "required": false } ], "category": "types" @@ -969,33 +1081,41 @@ "annotations": [ { "type": "Integer", - "description": "Unique message identifier inside this chat", - "html_description": "Unique message identifier inside this chat", - "rst_description": "Unique message identifier inside this chat\n", + "description": "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent", + "html_description": "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent", + "rst_description": "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent\n", "name": "message_id", "required": true }, { "type": "Integer", - "description": "Unique identifier of a message thread to which the message belongs; for supergroups only", - "html_description": "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only", - "rst_description": "*Optional*. Unique identifier of a message thread to which the message belongs; for supergroups only\n", + "description": "Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only", + "html_description": "Optional. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only", + "rst_description": "*Optional*. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only\n", "name": "message_thread_id", "required": false }, + { + "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; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", - "html_description": "Optional. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", - "rst_description": "*Optional*. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.\n", + "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", + "html_description": "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", + "rst_description": "*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\n", "name": "from", "required": false }, { "type": "Chat", - "description": "Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", - "html_description": "Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", - "rst_description": "*Optional*. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field *from* contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.\n", + "description": "Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.", + "html_description": "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.", + "rst_description": "*Optional*. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field *from* contains a fake sender user in non-channel chats.\n", "name": "sender_chat", "required": false }, @@ -1015,6 +1135,14 @@ "name": "sender_business_bot", "required": false }, + { + "type": "String", + "description": "Tag or custom title of the sender of the message; for supergroups only", + "html_description": "Optional. Tag or custom title of the sender of the message; for supergroups only", + "rst_description": "*Optional*. Tag or custom title of the sender of the message; for supergroups only\n", + "name": "sender_tag", + "required": false + }, { "type": "Integer", "description": "Date the message was sent in Unix time. It is always a positive number, representing a valid date.", @@ -1049,9 +1177,9 @@ }, { "type": "True", - "description": "True, if the message is sent to a forum topic", - "html_description": "Optional. True, if the message is sent to a forum topic", - "rst_description": "*Optional*. :code:`True`, if the message is sent to a forum topic\n", + "description": "True, if the message is sent to a topic in a forum supergroup or a private chat with the bot", + "html_description": "Optional. True, if the message is sent to a topic in a forum supergroup or a private chat with the bot", + "rst_description": "*Optional*. :code:`True`, if the message is sent to a topic in a forum supergroup or a private chat with the bot\n", "name": "is_topic_message", "required": false }, @@ -1066,8 +1194,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 }, @@ -1095,6 +1223,22 @@ "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": "String", + "description": "Persistent identifier of the specific poll option that is being replied to", + "html_description": "Optional. Persistent identifier of the specific poll option that is being replied to", + "rst_description": "*Optional*. Persistent identifier of the specific poll option that is being replied to\n", + "name": "reply_to_poll_option_id", + "required": false + }, { "type": "User", "description": "Bot through which the message was sent", @@ -1122,16 +1266,24 @@ { "type": "True", "description": "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", - "html_description": "Optional. 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", - "rst_description": "*Optional*. 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\n", + "html_description": "Optional. 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", + "rst_description": "*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\n", "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", - "html_description": "Optional. The unique identifier of a media message group this message belongs to", - "rst_description": "*Optional*. The unique identifier of a media message group this message belongs to\n", + "description": "The unique identifier inside this chat of a media message group this message belongs to", + "html_description": "Optional. The unique identifier inside this chat of a media message group this message belongs to", + "rst_description": "*Optional*. The unique identifier inside this chat of a media message group this message belongs to\n", "name": "media_group_id", "required": false }, @@ -1143,6 +1295,14 @@ "name": "author_signature", "required": false }, + { + "type": "Integer", + "description": "The number of Telegram Stars that were paid by the sender of the message to send it", + "html_description": "Optional. The number of Telegram Stars that were paid by the sender of the message to send it", + "rst_description": "*Optional*. The number of Telegram Stars that were paid by the sender of the message to send it\n", + "name": "paid_star_count", + "required": false + }, { "type": "String", "description": "For text messages, the actual UTF-8 text of the message", @@ -1167,6 +1327,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", @@ -1274,8 +1442,8 @@ { "type": "True", "description": "True, if the caption must be shown above the message media", - "html_description": "Optional. True, if the caption must be shown above the message media", - "rst_description": "*Optional*. True, if the caption must be shown above the message media\n", + "html_description": "Optional. True, if the caption must be shown above the message media", + "rst_description": "*Optional*. :code:`True`, if the caption must be shown above the message media\n", "name": "show_caption_above_media", "required": false }, @@ -1287,6 +1455,14 @@ "name": "has_media_spoiler", "required": false }, + { + "type": "Checklist", + "description": "Message is a checklist", + "html_description": "Optional. Message is a checklist", + "rst_description": "*Optional*. Message is a checklist\n", + "name": "checklist", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", @@ -1351,6 +1527,22 @@ "name": "left_chat_member", "required": false }, + { + "type": "ChatOwnerLeft", + "description": "Service message: chat owner has left", + "html_description": "Optional. Service message: chat owner has left", + "rst_description": "*Optional*. Service message: chat owner has left\n", + "name": "chat_owner_left", + "required": false + }, + { + "type": "ChatOwnerChanged", + "description": "Service message: chat owner has changed", + "html_description": "Optional. Service message: chat owner has changed", + "rst_description": "*Optional*. Service message: chat owner has changed\n", + "name": "chat_owner_changed", + "required": false + }, { "type": "String", "description": "A chat title was changed to this value", @@ -1426,8 +1618,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 }, @@ -1447,6 +1639,14 @@ "name": "successful_payment", "required": false }, + { + "type": "RefundedPayment", + "description": "Message is a service message about a refunded payment, information about the payment.", + "html_description": "Optional. Message is a service message about a refunded payment, information about the payment. More about payments »", + "rst_description": "*Optional*. Message is a service message about a refunded payment, information about the payment. `More about payments » `_\n", + "name": "refunded_payment", + "required": false + }, { "type": "UsersShared", "description": "Service message: users were shared with the bot", @@ -1463,6 +1663,30 @@ "name": "chat_shared", "required": false }, + { + "type": "GiftInfo", + "description": "Service message: a regular gift was sent or received", + "html_description": "Optional. Service message: a regular gift was sent or received", + "rst_description": "*Optional*. Service message: a regular gift was sent or received\n", + "name": "gift", + "required": false + }, + { + "type": "UniqueGiftInfo", + "description": "Service message: a unique gift was sent or received", + "html_description": "Optional. Service message: a unique gift was sent or received", + "rst_description": "*Optional*. Service message: a unique gift was sent or received\n", + "name": "unique_gift", + "required": false + }, + { + "type": "GiftInfo", + "description": "Service message: upgrade of a gift was purchased after the gift was sent", + "html_description": "Optional. Service message: upgrade of a gift was purchased after the gift was sent", + "rst_description": "*Optional*. Service message: upgrade of a gift was purchased after the gift was sent\n", + "name": "gift_upgrade_sent", + "required": false + }, { "type": "String", "description": "The domain name of the website on which the user has logged in.", @@ -1511,6 +1735,30 @@ "name": "chat_background_set", "required": false }, + { + "type": "ChecklistTasksDone", + "description": "Service message: some tasks in a checklist were marked as done or not done", + "html_description": "Optional. Service message: some tasks in a checklist were marked as done or not done", + "rst_description": "*Optional*. Service message: some tasks in a checklist were marked as done or not done\n", + "name": "checklist_tasks_done", + "required": false + }, + { + "type": "ChecklistTasksAdded", + "description": "Service message: tasks were added to a checklist", + "html_description": "Optional. Service message: tasks were added to a checklist", + "rst_description": "*Optional*. Service message: tasks were added to a checklist\n", + "name": "checklist_tasks_added", + "required": false + }, + { + "type": "DirectMessagePriceChanged", + "description": "Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed", + "html_description": "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed", + "rst_description": "*Optional*. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed\n", + "name": "direct_message_price_changed", + "required": false + }, { "type": "ForumTopicCreated", "description": "Service message: forum topic created", @@ -1591,6 +1839,78 @@ "name": "giveaway_completed", "required": false }, + { + "type": "ManagedBotCreated", + "description": "Service message: user created a bot that will be managed by the current bot", + "html_description": "Optional. Service message: user created a bot that will be managed by the current bot", + "rst_description": "*Optional*. Service message: user created a bot that will be managed by the current bot\n", + "name": "managed_bot_created", + "required": false + }, + { + "type": "PaidMessagePriceChanged", + "description": "Service message: the price for paid messages has changed in the chat", + "html_description": "Optional. Service message: the price for paid messages has changed in the chat", + "rst_description": "*Optional*. Service message: the price for paid messages has changed in the chat\n", + "name": "paid_message_price_changed", + "required": false + }, + { + "type": "PollOptionAdded", + "description": "Service message: answer option was added to a poll", + "html_description": "Optional. Service message: answer option was added to a poll", + "rst_description": "*Optional*. Service message: answer option was added to a poll\n", + "name": "poll_option_added", + "required": false + }, + { + "type": "PollOptionDeleted", + "description": "Service message: answer option was deleted from a poll", + "html_description": "Optional. Service message: answer option was deleted from a poll", + "rst_description": "*Optional*. Service message: answer option was deleted from a poll\n", + "name": "poll_option_deleted", + "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", @@ -1634,8 +1954,8 @@ { "type": "InlineKeyboardMarkup", "description": "Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.", - "html_description": "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.", - "rst_description": "*Optional*. Inline keyboard attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.\n", + "html_description": "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.\n", "name": "reply_markup", "required": false } @@ -1651,9 +1971,9 @@ "annotations": [ { "type": "Integer", - "description": "Unique message identifier", - "html_description": "Unique message identifier", - "rst_description": "Unique message identifier\n", + "description": "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent", + "html_description": "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent", + "rst_description": "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent\n", "name": "message_id", "required": true } @@ -1712,9 +2032,9 @@ "annotations": [ { "type": "String", - "description": "Type of the entity. Currently, can be 'mention' (@username), 'hashtag' (#hashtag), 'cashtag' ($USD), 'bot_command' (/start@jobs_bot), 'url' (https://telegram.org), 'email' (do-not-reply@telegram.org), 'phone_number' (+1-212-555-0123), 'bold' (bold text), 'italic' (italic text), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'expandable_blockquote' (collapsed-by-default block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users without usernames), 'custom_emoji' (for inline custom emoji stickers)", - "html_description": "Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)", - "rst_description": "Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag`), 'cashtag' (:code:`$USD`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'expandable_blockquote' (collapsed-by-default block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames `_), 'custom_emoji' (for inline custom emoji stickers)\n", + "description": "Type of the entity. Currently, can be 'mention' (@username), 'hashtag' (#hashtag or #hashtag@chatusername), 'cashtag' ($USD or $USD@chatusername), 'bot_command' (/start@jobs_bot), 'url' (https://telegram.org), 'email' (do-not-reply@telegram.org), 'phone_number' (+1-212-555-0123), 'bold' (bold text), 'italic' (italic text), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'expandable_blockquote' (collapsed-by-default block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users without usernames), 'custom_emoji' (for inline custom emoji stickers), or 'date_time' (for formatted date and time)", + "html_description": "Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag or #hashtag@chatusername), “cashtag” ($USD or $USD@chatusername), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers), or “date_time” (for formatted date and time)", + "rst_description": "Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag` or :code:`#hashtag@chatusername`), 'cashtag' (:code:`$USD` or :code:`$USD@chatusername`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'expandable_blockquote' (collapsed-by-default block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames `_), 'custom_emoji' (for inline custom emoji stickers), or 'date_time' (for formatted date and time)\n", "name": "type", "required": true }, @@ -1765,6 +2085,22 @@ "rst_description": "*Optional*. For 'custom_emoji' only, unique identifier of the custom emoji. Use :class:`aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers` to get full information about the sticker\n", "name": "custom_emoji_id", "required": false + }, + { + "type": "Integer", + "description": "For 'date_time' only, the Unix time associated with the entity", + "html_description": "Optional. For “date_time” only, the Unix time associated with the entity", + "rst_description": "*Optional*. For 'date_time' only, the Unix time associated with the entity\n", + "name": "unix_time", + "required": false + }, + { + "type": "String", + "description": "For 'date_time' only, the string that defines the formatting of the date and time. See date-time entity formatting for more details.", + "html_description": "Optional. For “date_time” only, the string that defines the formatting of the date and time. See date-time entity formatting for more details.", + "rst_description": "*Optional*. For 'date_time' only, the string that defines the formatting of the date and time. See `date-time entity formatting `_ for more details.\n", + "name": "date_time_format", + "required": false } ], "category": "types" @@ -1786,9 +2122,9 @@ }, { "type": "Array of MessageEntity", - "description": "Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.", - "html_description": "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.", - "rst_description": "*Optional*. Special entities that appear in the quote. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are kept in quotes.\n", + "description": "Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are kept in quotes.", + "html_description": "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are kept in quotes.", + "rst_description": "*Optional*. Special entities that appear in the quote. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities are kept in quotes.\n", "name": "entities", "required": false }, @@ -1803,8 +2139,8 @@ { "type": "True", "description": "True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", - "html_description": "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", - "rst_description": "*Optional*. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.\n", + "html_description": "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", + "rst_description": "*Optional*. :code:`True`, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.\n", "name": "is_manual", "required": false } @@ -1938,6 +2274,14 @@ "name": "has_media_spoiler", "required": false }, + { + "type": "Checklist", + "description": "Message is a checklist", + "html_description": "Optional. Message is a checklist", + "rst_description": "*Optional*. Message is a checklist\n", + "name": "checklist", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", @@ -2030,9 +2374,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 }, @@ -2046,9 +2390,9 @@ }, { "type": "String", - "description": "Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message.", - "html_description": "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message.", - "rst_description": "*Optional*. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities. The message will fail to send if the quote isn't found in the original message.\n", + "description": "Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities. The message will fail to send if the quote isn't found in the original message.", + "html_description": "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities. The message will fail to send if the quote isn't found in the original message.", + "rst_description": "*Optional*. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities. The message will fail to send if the quote isn't found in the original message.\n", "name": "quote", "required": false }, @@ -2075,6 +2419,22 @@ "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 + }, + { + "type": "String", + "description": "Persistent identifier of the specific poll option to be replied to", + "html_description": "Optional. Persistent identifier of the specific poll option to be replied to", + "rst_description": "*Optional*. Persistent identifier of the specific poll option to be replied to\n", + "name": "poll_option_id", + "required": false } ], "category": "types" @@ -2546,6 +2906,64 @@ ], "category": "types" }, + { + "anchor": "videoquality", + "name": "VideoQuality", + "description": "This object represents a video file of a specific quality.", + "html_description": "

This object represents a video file of a specific quality.

", + "rst_description": "This object represents a video file of a specific quality.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Video width", + "rst_description": "Video width\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Video height", + "rst_description": "Video height\n", + "name": "height", + "required": true + }, + { + "type": "String", + "description": "Codec that was used to encode the video, for example, 'h264', 'h265', or 'av01'", + "html_description": "Codec that was used to encode the video, for example, “h264”, “h265”, or “av01”", + "rst_description": "Codec that was used to encode the video, for example, 'h264', 'h265', or 'av01'\n", + "name": "codec", + "required": true + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 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 value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 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 value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 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 value.\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + }, { "anchor": "video", "name": "Video", @@ -2601,6 +3019,30 @@ "name": "thumbnail", "required": false }, + { + "type": "Array of PhotoSize", + "description": "Available sizes of the cover of the video in the message", + "html_description": "Optional. Available sizes of the cover of the video in the message", + "rst_description": "*Optional*. Available sizes of the cover of the video in the message\n", + "name": "cover", + "required": false + }, + { + "type": "Integer", + "description": "Timestamp in seconds from which the video will play in the message", + "html_description": "Optional. Timestamp in seconds from which the video will play in the message", + "rst_description": "*Optional*. Timestamp in seconds from which the video will play in the message\n", + "name": "start_timestamp", + "required": false + }, + { + "type": "Array of VideoQuality", + "description": "List of available qualities of the video", + "html_description": "Optional. List of available qualities of the video", + "rst_description": "*Optional*. List of available qualities of the video\n", + "name": "qualities", + "required": false + }, { "type": "String", "description": "Original filename as defined by the sender", @@ -2948,6 +3390,14 @@ "html_description": "

This object contains information about one answer option in a poll.

", "rst_description": "This object contains information about one answer option in a poll.", "annotations": [ + { + "type": "String", + "description": "Unique identifier of the option, persistent on option addition and deletion", + "html_description": "Unique identifier of the option, persistent on option addition and deletion", + "rst_description": "Unique identifier of the option, persistent on option addition and deletion\n", + "name": "persistent_id", + "required": true + }, { "type": "String", "description": "Option text, 1-100 characters", @@ -2966,11 +3416,35 @@ }, { "type": "Integer", - "description": "Number of users that voted for this option", - "html_description": "Number of users that voted for this option", - "rst_description": "Number of users that voted for this option\n", + "description": "Number of users who voted for this option; may be 0 if unknown", + "html_description": "Number of users who voted for this option; may be 0 if unknown", + "rst_description": "Number of users who voted for this option; may be 0 if unknown\n", "name": "voter_count", "required": true + }, + { + "type": "User", + "description": "User who added the option; omitted if the option wasn't added by a user after poll creation", + "html_description": "Optional. User who added the option; omitted if the option wasn't added by a user after poll creation", + "rst_description": "*Optional*. User who added the option; omitted if the option wasn't added by a user after poll creation\n", + "name": "added_by_user", + "required": false + }, + { + "type": "Chat", + "description": "Chat that added the option; omitted if the option wasn't added by a chat after poll creation", + "html_description": "Optional. Chat that added the option; omitted if the option wasn't added by a chat after poll creation", + "rst_description": "*Optional*. Chat that added the option; omitted if the option wasn't added by a chat after poll creation\n", + "name": "added_by_chat", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original poll", + "html_description": "Optional. Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original poll", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original poll\n", + "name": "addition_date", + "required": false } ], "category": "types" @@ -3047,6 +3521,14 @@ "rst_description": "0-based identifiers of chosen answer options. May be empty if the vote was retracted.\n", "name": "option_ids", "required": true + }, + { + "type": "Array of String", + "description": "Persistent identifiers of the chosen answer options. May be empty if the vote was retracted.", + "html_description": "Persistent identifiers of the chosen answer options. May be empty if the vote was retracted.", + "rst_description": "Persistent identifiers of the chosen answer options. May be empty if the vote was retracted.\n", + "name": "option_persistent_ids", + "required": true } ], "category": "types" @@ -3131,11 +3613,19 @@ "required": true }, { - "type": "Integer", - "description": "0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.", - "html_description": "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.", - "rst_description": "*Optional*. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.\n", - "name": "correct_option_id", + "type": "Boolean", + "description": "True, if the poll allows to change the chosen answer options", + "html_description": "True, if the poll allows to change the chosen answer options", + "rst_description": ":code:`True`, if the poll allows to change the chosen answer options\n", + "name": "allows_revoting", + "required": true + }, + { + "type": "Array of Integer", + "description": "Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which are closed or were sent (not forwarded) by the bot or to the private chat with the bot.", + "html_description": "Optional. Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which are closed or were sent (not forwarded) by the bot or to the private chat with the bot.", + "rst_description": "*Optional*. Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which are closed or were sent (not forwarded) by the bot or to the private chat with the bot.\n", + "name": "correct_option_ids", "required": false }, { @@ -3169,6 +3659,290 @@ "rst_description": "*Optional*. Point in time (Unix timestamp) when the poll will be automatically closed\n", "name": "close_date", "required": false + }, + { + "type": "String", + "description": "Description of the poll; for polls inside the Message object only", + "html_description": "Optional. Description of the poll; for polls inside the Message object only", + "rst_description": "*Optional*. Description of the poll; for polls inside the :class:`aiogram.types.message.Message` object only\n", + "name": "description", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities like usernames, URLs, bot commands, etc. that appear in the description", + "html_description": "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the description", + "rst_description": "*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the description\n", + "name": "description_entities", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "checklisttask", + "name": "ChecklistTask", + "description": "Describes a task in a checklist.", + "html_description": "

Describes a task in a checklist.

", + "rst_description": "Describes a task in a checklist.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier of the task", + "html_description": "Unique identifier of the task", + "rst_description": "Unique identifier of the task\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Text of the task", + "html_description": "Text of the task", + "rst_description": "Text of the task\n", + "name": "text", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the task text", + "html_description": "Optional. Special entities that appear in the task text", + "rst_description": "*Optional*. Special entities that appear in the task text\n", + "name": "text_entities", + "required": false + }, + { + "type": "User", + "description": "User that completed the task; omitted if the task wasn't completed by a user", + "html_description": "Optional. User that completed the task; omitted if the task wasn't completed by a user", + "rst_description": "*Optional*. User that completed the task; omitted if the task wasn't completed by a user\n", + "name": "completed_by_user", + "required": false + }, + { + "type": "Chat", + "description": "Chat that completed the task; omitted if the task wasn't completed by a chat", + "html_description": "Optional. Chat that completed the task; omitted if the task wasn't completed by a chat", + "rst_description": "*Optional*. Chat that completed the task; omitted if the task wasn't completed by a chat\n", + "name": "completed_by_chat", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed", + "html_description": "Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed\n", + "name": "completion_date", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "checklist", + "name": "Checklist", + "description": "Describes a checklist.", + "html_description": "

Describes a checklist.

", + "rst_description": "Describes a checklist.", + "annotations": [ + { + "type": "String", + "description": "Title of the checklist", + "html_description": "Title of the checklist", + "rst_description": "Title of the checklist\n", + "name": "title", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the checklist title", + "html_description": "Optional. Special entities that appear in the checklist title", + "rst_description": "*Optional*. Special entities that appear in the checklist title\n", + "name": "title_entities", + "required": false + }, + { + "type": "Array of ChecklistTask", + "description": "List of tasks in the checklist", + "html_description": "List of tasks in the checklist", + "rst_description": "List of tasks in the checklist\n", + "name": "tasks", + "required": true + }, + { + "type": "True", + "description": "True, if users other than the creator of the list can add tasks to the list", + "html_description": "Optional. True, if users other than the creator of the list can add tasks to the list", + "rst_description": "*Optional*. :code:`True`, if users other than the creator of the list can add tasks to the list\n", + "name": "others_can_add_tasks", + "required": false + }, + { + "type": "True", + "description": "True, if users other than the creator of the list can mark tasks as done or not done", + "html_description": "Optional. True, if users other than the creator of the list can mark tasks as done or not done", + "rst_description": "*Optional*. :code:`True`, if users other than the creator of the list can mark tasks as done or not done\n", + "name": "others_can_mark_tasks_as_done", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputchecklisttask", + "name": "InputChecklistTask", + "description": "Describes a task to add to a checklist.", + "html_description": "

Describes a task to add to a checklist.

", + "rst_description": "Describes a task to add to a checklist.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist", + "html_description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist", + "rst_description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Text of the task; 1-100 characters after entities parsing", + "html_description": "Text of the task; 1-100 characters after entities parsing", + "rst_description": "Text of the task; 1-100 characters after entities parsing\n", + "name": "text", + "required": true + }, + { + "type": "String", + "description": "Mode for parsing entities in the text. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the text. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the text. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.", + "html_description": "Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.", + "rst_description": "*Optional*. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities are allowed.\n", + "name": "text_entities", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputchecklist", + "name": "InputChecklist", + "description": "Describes a checklist to create.", + "html_description": "

Describes a checklist to create.

", + "rst_description": "Describes a checklist to create.", + "annotations": [ + { + "type": "String", + "description": "Title of the checklist; 1-255 characters after entities parsing", + "html_description": "Title of the checklist; 1-255 characters after entities parsing", + "rst_description": "Title of the checklist; 1-255 characters after entities parsing\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Mode for parsing entities in the title. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the title. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the title. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.", + "html_description": "Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.", + "rst_description": "*Optional*. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities are allowed.\n", + "name": "title_entities", + "required": false + }, + { + "type": "Array of InputChecklistTask", + "description": "List of 1-30 tasks in the checklist", + "html_description": "List of 1-30 tasks in the checklist", + "rst_description": "List of 1-30 tasks in the checklist\n", + "name": "tasks", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True if other users can add tasks to the checklist", + "html_description": "Optional. Pass True if other users can add tasks to the checklist", + "rst_description": "*Optional*. Pass :code:`True` if other users can add tasks to the checklist\n", + "name": "others_can_add_tasks", + "required": false + }, + { + "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", + "name": "others_can_mark_tasks_as_done", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "checklisttasksdone", + "name": "ChecklistTasksDone", + "description": "Describes a service message about checklist tasks marked as done or not done.", + "html_description": "

Describes a service message about checklist tasks marked as done or not done.

", + "rst_description": "Describes a service message about checklist tasks marked as done or not done.", + "annotations": [ + { + "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 :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 + }, + { + "type": "Array of Integer", + "description": "Identifiers of the tasks that were marked as done", + "html_description": "Optional. Identifiers of the tasks that were marked as done", + "rst_description": "*Optional*. Identifiers of the tasks that were marked as done\n", + "name": "marked_as_done_task_ids", + "required": false + }, + { + "type": "Array of Integer", + "description": "Identifiers of the tasks that were marked as not done", + "html_description": "Optional. Identifiers of the tasks that were marked as not done", + "rst_description": "*Optional*. Identifiers of the tasks that were marked as not done\n", + "name": "marked_as_not_done_task_ids", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "checklisttasksadded", + "name": "ChecklistTasksAdded", + "description": "Describes a service message about tasks added to a checklist.", + "html_description": "

Describes a service message about tasks added to a checklist.

", + "rst_description": "Describes a service message about tasks added to a checklist.", + "annotations": [ + { + "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 :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 + }, + { + "type": "Array of ChecklistTask", + "description": "List of tasks added to the checklist", + "html_description": "List of tasks added to the checklist", + "rst_description": "List of tasks added to the checklist\n", + "name": "tasks", + "required": true } ], "category": "types" @@ -3375,6 +4149,134 @@ ], "category": "types" }, + { + "anchor": "managedbotcreated", + "name": "ManagedBotCreated", + "description": "This object contains information about the bot that was created to be managed by the current bot.", + "html_description": "

This object contains information about the bot that was created to be managed by the current bot.

", + "rst_description": "This object contains information about the bot that was created to be managed by the current bot.", + "annotations": [ + { + "type": "User", + "description": "Information about the bot. The bot's token can be fetched using the method getManagedBotToken.", + "html_description": "Information about the bot. The bot's token can be fetched using the method getManagedBotToken.", + "rst_description": "Information about the bot. The bot's token can be fetched using the method :class:`aiogram.methods.get_managed_bot_token.GetManagedBotToken`.\n", + "name": "bot", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "managedbotupdated", + "name": "ManagedBotUpdated", + "description": "This object contains information about the creation or token update of a bot that is managed by the current bot.", + "html_description": "

This object contains information about the creation or token update of a bot that is managed by the current bot.

", + "rst_description": "This object contains information about the creation or token update of a bot that is managed by the current bot.", + "annotations": [ + { + "type": "User", + "description": "User that created the bot", + "html_description": "User that created the bot", + "rst_description": "User that created the bot\n", + "name": "user", + "required": true + }, + { + "type": "User", + "description": "Information about the bot. Token of the bot can be fetched using the method getManagedBotToken.", + "html_description": "Information about the bot. Token of the bot can be fetched using the method getManagedBotToken.", + "rst_description": "Information about the bot. Token of the bot can be fetched using the method :class:`aiogram.methods.get_managed_bot_token.GetManagedBotToken`.\n", + "name": "bot", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "polloptionadded", + "name": "PollOptionAdded", + "description": "Describes a service message about an option added to a poll.", + "html_description": "

Describes a service message about an option added to a poll.

", + "rst_description": "Describes a service message about an option added to a poll.", + "annotations": [ + { + "type": "MaybeInaccessibleMessage", + "description": "Message containing the poll to which the option was added, if known. 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 poll to which the option was added, if known. 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 poll to which the option was added, if known. 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": "poll_message", + "required": false + }, + { + "type": "String", + "description": "Unique identifier of the added option", + "html_description": "Unique identifier of the added option", + "rst_description": "Unique identifier of the added option\n", + "name": "option_persistent_id", + "required": true + }, + { + "type": "String", + "description": "Option text", + "html_description": "Option text", + "rst_description": "Option text\n", + "name": "option_text", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the option_text", + "html_description": "Optional. Special entities that appear in the option_text", + "rst_description": "*Optional*. Special entities that appear in the *option_text*\n", + "name": "option_text_entities", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "polloptiondeleted", + "name": "PollOptionDeleted", + "description": "Describes a service message about an option deleted from a poll.", + "html_description": "

Describes a service message about an option deleted from a poll.

", + "rst_description": "Describes a service message about an option deleted from a poll.", + "annotations": [ + { + "type": "MaybeInaccessibleMessage", + "description": "Message containing the poll from which the option was deleted, if known. 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 poll from which the option was deleted, if known. 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 poll from which the option was deleted, if known. 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": "poll_message", + "required": false + }, + { + "type": "String", + "description": "Unique identifier of the deleted option", + "html_description": "Unique identifier of the deleted option", + "rst_description": "Unique identifier of the deleted option\n", + "name": "option_persistent_id", + "required": true + }, + { + "type": "String", + "description": "Option text", + "html_description": "Option text", + "rst_description": "Option text\n", + "name": "option_text", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the option_text", + "html_description": "Optional. Special entities that appear in the option_text", + "rst_description": "*Optional*. Special entities that appear in the *option_text*\n", + "name": "option_text_entities", + "required": false + } + ], + "category": "types" + }, { "anchor": "chatboostadded", "name": "ChatBoostAdded", @@ -3592,9 +4494,9 @@ { "anchor": "backgroundtypepattern", "name": "BackgroundTypePattern", - "description": "The background is a PNG or TGV (gzipped subset of SVG with MIME type 'application/x-tgwallpattern') pattern to be combined with the background fill chosen by the user.", - "html_description": "

The background is a PNG or TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user.

", - "rst_description": "The background is a PNG or TGV (gzipped subset of SVG with MIME type 'application/x-tgwallpattern') pattern to be combined with the background fill chosen by the user.", + "description": "The background is a .PNG or .TGV (gzipped subset of SVG with MIME type 'application/x-tgwallpattern') pattern to be combined with the background fill chosen by the user.", + "html_description": "

The background is a .PNG or .TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user.

", + "rst_description": "The background is a .PNG or .TGV (gzipped subset of SVG with MIME type 'application/x-tgwallpattern') pattern to be combined with the background fill chosen by the user.", "annotations": [ { "type": "String", @@ -3721,6 +4623,14 @@ "rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n", "name": "icon_custom_emoji_id", "required": false + }, + { + "type": "True", + "description": "True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot", + "html_description": "Optional. True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot", + "rst_description": "*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot\n", + "name": "is_name_implicit", + "required": false } ], "category": "types" @@ -3923,8 +4833,8 @@ { "type": "Boolean", "description": "True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", - "html_description": "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", - "rst_description": "*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_\n", + "html_description": "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", + "rst_description": "*Optional*. :code:`True`, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_\n", "name": "from_request", "required": false }, @@ -3939,8 +4849,8 @@ { "type": "Boolean", "description": "True, if the access was granted when the bot was added to the attachment or side menu", - "html_description": "Optional. True, if the access was granted when the bot was added to the attachment or side menu", - "rst_description": "*Optional*. True, if the access was granted when the bot was added to the attachment or side menu\n", + "html_description": "Optional. True, if the access was granted when the bot was added to the attachment or side menu", + "rst_description": "*Optional*. :code:`True`, if the access was granted when the bot was added to the attachment or side menu\n", "name": "from_attachment_menu", "required": false } @@ -4010,13 +4920,220 @@ ], "category": "types" }, + { + "anchor": "paidmessagepricechanged", + "name": "PaidMessagePriceChanged", + "description": "Describes a service message about a change in the price of paid messages within a chat.", + "html_description": "

Describes a service message about a change in the price of paid messages within a chat.

", + "rst_description": "Describes a service message about a change in the price of paid messages within a chat.", + "annotations": [ + { + "type": "Integer", + "description": "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message", + "html_description": "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message", + "rst_description": "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message\n", + "name": "paid_message_star_count", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "directmessagepricechanged", + "name": "DirectMessagePriceChanged", + "description": "Describes a service message about a change in the price of direct messages sent to a channel chat.", + "html_description": "

Describes a service message about a change in the price of direct messages sent to a channel chat.

", + "rst_description": "Describes a service message about a change in the price of direct messages sent to a channel chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if direct messages are enabled for the channel chat; false otherwise", + "html_description": "True, if direct messages are enabled for the channel chat; false otherwise", + "rst_description": ":code:`True`, if direct messages are enabled for the channel chat; false otherwise\n", + "name": "are_direct_messages_enabled", + "required": true + }, + { + "type": "Integer", + "description": "The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.", + "html_description": "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.", + "rst_description": "*Optional*. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.\n", + "name": "direct_message_star_count", + "required": false + } + ], + "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", - "description": "This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.", - "html_description": "

This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.

", - "rst_description": "This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.", - "annotations": [], + "description": "This object represents a service message about the creation of a scheduled giveaway.", + "html_description": "

This object represents a service message about the creation of a scheduled giveaway.

", + "rst_description": "This object represents a service message about the creation of a scheduled giveaway.", + "annotations": [ + { + "type": "Integer", + "description": "The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "html_description": "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "rst_description": "*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only\n", + "name": "prize_star_count", + "required": false + } + ], "category": "types" }, { @@ -4084,9 +5201,17 @@ }, { "type": "Integer", - "description": "The number of months the Telegram Premium subscription won from the giveaway will be active for", - "html_description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for", - "rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for\n", + "description": "The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "html_description": "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "rst_description": "*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only\n", + "name": "prize_star_count", + "required": false + }, + { + "type": "Integer", + "description": "The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only", + "html_description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only", + "rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only\n", "name": "premium_subscription_month_count", "required": false } @@ -4150,9 +5275,17 @@ }, { "type": "Integer", - "description": "The number of months the Telegram Premium subscription won from the giveaway will be active for", - "html_description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for", - "rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for\n", + "description": "The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only", + "html_description": "Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only", + "rst_description": "*Optional*. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only\n", + "name": "prize_star_count", + "required": false + }, + { + "type": "Integer", + "description": "The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only", + "html_description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only", + "rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only\n", "name": "premium_subscription_month_count", "required": false }, @@ -4221,6 +5354,14 @@ "rst_description": "*Optional*. Message with the giveaway that was completed, if it wasn't deleted\n", "name": "giveaway_message", "required": false + }, + { + "type": "True", + "description": "True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.", + "html_description": "Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.", + "rst_description": "*Optional*. :code:`True`, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.\n", + "name": "is_star_giveaway", + "required": false } ], "category": "types" @@ -4275,6 +5416,118 @@ ], "category": "types" }, + { + "anchor": "suggestedpostprice", + "name": "SuggestedPostPrice", + "description": "Describes the price of a suggested post.", + "html_description": "

Describes the price of a suggested post.

", + "rst_description": "Describes the price of a suggested post.", + "annotations": [ + { + "type": "String", + "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. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "topic_id", + "required": true + }, + { + "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", @@ -4301,6 +5554,32 @@ ], "category": "types" }, + { + "anchor": "userprofileaudios", + "name": "UserProfileAudios", + "description": "This object represents the audios displayed on a user's profile.", + "html_description": "

This object represents the audios displayed on a user's profile.

", + "rst_description": "This object represents the audios displayed on a user's profile.", + "annotations": [ + { + "type": "Integer", + "description": "Total number of profile audios for the target user", + "html_description": "Total number of profile audios for the target user", + "rst_description": "Total number of profile audios for the target user\n", + "name": "total_count", + "required": true + }, + { + "type": "Array of Audio", + "description": "Requested profile audios", + "html_description": "Requested profile audios", + "rst_description": "Requested profile audios\n", + "name": "audios", + "required": true + } + ], + "category": "types" + }, { "anchor": "file", "name": "File", @@ -4422,34 +5701,58 @@ { "anchor": "keyboardbutton", "name": "KeyboardButton", - "description": "This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text.\nNote: request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message.", - "html_description": "

This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text.

Note: request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message.

", - "rst_description": "This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, *String* can be used instead of this object to specify the button text.\n**Note:** *request_users* and *request_chat* options will only work in Telegram versions released after 3 February, 2023. Older clients will display *unsupported message*.", + "description": "This object represents one button of the reply keyboard. At most one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button. For simple text buttons, String can be used instead of this object to specify the button text.", + "html_description": "

This object represents one button of the reply keyboard. At most one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button. For simple text buttons, String can be used instead of this object to specify the button text.

", + "rst_description": "This object represents one button of the reply keyboard. At most one of the fields other than *text*, *icon_custom_emoji_id*, and *style* must be used to specify the type of the button. For simple text buttons, *String* can be used instead of this object to specify the button text.", "annotations": [ { "type": "String", - "description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed", - "html_description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed", - "rst_description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed\n", + "description": "Text of the button. If none of the fields other than text, icon_custom_emoji_id, and style are used, it will be sent as a message when the button is pressed", + "html_description": "Text of the button. If none of the fields other than text, icon_custom_emoji_id, and style are used, it will be sent as a message when the button is pressed", + "rst_description": "Text of the button. If none of the fields other than *text*, *icon_custom_emoji_id*, and *style* are used, it will be sent as a message when the button is pressed\n", "name": "text", "required": true }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.", + "html_description": "Optional. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.", + "rst_description": "*Optional*. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on `Fragment `_ or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.\n", + "name": "icon_custom_emoji_id", + "required": false + }, + { + "type": "String", + "description": "Style of the button. Must be one of 'danger' (red), 'success' (green) or 'primary' (blue). If omitted, then an app-specific style is used.", + "html_description": "Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used.", + "rst_description": "*Optional*. Style of the button. Must be one of 'danger' (red), 'success' (green) or 'primary' (blue). If omitted, then an app-specific style is used.\n", + "name": "style", + "required": false + }, { "type": "KeyboardButtonRequestUsers", "description": "If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.", - "html_description": "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.", - "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.\n", + "html_description": "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.", + "rst_description": "*Optional*. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.\n", "name": "request_users", "required": false }, { "type": "KeyboardButtonRequestChat", "description": "If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.", - "html_description": "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.", - "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n", + "html_description": "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.", + "rst_description": "*Optional*. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n", "name": "request_chat", "required": false }, + { + "type": "KeyboardButtonRequestManagedBot", + "description": "If specified, pressing the button will ask the user to create and share a bot that will be managed by the current bot. Available for bots that enabled management of other bots in the @BotFather Mini App. Available in private chats only.", + "html_description": "Optional. If specified, pressing the button will ask the user to create and share a bot that will be managed by the current bot. Available for bots that enabled management of other bots in the @BotFather Mini App. Available in private chats only.", + "rst_description": "*Optional*. If specified, pressing the button will ask the user to create and share a bot that will be managed by the current bot. Available for bots that enabled management of other bots in the `@BotFather `_ Mini App. Available in private chats only.\n", + "name": "request_managed_bot", + "required": false + }, { "type": "Boolean", "description": "If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.", @@ -4649,6 +5952,40 @@ ], "category": "types" }, + { + "anchor": "keyboardbuttonrequestmanagedbot", + "name": "KeyboardButtonRequestManagedBot", + "description": "This object defines the parameters for the creation of a managed bot. Information about the created bot will be shared with the bot using the update managed_bot and a Message with the field managed_bot_created.", + "html_description": "

This object defines the parameters for the creation of a managed bot. Information about the created bot will be shared with the bot using the update managed_bot and a Message with the field managed_bot_created.

", + "rst_description": "This object defines the parameters for the creation of a managed bot. Information about the created bot will be shared with the bot using the update *managed_bot* and a :class:`aiogram.types.message.Message` with the field *managed_bot_created*.", + "annotations": [ + { + "type": "Integer", + "description": "Signed 32-bit identifier of the request. Must be unique within the message", + "html_description": "Signed 32-bit identifier of the request. Must be unique within the message", + "rst_description": "Signed 32-bit identifier of the request. Must be unique within the message\n", + "name": "request_id", + "required": true + }, + { + "type": "String", + "description": "Suggested name for the bot", + "html_description": "Optional. Suggested name for the bot", + "rst_description": "*Optional*. Suggested name for the bot\n", + "name": "suggested_name", + "required": false + }, + { + "type": "String", + "description": "Suggested username for the bot", + "html_description": "Optional. Suggested username for the bot", + "rst_description": "*Optional*. Suggested username for the bot\n", + "name": "suggested_username", + "required": false + } + ], + "category": "types" + }, { "anchor": "keyboardbuttonpolltype", "name": "KeyboardButtonPollType", @@ -4714,9 +6051,9 @@ { "anchor": "inlinekeyboardbutton", "name": "InlineKeyboardButton", - "description": "This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.", - "html_description": "

This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.

", - "rst_description": "This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.", + "description": "This object represents one button of an inline keyboard. Exactly one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button.", + "html_description": "

This object represents one button of an inline keyboard. Exactly one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button.

", + "rst_description": "This object represents one button of an inline keyboard. Exactly one of the fields other than *text*, *icon_custom_emoji_id*, and *style* must be used to specify the type of the button.", "annotations": [ { "type": "String", @@ -4726,6 +6063,22 @@ "name": "text", "required": true }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.", + "html_description": "Optional. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.", + "rst_description": "*Optional*. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on `Fragment `_ or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.\n", + "name": "icon_custom_emoji_id", + "required": false + }, + { + "type": "String", + "description": "Style of the button. Must be one of 'danger' (red), 'success' (green) or 'primary' (blue). If omitted, then an app-specific style is used.", + "html_description": "Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used.", + "rst_description": "*Optional*. Style of the button. Must be one of 'danger' (red), 'success' (green) or 'primary' (blue). If omitted, then an app-specific style is used.\n", + "name": "style", + "required": false + }, { "type": "String", "description": "HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id= can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings.", @@ -4760,28 +6113,36 @@ }, { "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 }, + { + "type": "CopyTextButton", + "description": "Description of the button that copies the specified text to the clipboard.", + "html_description": "Optional. Description of the button that copies the specified text to the clipboard.", + "rst_description": "*Optional*. Description of the button that copies the specified text to the clipboard.\n", + "name": "copy_text", + "required": false + }, { "type": "CallbackGame", "description": "Description of the game that will be launched when the user presses the button.\n\nNOTE: This type of button must always be the first button in the first row.", @@ -4861,38 +6222,56 @@ { "type": "Boolean", "description": "True, if private chats with users can be chosen", - "html_description": "Optional. True, if private chats with users can be chosen", - "rst_description": "*Optional*. True, if private chats with users can be chosen\n", + "html_description": "Optional. True, if private chats with users can be chosen", + "rst_description": "*Optional*. :code:`True`, if private chats with users can be chosen\n", "name": "allow_user_chats", "required": false }, { "type": "Boolean", "description": "True, if private chats with bots can be chosen", - "html_description": "Optional. True, if private chats with bots can be chosen", - "rst_description": "*Optional*. True, if private chats with bots can be chosen\n", + "html_description": "Optional. True, if private chats with bots can be chosen", + "rst_description": "*Optional*. :code:`True`, if private chats with bots can be chosen\n", "name": "allow_bot_chats", "required": false }, { "type": "Boolean", "description": "True, if group and supergroup chats can be chosen", - "html_description": "Optional. True, if group and supergroup chats can be chosen", - "rst_description": "*Optional*. True, if group and supergroup chats can be chosen\n", + "html_description": "Optional. True, if group and supergroup chats can be chosen", + "rst_description": "*Optional*. :code:`True`, if group and supergroup chats can be chosen\n", "name": "allow_group_chats", "required": false }, { "type": "Boolean", "description": "True, if channel chats can be chosen", - "html_description": "Optional. True, if channel chats can be chosen", - "rst_description": "*Optional*. True, if channel chats can be chosen\n", + "html_description": "Optional. True, if channel chats can be chosen", + "rst_description": "*Optional*. :code:`True`, if channel chats can be chosen\n", "name": "allow_channel_chats", "required": false } ], "category": "types" }, + { + "anchor": "copytextbutton", + "name": "CopyTextButton", + "description": "This object represents an inline keyboard button that copies specified text to the clipboard.", + "html_description": "

This object represents an inline keyboard button that copies specified text to the clipboard.

", + "rst_description": "This object represents an inline keyboard button that copies specified text to the clipboard.", + "annotations": [ + { + "type": "String", + "description": "The text to be copied to the clipboard; 1-256 characters", + "html_description": "The text to be copied to the clipboard; 1-256 characters", + "rst_description": "The text to be copied to the clipboard; 1-256 characters\n", + "name": "text", + "required": true + } + ], + "category": "types" + }, { "anchor": "callbackquery", "name": "CallbackQuery", @@ -5113,6 +6492,22 @@ "rst_description": "*Optional*. Number of pending join requests created using this link\n", "name": "pending_join_request_count", "required": false + }, + { + "type": "Integer", + "description": "The number of seconds the subscription will be active for before the next payment", + "html_description": "Optional. The number of seconds the subscription will be active for before the next payment", + "rst_description": "*Optional*. The number of seconds the subscription will be active for before the next payment\n", + "name": "subscription_period", + "required": false + }, + { + "type": "Integer", + "description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link", + "html_description": "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link", + "rst_description": "*Optional*. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link\n", + "name": "subscription_price", + "required": false } ], "category": "types" @@ -5134,9 +6529,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat", "required": true }, @@ -5214,9 +6609,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages", "required": false }, @@ -5243,6 +6638,22 @@ "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 + }, + { + "type": "Boolean", + "description": "True, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.", + "html_description": "Optional. True, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.\n", + "name": "can_manage_tags", + "required": false } ], "category": "types" @@ -5305,16 +6716,16 @@ { "type": "Boolean", "description": "True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", - "html_description": "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", - "rst_description": "*Optional*. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator\n", + "html_description": "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", + "rst_description": "*Optional*. :code:`True`, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator\n", "name": "via_join_request", "required": false }, { "type": "Boolean", "description": "True, if the user joined the chat via a chat folder invite link", - "html_description": "Optional. True, if the user joined the chat via a chat folder invite link", - "rst_description": "*Optional*. True, if the user joined the chat via a chat folder invite link\n", + "html_description": "Optional. True, if the user joined the chat via a chat folder invite link", + "rst_description": "*Optional*. :code:`True`, if the user joined the chat via a chat folder invite link\n", "name": "via_chat_folder_invite_link", "required": false } @@ -5413,9 +6824,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat", "required": true }, @@ -5493,9 +6904,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages", "required": false }, @@ -5523,6 +6934,22 @@ "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": "Boolean", + "description": "True, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.", + "html_description": "Optional. True, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.\n", + "name": "can_manage_tags", + "required": false + }, { "type": "String", "description": "Custom title for this user", @@ -5549,6 +6976,14 @@ "name": "status", "required": true }, + { + "type": "String", + "description": "Tag of the member", + "html_description": "Optional. Tag of the member", + "rst_description": "*Optional*. Tag of the member\n", + "name": "tag", + "required": false + }, { "type": "User", "description": "Information about the user", @@ -5556,6 +6991,14 @@ "rst_description": "Information about the user\n", "name": "user", "required": true + }, + { + "type": "Integer", + "description": "Date when the user's subscription will expire; Unix time", + "html_description": "Optional. Date when the user's subscription will expire; Unix time", + "rst_description": "*Optional*. Date when the user's subscription will expire; Unix time\n", + "name": "until_date", + "required": false } ], "category": "types" @@ -5575,6 +7018,14 @@ "name": "status", "required": true }, + { + "type": "String", + "description": "Tag of the member", + "html_description": "Optional. Tag of the member", + "rst_description": "*Optional*. Tag of the member\n", + "name": "tag", + "required": false + }, { "type": "User", "description": "Information about the user", @@ -5649,9 +7100,9 @@ }, { "type": "Boolean", - "description": "True, if the user is allowed to send polls", - "html_description": "True, if the user is allowed to send polls", - "rst_description": ":code:`True`, if the user is allowed to send polls\n", + "description": "True, if the user is allowed to send polls and checklists", + "html_description": "True, if the user is allowed to send polls and checklists", + "rst_description": ":code:`True`, if the user is allowed to send polls and checklists\n", "name": "can_send_polls", "required": true }, @@ -5671,6 +7122,14 @@ "name": "can_add_web_page_previews", "required": true }, + { + "type": "Boolean", + "description": "True, if the user is allowed to edit their own tag", + "html_description": "True, if the user is allowed to edit their own tag", + "rst_description": ":code:`True`, if the user is allowed to edit their own tag\n", + "name": "can_edit_tag", + "required": true + }, { "type": "Boolean", "description": "True, if the user is allowed to change the chat title, photo and other settings", @@ -5897,9 +7356,9 @@ }, { "type": "Boolean", - "description": "True, if the user is allowed to send polls", - "html_description": "Optional. True, if the user is allowed to send polls", - "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls\n", + "description": "True, if the user is allowed to send polls and checklists", + "html_description": "Optional. True, if the user is allowed to send polls and checklists", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls and checklists\n", "name": "can_send_polls", "required": false }, @@ -5919,6 +7378,14 @@ "name": "can_add_web_page_previews", "required": false }, + { + "type": "Boolean", + "description": "True, if the user is allowed to edit their own tag", + "html_description": "Optional. True, if the user is allowed to edit their own tag", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to edit their own tag\n", + "name": "can_edit_tag", + "required": false + }, { "type": "Boolean", "description": "True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups", @@ -6100,6 +7567,361 @@ ], "category": "types" }, + { + "anchor": "userrating", + "name": "UserRating", + "description": "This object describes the rating of a user based on their Telegram Star spendings.", + "html_description": "

This object describes the rating of a user based on their Telegram Star spendings.

", + "rst_description": "This object describes the rating of a user based on their Telegram Star spendings.", + "annotations": [ + { + "type": "Integer", + "description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.", + "html_description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.", + "rst_description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.\n", + "name": "level", + "required": true + }, + { + "type": "Integer", + "description": "Numerical value of the user's rating; the higher the rating, the better", + "html_description": "Numerical value of the user's rating; the higher the rating, the better", + "rst_description": "Numerical value of the user's rating; the higher the rating, the better\n", + "name": "rating", + "required": true + }, + { + "type": "Integer", + "description": "The rating value required to get the current level", + "html_description": "The rating value required to get the current level", + "rst_description": "The rating value required to get the current level\n", + "name": "current_level_rating", + "required": true + }, + { + "type": "Integer", + "description": "The rating value required to get to the next level; omitted if the maximum level was reached", + "html_description": "Optional. The rating value required to get to the next level; omitted if the maximum level was reached", + "rst_description": "*Optional*. The rating value required to get to the next level; omitted if the maximum level was reached\n", + "name": "next_level_rating", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "storyareaposition", + "name": "StoryAreaPosition", + "description": "Describes the position of a clickable area within a story.", + "html_description": "

Describes the position of a clickable area within a story.

", + "rst_description": "Describes the position of a clickable area within a story.", + "annotations": [ + { + "type": "Float", + "description": "The abscissa of the area's center, as a percentage of the media width", + "html_description": "The abscissa of the area's center, as a percentage of the media width", + "rst_description": "The abscissa of the area's center, as a percentage of the media width\n", + "name": "x_percentage", + "required": true + }, + { + "type": "Float", + "description": "The ordinate of the area's center, as a percentage of the media height", + "html_description": "The ordinate of the area's center, as a percentage of the media height", + "rst_description": "The ordinate of the area's center, as a percentage of the media height\n", + "name": "y_percentage", + "required": true + }, + { + "type": "Float", + "description": "The width of the area's rectangle, as a percentage of the media width", + "html_description": "The width of the area's rectangle, as a percentage of the media width", + "rst_description": "The width of the area's rectangle, as a percentage of the media width\n", + "name": "width_percentage", + "required": true + }, + { + "type": "Float", + "description": "The height of the area's rectangle, as a percentage of the media height", + "html_description": "The height of the area's rectangle, as a percentage of the media height", + "rst_description": "The height of the area's rectangle, as a percentage of the media height\n", + "name": "height_percentage", + "required": true + }, + { + "type": "Float", + "description": "The clockwise rotation angle of the rectangle, in degrees; 0-360", + "html_description": "The clockwise rotation angle of the rectangle, in degrees; 0-360", + "rst_description": "The clockwise rotation angle of the rectangle, in degrees; 0-360\n", + "name": "rotation_angle", + "required": true + }, + { + "type": "Float", + "description": "The radius of the rectangle corner rounding, as a percentage of the media width", + "html_description": "The radius of the rectangle corner rounding, as a percentage of the media width", + "rst_description": "The radius of the rectangle corner rounding, as a percentage of the media width\n", + "name": "corner_radius_percentage", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "locationaddress", + "name": "LocationAddress", + "description": "Describes the physical address of a location.", + "html_description": "

Describes the physical address of a location.

", + "rst_description": "Describes the physical address of a location.", + "annotations": [ + { + "type": "String", + "description": "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located", + "html_description": "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located", + "rst_description": "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located\n", + "name": "country_code", + "required": true + }, + { + "type": "String", + "description": "State of the location", + "html_description": "Optional. State of the location", + "rst_description": "*Optional*. State of the location\n", + "name": "state", + "required": false + }, + { + "type": "String", + "description": "City of the location", + "html_description": "Optional. City of the location", + "rst_description": "*Optional*. City of the location\n", + "name": "city", + "required": false + }, + { + "type": "String", + "description": "Street address of the location", + "html_description": "Optional. Street address of the location", + "rst_description": "*Optional*. Street address of the location\n", + "name": "street", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "storyareatype", + "name": "StoryAreaType", + "description": "Describes the type of a clickable area on a story. Currently, it can be one of\n - StoryAreaTypeLocation\n - StoryAreaTypeSuggestedReaction\n - StoryAreaTypeLink\n - StoryAreaTypeWeather\n - StoryAreaTypeUniqueGift", + "html_description": "

Describes the type of a clickable area on a story. Currently, it can be one of

", + "rst_description": "Describes the type of a clickable area on a story. Currently, it can be one of\n\n - :class:`aiogram.types.story_area_type_location.StoryAreaTypeLocation`\n - :class:`aiogram.types.story_area_type_suggested_reaction.StoryAreaTypeSuggestedReaction`\n - :class:`aiogram.types.story_area_type_link.StoryAreaTypeLink`\n - :class:`aiogram.types.story_area_type_weather.StoryAreaTypeWeather`\n - :class:`aiogram.types.story_area_type_unique_gift.StoryAreaTypeUniqueGift`", + "annotations": [], + "category": "types" + }, + { + "anchor": "storyareatypelocation", + "name": "StoryAreaTypeLocation", + "description": "Describes a story area pointing to a location. Currently, a story can have up to 10 location areas.", + "html_description": "

Describes a story area pointing to a location. Currently, a story can have up to 10 location areas.

", + "rst_description": "Describes a story area pointing to a location. Currently, a story can have up to 10 location areas.", + "annotations": [ + { + "type": "String", + "description": "Type of the area, always 'location'", + "html_description": "Type of the area, always “location”", + "rst_description": "Type of the area, always 'location'\n", + "name": "type", + "required": true + }, + { + "type": "Float", + "description": "Location latitude in degrees", + "html_description": "Location latitude in degrees", + "rst_description": "Location latitude in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Location longitude in degrees", + "html_description": "Location longitude in degrees", + "rst_description": "Location longitude in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "LocationAddress", + "description": "Address of the location", + "html_description": "Optional. Address of the location", + "rst_description": "*Optional*. Address of the location\n", + "name": "address", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "storyareatypesuggestedreaction", + "name": "StoryAreaTypeSuggestedReaction", + "description": "Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas.", + "html_description": "

Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas.

", + "rst_description": "Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas.", + "annotations": [ + { + "type": "String", + "description": "Type of the area, always 'suggested_reaction'", + "html_description": "Type of the area, always “suggested_reaction”", + "rst_description": "Type of the area, always 'suggested_reaction'\n", + "name": "type", + "required": true + }, + { + "type": "ReactionType", + "description": "Type of the reaction", + "html_description": "Type of the reaction", + "rst_description": "Type of the reaction\n", + "name": "reaction_type", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True if the reaction area has a dark background", + "html_description": "Optional. Pass True if the reaction area has a dark background", + "rst_description": "*Optional*. Pass :code:`True` if the reaction area has a dark background\n", + "name": "is_dark", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if reaction area corner is flipped", + "html_description": "Optional. Pass True if reaction area corner is flipped", + "rst_description": "*Optional*. Pass :code:`True` if reaction area corner is flipped\n", + "name": "is_flipped", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "storyareatypelink", + "name": "StoryAreaTypeLink", + "description": "Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas.", + "html_description": "

Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas.

", + "rst_description": "Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas.", + "annotations": [ + { + "type": "String", + "description": "Type of the area, always 'link'", + "html_description": "Type of the area, always “link”", + "rst_description": "Type of the area, always 'link'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "HTTP or tg:// URL to be opened when the area is clicked", + "html_description": "HTTP or tg:// URL to be opened when the area is clicked", + "rst_description": "HTTP or tg:// URL to be opened when the area is clicked\n", + "name": "url", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "storyareatypeweather", + "name": "StoryAreaTypeWeather", + "description": "Describes a story area containing weather information. Currently, a story can have up to 3 weather areas.", + "html_description": "

Describes a story area containing weather information. Currently, a story can have up to 3 weather areas.

", + "rst_description": "Describes a story area containing weather information. Currently, a story can have up to 3 weather areas.", + "annotations": [ + { + "type": "String", + "description": "Type of the area, always 'weather'", + "html_description": "Type of the area, always “weather”", + "rst_description": "Type of the area, always 'weather'\n", + "name": "type", + "required": true + }, + { + "type": "Float", + "description": "Temperature, in degree Celsius", + "html_description": "Temperature, in degree Celsius", + "rst_description": "Temperature, in degree Celsius\n", + "name": "temperature", + "required": true + }, + { + "type": "String", + "description": "Emoji representing the weather", + "html_description": "Emoji representing the weather", + "rst_description": "Emoji representing the weather\n", + "name": "emoji", + "required": true + }, + { + "type": "Integer", + "description": "A color of the area background in the ARGB format", + "html_description": "A color of the area background in the ARGB format", + "rst_description": "A color of the area background in the ARGB format\n", + "name": "background_color", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "storyareatypeuniquegift", + "name": "StoryAreaTypeUniqueGift", + "description": "Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area.", + "html_description": "

Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area.

", + "rst_description": "Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area.", + "annotations": [ + { + "type": "String", + "description": "Type of the area, always 'unique_gift'", + "html_description": "Type of the area, always “unique_gift”", + "rst_description": "Type of the area, always 'unique_gift'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique name of the gift", + "html_description": "Unique name of the gift", + "rst_description": "Unique name of the gift\n", + "name": "name", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "storyarea", + "name": "StoryArea", + "description": "Describes a clickable area on a story media.", + "html_description": "

Describes a clickable area on a story media.

", + "rst_description": "Describes a clickable area on a story media.", + "annotations": [ + { + "type": "StoryAreaPosition", + "description": "Position of the area", + "html_description": "Position of the area", + "rst_description": "Position of the area\n", + "name": "position", + "required": true + }, + { + "type": "StoryAreaType", + "description": "Type of the area", + "html_description": "Type of the area", + "rst_description": "Type of the area\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, { "anchor": "chatlocation", "name": "ChatLocation", @@ -6129,9 +7951,9 @@ { "anchor": "reactiontype", "name": "ReactionType", - "description": "This object describes the type of a reaction. Currently, it can be one of\n - ReactionTypeEmoji\n - ReactionTypeCustomEmoji", - "html_description": "

This object describes the type of a reaction. Currently, it can be one of

", - "rst_description": "This object describes the type of a reaction. Currently, it can be one of\n\n - :class:`aiogram.types.reaction_type_emoji.ReactionTypeEmoji`\n - :class:`aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji`", + "description": "This object describes the type of a reaction. Currently, it can be one of\n - ReactionTypeEmoji\n - ReactionTypeCustomEmoji\n - ReactionTypePaid", + "html_description": "

This object describes the type of a reaction. Currently, it can be one of

", + "rst_description": "This object describes the type of a reaction. Currently, it can be one of\n\n - :class:`aiogram.types.reaction_type_emoji.ReactionTypeEmoji`\n - :class:`aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji`\n - :class:`aiogram.types.reaction_type_paid.ReactionTypePaid`", "annotations": [], "category": "types" }, @@ -6153,8 +7975,8 @@ { "type": "String", "description": "Reaction emoji. Currently, it can be one of \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"", - "html_description": "Reaction emoji. Currently, it can be one of \"\"👍\"/\", \"\"👎\"/\", \"\"❤\"/\", \"\"🔥\"/\", \"\"🥰\"/\", \"\"👏\"/\", \"\"😁\"/\", \"\"🤔\"/\", \"\"🤯\"/\", \"\"😱\"/\", \"\"🤬\"/\", \"\"😢\"/\", \"\"🎉\"/\", \"\"🤩\"/\", \"\"🤮\"/\", \"\"💩\"/\", \"\"🙏\"/\", \"\"👌\"/\", \"\"🕊\"/\", \"\"🤡\"/\", \"\"🥱\"/\", \"\"🥴\"/\", \"\"😍\"/\", \"\"🐳\"/\", \"\"❤‍🔥\"/\", \"\"🌚\"/\", \"\"🌭\"/\", \"\"💯\"/\", \"\"🤣\"/\", \"\"⚡\"/\", \"\"🍌\"/\", \"\"🏆\"/\", \"\"💔\"/\", \"\"🤨\"/\", \"\"😐\"/\", \"\"🍓\"/\", \"\"🍾\"/\", \"\"💋\"/\", \"\"🖕\"/\", \"\"😈\"/\", \"\"😴\"/\", \"\"😭\"/\", \"\"🤓\"/\", \"\"👻\"/\", \"\"👨‍💻\"/\", \"\"👀\"/\", \"\"🎃\"/\", \"\"🙈\"/\", \"\"😇\"/\", \"\"😨\"/\", \"\"🤝\"/\", \"\"✍\"/\", \"\"🤗\"/\", \"\"🫡\"/\", \"\"🎅\"/\", \"\"🎄\"/\", \"\"☃\"/\", \"\"💅\"/\", \"\"🤪\"/\", \"\"🗿\"/\", \"\"🆒\"/\", \"\"💘\"/\", \"\"🙉\"/\", \"\"🦄\"/\", \"\"😘\"/\", \"\"💊\"/\", \"\"🙊\"/\", \"\"😎\"/\", \"\"👾\"/\", \"\"🤷‍♂\"/\", \"\"🤷\"/\", \"\"🤷‍♀\"/\", \"\"😡\"/\"", - "rst_description": "Reaction emoji. Currently, it can be one of \"👍\", \"👎\", \"❤\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤‍🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨‍💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷‍♂\", \"🤷\", \"🤷‍♀\", \"😡\"\n", + "html_description": "Reaction emoji. Currently, it can be one of \"\"❤\"/\", \"\"👍\"/\", \"\"👎\"/\", \"\"🔥\"/\", \"\"🥰\"/\", \"\"👏\"/\", \"\"😁\"/\", \"\"🤔\"/\", \"\"🤯\"/\", \"\"😱\"/\", \"\"🤬\"/\", \"\"😢\"/\", \"\"🎉\"/\", \"\"🤩\"/\", \"\"🤮\"/\", \"\"💩\"/\", \"\"🙏\"/\", \"\"👌\"/\", \"\"🕊\"/\", \"\"🤡\"/\", \"\"🥱\"/\", \"\"🥴\"/\", \"\"😍\"/\", \"\"🐳\"/\", \"\"❤‍🔥\"/\", \"\"🌚\"/\", \"\"🌭\"/\", \"\"💯\"/\", \"\"🤣\"/\", \"\"⚡\"/\", \"\"🍌\"/\", \"\"🏆\"/\", \"\"💔\"/\", \"\"🤨\"/\", \"\"😐\"/\", \"\"🍓\"/\", \"\"🍾\"/\", \"\"💋\"/\", \"\"🖕\"/\", \"\"😈\"/\", \"\"😴\"/\", \"\"😭\"/\", \"\"🤓\"/\", \"\"👻\"/\", \"\"👨‍💻\"/\", \"\"👀\"/\", \"\"🎃\"/\", \"\"🙈\"/\", \"\"😇\"/\", \"\"😨\"/\", \"\"🤝\"/\", \"\"✍\"/\", \"\"🤗\"/\", \"\"🫡\"/\", \"\"🎅\"/\", \"\"🎄\"/\", \"\"☃\"/\", \"\"💅\"/\", \"\"🤪\"/\", \"\"🗿\"/\", \"\"🆒\"/\", \"\"💘\"/\", \"\"🙉\"/\", \"\"🦄\"/\", \"\"😘\"/\", \"\"💊\"/\", \"\"🙊\"/\", \"\"😎\"/\", \"\"👾\"/\", \"\"🤷‍♂\"/\", \"\"🤷\"/\", \"\"🤷‍♀\"/\", \"\"😡\"/\"", + "rst_description": "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤‍🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨‍💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷‍♂\", \"🤷\", \"🤷‍♀\", \"😡\"\n", "name": "emoji", "required": true } @@ -6187,6 +8009,24 @@ ], "category": "types" }, + { + "anchor": "reactiontypepaid", + "name": "ReactionTypePaid", + "description": "The reaction is paid.", + "html_description": "

The reaction is paid.

", + "rst_description": "The reaction is paid.", + "annotations": [ + { + "type": "String", + "description": "Type of the reaction, always 'paid'", + "html_description": "Type of the reaction, always “paid”", + "rst_description": "Type of the reaction, always 'paid'\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, { "anchor": "reactioncount", "name": "ReactionCount", @@ -6359,6 +8199,983 @@ "rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n", "name": "icon_custom_emoji_id", "required": false + }, + { + "type": "True", + "description": "True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot", + "html_description": "Optional. True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot", + "rst_description": "*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot\n", + "name": "is_name_implicit", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "giftbackground", + "name": "GiftBackground", + "description": "This object describes the background of a gift.", + "html_description": "

This object describes the background of a gift.

", + "rst_description": "This object describes the background of a gift.", + "annotations": [ + { + "type": "Integer", + "description": "Center color of the background in RGB format", + "html_description": "Center color of the background in RGB format", + "rst_description": "Center color of the background in RGB format\n", + "name": "center_color", + "required": true + }, + { + "type": "Integer", + "description": "Edge color of the background in RGB format", + "html_description": "Edge color of the background in RGB format", + "rst_description": "Edge color of the background in RGB format\n", + "name": "edge_color", + "required": true + }, + { + "type": "Integer", + "description": "Text color of the background in RGB format", + "html_description": "Text color of the background in RGB format", + "rst_description": "Text color of the background in RGB format\n", + "name": "text_color", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "gift", + "name": "Gift", + "description": "This object represents a gift that can be sent by the bot.", + "html_description": "

This object represents a gift that can be sent by the bot.

", + "rst_description": "This object represents a gift that can be sent by the bot.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier of the gift", + "html_description": "Unique identifier of the gift", + "rst_description": "Unique identifier of the gift\n", + "name": "id", + "required": true + }, + { + "type": "Sticker", + "description": "The sticker that represents the gift", + "html_description": "The sticker that represents the gift", + "rst_description": "The sticker that represents the gift\n", + "name": "sticker", + "required": true + }, + { + "type": "Integer", + "description": "The number of Telegram Stars that must be paid to send the sticker", + "html_description": "The number of Telegram Stars that must be paid to send the sticker", + "rst_description": "The number of Telegram Stars that must be paid to send the sticker\n", + "name": "star_count", + "required": true + }, + { + "type": "Integer", + "description": "The number of Telegram Stars that must be paid to upgrade the gift to a unique one", + "html_description": "Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one", + "rst_description": "*Optional*. The number of Telegram Stars that must be paid to upgrade the gift to a unique one\n", + "name": "upgrade_star_count", + "required": false + }, + { + "type": "True", + "description": "True, if the gift can only be purchased by Telegram Premium subscribers", + "html_description": "Optional. True, if the gift can only be purchased by Telegram Premium subscribers", + "rst_description": "*Optional*. :code:`True`, if the gift can only be purchased by Telegram Premium subscribers\n", + "name": "is_premium", + "required": false + }, + { + "type": "True", + "description": "True, if the gift can be used (after being upgraded) to customize a user's appearance", + "html_description": "Optional. True, if the gift can be used (after being upgraded) to customize a user's appearance", + "rst_description": "*Optional*. :code:`True`, if the gift can be used (after being upgraded) to customize a user's appearance\n", + "name": "has_colors", + "required": false + }, + { + "type": "Integer", + "description": "The total number of gifts of this type that can be sent by all users; for limited gifts only", + "html_description": "Optional. The total number of gifts of this type that can be sent by all users; for limited gifts only", + "rst_description": "*Optional*. The total number of gifts of this type that can be sent by all users; for limited gifts only\n", + "name": "total_count", + "required": false + }, + { + "type": "Integer", + "description": "The number of remaining gifts of this type that can be sent by all users; for limited gifts only", + "html_description": "Optional. The number of remaining gifts of this type that can be sent by all users; for limited gifts only", + "rst_description": "*Optional*. The number of remaining gifts of this type that can be sent by all users; for limited gifts only\n", + "name": "remaining_count", + "required": false + }, + { + "type": "Integer", + "description": "The total number of gifts of this type that can be sent by the bot; for limited gifts only", + "html_description": "Optional. The total number of gifts of this type that can be sent by the bot; for limited gifts only", + "rst_description": "*Optional*. The total number of gifts of this type that can be sent by the bot; for limited gifts only\n", + "name": "personal_total_count", + "required": false + }, + { + "type": "Integer", + "description": "The number of remaining gifts of this type that can be sent by the bot; for limited gifts only", + "html_description": "Optional. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only", + "rst_description": "*Optional*. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only\n", + "name": "personal_remaining_count", + "required": false + }, + { + "type": "GiftBackground", + "description": "Background of the gift", + "html_description": "Optional. Background of the gift", + "rst_description": "*Optional*. Background of the gift\n", + "name": "background", + "required": false + }, + { + "type": "Integer", + "description": "The total number of different unique gifts that can be obtained by upgrading the gift", + "html_description": "Optional. The total number of different unique gifts that can be obtained by upgrading the gift", + "rst_description": "*Optional*. The total number of different unique gifts that can be obtained by upgrading the gift\n", + "name": "unique_gift_variant_count", + "required": false + }, + { + "type": "Chat", + "description": "Information about the chat that published the gift", + "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" + }, + { + "anchor": "gifts", + "name": "Gifts", + "description": "This object represent a list of gifts.", + "html_description": "

This object represent a list of gifts.

", + "rst_description": "This object represent a list of gifts.", + "annotations": [ + { + "type": "Array of Gift", + "description": "The list of gifts", + "html_description": "The list of gifts", + "rst_description": "The list of gifts\n", + "name": "gifts", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "uniquegiftmodel", + "name": "UniqueGiftModel", + "description": "This object describes the model of a unique gift.", + "html_description": "

This object describes the model of a unique gift.

", + "rst_description": "This object describes the model of a unique gift.", + "annotations": [ + { + "type": "String", + "description": "Name of the model", + "html_description": "Name of the model", + "rst_description": "Name of the model\n", + "name": "name", + "required": true + }, + { + "type": "Sticker", + "description": "The sticker that represents the unique gift", + "html_description": "The sticker that represents the unique gift", + "rst_description": "The sticker that represents the unique gift\n", + "name": "sticker", + "required": true + }, + { + "type": "Integer", + "description": "The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0 for crafted gifts.", + "html_description": "The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0 for crafted gifts.", + "rst_description": "The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0 for crafted gifts.\n", + "name": "rarity_per_mille", + "required": true + }, + { + "type": "String", + "description": "Rarity of the model if it is a crafted model. Currently, can be 'uncommon', 'rare', 'epic', or 'legendary'.", + "html_description": "Optional. Rarity of the model if it is a crafted model. Currently, can be “uncommon”, “rare”, “epic”, or “legendary”.", + "rst_description": "*Optional*. Rarity of the model if it is a crafted model. Currently, can be 'uncommon', 'rare', 'epic', or 'legendary'.\n", + "name": "rarity", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "uniquegiftsymbol", + "name": "UniqueGiftSymbol", + "description": "This object describes the symbol shown on the pattern of a unique gift.", + "html_description": "

This object describes the symbol shown on the pattern of a unique gift.

", + "rst_description": "This object describes the symbol shown on the pattern of a unique gift.", + "annotations": [ + { + "type": "String", + "description": "Name of the symbol", + "html_description": "Name of the symbol", + "rst_description": "Name of the symbol\n", + "name": "name", + "required": true + }, + { + "type": "Sticker", + "description": "The sticker that represents the unique gift", + "html_description": "The sticker that represents the unique gift", + "rst_description": "The sticker that represents the unique gift\n", + "name": "sticker", + "required": true + }, + { + "type": "Integer", + "description": "The number of unique gifts that receive this model for every 1000 gifts upgraded", + "html_description": "The number of unique gifts that receive this model for every 1000 gifts upgraded", + "rst_description": "The number of unique gifts that receive this model for every 1000 gifts upgraded\n", + "name": "rarity_per_mille", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "uniquegiftbackdropcolors", + "name": "UniqueGiftBackdropColors", + "description": "This object describes the colors of the backdrop of a unique gift.", + "html_description": "

This object describes the colors of the backdrop of a unique gift.

", + "rst_description": "This object describes the colors of the backdrop of a unique gift.", + "annotations": [ + { + "type": "Integer", + "description": "The color in the center of the backdrop in RGB format", + "html_description": "The color in the center of the backdrop in RGB format", + "rst_description": "The color in the center of the backdrop in RGB format\n", + "name": "center_color", + "required": true + }, + { + "type": "Integer", + "description": "The color on the edges of the backdrop in RGB format", + "html_description": "The color on the edges of the backdrop in RGB format", + "rst_description": "The color on the edges of the backdrop in RGB format\n", + "name": "edge_color", + "required": true + }, + { + "type": "Integer", + "description": "The color to be applied to the symbol in RGB format", + "html_description": "The color to be applied to the symbol in RGB format", + "rst_description": "The color to be applied to the symbol in RGB format\n", + "name": "symbol_color", + "required": true + }, + { + "type": "Integer", + "description": "The color for the text on the backdrop in RGB format", + "html_description": "The color for the text on the backdrop in RGB format", + "rst_description": "The color for the text on the backdrop in RGB format\n", + "name": "text_color", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "uniquegiftbackdrop", + "name": "UniqueGiftBackdrop", + "description": "This object describes the backdrop of a unique gift.", + "html_description": "

This object describes the backdrop of a unique gift.

", + "rst_description": "This object describes the backdrop of a unique gift.", + "annotations": [ + { + "type": "String", + "description": "Name of the backdrop", + "html_description": "Name of the backdrop", + "rst_description": "Name of the backdrop\n", + "name": "name", + "required": true + }, + { + "type": "UniqueGiftBackdropColors", + "description": "Colors of the backdrop", + "html_description": "Colors of the backdrop", + "rst_description": "Colors of the backdrop\n", + "name": "colors", + "required": true + }, + { + "type": "Integer", + "description": "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded", + "html_description": "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded", + "rst_description": "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded\n", + "name": "rarity_per_mille", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "uniquegiftcolors", + "name": "UniqueGiftColors", + "description": "This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.", + "html_description": "

This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.

", + "rst_description": "This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.", + "annotations": [ + { + "type": "String", + "description": "Custom emoji identifier of the unique gift's model", + "html_description": "Custom emoji identifier of the unique gift's model", + "rst_description": "Custom emoji identifier of the unique gift's model\n", + "name": "model_custom_emoji_id", + "required": true + }, + { + "type": "String", + "description": "Custom emoji identifier of the unique gift's symbol", + "html_description": "Custom emoji identifier of the unique gift's symbol", + "rst_description": "Custom emoji identifier of the unique gift's symbol\n", + "name": "symbol_custom_emoji_id", + "required": true + }, + { + "type": "Integer", + "description": "Main color used in light themes; RGB format", + "html_description": "Main color used in light themes; RGB format", + "rst_description": "Main color used in light themes; RGB format\n", + "name": "light_theme_main_color", + "required": true + }, + { + "type": "Array of Integer", + "description": "List of 1-3 additional colors used in light themes; RGB format", + "html_description": "List of 1-3 additional colors used in light themes; RGB format", + "rst_description": "List of 1-3 additional colors used in light themes; RGB format\n", + "name": "light_theme_other_colors", + "required": true + }, + { + "type": "Integer", + "description": "Main color used in dark themes; RGB format", + "html_description": "Main color used in dark themes; RGB format", + "rst_description": "Main color used in dark themes; RGB format\n", + "name": "dark_theme_main_color", + "required": true + }, + { + "type": "Array of Integer", + "description": "List of 1-3 additional colors used in dark themes; RGB format", + "html_description": "List of 1-3 additional colors used in dark themes; RGB format", + "rst_description": "List of 1-3 additional colors used in dark themes; RGB format\n", + "name": "dark_theme_other_colors", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "uniquegift", + "name": "UniqueGift", + "description": "This object describes a unique gift that was upgraded from a regular gift.", + "html_description": "

This object describes a unique gift that was upgraded from a regular gift.

", + "rst_description": "This object describes a unique gift that was upgraded from a regular gift.", + "annotations": [ + { + "type": "String", + "description": "Identifier of the regular gift from which the gift was upgraded", + "html_description": "Identifier of the regular gift from which the gift was upgraded", + "rst_description": "Identifier of the regular gift from which the gift was upgraded\n", + "name": "gift_id", + "required": true + }, + { + "type": "String", + "description": "Human-readable name of the regular gift from which this unique gift was upgraded", + "html_description": "Human-readable name of the regular gift from which this unique gift was upgraded", + "rst_description": "Human-readable name of the regular gift from which this unique gift was upgraded\n", + "name": "base_name", + "required": true + }, + { + "type": "String", + "description": "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas", + "html_description": "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas", + "rst_description": "Unique name of the gift. This name can be used in :code:`https://t.me/nft/...` links and story areas\n", + "name": "name", + "required": true + }, + { + "type": "Integer", + "description": "Unique number of the upgraded gift among gifts upgraded from the same regular gift", + "html_description": "Unique number of the upgraded gift among gifts upgraded from the same regular gift", + "rst_description": "Unique number of the upgraded gift among gifts upgraded from the same regular gift\n", + "name": "number", + "required": true + }, + { + "type": "UniqueGiftModel", + "description": "Model of the gift", + "html_description": "Model of the gift", + "rst_description": "Model of the gift\n", + "name": "model", + "required": true + }, + { + "type": "UniqueGiftSymbol", + "description": "Symbol of the gift", + "html_description": "Symbol of the gift", + "rst_description": "Symbol of the gift\n", + "name": "symbol", + "required": true + }, + { + "type": "UniqueGiftBackdrop", + "description": "Backdrop of the gift", + "html_description": "Backdrop of the gift", + "rst_description": "Backdrop of the gift\n", + "name": "backdrop", + "required": true + }, + { + "type": "True", + "description": "True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers", + "html_description": "Optional. True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers", + "rst_description": "*Optional*. :code:`True`, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers\n", + "name": "is_premium", + "required": false + }, + { + "type": "True", + "description": "True, if the gift was used to craft another gift and isn't available anymore", + "html_description": "Optional. True, if the gift was used to craft another gift and isn't available anymore", + "rst_description": "*Optional*. :code:`True`, if the gift was used to craft another gift and isn't available anymore\n", + "name": "is_burned", + "required": false + }, + { + "type": "True", + "description": "True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram", + "html_description": "Optional. True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram", + "rst_description": "*Optional*. :code:`True`, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram\n", + "name": "is_from_blockchain", + "required": false + }, + { + "type": "UniqueGiftColors", + "description": "The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only", + "html_description": "Optional. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only", + "rst_description": "*Optional*. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only\n", + "name": "colors", + "required": false + }, + { + "type": "Chat", + "description": "Information about the chat that published the gift", + "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" + }, + { + "anchor": "giftinfo", + "name": "GiftInfo", + "description": "Describes a service message about a regular gift that was sent or received.", + "html_description": "

Describes a service message about a regular gift that was sent or received.

", + "rst_description": "Describes a service message about a regular gift that was sent or received.", + "annotations": [ + { + "type": "Gift", + "description": "Information about the gift", + "html_description": "Information about the gift", + "rst_description": "Information about the gift\n", + "name": "gift", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts", + "html_description": "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts", + "rst_description": "*Optional*. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts\n", + "name": "owned_gift_id", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible", + "html_description": "Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible", + "rst_description": "*Optional*. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible\n", + "name": "convert_star_count", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that were prepaid for the ability to upgrade the gift", + "html_description": "Optional. Number of Telegram Stars that were prepaid for the ability to upgrade the gift", + "rst_description": "*Optional*. Number of Telegram Stars that were prepaid for the ability to upgrade the gift\n", + "name": "prepaid_upgrade_star_count", + "required": false + }, + { + "type": "True", + "description": "True, if the gift's upgrade was purchased after the gift was sent", + "html_description": "Optional. True, if the gift's upgrade was purchased after the gift was sent", + "rst_description": "*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent\n", + "name": "is_upgrade_separate", + "required": false + }, + { + "type": "True", + "description": "True, if the gift can be upgraded to a unique gift", + "html_description": "Optional. True, if the gift can be upgraded to a unique gift", + "rst_description": "*Optional*. :code:`True`, if the gift can be upgraded to a unique gift\n", + "name": "can_be_upgraded", + "required": false + }, + { + "type": "String", + "description": "Text of the message that was added to the gift", + "html_description": "Optional. Text of the message that was added to the gift", + "rst_description": "*Optional*. Text of the message that was added to the gift\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the text", + "html_description": "Optional. Special entities that appear in the text", + "rst_description": "*Optional*. Special entities that appear in the text\n", + "name": "entities", + "required": false + }, + { + "type": "True", + "description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "rst_description": "*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", + "name": "is_private", + "required": false + }, + { + "type": "Integer", + "description": "Unique number reserved for this gift when upgraded. See the number field in UniqueGift", + "html_description": "Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift", + "rst_description": "*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`\n", + "name": "unique_gift_number", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "uniquegiftinfo", + "name": "UniqueGiftInfo", + "description": "Describes a service message about a unique gift that was sent or received.", + "html_description": "

Describes a service message about a unique gift that was sent or received.

", + "rst_description": "Describes a service message about a unique gift that was sent or received.", + "annotations": [ + { + "type": "UniqueGift", + "description": "Information about the gift", + "html_description": "Information about the gift", + "rst_description": "Information about the gift\n", + "name": "gift", + "required": true + }, + { + "type": "String", + "description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, 'resale' for gifts bought from other users, 'gifted_upgrade' for upgrades purchased after the gift was sent, or 'offer' for gifts bought or sold through gift purchase offers", + "html_description": "Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, “resale” for gifts bought from other users, “gifted_upgrade” for upgrades purchased after the gift was sent, or “offer” for gifts bought or sold through gift purchase offers", + "rst_description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, 'resale' for gifts bought from other users, 'gifted_upgrade' for upgrades purchased after the gift was sent, or 'offer' for gifts bought or sold through gift purchase offers\n", + "name": "origin", + "required": true + }, + { + "type": "String", + "description": "For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins.", + "html_description": "Optional. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins.", + "rst_description": "*Optional*. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins.\n", + "name": "last_resale_currency", + "required": false + }, + { + "type": "Integer", + "description": "For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins", + "html_description": "Optional. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins", + "rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins\n", + "name": "last_resale_amount", + "required": false + }, + { + "type": "String", + "description": "Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts", + "html_description": "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts", + "rst_description": "*Optional*. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts\n", + "name": "owned_gift_id", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift", + "html_description": "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift", + "rst_description": "*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift\n", + "name": "transfer_star_count", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "html_description": "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now\n", + "name": "next_transfer_date", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "ownedgift", + "name": "OwnedGift", + "description": "This object describes a gift received and owned by a user or a chat. Currently, it can be one of\n - OwnedGiftRegular\n - OwnedGiftUnique", + "html_description": "

This object describes a gift received and owned by a user or a chat. Currently, it can be one of

", + "rst_description": "This object describes a gift received and owned by a user or a chat. Currently, it can be one of\n\n - :class:`aiogram.types.owned_gift_regular.OwnedGiftRegular`\n - :class:`aiogram.types.owned_gift_unique.OwnedGiftUnique`", + "annotations": [], + "category": "types" + }, + { + "anchor": "ownedgiftregular", + "name": "OwnedGiftRegular", + "description": "Describes a regular gift owned by a user or a chat.", + "html_description": "

Describes a regular gift owned by a user or a chat.

", + "rst_description": "Describes a regular gift owned by a user or a chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the gift, always 'regular'", + "html_description": "Type of the gift, always “regular”", + "rst_description": "Type of the gift, always 'regular'\n", + "name": "type", + "required": true + }, + { + "type": "Gift", + "description": "Information about the regular gift", + "html_description": "Information about the regular gift", + "rst_description": "Information about the regular gift\n", + "name": "gift", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only", + "html_description": "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only\n", + "name": "owned_gift_id", + "required": false + }, + { + "type": "User", + "description": "Sender of the gift if it is a known user", + "html_description": "Optional. Sender of the gift if it is a known user", + "rst_description": "*Optional*. Sender of the gift if it is a known user\n", + "name": "sender_user", + "required": false + }, + { + "type": "Integer", + "description": "Date the gift was sent in Unix time", + "html_description": "Date the gift was sent in Unix time", + "rst_description": "Date the gift was sent in Unix time\n", + "name": "send_date", + "required": true + }, + { + "type": "String", + "description": "Text of the message that was added to the gift", + "html_description": "Optional. Text of the message that was added to the gift", + "rst_description": "*Optional*. Text of the message that was added to the gift\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the text", + "html_description": "Optional. Special entities that appear in the text", + "rst_description": "*Optional*. Special entities that appear in the text\n", + "name": "entities", + "required": false + }, + { + "type": "True", + "description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "rst_description": "*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", + "name": "is_private", + "required": false + }, + { + "type": "True", + "description": "True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", + "name": "is_saved", + "required": false + }, + { + "type": "True", + "description": "True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only", + "html_description": "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only\n", + "name": "can_be_upgraded", + "required": false + }, + { + "type": "True", + "description": "True, if the gift was refunded and isn't available anymore", + "html_description": "Optional. True, if the gift was refunded and isn't available anymore", + "rst_description": "*Optional*. :code:`True`, if the gift was refunded and isn't available anymore\n", + "name": "was_refunded", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only", + "html_description": "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only\n", + "name": "convert_star_count", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that were paid for the ability to upgrade the gift", + "html_description": "Optional. Number of Telegram Stars that were paid for the ability to upgrade the gift", + "rst_description": "*Optional*. Number of Telegram Stars that were paid for the ability to upgrade the gift\n", + "name": "prepaid_upgrade_star_count", + "required": false + }, + { + "type": "True", + "description": "True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only", + "html_description": "Optional. True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only\n", + "name": "is_upgrade_separate", + "required": false + }, + { + "type": "Integer", + "description": "Unique number reserved for this gift when upgraded. See the number field in UniqueGift", + "html_description": "Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift", + "rst_description": "*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`\n", + "name": "unique_gift_number", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "ownedgiftunique", + "name": "OwnedGiftUnique", + "description": "Describes a unique gift received and owned by a user or a chat.", + "html_description": "

Describes a unique gift received and owned by a user or a chat.

", + "rst_description": "Describes a unique gift received and owned by a user or a chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the gift, always 'unique'", + "html_description": "Type of the gift, always “unique”", + "rst_description": "Type of the gift, always 'unique'\n", + "name": "type", + "required": true + }, + { + "type": "UniqueGift", + "description": "Information about the unique gift", + "html_description": "Information about the unique gift", + "rst_description": "Information about the unique gift\n", + "name": "gift", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only", + "html_description": "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only\n", + "name": "owned_gift_id", + "required": false + }, + { + "type": "User", + "description": "Sender of the gift if it is a known user", + "html_description": "Optional. Sender of the gift if it is a known user", + "rst_description": "*Optional*. Sender of the gift if it is a known user\n", + "name": "sender_user", + "required": false + }, + { + "type": "Integer", + "description": "Date the gift was sent in Unix time", + "html_description": "Date the gift was sent in Unix time", + "rst_description": "Date the gift was sent in Unix time\n", + "name": "send_date", + "required": true + }, + { + "type": "True", + "description": "True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", + "name": "is_saved", + "required": false + }, + { + "type": "True", + "description": "True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only", + "html_description": "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only\n", + "name": "can_be_transferred", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift", + "html_description": "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift", + "rst_description": "*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift\n", + "name": "transfer_star_count", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "html_description": "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now\n", + "name": "next_transfer_date", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "ownedgifts", + "name": "OwnedGifts", + "description": "Contains the list of gifts received and owned by a user or a chat.", + "html_description": "

Contains the list of gifts received and owned by a user or a chat.

", + "rst_description": "Contains the list of gifts received and owned by a user or a chat.", + "annotations": [ + { + "type": "Integer", + "description": "The total number of gifts owned by the user or the chat", + "html_description": "The total number of gifts owned by the user or the chat", + "rst_description": "The total number of gifts owned by the user or the chat\n", + "name": "total_count", + "required": true + }, + { + "type": "Array of OwnedGift", + "description": "The list of gifts", + "html_description": "The list of gifts", + "rst_description": "The list of gifts\n", + "name": "gifts", + "required": true + }, + { + "type": "String", + "description": "Offset for the next request. If empty, then there are no more results", + "html_description": "Optional. Offset for the next request. If empty, then there are no more results", + "rst_description": "*Optional*. Offset for the next request. If empty, then there are no more results\n", + "name": "next_offset", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "acceptedgifttypes", + "name": "AcceptedGiftTypes", + "description": "This object describes the types of gifts that can be gifted to a user or a chat.", + "html_description": "

This object describes the types of gifts that can be gifted to a user or a chat.

", + "rst_description": "This object describes the types of gifts that can be gifted to a user or a chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if unlimited regular gifts are accepted", + "html_description": "True, if unlimited regular gifts are accepted", + "rst_description": ":code:`True`, if unlimited regular gifts are accepted\n", + "name": "unlimited_gifts", + "required": true + }, + { + "type": "Boolean", + "description": "True, if limited regular gifts are accepted", + "html_description": "True, if limited regular gifts are accepted", + "rst_description": ":code:`True`, if limited regular gifts are accepted\n", + "name": "limited_gifts", + "required": true + }, + { + "type": "Boolean", + "description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted", + "html_description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted", + "rst_description": ":code:`True`, if unique gifts or gifts that can be upgraded to unique for free are accepted\n", + "name": "unique_gifts", + "required": true + }, + { + "type": "Boolean", + "description": "True, if a Telegram Premium subscription is accepted", + "html_description": "True, if a Telegram Premium subscription is accepted", + "rst_description": ":code:`True`, if a Telegram Premium subscription is accepted\n", + "name": "premium_subscription", + "required": true + }, + { + "type": "Boolean", + "description": "True, if transfers of unique gifts from channels are accepted", + "html_description": "True, if transfers of unique gifts from channels are accepted", + "rst_description": ":code:`True`, if transfers of unique gifts from channels are accepted\n", + "name": "gifts_from_channels", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "staramount", + "name": "StarAmount", + "description": "Describes an amount of Telegram Stars.", + "html_description": "

Describes an amount of Telegram Stars.

", + "rst_description": "Describes an amount of Telegram Stars.", + "annotations": [ + { + "type": "Integer", + "description": "Integer amount of Telegram Stars, rounded to 0; can be negative", + "html_description": "Integer amount of Telegram Stars, rounded to 0; can be negative", + "rst_description": "Integer amount of Telegram Stars, rounded to 0; can be negative\n", + "name": "amount", + "required": true + }, + { + "type": "Integer", + "description": "The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive", + "html_description": "Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive", + "rst_description": "*Optional*. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if *amount* is non-positive\n", + "name": "nanostar_amount", + "required": false } ], "category": "types" @@ -6487,9 +9304,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 } @@ -6513,9 +9330,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 } @@ -6539,9 +9356,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 }, @@ -6753,9 +9570,9 @@ { "anchor": "chatboostsourcegiveaway", "name": "ChatBoostSourceGiveaway", - "description": "The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.", - "html_description": "

The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.

", - "rst_description": "The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.", + "description": "The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways.", + "html_description": "

The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways.

", + "rst_description": "The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and *prize_star_count* / 500 times for one year for Telegram Star giveaways.", "annotations": [ { "type": "String", @@ -6775,17 +9592,25 @@ }, { "type": "User", - "description": "User that won the prize in the giveaway if any", - "html_description": "Optional. User that won the prize in the giveaway if any", - "rst_description": "*Optional*. User that won the prize in the giveaway if any\n", + "description": "User that won the prize in the giveaway if any; for Telegram Premium giveaways only", + "html_description": "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only", + "rst_description": "*Optional*. User that won the prize in the giveaway if any; for Telegram Premium giveaways only\n", "name": "user", "required": false }, + { + "type": "Integer", + "description": "The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "html_description": "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "rst_description": "*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only\n", + "name": "prize_star_count", + "required": false + }, { "type": "True", "description": "True, if the giveaway was completed, but there was no user to win the prize", - "html_description": "Optional. True, if the giveaway was completed, but there was no user to win the prize", - "rst_description": "*Optional*. True, if the giveaway was completed, but there was no user to win the prize\n", + "html_description": "Optional. True, if the giveaway was completed, but there was no user to win the prize", + "rst_description": "*Optional*. :code:`True`, if the giveaway was completed, but there was no user to win the prize\n", "name": "is_unclaimed", "required": false } @@ -6902,6 +9727,42 @@ ], "category": "types" }, + { + "anchor": "chatownerleft", + "name": "ChatOwnerLeft", + "description": "Describes a service message about the chat owner leaving the chat.", + "html_description": "

Describes a service message about the chat owner leaving the chat.

", + "rst_description": "Describes a service message about the chat owner leaving the chat.", + "annotations": [ + { + "type": "User", + "description": "The user which will be the new owner of the chat if the previous owner does not return to the chat", + "html_description": "Optional. The user which will be the new owner of the chat if the previous owner does not return to the chat", + "rst_description": "*Optional*. The user which will be the new owner of the chat if the previous owner does not return to the chat\n", + "name": "new_owner", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatownerchanged", + "name": "ChatOwnerChanged", + "description": "Describes a service message about an ownership change in the chat.", + "html_description": "

Describes a service message about an ownership change in the chat.

", + "rst_description": "Describes a service message about an ownership change in the chat.", + "annotations": [ + { + "type": "User", + "description": "The new owner of the chat", + "html_description": "The new owner of the chat", + "rst_description": "The new owner of the chat\n", + "name": "new_owner", + "required": true + } + ], + "category": "types" + }, { "anchor": "userchatboosts", "name": "UserChatBoosts", @@ -6920,6 +9781,128 @@ ], "category": "types" }, + { + "anchor": "businessbotrights", + "name": "BusinessBotRights", + "description": "Represents the rights of a business bot.", + "html_description": "

Represents the rights of a business bot.

", + "rst_description": "Represents the rights of a business bot.", + "annotations": [ + { + "type": "True", + "description": "True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours", + "html_description": "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours", + "rst_description": "*Optional*. :code:`True`, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours\n", + "name": "can_reply", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can mark incoming private messages as read", + "html_description": "Optional. True, if the bot can mark incoming private messages as read", + "rst_description": "*Optional*. :code:`True`, if the bot can mark incoming private messages as read\n", + "name": "can_read_messages", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can delete messages sent by the bot", + "html_description": "Optional. True, if the bot can delete messages sent by the bot", + "rst_description": "*Optional*. :code:`True`, if the bot can delete messages sent by the bot\n", + "name": "can_delete_sent_messages", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can delete all private messages in managed chats", + "html_description": "Optional. True, if the bot can delete all private messages in managed chats", + "rst_description": "*Optional*. :code:`True`, if the bot can delete all private messages in managed chats\n", + "name": "can_delete_all_messages", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the first and last name of the business account", + "html_description": "Optional. True, if the bot can edit the first and last name of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the first and last name of the business account\n", + "name": "can_edit_name", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the bio of the business account", + "html_description": "Optional. True, if the bot can edit the bio of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the bio of the business account\n", + "name": "can_edit_bio", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the profile photo of the business account", + "html_description": "Optional. True, if the bot can edit the profile photo of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the profile photo of the business account\n", + "name": "can_edit_profile_photo", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the username of the business account", + "html_description": "Optional. True, if the bot can edit the username of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the username of the business account\n", + "name": "can_edit_username", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can change the privacy settings pertaining to gifts for the business account", + "html_description": "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can change the privacy settings pertaining to gifts for the business account\n", + "name": "can_change_gift_settings", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can view gifts and the amount of Telegram Stars owned by the business account", + "html_description": "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can view gifts and the amount of Telegram Stars owned by the business account\n", + "name": "can_view_gifts_and_stars", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can convert regular gifts owned by the business account to Telegram Stars", + "html_description": "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars", + "rst_description": "*Optional*. :code:`True`, if the bot can convert regular gifts owned by the business account to Telegram Stars\n", + "name": "can_convert_gifts_to_stars", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can transfer and upgrade gifts owned by the business account", + "html_description": "Optional. True, if the bot can transfer and upgrade gifts owned by the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can transfer and upgrade gifts owned by the business account\n", + "name": "can_transfer_and_upgrade_gifts", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts", + "html_description": "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts", + "rst_description": "*Optional*. :code:`True`, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts\n", + "name": "can_transfer_stars", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can post, edit and delete stories on behalf of the business account", + "html_description": "Optional. True, if the bot can post, edit and delete stories on behalf of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can post, edit and delete stories on behalf of the business account\n", + "name": "can_manage_stories", + "required": false + } + ], + "category": "types" + }, { "anchor": "businessconnection", "name": "BusinessConnection", @@ -6960,18 +9943,18 @@ "required": true }, { - "type": "Boolean", - "description": "True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours", - "html_description": "True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours", - "rst_description": "True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours\n", - "name": "can_reply", - "required": true + "type": "BusinessBotRights", + "description": "Rights of the business bot", + "html_description": "Optional. Rights of the business bot", + "rst_description": "*Optional*. Rights of the business bot\n", + "name": "rights", + "required": false }, { "type": "Boolean", "description": "True, if the connection is active", - "html_description": "True, if the connection is active", - "rst_description": "True, if the connection is active\n", + "html_description": "True, if the connection is active", + "rst_description": ":code:`True`, if the connection is active\n", "name": "is_enabled", "required": true } @@ -7012,6 +9995,68 @@ ], "category": "types" }, + { + "anchor": "sentwebappmessage", + "name": "SentWebAppMessage", + "description": "Describes an inline message sent by a Web App on behalf of a user.", + "html_description": "

Describes an inline message sent by a Web App on behalf of a user.

", + "rst_description": "Describes an inline message sent by a `Web App `_ on behalf of a user.", + "annotations": [ + { + "type": "String", + "description": "Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message.", + "html_description": "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message.", + "rst_description": "*Optional*. Identifier of the sent inline message. Available only if there is an `inline keyboard `_ attached to the message.\n", + "name": "inline_message_id", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "preparedinlinemessage", + "name": "PreparedInlineMessage", + "description": "Describes an inline message to be sent by a user of a Mini App.", + "html_description": "

Describes an inline message to be sent by a user of a Mini App.

", + "rst_description": "Describes an inline message to be sent by a user of a Mini App.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier of the prepared message", + "html_description": "Unique identifier of the prepared message", + "rst_description": "Unique identifier of the prepared message\n", + "name": "id", + "required": true + }, + { + "type": "Integer", + "description": "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used", + "html_description": "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used", + "rst_description": "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used\n", + "name": "expiration_date", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "preparedkeyboardbutton", + "name": "PreparedKeyboardButton", + "description": "Describes a keyboard button to be used by a user of a Mini App.", + "html_description": "

Describes a keyboard button to be used by a user of a Mini App.

", + "rst_description": "Describes a keyboard button to be used by a user of a Mini App.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier of the keyboard button", + "html_description": "Unique identifier of the keyboard button", + "rst_description": "Unique identifier of the keyboard button\n", + "name": "id", + "required": true + } + ], + "category": "types" + }, { "anchor": "responseparameters", "name": "ResponseParameters", @@ -7137,13 +10182,29 @@ "required": true }, { - "type": "InputFile or String", + "type": "String", "description": "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 . More information on Sending Files", "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", "rst_description": "*Optional*. 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 » `\n", "name": "thumbnail", "required": false }, + { + "type": "String", + "description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "*Optional*. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `\n", + "name": "cover", + "required": false + }, + { + "type": "Integer", + "description": "Start timestamp for the video in the message", + "html_description": "Optional. Start timestamp for the video in the message", + "rst_description": "*Optional*. Start timestamp for the video in the message\n", + "name": "start_timestamp", + "required": false + }, { "type": "String", "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", @@ -7243,7 +10304,7 @@ "required": true }, { - "type": "InputFile or String", + "type": "String", "description": "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 . More information on Sending Files", "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", "rst_description": "*Optional*. 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 » `\n", @@ -7341,7 +10402,7 @@ "required": true }, { - "type": "InputFile or String", + "type": "String", "description": "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 . More information on Sending Files", "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", "rst_description": "*Optional*. 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 » `\n", @@ -7423,7 +10484,7 @@ "required": true }, { - "type": "InputFile or String", + "type": "String", "description": "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 . More information on Sending Files", "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", "rst_description": "*Optional*. 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 » `\n", @@ -7533,13 +10594,29 @@ "required": true }, { - "type": "InputFile or String", + "type": "String", "description": "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 . More information on Sending Files", "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", "rst_description": "*Optional*. 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 » `\n", "name": "thumbnail", "required": false }, + { + "type": "String", + "description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "*Optional*. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `\n", + "name": "cover", + "required": false + }, + { + "type": "Integer", + "description": "Start timestamp for the video in the message", + "html_description": "Optional. Start timestamp for the video in the message", + "rst_description": "*Optional*. Start timestamp for the video in the message\n", + "name": "start_timestamp", + "required": false + }, { "type": "Integer", "description": "Video width", @@ -7574,6 +10651,160 @@ } ], "category": "types" + }, + { + "anchor": "inputprofilephoto", + "name": "InputProfilePhoto", + "description": "This object describes a profile photo to set. Currently, it can be one of\n - InputProfilePhotoStatic\n - InputProfilePhotoAnimated", + "html_description": "

This object describes a profile photo to set. Currently, it can be one of

", + "rst_description": "This object describes a profile photo to set. Currently, it can be one of\n\n - :class:`aiogram.types.input_profile_photo_static.InputProfilePhotoStatic`\n - :class:`aiogram.types.input_profile_photo_animated.InputProfilePhotoAnimated`", + "annotations": [], + "category": "types" + }, + { + "anchor": "inputprofilephotostatic", + "name": "InputProfilePhotoStatic", + "description": "A static profile photo in the .JPG format.", + "html_description": "

A static profile photo in the .JPG format.

", + "rst_description": "A static profile photo in the .JPG format.", + "annotations": [ + { + "type": "String", + "description": "Type of the profile photo, must be static", + "html_description": "Type of the profile photo, must be static", + "rst_description": "Type of the profile photo, must be *static*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `\n", + "name": "photo", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "inputprofilephotoanimated", + "name": "InputProfilePhotoAnimated", + "description": "An animated profile photo in the MPEG4 format.", + "html_description": "

An animated profile photo in the MPEG4 format.

", + "rst_description": "An animated profile photo in the MPEG4 format.", + "annotations": [ + { + "type": "String", + "description": "Type of the profile photo, must be animated", + "html_description": "Type of the profile photo, must be animated", + "rst_description": "Type of the profile photo, must be *animated*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `\n", + "name": "animation", + "required": true + }, + { + "type": "Float", + "description": "Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.", + "html_description": "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.", + "rst_description": "*Optional*. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.\n", + "name": "main_frame_timestamp", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputstorycontent", + "name": "InputStoryContent", + "description": "This object describes the content of a story to post. Currently, it can be one of\n - InputStoryContentPhoto\n - InputStoryContentVideo", + "html_description": "

This object describes the content of a story to post. Currently, it can be one of

", + "rst_description": "This object describes the content of a story to post. Currently, it can be one of\n\n - :class:`aiogram.types.input_story_content_photo.InputStoryContentPhoto`\n - :class:`aiogram.types.input_story_content_video.InputStoryContentVideo`", + "annotations": [], + "category": "types" + }, + { + "anchor": "inputstorycontentphoto", + "name": "InputStoryContentPhoto", + "description": "Describes a photo to post as a story.", + "html_description": "

Describes a photo to post as a story.

", + "rst_description": "Describes a photo to post as a story.", + "annotations": [ + { + "type": "String", + "description": "Type of the content, must be photo", + "html_description": "Type of the content, must be photo", + "rst_description": "Type of the content, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `\n", + "name": "photo", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "inputstorycontentvideo", + "name": "InputStoryContentVideo", + "description": "Describes a video to post as a story.", + "html_description": "

Describes a video to post as a story.

", + "rst_description": "Describes a video to post as a story.", + "annotations": [ + { + "type": "String", + "description": "Type of the content, must be video", + "html_description": "Type of the content, must be video", + "rst_description": "Type of the content, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the video was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the video was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `\n", + "name": "video", + "required": true + }, + { + "type": "Float", + "description": "Precise duration of the video in seconds; 0-60", + "html_description": "Optional. Precise duration of the video in seconds; 0-60", + "rst_description": "*Optional*. Precise duration of the video in seconds; 0-60\n", + "name": "duration", + "required": false + }, + { + "type": "Float", + "description": "Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.", + "html_description": "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.", + "rst_description": "*Optional*. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.\n", + "name": "cover_frame_timestamp", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the video has no sound", + "html_description": "Optional. Pass True if the video has no sound", + "rst_description": "*Optional*. Pass :code:`True` if the video has no sound\n", + "name": "is_animation", + "required": false + } + ], + "category": "types" } ], "description": "All types used in the Bot API responses are represented as JSON-objects.\nIt is safe to use 32-bit signed integers for storing all Integer fields unless otherwise noted.\nOptional fields may be not returned when irrelevant." @@ -7635,11 +10866,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -7688,6 +10927,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -7696,6 +10943,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, @@ -7733,11 +10988,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -7746,6 +11009,14 @@ "rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n", "name": "from_chat_id" }, + { + "type": "Integer", + "required": false, + "description": "New start timestamp for the forwarded video in the message", + "html_description": "New start timestamp for the forwarded video in the message", + "rst_description": "New start timestamp for the forwarded video in the message\n", + "name": "video_start_timestamp" + }, { "type": "Boolean", "required": false, @@ -7762,6 +11033,22 @@ "rst_description": "Protects the contents of the forwarded message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats", + "html_description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats", + "rst_description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats\n", + "name": "message_effect_id" + }, + { + "type": "SuggestedPostParameters", + "required": false, + "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, @@ -7791,11 +11078,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -7849,11 +11144,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -7870,6 +11173,14 @@ "rst_description": "Message identifier in the chat specified in *from_chat_id*\n", "name": "message_id" }, + { + "type": "Integer", + "required": false, + "description": "New start timestamp for the copied video in the message", + "html_description": "New start timestamp for the copied video in the message", + "rst_description": "New start timestamp for the copied video in the message\n", + "name": "video_start_timestamp" + }, { "type": "String", "required": false, @@ -7918,6 +11229,30 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats", + "html_description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats", + "rst_description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats\n", + "name": "message_effect_id" + }, + { + "type": "SuggestedPostParameters", + "required": false, + "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, @@ -7955,11 +11290,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -8029,11 +11372,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -8098,6 +11449,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -8106,6 +11465,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, @@ -8151,11 +11518,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -8236,6 +11611,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -8244,6 +11627,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, @@ -8289,11 +11680,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -8358,6 +11757,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -8366,6 +11773,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, @@ -8411,11 +11826,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -8456,6 +11879,22 @@ "rst_description": "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 » `\n", "name": "thumbnail" }, + { + "type": "InputFile or String", + "required": false, + "description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `\n", + "name": "cover" + }, + { + "type": "Integer", + "required": false, + "description": "Start timestamp for the video in the message", + "html_description": "Start timestamp for the video in the message", + "rst_description": "Start timestamp for the video in the message\n", + "name": "start_timestamp" + }, { "type": "String", "required": false, @@ -8520,6 +11959,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -8528,6 +11975,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, @@ -8573,11 +12028,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -8674,6 +12137,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -8682,6 +12153,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, @@ -8727,11 +12206,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -8788,6 +12275,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -8796,6 +12291,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, @@ -8841,11 +12344,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -8894,6 +12405,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -8902,6 +12421,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, @@ -8924,24 +12451,48 @@ { "anchor": "sendpaidmedia", "name": "sendPaidMedia", - "description": "Use this method to send paid media to channel chats. On success, the sent Message is returned.", - "html_description": "

Use this method to send paid media to channel chats. On success, the sent Message is returned.

", - "rst_description": "Use this method to send paid media to channel chats. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "description": "Use this method to send paid media. On success, the sent Message is returned.", + "html_description": "

Use this method to send paid media. On success, the sent Message is returned.

", + "rst_description": "Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned.", "annotations": [ + { + "type": "String", + "required": false, + "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 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). 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.", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @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.", + "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 a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", + "name": "message_thread_id" + }, + { + "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, - "description": "The number of Telegram Stars that must be paid to buy access to the media", - "html_description": "The number of Telegram Stars that must be paid to buy access to the media", - "rst_description": "The number of Telegram Stars that must be paid to buy access to the media\n", + "description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000", + "html_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000", + "rst_description": "The number of Telegram Stars that must be paid to buy access to the media; 1-25000\n", "name": "star_count" }, { @@ -8952,6 +12503,14 @@ "rst_description": "A JSON-serialized array describing the media to be sent; up to 10 items\n", "name": "media" }, + { + "type": "String", + "required": false, + "description": "Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "html_description": "Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "rst_description": "Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.\n", + "name": "payload" + }, { "type": "String", "required": false, @@ -9000,6 +12559,22 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "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, @@ -9022,9 +12597,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", @@ -9045,11 +12620,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -9074,6 +12657,14 @@ "rst_description": "Protects the contents of the sent messages from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -9119,11 +12710,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -9188,6 +12787,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -9196,6 +12803,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, @@ -9241,11 +12856,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -9326,6 +12949,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -9334,6 +12965,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, @@ -9379,11 +13018,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -9432,6 +13079,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -9440,6 +13095,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, @@ -9477,17 +13140,17 @@ { "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" }, { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, { @@ -9517,9 +13180,9 @@ { "type": "Array of InputPollOption", "required": true, - "description": "A JSON-serialized list of 2-10 answer options", - "html_description": "A JSON-serialized list of 2-10 answer options", - "rst_description": "A JSON-serialized list of 2-10 answer options\n", + "description": "A JSON-serialized list of 2-12 answer options", + "html_description": "A JSON-serialized list of 2-12 answer options", + "rst_description": "A JSON-serialized list of 2-12 answer options\n", "name": "options" }, { @@ -9541,18 +13204,50 @@ { "type": "Boolean", "required": false, - "description": "True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False", - "html_description": "True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False", - "rst_description": ":code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False`\n", + "description": "Pass True, if the poll allows multiple answers, defaults to False", + "html_description": "Pass True, if the poll allows multiple answers, defaults to False", + "rst_description": "Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False`\n", "name": "allows_multiple_answers" }, { - "type": "Integer", + "type": "Boolean", "required": false, - "description": "0-based identifier of the correct answer option, required for polls in quiz mode", - "html_description": "0-based identifier of the correct answer option, required for polls in quiz mode", - "rst_description": "0-based identifier of the correct answer option, required for polls in quiz mode\n", - "name": "correct_option_id" + "description": "Pass True, if the poll allows to change chosen answer options, defaults to False for quizzes and to True for regular polls", + "html_description": "Pass True, if the poll allows to change chosen answer options, defaults to False for quizzes and to True for regular polls", + "rst_description": "Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls\n", + "name": "allows_revoting" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if the poll options must be shown in random order", + "html_description": "Pass True, if the poll options must be shown in random order", + "rst_description": "Pass :code:`True`, if the poll options must be shown in random order\n", + "name": "shuffle_options" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes", + "html_description": "Pass True, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes", + "rst_description": "Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes\n", + "name": "allow_adding_options" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True, if poll results must be shown only after the poll closes", + "html_description": "Pass True, if poll results must be shown only after the poll closes", + "rst_description": "Pass :code:`True`, if poll results must be shown only after the poll closes\n", + "name": "hide_results_until_closes" + }, + { + "type": "Array of Integer", + "required": false, + "description": "A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode", + "html_description": "A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode", + "rst_description": "A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode\n", + "name": "correct_option_ids" }, { "type": "String", @@ -9581,17 +13276,17 @@ { "type": "Integer", "required": false, - "description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.", - "html_description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.", - "rst_description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*.\n", + "description": "Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with close_date.", + "html_description": "Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with close_date.", + "rst_description": "Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*.\n", "name": "open_period" }, { "type": "Integer", "required": false, - "description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.", - "html_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.", - "rst_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*.\n", + "description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with open_period.", + "html_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with open_period.", + "rst_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*.\n", "name": "close_date" }, { @@ -9602,6 +13297,30 @@ "rst_description": "Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview.\n", "name": "is_closed" }, + { + "type": "String", + "required": false, + "description": "Description of the poll to be sent, 0-1024 characters after entities parsing", + "html_description": "Description of the poll to be sent, 0-1024 characters after entities parsing", + "rst_description": "Description of the poll to be sent, 0-1024 characters after entities parsing\n", + "name": "description" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the poll description. See formatting options for more details.", + "html_description": "Mode for parsing entities in the poll description. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the poll description. See `formatting options `_ for more details.\n", + "name": "description_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of description_parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of description_parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode*\n", + "name": "description_entities" + }, { "type": "Boolean", "required": false, @@ -9618,6 +13337,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -9645,6 +13372,80 @@ ], "category": "methods" }, + { + "anchor": "sendchecklist", + "name": "sendChecklist", + "description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.", + "html_description": "

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

", + "rst_description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent :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": "InputChecklist", + "required": true, + "description": "A JSON-serialized object for the checklist to send", + "html_description": "A JSON-serialized object for the checklist to send", + "rst_description": "A JSON-serialized object for the checklist to send\n", + "name": "checklist" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message silently. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the message effect to be added to the message", + "html_description": "Unique identifier of the message effect to be added to the message", + "rst_description": "Unique identifier of the message effect to be added to the message\n", + "name": "message_effect_id" + }, + { + "type": "ReplyParameters", + "required": false, + "description": "A JSON-serialized object for description of the message to reply to", + "html_description": "A JSON-serialized object for description of the message to reply to", + "rst_description": "A JSON-serialized object for description of the message to reply to\n", + "name": "reply_parameters" + }, + { + "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": "senddice", "name": "sendDice", @@ -9671,11 +13472,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -9700,6 +13509,14 @@ "rst_description": "Protects the contents of the sent message from forwarding\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -9708,6 +13525,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, @@ -9727,6 +13552,64 @@ ], "category": "methods" }, + { + "anchor": "sendmessagedraft", + "name": "sendMessageDraft", + "description": "Use this method to stream a partial message to a user while the message is being generated. Returns True on success.", + "html_description": "

Use this method to stream a partial message to a user while the message is being generated. Returns True on success.

", + "rst_description": "Use this method to stream a partial message to a user while the message is being generated. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target private chat", + "html_description": "Unique identifier for the target private chat", + "rst_description": "Unique identifier for the target private chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread", + "html_description": "Unique identifier for the target message thread", + "rst_description": "Unique identifier for the target message thread\n", + "name": "message_thread_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated", + "html_description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated", + "rst_description": "Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated\n", + "name": "draft_id" + }, + { + "type": "String", + "required": true, + "description": "Text of the message to be sent, 1-4096 characters after entities parsing", + "html_description": "Text of the message to be sent, 1-4096 characters after entities parsing", + "rst_description": "Text of the message to be sent, 1-4096 characters after entities parsing\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message text. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities" + } + ], + "category": "methods" + }, { "anchor": "sendchataction", "name": "sendChatAction", @@ -9745,17 +13628,17 @@ { "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" }, { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread; for supergroups only", - "html_description": "Unique identifier for the target message thread; for supergroups only", - "rst_description": "Unique identifier for the target message thread; for supergroups only\n", + "description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, { @@ -9772,9 +13655,9 @@ { "anchor": "setmessagereaction", "name": "setMessageReaction", - "description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.", - "html_description": "

Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.

", - "rst_description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns :code:`True` on success.", + "description": "Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.", + "html_description": "

Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.

", + "rst_description": "Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", @@ -9795,9 +13678,9 @@ { "type": "Array of ReactionType", "required": false, - "description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.", - "html_description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.", - "rst_description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.\n", + "description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.", + "html_description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.", + "rst_description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.\n", "name": "reaction" }, { @@ -9845,6 +13728,74 @@ ], "category": "methods" }, + { + "anchor": "getuserprofileaudios", + "name": "getUserProfileAudios", + "description": "Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object.", + "html_description": "

Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object.

", + "rst_description": "Use this method to get a list of profile audios for a user. Returns a :class:`aiogram.types.user_profile_audios.UserProfileAudios` object.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": false, + "description": "Sequential number of the first audio to be returned. By default, all audios are returned.", + "html_description": "Sequential number of the first audio to be returned. By default, all audios are returned.", + "rst_description": "Sequential number of the first audio to be returned. By default, all audios are returned.\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + } + ], + "category": "methods" + }, + { + "anchor": "setuseremojistatus", + "name": "setUserEmojiStatus", + "description": "Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.", + "html_description": "

Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.

", + "rst_description": "Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method `requestEmojiStatusAccess `_. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "String", + "required": false, + "description": "Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.", + "html_description": "Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.", + "rst_description": "Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.\n", + "name": "emoji_status_custom_emoji_id" + }, + { + "type": "Integer", + "required": false, + "description": "Expiration date of the emoji status, if any", + "html_description": "Expiration date of the emoji status, if any", + "rst_description": "Expiration date of the emoji status, if any\n", + "name": "emoji_status_expiration_date" + } + ], + "category": "methods" + }, { "anchor": "getfile", "name": "getFile", @@ -10023,9 +13974,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": "Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": "Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat" }, { @@ -10047,9 +13998,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics", - "html_description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics", - "rst_description": "Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics\n", + "description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to True for promotions of channel administrators", + "html_description": "Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to True for promotions of channel administrators", + "rst_description": "Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to :code:`True` for promotions of channel administrators\n", "name": "can_restrict_members" }, { @@ -10103,9 +14054,9 @@ { "type": "Boolean", "required": false, - "description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages" }, { @@ -10131,6 +14082,22 @@ "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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can edit the tags of regular members; for groups and supergroups only", + "html_description": "Pass True if the administrator can edit the tags of regular members; for groups and supergroups only", + "rst_description": "Pass :code:`True` if the administrator can edit the tags of regular members; for groups and supergroups only\n", + "name": "can_manage_tags" } ], "category": "methods" @@ -10169,6 +14136,40 @@ ], "category": "methods" }, + { + "anchor": "setchatmembertag", + "name": "setChatMemberTag", + "description": "Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the can_manage_tags administrator right. Returns True on success.", + "html_description": "

Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the can_manage_tags administrator right. Returns True on success.

", + "rst_description": "Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the *can_manage_tags* administrator right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "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", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "String", + "required": false, + "description": "New tag for the member; 0-16 characters, emoji are not allowed", + "html_description": "New tag for the member; 0-16 characters, emoji are not allowed", + "rst_description": "New tag for the member; 0-16 characters, emoji are not allowed\n", + "name": "tag" + } + ], + "category": "methods" + }, { "anchor": "banchatsenderchat", "name": "banChatSenderChat", @@ -10381,6 +14382,82 @@ ], "category": "methods" }, + { + "anchor": "createchatsubscriptioninvitelink", + "name": "createChatSubscriptionInviteLink", + "description": "Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.", + "html_description": "

Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.

", + "rst_description": "Use this method to create a `subscription invite link `_ for a channel chat. The bot must have the *can_invite_users* administrator rights. The link can be edited using the method :class:`aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink` or revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target channel chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": false, + "description": "Invite link name; 0-32 characters", + "html_description": "Invite link name; 0-32 characters", + "rst_description": "Invite link name; 0-32 characters\n", + "name": "name" + }, + { + "type": "Integer", + "required": true, + "description": "The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).", + "html_description": "The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).", + "rst_description": "The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).\n", + "name": "subscription_period" + }, + { + "type": "Integer", + "required": true, + "description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000", + "html_description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000", + "rst_description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000\n", + "name": "subscription_price" + } + ], + "category": "methods" + }, + { + "anchor": "editchatsubscriptioninvitelink", + "name": "editChatSubscriptionInviteLink", + "description": "Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.", + "html_description": "

Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.

", + "rst_description": "Use this method to edit a subscription invite link created by the bot. The bot must have the *can_invite_users* administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.", + "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": "String", + "required": true, + "description": "The invite link to edit", + "html_description": "The invite link to edit", + "rst_description": "The invite link to edit\n", + "name": "invite_link" + }, + { + "type": "String", + "required": false, + "description": "Invite link name; 0-32 characters", + "html_description": "Invite link name; 0-32 characters", + "rst_description": "Invite link name; 0-32 characters\n", + "name": "name" + } + ], + "category": "methods" + }, { "anchor": "revokechatinvitelink", "name": "revokeChatInviteLink", @@ -10558,10 +14635,18 @@ { "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", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message will be pinned", + "html_description": "Unique identifier of the business connection on behalf of which the message will be pinned", + "rst_description": "Unique identifier of the business connection on behalf of which the message will be pinned\n", + "name": "business_connection_id" + }, { "type": "Integer or String", "required": true, @@ -10592,10 +14677,18 @@ { "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", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the message will be unpinned", + "html_description": "Unique identifier of the business connection on behalf of which the message will be unpinned", + "rst_description": "Unique identifier of the business connection on behalf of which the message will be unpinned\n", + "name": "business_connection_id" + }, { "type": "Integer or String", "required": true, @@ -10607,9 +14700,9 @@ { "type": "Integer", "required": false, - "description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.", - "html_description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.", - "rst_description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.\n", + "description": "Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.", + "html_description": "Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.", + "rst_description": "Identifier of the message to unpin. Required if *business_connection_id* is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.\n", "name": "message_id" } ], @@ -10618,9 +14711,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", @@ -10643,9 +14736,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" } ], @@ -10787,9 +14880,9 @@ { "anchor": "createforumtopic", "name": "createForumTopic", - "description": "Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.", - "html_description": "

Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.

", - "rst_description": "Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object.", + "description": "Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator right. Returns information about the created topic as a ForumTopic object.", + "html_description": "

Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator right. Returns information about the created topic as a ForumTopic object.

", + "rst_description": "Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator right. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object.", "annotations": [ { "type": "Integer or String", @@ -10829,9 +14922,9 @@ { "anchor": "editforumtopic", "name": "editForumTopic", - "description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.", - "html_description": "

Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

", - "rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.", + "description": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.", + "html_description": "

Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

", + "rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", @@ -10923,9 +15016,9 @@ { "anchor": "deleteforumtopic", "name": "deleteForumTopic", - "description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.", - "html_description": "

Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.

", - "rst_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.", + "description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.", + "html_description": "

Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.

", + "rst_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", @@ -10949,9 +15042,9 @@ { "anchor": "unpinallforumtopicmessages", "name": "unpinAllForumTopicMessages", - "description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.", - "html_description": "

Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.

", - "rst_description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.", + "description": "Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.", + "html_description": "

Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.

", + "rst_description": "Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", @@ -10975,9 +15068,9 @@ { "anchor": "editgeneralforumtopic", "name": "editGeneralForumTopic", - "description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.", - "html_description": "

Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.

", - "rst_description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights. Returns :code:`True` on success.", + "description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.", + "html_description": "

Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.

", + "rst_description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", @@ -11182,6 +15275,42 @@ ], "category": "methods" }, + { + "anchor": "getmanagedbottoken", + "name": "getManagedBotToken", + "description": "Use this method to get the token of a managed bot. Returns the token as String on success.", + "html_description": "

Use this method to get the token of a managed bot. Returns the token as String on success.

", + "rst_description": "Use this method to get the token of a managed bot. Returns the token as *String* on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of the managed bot whose token will be returned", + "html_description": "User identifier of the managed bot whose token will be returned", + "rst_description": "User identifier of the managed bot whose token will be returned\n", + "name": "user_id" + } + ], + "category": "methods" + }, + { + "anchor": "replacemanagedbottoken", + "name": "replaceManagedBotToken", + "description": "Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as String on success.", + "html_description": "

Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as String on success.

", + "rst_description": "Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as *String* on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of the managed bot whose token will be replaced", + "html_description": "User identifier of the managed bot whose token will be replaced", + "rst_description": "User identifier of the managed bot whose token will be replaced\n", + "name": "user_id" + } + ], + "category": "methods" + }, { "anchor": "setmycommands", "name": "setMyCommands", @@ -11400,6 +15529,33 @@ ], "category": "methods" }, + { + "anchor": "setmyprofilephoto", + "name": "setMyProfilePhoto", + "description": "Changes the profile photo of the bot. Returns True on success.", + "html_description": "

Changes the profile photo of the bot. Returns True on success.

", + "rst_description": "Changes the profile photo of the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "InputProfilePhoto", + "required": true, + "description": "The new profile photo to set", + "html_description": "The new profile photo to set", + "rst_description": "The new profile photo to set\n", + "name": "photo" + } + ], + "category": "methods" + }, + { + "anchor": "removemyprofilephoto", + "name": "removeMyProfilePhoto", + "description": "Removes the profile photo of the bot. Requires no parameters. Returns True on success.", + "html_description": "

Removes the profile photo of the bot. Requires no parameters. Returns True on success.

", + "rst_description": "Removes the profile photo of the bot. Requires no parameters. Returns :code:`True` on success.", + "annotations": [], + "category": "methods" + }, { "anchor": "setchatmenubutton", "name": "setChatMenuButton", @@ -11487,6 +15643,1241 @@ } ], "category": "methods" + }, + { + "anchor": "getavailablegifts", + "name": "getAvailableGifts", + "description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.", + "html_description": "

Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.

", + "rst_description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object.", + "annotations": [], + "category": "methods" + }, + { + "anchor": "sendgift", + "name": "sendGift", + "description": "Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.", + "html_description": "

Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.

", + "rst_description": "Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.", + "html_description": "Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.", + "rst_description": "Required if *chat_id* is not specified. Unique identifier of the target user who will receive the gift.\n", + "name": "user_id" + }, + { + "type": "Integer or String", + "required": false, + "description": "Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.", + "html_description": "Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.", + "rst_description": "Required if *user_id* is not specified. Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`) that will receive the gift.\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "Identifier of the gift; limited gifts can't be sent to channel chats", + "html_description": "Identifier of the gift; limited gifts can't be sent to channel chats", + "rst_description": "Identifier of the gift; limited gifts can't be sent to channel chats\n", + "name": "gift_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver", + "html_description": "Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver", + "rst_description": "Pass :code:`True` to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver\n", + "name": "pay_for_upgrade" + }, + { + "type": "String", + "required": false, + "description": "Text that will be shown along with the gift; 0-128 characters", + "html_description": "Text that will be shown along with the gift; 0-128 characters", + "rst_description": "Text that will be shown along with the gift; 0-128 characters\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.", + "html_description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.", + "rst_description": "Mode for parsing entities in the text. See `formatting options `_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n", + "name": "text_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.", + "html_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.", + "rst_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n", + "name": "text_entities" + } + ], + "category": "methods" + }, + { + "anchor": "giftpremiumsubscription", + "name": "giftPremiumSubscription", + "description": "Gifts a Telegram Premium subscription to the given user. Returns True on success.", + "html_description": "

Gifts a Telegram Premium subscription to the given user. Returns True on success.

", + "rst_description": "Gifts a Telegram Premium subscription to the given user. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user who will receive a Telegram Premium subscription", + "html_description": "Unique identifier of the target user who will receive a Telegram Premium subscription", + "rst_description": "Unique identifier of the target user who will receive a Telegram Premium subscription\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": true, + "description": "Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12", + "html_description": "Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12", + "rst_description": "Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12\n", + "name": "month_count" + }, + { + "type": "Integer", + "required": true, + "description": "Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months", + "html_description": "Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months", + "rst_description": "Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months\n", + "name": "star_count" + }, + { + "type": "String", + "required": false, + "description": "Text that will be shown along with the service message about the subscription; 0-128 characters", + "html_description": "Text that will be shown along with the service message about the subscription; 0-128 characters", + "rst_description": "Text that will be shown along with the service message about the subscription; 0-128 characters\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.", + "html_description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.", + "rst_description": "Mode for parsing entities in the text. See `formatting options `_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n", + "name": "text_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.", + "html_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.", + "rst_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.\n", + "name": "text_entities" + } + ], + "category": "methods" + }, + { + "anchor": "verifyuser", + "name": "verifyUser", + "description": "Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.", + "html_description": "

Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.

", + "rst_description": "Verifies a user `on behalf of the organization `_ which is represented by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "String", + "required": false, + "description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.", + "html_description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.", + "rst_description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.\n", + "name": "custom_description" + } + ], + "category": "methods" + }, + { + "anchor": "verifychat", + "name": "verifyChat", + "description": "Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.", + "html_description": "

Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.

", + "rst_description": "Verifies a chat `on behalf of the organization `_ which is represented by the bot. 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). 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" + }, + { + "type": "String", + "required": false, + "description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.", + "html_description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.", + "rst_description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.\n", + "name": "custom_description" + } + ], + "category": "methods" + }, + { + "anchor": "removeuserverification", + "name": "removeUserVerification", + "description": "Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.", + "html_description": "

Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.

", + "rst_description": "Removes verification from a user who is currently verified `on behalf of the organization `_ represented by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + } + ], + "category": "methods" + }, + { + "anchor": "removechatverification", + "name": "removeChatVerification", + "description": "Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.", + "html_description": "

Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.

", + "rst_description": "Removes verification from a chat that is currently verified `on behalf of the organization `_ represented by the bot. 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" + } + ], + "category": "methods" + }, + { + "anchor": "readbusinessmessage", + "name": "readBusinessMessage", + "description": "Marks incoming message as read on behalf of a business account. Requires the can_read_messages business bot right. Returns True on success.", + "html_description": "

Marks incoming message as read on behalf of a business account. Requires the can_read_messages business bot right. Returns True on success.

", + "rst_description": "Marks incoming message as read on behalf of a business account. Requires the *can_read_messages* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection on behalf of which to read the message", + "html_description": "Unique identifier of the business connection on behalf of which to read the message", + "rst_description": "Unique identifier of the business connection on behalf of which to read the message\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.", + "html_description": "Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.", + "rst_description": "Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the message to mark as read", + "html_description": "Unique identifier of the message to mark as read", + "rst_description": "Unique identifier of the message to mark as read\n", + "name": "message_id" + } + ], + "category": "methods" + }, + { + "anchor": "deletebusinessmessages", + "name": "deleteBusinessMessages", + "description": "Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.", + "html_description": "

Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.

", + "rst_description": "Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection on behalf of which to delete the messages", + "html_description": "Unique identifier of the business connection on behalf of which to delete the messages", + "rst_description": "Unique identifier of the business connection on behalf of which to delete the messages\n", + "name": "business_connection_id" + }, + { + "type": "Array of Integer", + "required": true, + "description": "A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted", + "html_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted", + "rst_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted\n", + "name": "message_ids" + } + ], + "category": "methods" + }, + { + "anchor": "setbusinessaccountname", + "name": "setBusinessAccountName", + "description": "Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.", + "html_description": "

Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.

", + "rst_description": "Changes the first and last name of a managed business account. Requires the *can_change_name* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": true, + "description": "The new value of the first name for the business account; 1-64 characters", + "html_description": "The new value of the first name for the business account; 1-64 characters", + "rst_description": "The new value of the first name for the business account; 1-64 characters\n", + "name": "first_name" + }, + { + "type": "String", + "required": false, + "description": "The new value of the last name for the business account; 0-64 characters", + "html_description": "The new value of the last name for the business account; 0-64 characters", + "rst_description": "The new value of the last name for the business account; 0-64 characters\n", + "name": "last_name" + } + ], + "category": "methods" + }, + { + "anchor": "setbusinessaccountusername", + "name": "setBusinessAccountUsername", + "description": "Changes the username of a managed business account. Requires the can_change_username business bot right. Returns True on success.", + "html_description": "

Changes the username of a managed business account. Requires the can_change_username business bot right. Returns True on success.

", + "rst_description": "Changes the username of a managed business account. Requires the *can_change_username* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": false, + "description": "The new value of the username for the business account; 0-32 characters", + "html_description": "The new value of the username for the business account; 0-32 characters", + "rst_description": "The new value of the username for the business account; 0-32 characters\n", + "name": "username" + } + ], + "category": "methods" + }, + { + "anchor": "setbusinessaccountbio", + "name": "setBusinessAccountBio", + "description": "Changes the bio of a managed business account. Requires the can_change_bio business bot right. Returns True on success.", + "html_description": "

Changes the bio of a managed business account. Requires the can_change_bio business bot right. Returns True on success.

", + "rst_description": "Changes the bio of a managed business account. Requires the *can_change_bio* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": false, + "description": "The new value of the bio for the business account; 0-140 characters", + "html_description": "The new value of the bio for the business account; 0-140 characters", + "rst_description": "The new value of the bio for the business account; 0-140 characters\n", + "name": "bio" + } + ], + "category": "methods" + }, + { + "anchor": "setbusinessaccountprofilephoto", + "name": "setBusinessAccountProfilePhoto", + "description": "Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.", + "html_description": "

Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.

", + "rst_description": "Changes the profile photo of a managed business account. Requires the *can_edit_profile_photo* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "InputProfilePhoto", + "required": true, + "description": "The new profile photo to set", + "html_description": "The new profile photo to set", + "rst_description": "The new profile photo to set\n", + "name": "photo" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.", + "html_description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.", + "rst_description": "Pass :code:`True` to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.\n", + "name": "is_public" + } + ], + "category": "methods" + }, + { + "anchor": "removebusinessaccountprofilephoto", + "name": "removeBusinessAccountProfilePhoto", + "description": "Removes the current profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.", + "html_description": "

Removes the current profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.

", + "rst_description": "Removes the current profile photo of a managed business account. Requires the *can_edit_profile_photo* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.", + "html_description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.", + "rst_description": "Pass :code:`True` to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.\n", + "name": "is_public" + } + ], + "category": "methods" + }, + { + "anchor": "setbusinessaccountgiftsettings", + "name": "setBusinessAccountGiftSettings", + "description": "Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the can_change_gift_settings business bot right. Returns True on success.", + "html_description": "

Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the can_change_gift_settings business bot right. Returns True on success.

", + "rst_description": "Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the *can_change_gift_settings* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field", + "html_description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field", + "rst_description": "Pass :code:`True`, if a button for sending a gift to the user or by the business account must always be shown in the input field\n", + "name": "show_gift_button" + }, + { + "type": "AcceptedGiftTypes", + "required": true, + "description": "Types of gifts accepted by the business account", + "html_description": "Types of gifts accepted by the business account", + "rst_description": "Types of gifts accepted by the business account\n", + "name": "accepted_gift_types" + } + ], + "category": "methods" + }, + { + "anchor": "getbusinessaccountstarbalance", + "name": "getBusinessAccountStarBalance", + "description": "Returns the amount of Telegram Stars owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns StarAmount on success.", + "html_description": "

Returns the amount of Telegram Stars owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns StarAmount on success.

", + "rst_description": "Returns the amount of Telegram Stars owned by a managed business account. Requires the *can_view_gifts_and_stars* business bot right. Returns :class:`aiogram.types.star_amount.StarAmount` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + } + ], + "category": "methods" + }, + { + "anchor": "transferbusinessaccountstars", + "name": "transferBusinessAccountStars", + "description": "Transfers Telegram Stars from the business account balance to the bot's balance. Requires the can_transfer_stars business bot right. Returns True on success.", + "html_description": "

Transfers Telegram Stars from the business account balance to the bot's balance. Requires the can_transfer_stars business bot right. Returns True on success.

", + "rst_description": "Transfers Telegram Stars from the business account balance to the bot's balance. Requires the *can_transfer_stars* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Number of Telegram Stars to transfer; 1-10000", + "html_description": "Number of Telegram Stars to transfer; 1-10000", + "rst_description": "Number of Telegram Stars to transfer; 1-10000\n", + "name": "star_count" + } + ], + "category": "methods" + }, + { + "anchor": "getbusinessaccountgifts", + "name": "getBusinessAccountGifts", + "description": "Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns OwnedGifts on success.", + "html_description": "

Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns OwnedGifts on success.

", + "rst_description": "Returns the gifts received and owned by a managed business account. Requires the *can_view_gifts_and_stars* business bot right. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that aren't saved to the account's profile page", + "html_description": "Pass True to exclude gifts that aren't saved to the account's profile page", + "rst_description": "Pass :code:`True` to exclude gifts that aren't saved to the account's profile page\n", + "name": "exclude_unsaved" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that are saved to the account's profile page", + "html_description": "Pass True to exclude gifts that are saved to the account's profile page", + "rst_description": "Pass :code:`True` to exclude gifts that are saved to the account's profile page\n", + "name": "exclude_saved" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n", + "name": "exclude_unlimited" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n", + "name": "exclude_limited_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n", + "name": "exclude_limited_non_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude unique gifts", + "html_description": "Pass True to exclude unique gifts", + "rst_description": "Pass :code:`True` to exclude unique gifts\n", + "name": "exclude_unique" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n", + "name": "exclude_from_blockchain" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "html_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n", + "name": "sort_by_price" + }, + { + "type": "String", + "required": false, + "description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results", + "html_description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results", + "rst_description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "html_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n", + "name": "limit" + } + ], + "category": "methods" + }, + { + "anchor": "getusergifts", + "name": "getUserGifts", + "description": "Returns the gifts owned and hosted by a user. Returns OwnedGifts on success.", + "html_description": "

Returns the gifts owned and hosted by a user. Returns OwnedGifts on success.

", + "rst_description": "Returns the gifts owned and hosted by a user. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the user", + "html_description": "Unique identifier of the user", + "rst_description": "Unique identifier of the user\n", + "name": "user_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n", + "name": "exclude_unlimited" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n", + "name": "exclude_limited_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n", + "name": "exclude_limited_non_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n", + "name": "exclude_from_blockchain" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude unique gifts", + "html_description": "Pass True to exclude unique gifts", + "rst_description": "Pass :code:`True` to exclude unique gifts\n", + "name": "exclude_unique" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "html_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n", + "name": "sort_by_price" + }, + { + "type": "String", + "required": false, + "description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results", + "html_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results", + "rst_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "html_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n", + "name": "limit" + } + ], + "category": "methods" + }, + { + "anchor": "getchatgifts", + "name": "getChatGifts", + "description": "Returns the gifts owned by a chat. Returns OwnedGifts on success.", + "html_description": "

Returns the gifts owned by a chat. Returns OwnedGifts on success.

", + "rst_description": "Returns the gifts owned by a chat. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that aren't saved to the chat's profile page. Always True, unless the bot has the can_post_messages administrator right in the channel.", + "html_description": "Pass True to exclude gifts that aren't saved to the chat's profile page. Always True, unless the bot has the can_post_messages administrator right in the channel.", + "rst_description": "Pass :code:`True` to exclude gifts that aren't saved to the chat's profile page. Always :code:`True`, unless the bot has the *can_post_messages* administrator right in the channel.\n", + "name": "exclude_unsaved" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that are saved to the chat's profile page. Always False, unless the bot has the can_post_messages administrator right in the channel.", + "html_description": "Pass True to exclude gifts that are saved to the chat's profile page. Always False, unless the bot has the can_post_messages administrator right in the channel.", + "rst_description": "Pass :code:`True` to exclude gifts that are saved to the chat's profile page. Always :code:`False`, unless the bot has the *can_post_messages* administrator right in the channel.\n", + "name": "exclude_saved" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "html_description": "Pass True to exclude gifts that can be purchased an unlimited number of times", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n", + "name": "exclude_unlimited" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n", + "name": "exclude_limited_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "html_description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique", + "rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n", + "name": "exclude_limited_non_upgradable" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "html_description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram", + "rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n", + "name": "exclude_from_blockchain" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to exclude unique gifts", + "html_description": "Pass True to exclude unique gifts", + "rst_description": "Pass :code:`True` to exclude unique gifts\n", + "name": "exclude_unique" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "html_description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.", + "rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n", + "name": "sort_by_price" + }, + { + "type": "String", + "required": false, + "description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results", + "html_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results", + "rst_description": "Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "html_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100", + "rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n", + "name": "limit" + } + ], + "category": "methods" + }, + { + "anchor": "convertgifttostars", + "name": "convertGiftToStars", + "description": "Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right. Returns True on success.", + "html_description": "

Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right. Returns True on success.

", + "rst_description": "Converts a given regular gift to Telegram Stars. Requires the *can_convert_gifts_to_stars* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": true, + "description": "Unique identifier of the regular gift that should be converted to Telegram Stars", + "html_description": "Unique identifier of the regular gift that should be converted to Telegram Stars", + "rst_description": "Unique identifier of the regular gift that should be converted to Telegram Stars\n", + "name": "owned_gift_id" + } + ], + "category": "methods" + }, + { + "anchor": "upgradegift", + "name": "upgradeGift", + "description": "Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right. Additionally requires the can_transfer_stars business bot right if the upgrade is paid. Returns True on success.", + "html_description": "

Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right. Additionally requires the can_transfer_stars business bot right if the upgrade is paid. Returns True on success.

", + "rst_description": "Upgrades a given regular gift to a unique gift. Requires the *can_transfer_and_upgrade_gifts* business bot right. Additionally requires the *can_transfer_stars* business bot right if the upgrade is paid. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": true, + "description": "Unique identifier of the regular gift that should be upgraded to a unique one", + "html_description": "Unique identifier of the regular gift that should be upgraded to a unique one", + "rst_description": "Unique identifier of the regular gift that should be upgraded to a unique one\n", + "name": "owned_gift_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift", + "html_description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift", + "rst_description": "Pass :code:`True` to keep the original gift text, sender and receiver in the upgraded gift\n", + "name": "keep_original_details" + }, + { + "type": "Integer", + "required": false, + "description": "The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If gift.prepaid_upgrade_star_count > 0, then pass 0, otherwise, the can_transfer_stars business bot right is required and gift.upgrade_star_count must be passed.", + "html_description": "The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If gift.prepaid_upgrade_star_count > 0, then pass 0, otherwise, the can_transfer_stars business bot right is required and gift.upgrade_star_count must be passed.", + "rst_description": "The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If :code:`gift.prepaid_upgrade_star_count > 0`, then pass 0, otherwise, the *can_transfer_stars* business bot right is required and :code:`gift.upgrade_star_count` must be passed.\n", + "name": "star_count" + } + ], + "category": "methods" + }, + { + "anchor": "transfergift", + "name": "transferGift", + "description": "Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business bot right. Requires can_transfer_stars business bot right if the transfer is paid. Returns True on success.", + "html_description": "

Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business bot right. Requires can_transfer_stars business bot right if the transfer is paid. Returns True on success.

", + "rst_description": "Transfers an owned unique gift to another user. Requires the *can_transfer_and_upgrade_gifts* business bot right. Requires *can_transfer_stars* business bot right if the transfer is paid. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "String", + "required": true, + "description": "Unique identifier of the regular gift that should be transferred", + "html_description": "Unique identifier of the regular gift that should be transferred", + "rst_description": "Unique identifier of the regular gift that should be transferred\n", + "name": "owned_gift_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours.", + "html_description": "Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours.", + "rst_description": "Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours.\n", + "name": "new_owner_chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the can_transfer_stars business bot right is required.", + "html_description": "The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the can_transfer_stars business bot right is required.", + "rst_description": "The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the *can_transfer_stars* business bot right is required.\n", + "name": "star_count" + } + ], + "category": "methods" + }, + { + "anchor": "poststory", + "name": "postStory", + "description": "Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.", + "html_description": "

Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.

", + "rst_description": "Posts a story on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :class:`aiogram.types.story.Story` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "InputStoryContent", + "required": true, + "description": "Content of the story", + "html_description": "Content of the story", + "rst_description": "Content of the story\n", + "name": "content" + }, + { + "type": "Integer", + "required": true, + "description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400", + "html_description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400", + "rst_description": "Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400`\n", + "name": "active_period" + }, + { + "type": "String", + "required": false, + "description": "Caption of the story, 0-2048 characters after entities parsing", + "html_description": "Caption of the story, 0-2048 characters after entities parsing", + "rst_description": "Caption of the story, 0-2048 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the story caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the story caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the story 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": "Array of StoryArea", + "required": false, + "description": "A JSON-serialized list of clickable areas to be shown on the story", + "html_description": "A JSON-serialized list of clickable areas to be shown on the story", + "rst_description": "A JSON-serialized list of clickable areas to be shown on the story\n", + "name": "areas" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to keep the story accessible after it expires", + "html_description": "Pass True to keep the story accessible after it expires", + "rst_description": "Pass :code:`True` to keep the story accessible after it expires\n", + "name": "post_to_chat_page" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the content of the story must be protected from forwarding and screenshotting", + "html_description": "Pass True if the content of the story must be protected from forwarding and screenshotting", + "rst_description": "Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting\n", + "name": "protect_content" + } + ], + "category": "methods" + }, + { + "anchor": "repoststory", + "name": "repostStory", + "description": "Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success.", + "html_description": "

Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success.

", + "rst_description": "Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the *can_manage_stories* business bot right for both business accounts. Returns :class:`aiogram.types.story.Story` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the chat which posted the story that should be reposted", + "html_description": "Unique identifier of the chat which posted the story that should be reposted", + "rst_description": "Unique identifier of the chat which posted the story that should be reposted\n", + "name": "from_chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the story that should be reposted", + "html_description": "Unique identifier of the story that should be reposted", + "rst_description": "Unique identifier of the story that should be reposted\n", + "name": "from_story_id" + }, + { + "type": "Integer", + "required": true, + "description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400", + "html_description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400", + "rst_description": "Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400`\n", + "name": "active_period" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to keep the story accessible after it expires", + "html_description": "Pass True to keep the story accessible after it expires", + "rst_description": "Pass :code:`True` to keep the story accessible after it expires\n", + "name": "post_to_chat_page" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the content of the story must be protected from forwarding and screenshotting", + "html_description": "Pass True if the content of the story must be protected from forwarding and screenshotting", + "rst_description": "Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting\n", + "name": "protect_content" + } + ], + "category": "methods" + }, + { + "anchor": "editstory", + "name": "editStory", + "description": "Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.", + "html_description": "

Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.

", + "rst_description": "Edits a story previously posted by the bot on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :class:`aiogram.types.story.Story` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the story to edit", + "html_description": "Unique identifier of the story to edit", + "rst_description": "Unique identifier of the story to edit\n", + "name": "story_id" + }, + { + "type": "InputStoryContent", + "required": true, + "description": "Content of the story", + "html_description": "Content of the story", + "rst_description": "Content of the story\n", + "name": "content" + }, + { + "type": "String", + "required": false, + "description": "Caption of the story, 0-2048 characters after entities parsing", + "html_description": "Caption of the story, 0-2048 characters after entities parsing", + "rst_description": "Caption of the story, 0-2048 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the story caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the story caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the story 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": "Array of StoryArea", + "required": false, + "description": "A JSON-serialized list of clickable areas to be shown on the story", + "html_description": "A JSON-serialized list of clickable areas to be shown on the story", + "rst_description": "A JSON-serialized list of clickable areas to be shown on the story\n", + "name": "areas" + } + ], + "category": "methods" + }, + { + "anchor": "deletestory", + "name": "deleteStory", + "description": "Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success.", + "html_description": "

Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success.

", + "rst_description": "Deletes a story previously posted by the bot on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier of the business connection", + "html_description": "Unique identifier of the business connection", + "rst_description": "Unique identifier of the business connection\n", + "name": "business_connection_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the story to delete", + "html_description": "Unique identifier of the story to delete", + "rst_description": "Unique identifier of the story to delete\n", + "name": "story_id" + } + ], + "category": "methods" + }, + { + "anchor": "answerwebappquery", + "name": "answerWebAppQuery", + "description": "Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.", + "html_description": "

Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.

", + "rst_description": "Use this method to set the result of an interaction with a `Web App `_ and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the query to be answered", + "html_description": "Unique identifier for the query to be answered", + "rst_description": "Unique identifier for the query to be answered\n", + "name": "web_app_query_id" + }, + { + "type": "InlineQueryResult", + "required": true, + "description": "A JSON-serialized object describing the message to be sent", + "html_description": "A JSON-serialized object describing the message to be sent", + "rst_description": "A JSON-serialized object describing the message to be sent\n", + "name": "result" + } + ], + "category": "methods" + }, + { + "anchor": "savepreparedinlinemessage", + "name": "savePreparedInlineMessage", + "description": "Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.", + "html_description": "

Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.

", + "rst_description": "Stores a message that can be sent by a user of a Mini App. Returns a :class:`aiogram.types.prepared_inline_message.PreparedInlineMessage` object.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user that can use the prepared message", + "html_description": "Unique identifier of the target user that can use the prepared message", + "rst_description": "Unique identifier of the target user that can use the prepared message\n", + "name": "user_id" + }, + { + "type": "InlineQueryResult", + "required": true, + "description": "A JSON-serialized object describing the message to be sent", + "html_description": "A JSON-serialized object describing the message to be sent", + "rst_description": "A JSON-serialized object describing the message to be sent\n", + "name": "result" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message can be sent to private chats with users", + "html_description": "Pass True if the message can be sent to private chats with users", + "rst_description": "Pass :code:`True` if the message can be sent to private chats with users\n", + "name": "allow_user_chats" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message can be sent to private chats with bots", + "html_description": "Pass True if the message can be sent to private chats with bots", + "rst_description": "Pass :code:`True` if the message can be sent to private chats with bots\n", + "name": "allow_bot_chats" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message can be sent to group and supergroup chats", + "html_description": "Pass True if the message can be sent to group and supergroup chats", + "rst_description": "Pass :code:`True` if the message can be sent to group and supergroup chats\n", + "name": "allow_group_chats" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message can be sent to channel chats", + "html_description": "Pass True if the message can be sent to channel chats", + "rst_description": "Pass :code:`True` if the message can be sent to channel chats\n", + "name": "allow_channel_chats" + } + ], + "category": "methods" + }, + { + "anchor": "savepreparedkeyboardbutton", + "name": "savePreparedKeyboardButton", + "description": "Stores a keyboard button that can be used by a user within a Mini App. Returns a PreparedKeyboardButton object.", + "html_description": "

Stores a keyboard button that can be used by a user within a Mini App. Returns a PreparedKeyboardButton object.

", + "rst_description": "Stores a keyboard button that can be used by a user within a Mini App. Returns a :class:`aiogram.types.prepared_keyboard_button.PreparedKeyboardButton` object.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user that can use the button", + "html_description": "Unique identifier of the target user that can use the button", + "rst_description": "Unique identifier of the target user that can use the button\n", + "name": "user_id" + }, + { + "type": "KeyboardButton", + "required": true, + "description": "A JSON-serialized object describing the button to be saved. The button must be of the type request_users, request_chat, or request_managed_bot", + "html_description": "A JSON-serialized object describing the button to be saved. The button must be of the type request_users, request_chat, or request_managed_bot", + "rst_description": "A JSON-serialized object describing the button to be saved. The button must be of the type *request_users*, *request_chat*, or *request_managed_bot*\n", + "name": "button" + } + ], + "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." @@ -11662,9 +17053,9 @@ { "anchor": "editmessagemedia", "name": "editMessageMedia", - "description": "Use this method to edit animation, audio, document, photo, or video 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. 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. 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.", + "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", @@ -11865,6 +17256,56 @@ ], "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", @@ -11957,12 +17398,80 @@ ], "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 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", @@ -12246,18 +17755,18 @@ "rst_description": "This object describes a sticker to be added to a sticker set.", "annotations": [ { - "type": "InputFile or String", - "description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass 'attach://' to upload a new one using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files", - "html_description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »", - "rst_description": "The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass 'attach://' to upload a new one using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » `\n", + "type": "String", + "description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass 'attach://' to upload a new file using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files", + "html_description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new file using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »", + "rst_description": "The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass 'attach://' to upload a new file using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » `\n", "name": "sticker", "required": true }, { "type": "String", - "description": "Format of the added sticker, must be one of 'static' for a .WEBP or .PNG image, 'animated' for a .TGS animation, 'video' for a WEBM video", - "html_description": "Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a WEBM video", - "rst_description": "Format of the added sticker, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, 'video' for a **WEBM** video\n", + "description": "Format of the added sticker, must be one of 'static' for a .WEBP or .PNG image, 'animated' for a .TGS animation, 'video' for a .WEBM video", + "html_description": "Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a .WEBM video", + "rst_description": "Format of the added sticker, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, 'video' for a **.WEBM** video\n", "name": "format", "required": true }, @@ -12314,11 +17823,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -12351,6 +17868,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -12359,6 +17884,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, @@ -12756,17 +18289,17 @@ { "type": "InputFile or String", "required": false, - "description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, 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. More information on Sending Files. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", - "html_description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, 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. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", - "rst_description": "A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, 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 » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.\n", + "description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animation-requirements for animated sticker technical requirements), or a .WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, 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. More information on Sending Files. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", + "html_description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animation-requirements for animated sticker technical requirements), or a .WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, 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. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", + "rst_description": "A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animation-requirements `_`https://core.telegram.org/stickers#animation-requirements `_ for animated sticker technical requirements), or a **.WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-requirements `_`https://core.telegram.org/stickers#video-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, 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 » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.\n", "name": "thumbnail" }, { "type": "String", "required": true, - "description": "Format of the thumbnail, must be one of 'static' for a .WEBP or .PNG image, 'animated' for a .TGS animation, or 'video' for a WEBM video", - "html_description": "Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a WEBM video", - "rst_description": "Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **WEBM** video\n", + "description": "Format of the thumbnail, must be one of 'static' for a .WEBP or .PNG image, 'animated' for a .TGS animation, or 'video' for a .WEBM video", + "html_description": "Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a .WEBM video", + "rst_description": "Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **.WEBM** video\n", "name": "format" } ], @@ -13037,14 +18570,6 @@ "name": "url", "required": false }, - { - "type": "Boolean", - "description": "Pass True if you don't want the URL to be shown in the message", - "html_description": "Optional. Pass True if you don't want the URL to be shown in the message", - "rst_description": "*Optional*. Pass :code:`True` if you don't want the URL to be shown in the message\n", - "name": "hide_url", - "required": false - }, { "type": "String", "description": "Short description of the result", @@ -13227,9 +18752,9 @@ }, { "type": "String", - "description": "A valid URL for the GIF file. File size must not exceed 1MB", - "html_description": "A valid URL for the GIF file. File size must not exceed 1MB", - "rst_description": "A valid URL for the GIF file. File size must not exceed 1MB\n", + "description": "A valid URL for the GIF file", + "html_description": "A valid URL for the GIF file", + "rst_description": "A valid URL for the GIF file\n", "name": "gif_url", "required": true }, @@ -13357,9 +18882,9 @@ }, { "type": "String", - "description": "A valid URL for the MPEG4 file. File size must not exceed 1MB", - "html_description": "A valid URL for the MPEG4 file. File size must not exceed 1MB", - "rst_description": "A valid URL for the MPEG4 file. File size must not exceed 1MB\n", + "description": "A valid URL for the MPEG4 file", + "html_description": "A valid URL for the MPEG4 file", + "rst_description": "A valid URL for the MPEG4 file\n", "name": "mpeg4_url", "required": true }, @@ -13870,8 +19395,8 @@ { "type": "InlineKeyboardMarkup", "description": "Inline keyboard attached to the message", - "html_description": "Optional. Inline keyboard attached to the message", - "rst_description": "*Optional*. Inline keyboard attached to the message\n", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", "name": "reply_markup", "required": false }, @@ -15224,9 +20749,9 @@ }, { "type": "String", - "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.\n", "name": "payload", "required": true }, @@ -15418,50 +20943,6 @@ } ], "category": "types" - }, - { - "anchor": "answerwebappquery", - "name": "answerWebAppQuery", - "description": "Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.", - "html_description": "

Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.

", - "rst_description": "Use this method to set the result of an interaction with a `Web App `_ and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned.", - "annotations": [ - { - "type": "String", - "required": true, - "description": "Unique identifier for the query to be answered", - "html_description": "Unique identifier for the query to be answered", - "rst_description": "Unique identifier for the query to be answered\n", - "name": "web_app_query_id" - }, - { - "type": "InlineQueryResult", - "required": true, - "description": "A JSON-serialized object describing the message to be sent", - "html_description": "A JSON-serialized object describing the message to be sent", - "rst_description": "A JSON-serialized object describing the message to be sent\n", - "name": "result" - } - ], - "category": "methods" - }, - { - "anchor": "sentwebappmessage", - "name": "SentWebAppMessage", - "description": "Describes an inline message sent by a Web App on behalf of a user.", - "html_description": "

Describes an inline message sent by a Web App on behalf of a user.

", - "rst_description": "Describes an inline message sent by a `Web App `_ on behalf of a user.", - "annotations": [ - { - "type": "String", - "description": "Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message.", - "html_description": "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message.", - "rst_description": "*Optional*. Identifier of the sent inline message. Available only if there is an `inline keyboard `_ attached to the message.\n", - "name": "inline_message_id", - "required": false - } - ], - "category": "types" } ], "description": "The following methods and objects allow your bot to work in inline mode.\nPlease see our Introduction to Inline bots for more details.\nTo enable this option, send the /setinline command to @BotFather and provide the placeholder text that the user will see in the input field after typing your bot's name." @@ -15488,11 +20969,19 @@ { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, + { + "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, @@ -15512,9 +21001,9 @@ { "type": "String", "required": true, - "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.\n", "name": "payload" }, { @@ -15677,6 +21166,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -15685,6 +21182,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, @@ -15711,6 +21216,14 @@ "html_description": "

Use this method to create a link for an invoice. Returns the created invoice link as String on success.

", "rst_description": "Use this method to create a link for an invoice. Returns the created invoice link as *String* on success.", "annotations": [ + { + "type": "String", + "required": false, + "description": "Unique identifier of the business connection on behalf of which the link will be created. For payments in Telegram Stars only.", + "html_description": "Unique identifier of the business connection on behalf of which the link will be created. For payments in Telegram Stars only.", + "rst_description": "Unique identifier of the business connection on behalf of which the link will be created. For payments in `Telegram Stars `_ only.\n", + "name": "business_connection_id" + }, { "type": "String", "required": true, @@ -15730,9 +21243,9 @@ { "type": "String", "required": true, - "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.\n", "name": "payload" }, { @@ -15759,6 +21272,14 @@ "rst_description": "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 `_.\n", "name": "prices" }, + { + "type": "Integer", + "required": false, + "description": "The number of seconds the subscription will be active for before the next payment. The currency must be set to 'XTR' (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.", + "html_description": "The number of seconds the subscription will be active for before the next payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.", + "rst_description": "The number of seconds the subscription will be active for before the next payment. The currency must be set to 'XTR' (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.\n", + "name": "subscription_period" + }, { "type": "Integer", "required": false, @@ -15908,9 +21429,9 @@ { "type": "String", "required": false, - "description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", - "html_description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", - "rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.\n", + "description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", + "html_description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. “Sorry, delivery to your desired address is unavailable”). Telegram will display this message to the user.", + "rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.\n", "name": "error_message" } ], @@ -15950,6 +21471,15 @@ ], "category": "methods" }, + { + "anchor": "getmystarbalance", + "name": "getMyStarBalance", + "description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.", + "html_description": "

A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.

", + "rst_description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a :class:`aiogram.types.star_amount.StarAmount` object.", + "annotations": [], + "category": "methods" + }, { "anchor": "getstartransactions", "name": "getStarTransactions", @@ -16002,6 +21532,40 @@ ], "category": "methods" }, + { + "anchor": "edituserstarsubscription", + "name": "editUserStarSubscription", + "description": "Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.", + "html_description": "

Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.

", + "rst_description": "Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Identifier of the user whose subscription will be edited", + "html_description": "Identifier of the user whose subscription will be edited", + "rst_description": "Identifier of the user whose subscription will be edited\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Telegram payment identifier for the subscription", + "html_description": "Telegram payment identifier for the subscription", + "rst_description": "Telegram payment identifier for the subscription\n", + "name": "telegram_payment_charge_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.", + "html_description": "Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.", + "rst_description": "Pass :code:`True` to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass :code:`False` to allow the user to re-enable a subscription that was previously canceled by the bot.\n", + "name": "is_canceled" + } + ], + "category": "methods" + }, { "anchor": "labeledprice", "name": "LabeledPrice", @@ -16215,9 +21779,9 @@ { "anchor": "successfulpayment", "name": "SuccessfulPayment", - "description": "This object contains basic information about a successful payment.", - "html_description": "

This object contains basic information about a successful payment.

", - "rst_description": "This object contains basic information about a successful payment.", + "description": "This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control.", + "html_description": "

This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control.

", + "rst_description": "This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control.", "annotations": [ { "type": "String", @@ -16243,6 +21807,30 @@ "name": "invoice_payload", "required": true }, + { + "type": "Integer", + "description": "Expiration date of the subscription, in Unix time; for recurring payments only", + "html_description": "Optional. Expiration date of the subscription, in Unix time; for recurring payments only", + "rst_description": "*Optional*. Expiration date of the subscription, in Unix time; for recurring payments only\n", + "name": "subscription_expiration_date", + "required": false + }, + { + "type": "True", + "description": "True, if the payment is a recurring payment for a subscription", + "html_description": "Optional. True, if the payment is a recurring payment for a subscription", + "rst_description": "*Optional*. :code:`True`, if the payment is a recurring payment for a subscription\n", + "name": "is_recurring", + "required": false + }, + { + "type": "True", + "description": "True, if the payment is the first payment for a subscription", + "html_description": "Optional. True, if the payment is the first payment for a subscription", + "rst_description": "*Optional*. :code:`True`, if the payment is the first payment for a subscription\n", + "name": "is_first_recurring", + "required": false + }, { "type": "String", "description": "Identifier of the shipping option chosen by the user", @@ -16278,6 +21866,56 @@ ], "category": "types" }, + { + "anchor": "refundedpayment", + "name": "RefundedPayment", + "description": "This object contains basic information about a refunded payment.", + "html_description": "

This object contains basic information about a refunded payment.

", + "rst_description": "This object contains basic information about a refunded payment.", + "annotations": [ + { + "type": "String", + "description": "Three-letter ISO 4217 currency code, or 'XTR' for payments in Telegram Stars. Currently, always 'XTR'", + "html_description": "Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. Currently, always “XTR”", + "rst_description": "Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_. Currently, always 'XTR'\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_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).", + "html_description": "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_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).", + "rst_description": "Total refunded price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45`, :code:`total_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).\n", + "name": "total_amount", + "required": true + }, + { + "type": "String", + "description": "Bot-specified invoice payload", + "html_description": "Bot-specified invoice payload", + "rst_description": "Bot-specified invoice payload\n", + "name": "invoice_payload", + "required": true + }, + { + "type": "String", + "description": "Telegram payment identifier", + "html_description": "Telegram payment identifier", + "rst_description": "Telegram payment identifier\n", + "name": "telegram_payment_charge_id", + "required": true + }, + { + "type": "String", + "description": "Provider payment identifier", + "html_description": "Optional. Provider payment identifier", + "rst_description": "*Optional*. Provider payment identifier\n", + "name": "provider_payment_charge_id", + "required": false + } + ], + "category": "types" + }, { "anchor": "shippingquery", "name": "ShippingQuery", @@ -16386,6 +22024,32 @@ ], "category": "types" }, + { + "anchor": "paidmediapurchased", + "name": "PaidMediaPurchased", + "description": "This object contains information about a paid media purchase.", + "html_description": "

This object contains information about a paid media purchase.

", + "rst_description": "This object contains information about a paid media purchase.", + "annotations": [ + { + "type": "User", + "description": "User who purchased the media", + "html_description": "User who purchased the media", + "rst_description": "User who purchased the media\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Bot-specified paid media payload", + "html_description": "Bot-specified paid media payload", + "rst_description": "Bot-specified paid media payload\n", + "name": "paid_media_payload", + "required": true + } + ], + "category": "types" + }, { "anchor": "revenuewithdrawalstate", "name": "RevenueWithdrawalState", @@ -16465,12 +22129,62 @@ ], "category": "types" }, + { + "anchor": "affiliateinfo", + "name": "AffiliateInfo", + "description": "Contains information about the affiliate that received a commission via this transaction.", + "html_description": "

Contains information about the affiliate that received a commission via this transaction.

", + "rst_description": "Contains information about the affiliate that received a commission via this transaction.", + "annotations": [ + { + "type": "User", + "description": "The bot or the user that received an affiliate commission if it was received by a bot or a user", + "html_description": "Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user", + "rst_description": "*Optional*. The bot or the user that received an affiliate commission if it was received by a bot or a user\n", + "name": "affiliate_user", + "required": false + }, + { + "type": "Chat", + "description": "The chat that received an affiliate commission if it was received by a chat", + "html_description": "Optional. The chat that received an affiliate commission if it was received by a chat", + "rst_description": "*Optional*. The chat that received an affiliate commission if it was received by a chat\n", + "name": "affiliate_chat", + "required": false + }, + { + "type": "Integer", + "description": "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users", + "html_description": "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users", + "rst_description": "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users\n", + "name": "commission_per_mille", + "required": true + }, + { + "type": "Integer", + "description": "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds", + "html_description": "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds", + "rst_description": "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds\n", + "name": "amount", + "required": true + }, + { + "type": "Integer", + "description": "The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds", + "html_description": "Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds", + "rst_description": "*Optional*. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds\n", + "name": "nanostar_amount", + "required": false + } + ], + "category": "types" + }, { "anchor": "transactionpartner", "name": "TransactionPartner", - "description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n - TransactionPartnerUser\n - TransactionPartnerFragment\n - TransactionPartnerTelegramAds\n - TransactionPartnerOther", - "html_description": "

This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of

", - "rst_description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n\n - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`\n - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`\n - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`\n - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`", + "description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n - TransactionPartnerUser\n - TransactionPartnerChat\n - TransactionPartnerAffiliateProgram\n - TransactionPartnerFragment\n - TransactionPartnerTelegramAds\n - TransactionPartnerTelegramApi\n - TransactionPartnerOther", + "html_description": "

This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of

", + "rst_description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n\n - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`\n - :class:`aiogram.types.transaction_partner_chat.TransactionPartnerChat`\n - :class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram`\n - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`\n - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`\n - :class:`aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi`\n - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`", "annotations": [], "category": "types" }, @@ -16489,6 +22203,14 @@ "name": "type", "required": true }, + { + "type": "String", + "description": "Type of the transaction, currently one of 'invoice_payment' for payments via invoices, 'paid_media_payment' for payments for paid media, 'gift_purchase' for gifts sent by the bot, 'premium_purchase' for Telegram Premium subscriptions gifted by the bot, 'business_account_transfer' for direct transfers from managed business accounts", + "html_description": "Type of the transaction, currently one of “invoice_payment” for payments via invoices, “paid_media_payment” for payments for paid media, “gift_purchase” for gifts sent by the bot, “premium_purchase” for Telegram Premium subscriptions gifted by the bot, “business_account_transfer” for direct transfers from managed business accounts", + "rst_description": "Type of the transaction, currently one of 'invoice_payment' for payments via invoices, 'paid_media_payment' for payments for paid media, 'gift_purchase' for gifts sent by the bot, 'premium_purchase' for Telegram Premium subscriptions gifted by the bot, 'business_account_transfer' for direct transfers from managed business accounts\n", + "name": "transaction_type", + "required": true + }, { "type": "User", "description": "Information about the user", @@ -16497,13 +22219,129 @@ "name": "user", "required": true }, + { + "type": "AffiliateInfo", + "description": "Information about the affiliate that received a commission via this transaction. Can be available only for 'invoice_payment' and 'paid_media_payment' transactions.", + "html_description": "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for “invoice_payment” and “paid_media_payment” transactions.", + "rst_description": "*Optional*. Information about the affiliate that received a commission via this transaction. Can be available only for 'invoice_payment' and 'paid_media_payment' transactions.\n", + "name": "affiliate", + "required": false + }, { "type": "String", - "description": "Bot-specified invoice payload", - "html_description": "Optional. Bot-specified invoice payload", - "rst_description": "*Optional*. Bot-specified invoice payload\n", + "description": "Bot-specified invoice payload. Can be available only for 'invoice_payment' transactions.", + "html_description": "Optional. Bot-specified invoice payload. Can be available only for “invoice_payment” transactions.", + "rst_description": "*Optional*. Bot-specified invoice payload. Can be available only for 'invoice_payment' transactions.\n", "name": "invoice_payload", "required": false + }, + { + "type": "Integer", + "description": "The duration of the paid subscription. Can be available only for 'invoice_payment' transactions.", + "html_description": "Optional. The duration of the paid subscription. Can be available only for “invoice_payment” transactions.", + "rst_description": "*Optional*. The duration of the paid subscription. Can be available only for 'invoice_payment' transactions.\n", + "name": "subscription_period", + "required": false + }, + { + "type": "Array of PaidMedia", + "description": "Information about the paid media bought by the user; for 'paid_media_payment' transactions only", + "html_description": "Optional. Information about the paid media bought by the user; for “paid_media_payment” transactions only", + "rst_description": "*Optional*. Information about the paid media bought by the user; for 'paid_media_payment' transactions only\n", + "name": "paid_media", + "required": false + }, + { + "type": "String", + "description": "Bot-specified paid media payload. Can be available only for 'paid_media_payment' transactions.", + "html_description": "Optional. Bot-specified paid media payload. Can be available only for “paid_media_payment” transactions.", + "rst_description": "*Optional*. Bot-specified paid media payload. Can be available only for 'paid_media_payment' transactions.\n", + "name": "paid_media_payload", + "required": false + }, + { + "type": "Gift", + "description": "The gift sent to the user by the bot; for 'gift_purchase' transactions only", + "html_description": "Optional. The gift sent to the user by the bot; for “gift_purchase” transactions only", + "rst_description": "*Optional*. The gift sent to the user by the bot; for 'gift_purchase' transactions only\n", + "name": "gift", + "required": false + }, + { + "type": "Integer", + "description": "Number of months the gifted Telegram Premium subscription will be active for; for 'premium_purchase' transactions only", + "html_description": "Optional. Number of months the gifted Telegram Premium subscription will be active for; for “premium_purchase” transactions only", + "rst_description": "*Optional*. Number of months the gifted Telegram Premium subscription will be active for; for 'premium_purchase' transactions only\n", + "name": "premium_subscription_duration", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "transactionpartnerchat", + "name": "TransactionPartnerChat", + "description": "Describes a transaction with a chat.", + "html_description": "

Describes a transaction with a chat.

", + "rst_description": "Describes a transaction with a chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'chat'", + "html_description": "Type of the transaction partner, always “chat”", + "rst_description": "Type of the transaction partner, always 'chat'\n", + "name": "type", + "required": true + }, + { + "type": "Chat", + "description": "Information about the chat", + "html_description": "Information about the chat", + "rst_description": "Information about the chat\n", + "name": "chat", + "required": true + }, + { + "type": "Gift", + "description": "The gift sent to the chat by the bot", + "html_description": "Optional. The gift sent to the chat by the bot", + "rst_description": "*Optional*. The gift sent to the chat by the bot\n", + "name": "gift", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "transactionpartneraffiliateprogram", + "name": "TransactionPartnerAffiliateProgram", + "description": "Describes the affiliate program that issued the affiliate commission received via this transaction.", + "html_description": "

Describes the affiliate program that issued the affiliate commission received via this transaction.

", + "rst_description": "Describes the affiliate program that issued the affiliate commission received via this transaction.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'affiliate_program'", + "html_description": "Type of the transaction partner, always “affiliate_program”", + "rst_description": "Type of the transaction partner, always 'affiliate_program'\n", + "name": "type", + "required": true + }, + { + "type": "User", + "description": "Information about the bot that sponsored the affiliate program", + "html_description": "Optional. Information about the bot that sponsored the affiliate program", + "rst_description": "*Optional*. Information about the bot that sponsored the affiliate program\n", + "name": "sponsor_user", + "required": false + }, + { + "type": "Integer", + "description": "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users", + "html_description": "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users", + "rst_description": "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users\n", + "name": "commission_per_mille", + "required": true } ], "category": "types" @@ -16552,6 +22390,32 @@ ], "category": "types" }, + { + "anchor": "transactionpartnertelegramapi", + "name": "TransactionPartnerTelegramApi", + "description": "Describes a transaction with payment for paid broadcasting.", + "html_description": "

Describes a transaction with payment for paid broadcasting.

", + "rst_description": "Describes a transaction with payment for `paid broadcasting `_.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'telegram_api'", + "html_description": "Type of the transaction partner, always “telegram_api”", + "rst_description": "Type of the transaction partner, always 'telegram_api'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "The number of successful requests that exceeded regular limits and were therefore billed", + "html_description": "The number of successful requests that exceeded regular limits and were therefore billed", + "rst_description": "The number of successful requests that exceeded regular limits and were therefore billed\n", + "name": "request_count", + "required": true + } + ], + "category": "types" + }, { "anchor": "transactionpartnerother", "name": "TransactionPartnerOther", @@ -16573,26 +22437,34 @@ { "anchor": "startransaction", "name": "StarTransaction", - "description": "Describes a Telegram Star transaction.", - "html_description": "

Describes a Telegram Star transaction.

", - "rst_description": "Describes a Telegram Star transaction.", + "description": "Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control.", + "html_description": "

Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control.

", + "rst_description": "Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control.", "annotations": [ { "type": "String", - "description": "Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.", - "html_description": "Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.", - "rst_description": "Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with *SuccessfulPayment.telegram_payment_charge_id* for successful incoming payments from users.\n", + "description": "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.", + "html_description": "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.", + "rst_description": "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with *SuccessfulPayment.telegram_payment_charge_id* for successful incoming payments from users.\n", "name": "id", "required": true }, { "type": "Integer", - "description": "Number of Telegram Stars transferred by the transaction", - "html_description": "Number of Telegram Stars transferred by the transaction", - "rst_description": "Number of Telegram Stars transferred by the transaction\n", + "description": "Integer amount of Telegram Stars transferred by the transaction", + "html_description": "Integer amount of Telegram Stars transferred by the transaction", + "rst_description": "Integer amount of Telegram Stars transferred by the transaction\n", "name": "amount", "required": true }, + { + "type": "Integer", + "description": "The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999", + "html_description": "Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999", + "rst_description": "*Optional*. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999\n", + "name": "nanostar_amount", + "required": false + }, { "type": "Integer", "description": "Date the transaction was created in Unix time", @@ -17283,17 +23155,17 @@ { "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" }, { "type": "Integer", "required": false, - "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", - "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "html_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only", + "rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n", "name": "message_thread_id" }, { @@ -17320,6 +23192,14 @@ "rst_description": "Protects the contents of the sent message from forwarding and saving\n", "name": "protect_content" }, + { + "type": "Boolean", + "required": false, + "description": "Pass 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", + "html_description": "Pass 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", + "rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n", + "name": "allow_paid_broadcast" + }, { "type": "String", "required": false, @@ -17557,7 +23437,7 @@ "category": "types" } ], - "description": "Your bot can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. Create games via @BotFather using the /newgame command. Please note that this kind of power requires responsibility: you will need to accept the terms for each game that your bots will be offering.\n - Games are a new type of content on Telegram, represented by the Game and InlineQueryResultGame objects.\n - Once you've created a game via BotFather, you can send games to chats as regular messages using the sendGame method, or use inline mode with InlineQueryResultGame.\n - If you send the game message without any buttons, it will automatically have a 'Play GameName' button. When this button is pressed, your bot gets a CallbackQuery with the game_short_name of the requested game. You provide the correct URL for this particular user and the app opens the game in the in-app browser.\n - You can manually add multiple buttons to your game message. Please note that the first button in the first row must always launch the game, using the field callback_game in InlineKeyboardButton. You can add extra buttons according to taste: e.g., for a description of the rules, or to open the game's official community.\n - To make your game more attractive, you can upload a GIF animation that demostrates the game to the users via BotFather (see Lumberjack for example).\n - A game message will also display high scores for the current chat. Use setGameScore to post high scores to the chat with the game, add the edit_message parameter to automatically update the message with the current scoreboard.\n - Use getGameHighScores to get data for in-game high score tables.\n - You can also add an extra sharing button for users to share their best score to different chats.\n - For examples of what can be done using this new stuff, check the @gamebot and @gamee bots." + "description": "Your bot can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. Create games via @BotFather using the /newgame command. Please note that this kind of power requires responsibility: you will need to accept the terms for each game that your bots will be offering.\n - Games are a new type of content on Telegram, represented by the Game and InlineQueryResultGame objects.\n - Once you've created a game via BotFather, you can send games to chats as regular messages using the sendGame method, or use inline mode with InlineQueryResultGame.\n - If you send the game message without any buttons, it will automatically have a 'Play GameName' button. When this button is pressed, your bot gets a CallbackQuery with the game_short_name of the requested game. You provide the correct URL for this particular user and the app opens the game in the in-app browser.\n - You can manually add multiple buttons to your game message. Please note that the first button in the first row must always launch the game, using the field callback_game in InlineKeyboardButton. You can add extra buttons according to taste: e.g., for a description of the rules, or to open the game's official community.\n - To make your game more attractive, you can upload a GIF animation that demonstrates the game to the users via BotFather (see Lumberjack for example).\n - A game message will also display high scores for the current chat. Use setGameScore to post high scores to the chat with the game, add the disable_edit_message parameter to disable automatic update of the message with the current scoreboard.\n - Use getGameHighScores to get data for in-game high score tables.\n - You can also add an extra sharing button for users to share their best score to different chats.\n - For examples of what can be done using this new stuff, check the @gamebot and @gamee bots." } ] } diff --git a/.butcher/types/AcceptedGiftTypes/entity.json b/.butcher/types/AcceptedGiftTypes/entity.json new file mode 100644 index 00000000..5292a643 --- /dev/null +++ b/.butcher/types/AcceptedGiftTypes/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "acceptedgifttypes", + "name": "AcceptedGiftTypes", + "description": "This object describes the types of gifts that can be gifted to a user or a chat.", + "html_description": "

This object describes the types of gifts that can be gifted to a user or a chat.

", + "rst_description": "This object describes the types of gifts that can be gifted to a user or a chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if unlimited regular gifts are accepted", + "html_description": "True, if unlimited regular gifts are accepted", + "rst_description": ":code:`True`, if unlimited regular gifts are accepted\n", + "name": "unlimited_gifts", + "required": true + }, + { + "type": "Boolean", + "description": "True, if limited regular gifts are accepted", + "html_description": "True, if limited regular gifts are accepted", + "rst_description": ":code:`True`, if limited regular gifts are accepted\n", + "name": "limited_gifts", + "required": true + }, + { + "type": "Boolean", + "description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted", + "html_description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted", + "rst_description": ":code:`True`, if unique gifts or gifts that can be upgraded to unique for free are accepted\n", + "name": "unique_gifts", + "required": true + }, + { + "type": "Boolean", + "description": "True, if a Telegram Premium subscription is accepted", + "html_description": "True, if a Telegram Premium subscription is accepted", + "rst_description": ":code:`True`, if a Telegram Premium subscription is accepted\n", + "name": "premium_subscription", + "required": true + }, + { + "type": "Boolean", + "description": "True, if transfers of unique gifts from channels are accepted", + "html_description": "True, if transfers of unique gifts from channels are accepted", + "rst_description": ":code:`True`, if transfers of unique gifts from channels are accepted\n", + "name": "gifts_from_channels", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/AffiliateInfo/entity.json b/.butcher/types/AffiliateInfo/entity.json new file mode 100644 index 00000000..f73a4f24 --- /dev/null +++ b/.butcher/types/AffiliateInfo/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "affiliateinfo", + "name": "AffiliateInfo", + "description": "Contains information about the affiliate that received a commission via this transaction.", + "html_description": "

Contains information about the affiliate that received a commission via this transaction.

", + "rst_description": "Contains information about the affiliate that received a commission via this transaction.", + "annotations": [ + { + "type": "User", + "description": "The bot or the user that received an affiliate commission if it was received by a bot or a user", + "html_description": "Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user", + "rst_description": "*Optional*. The bot or the user that received an affiliate commission if it was received by a bot or a user\n", + "name": "affiliate_user", + "required": false + }, + { + "type": "Chat", + "description": "The chat that received an affiliate commission if it was received by a chat", + "html_description": "Optional. The chat that received an affiliate commission if it was received by a chat", + "rst_description": "*Optional*. The chat that received an affiliate commission if it was received by a chat\n", + "name": "affiliate_chat", + "required": false + }, + { + "type": "Integer", + "description": "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users", + "html_description": "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users", + "rst_description": "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users\n", + "name": "commission_per_mille", + "required": true + }, + { + "type": "Integer", + "description": "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds", + "html_description": "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds", + "rst_description": "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds\n", + "name": "amount", + "required": true + }, + { + "type": "Integer", + "description": "The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds", + "html_description": "Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds", + "rst_description": "*Optional*. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds\n", + "name": "nanostar_amount", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BackgroundTypePattern/entity.json b/.butcher/types/BackgroundTypePattern/entity.json index 1f286b9f..336bed87 100644 --- a/.butcher/types/BackgroundTypePattern/entity.json +++ b/.butcher/types/BackgroundTypePattern/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "backgroundtypepattern", "name": "BackgroundTypePattern", - "description": "The background is a PNG or TGV (gzipped subset of SVG with MIME type 'application/x-tgwallpattern') pattern to be combined with the background fill chosen by the user.", - "html_description": "

The background is a PNG or TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user.

", - "rst_description": "The background is a PNG or TGV (gzipped subset of SVG with MIME type 'application/x-tgwallpattern') pattern to be combined with the background fill chosen by the user.", + "description": "The background is a .PNG or .TGV (gzipped subset of SVG with MIME type 'application/x-tgwallpattern') pattern to be combined with the background fill chosen by the user.", + "html_description": "

The background is a .PNG or .TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user.

", + "rst_description": "The background is a .PNG or .TGV (gzipped subset of SVG with MIME type 'application/x-tgwallpattern') pattern to be combined with the background fill chosen by the user.", "annotations": [ { "type": "String", 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/BusinessBotRights/entity.json b/.butcher/types/BusinessBotRights/entity.json new file mode 100644 index 00000000..7dc99a03 --- /dev/null +++ b/.butcher/types/BusinessBotRights/entity.json @@ -0,0 +1,141 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "businessbotrights", + "name": "BusinessBotRights", + "description": "Represents the rights of a business bot.", + "html_description": "

Represents the rights of a business bot.

", + "rst_description": "Represents the rights of a business bot.", + "annotations": [ + { + "type": "True", + "description": "True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours", + "html_description": "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours", + "rst_description": "*Optional*. :code:`True`, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours\n", + "name": "can_reply", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can mark incoming private messages as read", + "html_description": "Optional. True, if the bot can mark incoming private messages as read", + "rst_description": "*Optional*. :code:`True`, if the bot can mark incoming private messages as read\n", + "name": "can_read_messages", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can delete messages sent by the bot", + "html_description": "Optional. True, if the bot can delete messages sent by the bot", + "rst_description": "*Optional*. :code:`True`, if the bot can delete messages sent by the bot\n", + "name": "can_delete_sent_messages", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can delete all private messages in managed chats", + "html_description": "Optional. True, if the bot can delete all private messages in managed chats", + "rst_description": "*Optional*. :code:`True`, if the bot can delete all private messages in managed chats\n", + "name": "can_delete_all_messages", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the first and last name of the business account", + "html_description": "Optional. True, if the bot can edit the first and last name of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the first and last name of the business account\n", + "name": "can_edit_name", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the bio of the business account", + "html_description": "Optional. True, if the bot can edit the bio of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the bio of the business account\n", + "name": "can_edit_bio", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the profile photo of the business account", + "html_description": "Optional. True, if the bot can edit the profile photo of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the profile photo of the business account\n", + "name": "can_edit_profile_photo", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can edit the username of the business account", + "html_description": "Optional. True, if the bot can edit the username of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can edit the username of the business account\n", + "name": "can_edit_username", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can change the privacy settings pertaining to gifts for the business account", + "html_description": "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can change the privacy settings pertaining to gifts for the business account\n", + "name": "can_change_gift_settings", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can view gifts and the amount of Telegram Stars owned by the business account", + "html_description": "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can view gifts and the amount of Telegram Stars owned by the business account\n", + "name": "can_view_gifts_and_stars", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can convert regular gifts owned by the business account to Telegram Stars", + "html_description": "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars", + "rst_description": "*Optional*. :code:`True`, if the bot can convert regular gifts owned by the business account to Telegram Stars\n", + "name": "can_convert_gifts_to_stars", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can transfer and upgrade gifts owned by the business account", + "html_description": "Optional. True, if the bot can transfer and upgrade gifts owned by the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can transfer and upgrade gifts owned by the business account\n", + "name": "can_transfer_and_upgrade_gifts", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts", + "html_description": "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts", + "rst_description": "*Optional*. :code:`True`, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts\n", + "name": "can_transfer_stars", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can post, edit and delete stories on behalf of the business account", + "html_description": "Optional. True, if the bot can post, edit and delete stories on behalf of the business account", + "rst_description": "*Optional*. :code:`True`, if the bot can post, edit and delete stories on behalf of the business account\n", + "name": "can_manage_stories", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can delete messages sent by the bot", + "html_description": "Optional. True, if the bot can delete messages sent by the bot", + "rst_description": "*Optional*. True, if the bot can delete messages sent by the bot\n", + "name": "can_delete_outgoing_messages", + "required": false, + "deprecated": { + "version": "9.1", + "release_date": "2025-07-03" + } + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BusinessConnection/entity.json b/.butcher/types/BusinessConnection/entity.json index 09b9a0ef..1eeec3df 100644 --- a/.butcher/types/BusinessConnection/entity.json +++ b/.butcher/types/BusinessConnection/entity.json @@ -43,21 +43,33 @@ "name": "date", "required": true }, + { + "type": "BusinessBotRights", + "description": "Rights of the business bot", + "html_description": "Optional. Rights of the business bot", + "rst_description": "*Optional*. Rights of the business bot\n", + "name": "rights", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the connection is active", + "html_description": "True, if the connection is active", + "rst_description": ":code:`True`, if the connection is active\n", + "name": "is_enabled", + "required": true + }, { "type": "Boolean", "description": "True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours", "html_description": "True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours", "rst_description": "True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours\n", "name": "can_reply", - "required": true - }, - { - "type": "Boolean", - "description": "True, if the connection is active", - "html_description": "True, if the connection is active", - "rst_description": "True, if the connection is active\n", - "name": "is_enabled", - "required": true + "required": false, + "deprecated": { + "version": "9.0", + "release_date": "2025-04-11" + } } ], "category": "types" diff --git a/.butcher/types/Chat/aliases.yml b/.butcher/types/Chat/aliases.yml index 89b5843c..7a03c4a9 100644 --- a/.butcher/types/Chat/aliases.yml +++ b/.butcher/types/Chat/aliases.yml @@ -71,6 +71,10 @@ set_administrator_custom_title: method: setChatAdministratorCustomTitle fill: *self +set_member_tag: + method: setChatMemberTag + fill: *self + set_permissions: method: setChatPermissions fill: *self 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 21f5e36c..f271d1fd 100644 --- a/.butcher/types/ChatAdministratorRights/entity.json +++ b/.butcher/types/ChatAdministratorRights/entity.json @@ -21,9 +21,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat", "required": true }, @@ -101,9 +101,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages", "required": false }, @@ -130,6 +130,22 @@ "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 + }, + { + "type": "Boolean", + "description": "True, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.", + "html_description": "Optional. True, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.\n", + "name": "can_manage_tags", + "required": false } ], "category": "types" diff --git a/.butcher/types/ChatBoostSourceGiveaway/entity.json b/.butcher/types/ChatBoostSourceGiveaway/entity.json index f01133f3..f6850a07 100644 --- a/.butcher/types/ChatBoostSourceGiveaway/entity.json +++ b/.butcher/types/ChatBoostSourceGiveaway/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "chatboostsourcegiveaway", "name": "ChatBoostSourceGiveaway", - "description": "The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.", - "html_description": "

The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.

", - "rst_description": "The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.", + "description": "The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways.", + "html_description": "

The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways.

", + "rst_description": "The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and *prize_star_count* / 500 times for one year for Telegram Star giveaways.", "annotations": [ { "type": "String", @@ -29,17 +29,25 @@ }, { "type": "User", - "description": "User that won the prize in the giveaway if any", - "html_description": "Optional. User that won the prize in the giveaway if any", - "rst_description": "*Optional*. User that won the prize in the giveaway if any\n", + "description": "User that won the prize in the giveaway if any; for Telegram Premium giveaways only", + "html_description": "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only", + "rst_description": "*Optional*. User that won the prize in the giveaway if any; for Telegram Premium giveaways only\n", "name": "user", "required": false }, + { + "type": "Integer", + "description": "The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "html_description": "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "rst_description": "*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only\n", + "name": "prize_star_count", + "required": false + }, { "type": "True", "description": "True, if the giveaway was completed, but there was no user to win the prize", - "html_description": "Optional. True, if the giveaway was completed, but there was no user to win the prize", - "rst_description": "*Optional*. True, if the giveaway was completed, but there was no user to win the prize\n", + "html_description": "Optional. True, if the giveaway was completed, but there was no user to win the prize", + "rst_description": "*Optional*. :code:`True`, if the giveaway was completed, but there was no user to win the prize\n", "name": "is_unclaimed", "required": false } diff --git a/.butcher/types/ChatFullInfo/entity.json b/.butcher/types/ChatFullInfo/entity.json index 0d7dac49..3627d65d 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.", @@ -259,6 +275,14 @@ "name": "permissions", "required": false }, + { + "type": "AcceptedGiftTypes", + "description": "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats", + "html_description": "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats", + "rst_description": "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats\n", + "name": "accepted_gift_types", + "required": true + }, { "type": "True", "description": "True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.", @@ -362,6 +386,50 @@ "rst_description": "*Optional*. For supergroups, the location to which the supergroup is connected\n", "name": "location", "required": false + }, + { + "type": "UserRating", + "description": "For private chats, the rating of the user if any", + "html_description": "Optional. For private chats, the rating of the user if any", + "rst_description": "*Optional*. For private chats, the rating of the user if any\n", + "name": "rating", + "required": false + }, + { + "type": "Audio", + "description": "For private chats, the first audio added to the profile of the user", + "html_description": "Optional. For private chats, the first audio added to the profile of the user", + "rst_description": "*Optional*. For private chats, the first audio added to the profile of the user\n", + "name": "first_profile_audio", + "required": false + }, + { + "type": "UniqueGiftColors", + "description": "The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews", + "html_description": "Optional. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews", + "rst_description": "*Optional*. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews\n", + "name": "unique_gift_colors", + "required": false + }, + { + "type": "Integer", + "description": "The number of Telegram Stars a general user have to pay to send a message to the chat", + "html_description": "Optional. The number of Telegram Stars a general user have to pay to send a message to the chat", + "rst_description": "*Optional*. The number of Telegram Stars a general user have to pay to send a message to the chat\n", + "name": "paid_message_star_count", + "required": false + }, + { + "type": "True", + "description": "True, if gifts can be sent to the chat", + "html_description": "Optional. True, if gifts can be sent to the chat", + "rst_description": "*Optional*. :code:`True`, if gifts can be sent to the chat\n", + "name": "can_send_gift", + "required": false, + "deprecated": { + "version": "9.0", + "release_date": "2025-04-11" + } } ], "category": "types" diff --git a/.butcher/types/ChatInviteLink/entity.json b/.butcher/types/ChatInviteLink/entity.json index d2441682..c656d1a7 100644 --- a/.butcher/types/ChatInviteLink/entity.json +++ b/.butcher/types/ChatInviteLink/entity.json @@ -82,6 +82,22 @@ "rst_description": "*Optional*. Number of pending join requests created using this link\n", "name": "pending_join_request_count", "required": false + }, + { + "type": "Integer", + "description": "The number of seconds the subscription will be active for before the next payment", + "html_description": "Optional. The number of seconds the subscription will be active for before the next payment", + "rst_description": "*Optional*. The number of seconds the subscription will be active for before the next payment\n", + "name": "subscription_period", + "required": false + }, + { + "type": "Integer", + "description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link", + "html_description": "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link", + "rst_description": "*Optional*. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link\n", + "name": "subscription_price", + "required": false } ], "category": "types" diff --git a/.butcher/types/ChatMemberAdministrator/entity.json b/.butcher/types/ChatMemberAdministrator/entity.json index f217b3fe..7b55cc7a 100644 --- a/.butcher/types/ChatMemberAdministrator/entity.json +++ b/.butcher/types/ChatMemberAdministrator/entity.json @@ -45,9 +45,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", - "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.\n", + "description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "html_description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", + "rst_description": ":code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.\n", "name": "can_manage_chat", "required": true }, @@ -125,9 +125,9 @@ }, { "type": "Boolean", - "description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "html_description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only", - "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n", + "description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "html_description": "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only\n", "name": "can_post_messages", "required": false }, @@ -155,6 +155,22 @@ "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": "Boolean", + "description": "True, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.", + "html_description": "Optional. True, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.\n", + "name": "can_manage_tags", + "required": false + }, { "type": "String", "description": "Custom title for this user", diff --git a/.butcher/types/ChatMemberMember/entity.json b/.butcher/types/ChatMemberMember/entity.json index 90d6016a..ed1a8304 100644 --- a/.butcher/types/ChatMemberMember/entity.json +++ b/.butcher/types/ChatMemberMember/entity.json @@ -19,6 +19,14 @@ "name": "status", "required": true }, + { + "type": "String", + "description": "Tag of the member", + "html_description": "Optional. Tag of the member", + "rst_description": "*Optional*. Tag of the member\n", + "name": "tag", + "required": false + }, { "type": "User", "description": "Information about the user", @@ -26,6 +34,14 @@ "rst_description": "Information about the user\n", "name": "user", "required": true + }, + { + "type": "Integer", + "description": "Date when the user's subscription will expire; Unix time", + "html_description": "Optional. Date when the user's subscription will expire; Unix time", + "rst_description": "*Optional*. Date when the user's subscription will expire; Unix time\n", + "name": "until_date", + "required": false } ], "category": "types" diff --git a/.butcher/types/ChatMemberMember/replace.yml b/.butcher/types/ChatMemberMember/replace.yml new file mode 100644 index 00000000..e264e991 --- /dev/null +++ b/.butcher/types/ChatMemberMember/replace.yml @@ -0,0 +1,5 @@ +annotations: + until_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/ChatMemberRestricted/entity.json b/.butcher/types/ChatMemberRestricted/entity.json index e822ae41..f0572284 100644 --- a/.butcher/types/ChatMemberRestricted/entity.json +++ b/.butcher/types/ChatMemberRestricted/entity.json @@ -19,6 +19,14 @@ "name": "status", "required": true }, + { + "type": "String", + "description": "Tag of the member", + "html_description": "Optional. Tag of the member", + "rst_description": "*Optional*. Tag of the member\n", + "name": "tag", + "required": false + }, { "type": "User", "description": "Information about the user", @@ -93,9 +101,9 @@ }, { "type": "Boolean", - "description": "True, if the user is allowed to send polls", - "html_description": "True, if the user is allowed to send polls", - "rst_description": ":code:`True`, if the user is allowed to send polls\n", + "description": "True, if the user is allowed to send polls and checklists", + "html_description": "True, if the user is allowed to send polls and checklists", + "rst_description": ":code:`True`, if the user is allowed to send polls and checklists\n", "name": "can_send_polls", "required": true }, @@ -115,6 +123,14 @@ "name": "can_add_web_page_previews", "required": true }, + { + "type": "Boolean", + "description": "True, if the user is allowed to edit their own tag", + "html_description": "True, if the user is allowed to edit their own tag", + "rst_description": ":code:`True`, if the user is allowed to edit their own tag\n", + "name": "can_edit_tag", + "required": true + }, { "type": "Boolean", "description": "True, if the user is allowed to change the chat title, photo and other settings", diff --git a/.butcher/types/ChatMemberUpdated/entity.json b/.butcher/types/ChatMemberUpdated/entity.json index e76773dc..e20b3ee6 100644 --- a/.butcher/types/ChatMemberUpdated/entity.json +++ b/.butcher/types/ChatMemberUpdated/entity.json @@ -62,16 +62,16 @@ { "type": "Boolean", "description": "True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", - "html_description": "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", - "rst_description": "*Optional*. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator\n", + "html_description": "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", + "rst_description": "*Optional*. :code:`True`, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator\n", "name": "via_join_request", "required": false }, { "type": "Boolean", "description": "True, if the user joined the chat via a chat folder invite link", - "html_description": "Optional. True, if the user joined the chat via a chat folder invite link", - "rst_description": "*Optional*. True, if the user joined the chat via a chat folder invite link\n", + "html_description": "Optional. True, if the user joined the chat via a chat folder invite link", + "rst_description": "*Optional*. :code:`True`, if the user joined the chat via a chat folder invite link\n", "name": "via_chat_folder_invite_link", "required": false } diff --git a/.butcher/types/ChatOwnerChanged/entity.json b/.butcher/types/ChatOwnerChanged/entity.json new file mode 100644 index 00000000..083be3fa --- /dev/null +++ b/.butcher/types/ChatOwnerChanged/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatownerchanged", + "name": "ChatOwnerChanged", + "description": "Describes a service message about an ownership change in the chat.", + "html_description": "

Describes a service message about an ownership change in the chat.

", + "rst_description": "Describes a service message about an ownership change in the chat.", + "annotations": [ + { + "type": "User", + "description": "The new owner of the chat", + "html_description": "The new owner of the chat", + "rst_description": "The new owner of the chat\n", + "name": "new_owner", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatOwnerLeft/entity.json b/.butcher/types/ChatOwnerLeft/entity.json new file mode 100644 index 00000000..bbeac660 --- /dev/null +++ b/.butcher/types/ChatOwnerLeft/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatownerleft", + "name": "ChatOwnerLeft", + "description": "Describes a service message about the chat owner leaving the chat.", + "html_description": "

Describes a service message about the chat owner leaving the chat.

", + "rst_description": "Describes a service message about the chat owner leaving the chat.", + "annotations": [ + { + "type": "User", + "description": "The user which will be the new owner of the chat if the previous owner does not return to the chat", + "html_description": "Optional. The user which will be the new owner of the chat if the previous owner does not return to the chat", + "rst_description": "*Optional*. The user which will be the new owner of the chat if the previous owner does not return to the chat\n", + "name": "new_owner", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatPermissions/entity.json b/.butcher/types/ChatPermissions/entity.json index b3209460..d6ad3cc9 100644 --- a/.butcher/types/ChatPermissions/entity.json +++ b/.butcher/types/ChatPermissions/entity.json @@ -69,9 +69,9 @@ }, { "type": "Boolean", - "description": "True, if the user is allowed to send polls", - "html_description": "Optional. True, if the user is allowed to send polls", - "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls\n", + "description": "True, if the user is allowed to send polls and checklists", + "html_description": "Optional. True, if the user is allowed to send polls and checklists", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls and checklists\n", "name": "can_send_polls", "required": false }, @@ -91,6 +91,14 @@ "name": "can_add_web_page_previews", "required": false }, + { + "type": "Boolean", + "description": "True, if the user is allowed to edit their own tag", + "html_description": "Optional. True, if the user is allowed to edit their own tag", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to edit their own tag\n", + "name": "can_edit_tag", + "required": false + }, { "type": "Boolean", "description": "True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups", diff --git a/.butcher/types/Checklist/entity.json b/.butcher/types/Checklist/entity.json new file mode 100644 index 00000000..0d415f2a --- /dev/null +++ b/.butcher/types/Checklist/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "checklist", + "name": "Checklist", + "description": "Describes a checklist.", + "html_description": "

Describes a checklist.

", + "rst_description": "Describes a checklist.", + "annotations": [ + { + "type": "String", + "description": "Title of the checklist", + "html_description": "Title of the checklist", + "rst_description": "Title of the checklist\n", + "name": "title", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the checklist title", + "html_description": "Optional. Special entities that appear in the checklist title", + "rst_description": "*Optional*. Special entities that appear in the checklist title\n", + "name": "title_entities", + "required": false + }, + { + "type": "Array of ChecklistTask", + "description": "List of tasks in the checklist", + "html_description": "List of tasks in the checklist", + "rst_description": "List of tasks in the checklist\n", + "name": "tasks", + "required": true + }, + { + "type": "True", + "description": "True, if users other than the creator of the list can add tasks to the list", + "html_description": "Optional. True, if users other than the creator of the list can add tasks to the list", + "rst_description": "*Optional*. :code:`True`, if users other than the creator of the list can add tasks to the list\n", + "name": "others_can_add_tasks", + "required": false + }, + { + "type": "True", + "description": "True, if users other than the creator of the list can mark tasks as done or not done", + "html_description": "Optional. True, if users other than the creator of the list can mark tasks as done or not done", + "rst_description": "*Optional*. :code:`True`, if users other than the creator of the list can mark tasks as done or not done\n", + "name": "others_can_mark_tasks_as_done", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChecklistTask/entity.json b/.butcher/types/ChecklistTask/entity.json new file mode 100644 index 00000000..7dd1af45 --- /dev/null +++ b/.butcher/types/ChecklistTask/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "checklisttask", + "name": "ChecklistTask", + "description": "Describes a task in a checklist.", + "html_description": "

Describes a task in a checklist.

", + "rst_description": "Describes a task in a checklist.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier of the task", + "html_description": "Unique identifier of the task", + "rst_description": "Unique identifier of the task\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Text of the task", + "html_description": "Text of the task", + "rst_description": "Text of the task\n", + "name": "text", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the task text", + "html_description": "Optional. Special entities that appear in the task text", + "rst_description": "*Optional*. Special entities that appear in the task text\n", + "name": "text_entities", + "required": false + }, + { + "type": "User", + "description": "User that completed the task; omitted if the task wasn't completed by a user", + "html_description": "Optional. User that completed the task; omitted if the task wasn't completed by a user", + "rst_description": "*Optional*. User that completed the task; omitted if the task wasn't completed by a user\n", + "name": "completed_by_user", + "required": false + }, + { + "type": "Chat", + "description": "Chat that completed the task; omitted if the task wasn't completed by a chat", + "html_description": "Optional. Chat that completed the task; omitted if the task wasn't completed by a chat", + "rst_description": "*Optional*. Chat that completed the task; omitted if the task wasn't completed by a chat\n", + "name": "completed_by_chat", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed", + "html_description": "Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed\n", + "name": "completion_date", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChecklistTasksAdded/entity.json b/.butcher/types/ChecklistTasksAdded/entity.json new file mode 100644 index 00000000..08767562 --- /dev/null +++ b/.butcher/types/ChecklistTasksAdded/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "checklisttasksadded", + "name": "ChecklistTasksAdded", + "description": "Describes a service message about tasks added to a checklist.", + "html_description": "

Describes a service message about tasks added to a checklist.

", + "rst_description": "Describes a service message about tasks added to a checklist.", + "annotations": [ + { + "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 :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 + }, + { + "type": "Array of ChecklistTask", + "description": "List of tasks added to the checklist", + "html_description": "List of tasks added to the checklist", + "rst_description": "List of tasks added to the checklist\n", + "name": "tasks", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChecklistTasksDone/entity.json b/.butcher/types/ChecklistTasksDone/entity.json new file mode 100644 index 00000000..7949b8ff --- /dev/null +++ b/.butcher/types/ChecklistTasksDone/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "checklisttasksdone", + "name": "ChecklistTasksDone", + "description": "Describes a service message about checklist tasks marked as done or not done.", + "html_description": "

Describes a service message about checklist tasks marked as done or not done.

", + "rst_description": "Describes a service message about checklist tasks marked as done or not done.", + "annotations": [ + { + "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 :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 + }, + { + "type": "Array of Integer", + "description": "Identifiers of the tasks that were marked as done", + "html_description": "Optional. Identifiers of the tasks that were marked as done", + "rst_description": "*Optional*. Identifiers of the tasks that were marked as done\n", + "name": "marked_as_done_task_ids", + "required": false + }, + { + "type": "Array of Integer", + "description": "Identifiers of the tasks that were marked as not done", + "html_description": "Optional. Identifiers of the tasks that were marked as not done", + "rst_description": "*Optional*. Identifiers of the tasks that were marked as not done\n", + "name": "marked_as_not_done_task_ids", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/CopyTextButton/entity.json b/.butcher/types/CopyTextButton/entity.json new file mode 100644 index 00000000..cafe2a36 --- /dev/null +++ b/.butcher/types/CopyTextButton/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "copytextbutton", + "name": "CopyTextButton", + "description": "This object represents an inline keyboard button that copies specified text to the clipboard.", + "html_description": "

This object represents an inline keyboard button that copies specified text to the clipboard.

", + "rst_description": "This object represents an inline keyboard button that copies specified text to the clipboard.", + "annotations": [ + { + "type": "String", + "description": "The text to be copied to the clipboard; 1-256 characters", + "html_description": "The text to be copied to the clipboard; 1-256 characters", + "rst_description": "The text to be copied to the clipboard; 1-256 characters\n", + "name": "text", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/DirectMessagePriceChanged/entity.json b/.butcher/types/DirectMessagePriceChanged/entity.json new file mode 100644 index 00000000..7652323c --- /dev/null +++ b/.butcher/types/DirectMessagePriceChanged/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "directmessagepricechanged", + "name": "DirectMessagePriceChanged", + "description": "Describes a service message about a change in the price of direct messages sent to a channel chat.", + "html_description": "

Describes a service message about a change in the price of direct messages sent to a channel chat.

", + "rst_description": "Describes a service message about a change in the price of direct messages sent to a channel chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if direct messages are enabled for the channel chat; false otherwise", + "html_description": "True, if direct messages are enabled for the channel chat; false otherwise", + "rst_description": ":code:`True`, if direct messages are enabled for the channel chat; false otherwise\n", + "name": "are_direct_messages_enabled", + "required": true + }, + { + "type": "Integer", + "description": "The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.", + "html_description": "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.", + "rst_description": "*Optional*. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.\n", + "name": "direct_message_star_count", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/DirectMessagesTopic/entity.json b/.butcher/types/DirectMessagesTopic/entity.json new file mode 100644 index 00000000..7139d8de --- /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. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "topic_id", + "required": true + }, + { + "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/ExternalReplyInfo/default.yml b/.butcher/types/ExternalReplyInfo/default.yml new file mode 100644 index 00000000..becd35ac --- /dev/null +++ b/.butcher/types/ExternalReplyInfo/default.yml @@ -0,0 +1,2 @@ +disable_web_page_preview: link_preview_is_disabled +parse_mode: parse_mode diff --git a/.butcher/types/ExternalReplyInfo/entity.json b/.butcher/types/ExternalReplyInfo/entity.json index 312693a3..2eb4ed5c 100644 --- a/.butcher/types/ExternalReplyInfo/entity.json +++ b/.butcher/types/ExternalReplyInfo/entity.json @@ -131,6 +131,14 @@ "name": "has_media_spoiler", "required": false }, + { + "type": "Checklist", + "description": "Message is a checklist", + "html_description": "Optional. Message is a checklist", + "rst_description": "*Optional*. Message is a checklist\n", + "name": "checklist", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", diff --git a/.butcher/types/ForumTopic/entity.json b/.butcher/types/ForumTopic/entity.json index 4198661a..d774fb7e 100644 --- a/.butcher/types/ForumTopic/entity.json +++ b/.butcher/types/ForumTopic/entity.json @@ -42,6 +42,14 @@ "rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n", "name": "icon_custom_emoji_id", "required": false + }, + { + "type": "True", + "description": "True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot", + "html_description": "Optional. True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot", + "rst_description": "*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot\n", + "name": "is_name_implicit", + "required": false } ], "category": "types" diff --git a/.butcher/types/ForumTopicCreated/entity.json b/.butcher/types/ForumTopicCreated/entity.json index f1832898..a2b39b66 100644 --- a/.butcher/types/ForumTopicCreated/entity.json +++ b/.butcher/types/ForumTopicCreated/entity.json @@ -34,6 +34,14 @@ "rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n", "name": "icon_custom_emoji_id", "required": false + }, + { + "type": "True", + "description": "True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot", + "html_description": "Optional. True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot", + "rst_description": "*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot\n", + "name": "is_name_implicit", + "required": false } ], "category": "types" diff --git a/.butcher/types/Gift/entity.json b/.butcher/types/Gift/entity.json new file mode 100644 index 00000000..be2f518f --- /dev/null +++ b/.butcher/types/Gift/entity.json @@ -0,0 +1,121 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "gift", + "name": "Gift", + "description": "This object represents a gift that can be sent by the bot.", + "html_description": "

This object represents a gift that can be sent by the bot.

", + "rst_description": "This object represents a gift that can be sent by the bot.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier of the gift", + "html_description": "Unique identifier of the gift", + "rst_description": "Unique identifier of the gift\n", + "name": "id", + "required": true + }, + { + "type": "Sticker", + "description": "The sticker that represents the gift", + "html_description": "The sticker that represents the gift", + "rst_description": "The sticker that represents the gift\n", + "name": "sticker", + "required": true + }, + { + "type": "Integer", + "description": "The number of Telegram Stars that must be paid to send the sticker", + "html_description": "The number of Telegram Stars that must be paid to send the sticker", + "rst_description": "The number of Telegram Stars that must be paid to send the sticker\n", + "name": "star_count", + "required": true + }, + { + "type": "Integer", + "description": "The number of Telegram Stars that must be paid to upgrade the gift to a unique one", + "html_description": "Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one", + "rst_description": "*Optional*. The number of Telegram Stars that must be paid to upgrade the gift to a unique one\n", + "name": "upgrade_star_count", + "required": false + }, + { + "type": "True", + "description": "True, if the gift can only be purchased by Telegram Premium subscribers", + "html_description": "Optional. True, if the gift can only be purchased by Telegram Premium subscribers", + "rst_description": "*Optional*. :code:`True`, if the gift can only be purchased by Telegram Premium subscribers\n", + "name": "is_premium", + "required": false + }, + { + "type": "True", + "description": "True, if the gift can be used (after being upgraded) to customize a user's appearance", + "html_description": "Optional. True, if the gift can be used (after being upgraded) to customize a user's appearance", + "rst_description": "*Optional*. :code:`True`, if the gift can be used (after being upgraded) to customize a user's appearance\n", + "name": "has_colors", + "required": false + }, + { + "type": "Integer", + "description": "The total number of gifts of this type that can be sent by all users; for limited gifts only", + "html_description": "Optional. The total number of gifts of this type that can be sent by all users; for limited gifts only", + "rst_description": "*Optional*. The total number of gifts of this type that can be sent by all users; for limited gifts only\n", + "name": "total_count", + "required": false + }, + { + "type": "Integer", + "description": "The number of remaining gifts of this type that can be sent by all users; for limited gifts only", + "html_description": "Optional. The number of remaining gifts of this type that can be sent by all users; for limited gifts only", + "rst_description": "*Optional*. The number of remaining gifts of this type that can be sent by all users; for limited gifts only\n", + "name": "remaining_count", + "required": false + }, + { + "type": "Integer", + "description": "The total number of gifts of this type that can be sent by the bot; for limited gifts only", + "html_description": "Optional. The total number of gifts of this type that can be sent by the bot; for limited gifts only", + "rst_description": "*Optional*. The total number of gifts of this type that can be sent by the bot; for limited gifts only\n", + "name": "personal_total_count", + "required": false + }, + { + "type": "Integer", + "description": "The number of remaining gifts of this type that can be sent by the bot; for limited gifts only", + "html_description": "Optional. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only", + "rst_description": "*Optional*. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only\n", + "name": "personal_remaining_count", + "required": false + }, + { + "type": "GiftBackground", + "description": "Background of the gift", + "html_description": "Optional. Background of the gift", + "rst_description": "*Optional*. Background of the gift\n", + "name": "background", + "required": false + }, + { + "type": "Integer", + "description": "The total number of different unique gifts that can be obtained by upgrading the gift", + "html_description": "Optional. The total number of different unique gifts that can be obtained by upgrading the gift", + "rst_description": "*Optional*. The total number of different unique gifts that can be obtained by upgrading the gift\n", + "name": "unique_gift_variant_count", + "required": false + }, + { + "type": "Chat", + "description": "Information about the chat that published the gift", + "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/GiftBackground/entity.json b/.butcher/types/GiftBackground/entity.json new file mode 100644 index 00000000..34e3e0a6 --- /dev/null +++ b/.butcher/types/GiftBackground/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "giftbackground", + "name": "GiftBackground", + "description": "This object describes the background of a gift.", + "html_description": "

This object describes the background of a gift.

", + "rst_description": "This object describes the background of a gift.", + "annotations": [ + { + "type": "Integer", + "description": "Center color of the background in RGB format", + "html_description": "Center color of the background in RGB format", + "rst_description": "Center color of the background in RGB format\n", + "name": "center_color", + "required": true + }, + { + "type": "Integer", + "description": "Edge color of the background in RGB format", + "html_description": "Edge color of the background in RGB format", + "rst_description": "Edge color of the background in RGB format\n", + "name": "edge_color", + "required": true + }, + { + "type": "Integer", + "description": "Text color of the background in RGB format", + "html_description": "Text color of the background in RGB format", + "rst_description": "Text color of the background in RGB format\n", + "name": "text_color", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/GiftInfo/entity.json b/.butcher/types/GiftInfo/entity.json new file mode 100644 index 00000000..daf00279 --- /dev/null +++ b/.butcher/types/GiftInfo/entity.json @@ -0,0 +1,97 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "giftinfo", + "name": "GiftInfo", + "description": "Describes a service message about a regular gift that was sent or received.", + "html_description": "

Describes a service message about a regular gift that was sent or received.

", + "rst_description": "Describes a service message about a regular gift that was sent or received.", + "annotations": [ + { + "type": "Gift", + "description": "Information about the gift", + "html_description": "Information about the gift", + "rst_description": "Information about the gift\n", + "name": "gift", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts", + "html_description": "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts", + "rst_description": "*Optional*. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts\n", + "name": "owned_gift_id", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible", + "html_description": "Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible", + "rst_description": "*Optional*. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible\n", + "name": "convert_star_count", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that were prepaid for the ability to upgrade the gift", + "html_description": "Optional. Number of Telegram Stars that were prepaid for the ability to upgrade the gift", + "rst_description": "*Optional*. Number of Telegram Stars that were prepaid for the ability to upgrade the gift\n", + "name": "prepaid_upgrade_star_count", + "required": false + }, + { + "type": "True", + "description": "True, if the gift's upgrade was purchased after the gift was sent", + "html_description": "Optional. True, if the gift's upgrade was purchased after the gift was sent", + "rst_description": "*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent\n", + "name": "is_upgrade_separate", + "required": false + }, + { + "type": "True", + "description": "True, if the gift can be upgraded to a unique gift", + "html_description": "Optional. True, if the gift can be upgraded to a unique gift", + "rst_description": "*Optional*. :code:`True`, if the gift can be upgraded to a unique gift\n", + "name": "can_be_upgraded", + "required": false + }, + { + "type": "String", + "description": "Text of the message that was added to the gift", + "html_description": "Optional. Text of the message that was added to the gift", + "rst_description": "*Optional*. Text of the message that was added to the gift\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the text", + "html_description": "Optional. Special entities that appear in the text", + "rst_description": "*Optional*. Special entities that appear in the text\n", + "name": "entities", + "required": false + }, + { + "type": "True", + "description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "rst_description": "*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", + "name": "is_private", + "required": false + }, + { + "type": "Integer", + "description": "Unique number reserved for this gift when upgraded. See the number field in UniqueGift", + "html_description": "Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift", + "rst_description": "*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`\n", + "name": "unique_gift_number", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Gifts/entity.json b/.butcher/types/Gifts/entity.json new file mode 100644 index 00000000..bca737bd --- /dev/null +++ b/.butcher/types/Gifts/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "gifts", + "name": "Gifts", + "description": "This object represent a list of gifts.", + "html_description": "

This object represent a list of gifts.

", + "rst_description": "This object represent a list of gifts.", + "annotations": [ + { + "type": "Array of Gift", + "description": "The list of gifts", + "html_description": "The list of gifts", + "rst_description": "The list of gifts\n", + "name": "gifts", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Giveaway/entity.json b/.butcher/types/Giveaway/entity.json index 53178a8c..ad326982 100644 --- a/.butcher/types/Giveaway/entity.json +++ b/.butcher/types/Giveaway/entity.json @@ -69,9 +69,17 @@ }, { "type": "Integer", - "description": "The number of months the Telegram Premium subscription won from the giveaway will be active for", - "html_description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for", - "rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for\n", + "description": "The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "html_description": "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "rst_description": "*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only\n", + "name": "prize_star_count", + "required": false + }, + { + "type": "Integer", + "description": "The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only", + "html_description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only", + "rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only\n", "name": "premium_subscription_month_count", "required": false } diff --git a/.butcher/types/GiveawayCompleted/entity.json b/.butcher/types/GiveawayCompleted/entity.json index 169d3446..e1ecec54 100644 --- a/.butcher/types/GiveawayCompleted/entity.json +++ b/.butcher/types/GiveawayCompleted/entity.json @@ -34,6 +34,14 @@ "rst_description": "*Optional*. Message with the giveaway that was completed, if it wasn't deleted\n", "name": "giveaway_message", "required": false + }, + { + "type": "True", + "description": "True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.", + "html_description": "Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.", + "rst_description": "*Optional*. :code:`True`, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.\n", + "name": "is_star_giveaway", + "required": false } ], "category": "types" diff --git a/.butcher/types/GiveawayCreated/entity.json b/.butcher/types/GiveawayCreated/entity.json index 38e68bf3..1cf7ca10 100644 --- a/.butcher/types/GiveawayCreated/entity.json +++ b/.butcher/types/GiveawayCreated/entity.json @@ -7,10 +7,19 @@ "object": { "anchor": "giveawaycreated", "name": "GiveawayCreated", - "description": "This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.", - "html_description": "

This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.

", - "rst_description": "This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.", - "annotations": [], + "description": "This object represents a service message about the creation of a scheduled giveaway.", + "html_description": "

This object represents a service message about the creation of a scheduled giveaway.

", + "rst_description": "This object represents a service message about the creation of a scheduled giveaway.", + "annotations": [ + { + "type": "Integer", + "description": "The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "html_description": "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only", + "rst_description": "*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only\n", + "name": "prize_star_count", + "required": false + } + ], "category": "types" } } diff --git a/.butcher/types/GiveawayWinners/entity.json b/.butcher/types/GiveawayWinners/entity.json index 76628b90..6843f7a7 100644 --- a/.butcher/types/GiveawayWinners/entity.json +++ b/.butcher/types/GiveawayWinners/entity.json @@ -61,9 +61,17 @@ }, { "type": "Integer", - "description": "The number of months the Telegram Premium subscription won from the giveaway will be active for", - "html_description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for", - "rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for\n", + "description": "The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only", + "html_description": "Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only", + "rst_description": "*Optional*. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only\n", + "name": "prize_star_count", + "required": false + }, + { + "type": "Integer", + "description": "The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only", + "html_description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only", + "rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only\n", "name": "premium_subscription_month_count", "required": false }, diff --git a/.butcher/types/InaccessibleMessage/aliases.yml b/.butcher/types/InaccessibleMessage/aliases.yml new file mode 100644 index 00000000..225e4f7c --- /dev/null +++ b/.butcher/types/InaccessibleMessage/aliases.yml @@ -0,0 +1,202 @@ +answer: + method: sendMessage + code: &assert-chat | + assert self.chat is not None, "This method can be used only if chat is present in the message." + fill: &fill-answer + chat_id: self.chat.id + +reply: + method: sendMessage + code: *assert-chat + fill: &fill-reply + <<: *fill-answer + reply_parameters: self.as_reply_parameters() + ignore: &ignore-reply + - reply_to_message_id + +answer_animation: + method: sendAnimation + code: *assert-chat + fill: *fill-answer + +reply_animation: + method: sendAnimation + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_audio: + method: sendAudio + code: *assert-chat + fill: *fill-answer + +reply_audio: + method: sendAudio + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_contact: + method: sendContact + code: *assert-chat + fill: *fill-answer + +reply_contact: + method: sendContact + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_document: + method: sendDocument + code: *assert-chat + fill: *fill-answer + +reply_document: + method: sendDocument + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_game: + method: sendGame + code: *assert-chat + fill: *fill-answer + +reply_game: + method: sendGame + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_invoice: + method: sendInvoice + code: *assert-chat + fill: *fill-answer + +reply_invoice: + method: sendInvoice + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_location: + method: sendLocation + code: *assert-chat + fill: *fill-answer + +reply_location: + method: sendLocation + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_media_group: + method: sendMediaGroup + code: *assert-chat + fill: *fill-answer + +reply_media_group: + method: sendMediaGroup + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_photo: + method: sendPhoto + code: *assert-chat + fill: *fill-answer + +reply_photo: + method: sendPhoto + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_poll: + method: sendPoll + code: *assert-chat + fill: *fill-answer + +reply_poll: + method: sendPoll + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_dice: + method: sendDice + code: *assert-chat + fill: *fill-answer + +reply_dice: + method: sendDice + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_sticker: + method: sendSticker + code: *assert-chat + fill: *fill-answer + +reply_sticker: + method: sendSticker + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_venue: + method: sendVenue + code: *assert-chat + fill: *fill-answer + +reply_venue: + method: sendVenue + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_video: + method: sendVideo + code: *assert-chat + fill: *fill-answer + +reply_video: + method: sendVideo + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_video_note: + method: sendVideoNote + code: *assert-chat + fill: *fill-answer + +reply_video_note: + method: sendVideoNote + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_voice: + method: sendVoice + code: *assert-chat + fill: *fill-answer + +reply_voice: + method: sendVoice + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + +answer_paid_media: + method: sendPaidMedia + code: *assert-chat + fill: *fill-answer + +reply_paid_media: + method: sendPaidMedia + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply diff --git a/.butcher/types/InlineKeyboardButton/entity.json b/.butcher/types/InlineKeyboardButton/entity.json index 7476ee56..15e52808 100644 --- a/.butcher/types/InlineKeyboardButton/entity.json +++ b/.butcher/types/InlineKeyboardButton/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "inlinekeyboardbutton", "name": "InlineKeyboardButton", - "description": "This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.", - "html_description": "

This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.

", - "rst_description": "This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.", + "description": "This object represents one button of an inline keyboard. Exactly one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button.", + "html_description": "

This object represents one button of an inline keyboard. Exactly one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button.

", + "rst_description": "This object represents one button of an inline keyboard. Exactly one of the fields other than *text*, *icon_custom_emoji_id*, and *style* must be used to specify the type of the button.", "annotations": [ { "type": "String", @@ -19,6 +19,22 @@ "name": "text", "required": true }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.", + "html_description": "Optional. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.", + "rst_description": "*Optional*. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on `Fragment `_ or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.\n", + "name": "icon_custom_emoji_id", + "required": false + }, + { + "type": "String", + "description": "Style of the button. Must be one of 'danger' (red), 'success' (green) or 'primary' (blue). If omitted, then an app-specific style is used.", + "html_description": "Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used.", + "rst_description": "*Optional*. Style of the button. Must be one of 'danger' (red), 'success' (green) or 'primary' (blue). If omitted, then an app-specific style is used.\n", + "name": "style", + "required": false + }, { "type": "String", "description": "HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id= can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings.", @@ -53,28 +69,36 @@ }, { "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 }, + { + "type": "CopyTextButton", + "description": "Description of the button that copies the specified text to the clipboard.", + "html_description": "Optional. Description of the button that copies the specified text to the clipboard.", + "rst_description": "*Optional*. Description of the button that copies the specified text to the clipboard.\n", + "name": "copy_text", + "required": false + }, { "type": "CallbackGame", "description": "Description of the game that will be launched when the user presses the button.\n\nNOTE: This type of button must always be the first button in the first row.", diff --git a/.butcher/types/InlineQueryResultArticle/entity.json b/.butcher/types/InlineQueryResultArticle/entity.json index eba5d318..c9622b2a 100644 --- a/.butcher/types/InlineQueryResultArticle/entity.json +++ b/.butcher/types/InlineQueryResultArticle/entity.json @@ -59,14 +59,6 @@ "name": "url", "required": false }, - { - "type": "Boolean", - "description": "Pass True if you don't want the URL to be shown in the message", - "html_description": "Optional. Pass True if you don't want the URL to be shown in the message", - "rst_description": "*Optional*. Pass :code:`True` if you don't want the URL to be shown in the message\n", - "name": "hide_url", - "required": false - }, { "type": "String", "description": "Short description of the result", @@ -98,6 +90,18 @@ "rst_description": "*Optional*. Thumbnail height\n", "name": "thumbnail_height", "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you don't want the URL to be shown in the message", + "html_description": "Optional. Pass True if you don't want the URL to be shown in the message", + "rst_description": "*Optional*. Pass :code:`True` if you don't want the URL to be shown in the message\n", + "name": "hide_url", + "required": false, + "deprecated": { + "version": "8.2", + "release_date": "2025-01-01" + } } ], "category": "types" diff --git a/.butcher/types/InlineQueryResultDocument/entity.json b/.butcher/types/InlineQueryResultDocument/entity.json index ff703482..97bb05a6 100644 --- a/.butcher/types/InlineQueryResultDocument/entity.json +++ b/.butcher/types/InlineQueryResultDocument/entity.json @@ -86,8 +86,8 @@ { "type": "InlineKeyboardMarkup", "description": "Inline keyboard attached to the message", - "html_description": "Optional. Inline keyboard attached to the message", - "rst_description": "*Optional*. Inline keyboard attached to the message\n", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", "name": "reply_markup", "required": false }, diff --git a/.butcher/types/InlineQueryResultGif/entity.json b/.butcher/types/InlineQueryResultGif/entity.json index 7c104615..ee825305 100644 --- a/.butcher/types/InlineQueryResultGif/entity.json +++ b/.butcher/types/InlineQueryResultGif/entity.json @@ -29,9 +29,9 @@ }, { "type": "String", - "description": "A valid URL for the GIF file. File size must not exceed 1MB", - "html_description": "A valid URL for the GIF file. File size must not exceed 1MB", - "rst_description": "A valid URL for the GIF file. File size must not exceed 1MB\n", + "description": "A valid URL for the GIF file", + "html_description": "A valid URL for the GIF file", + "rst_description": "A valid URL for the GIF file\n", "name": "gif_url", "required": true }, diff --git a/.butcher/types/InlineQueryResultMpeg4Gif/entity.json b/.butcher/types/InlineQueryResultMpeg4Gif/entity.json index fa4c3e81..fc309461 100644 --- a/.butcher/types/InlineQueryResultMpeg4Gif/entity.json +++ b/.butcher/types/InlineQueryResultMpeg4Gif/entity.json @@ -29,9 +29,9 @@ }, { "type": "String", - "description": "A valid URL for the MPEG4 file. File size must not exceed 1MB", - "html_description": "A valid URL for the MPEG4 file. File size must not exceed 1MB", - "rst_description": "A valid URL for the MPEG4 file. File size must not exceed 1MB\n", + "description": "A valid URL for the MPEG4 file", + "html_description": "A valid URL for the MPEG4 file", + "rst_description": "A valid URL for the MPEG4 file\n", "name": "mpeg4_url", "required": true }, diff --git a/.butcher/types/InputChecklist/entity.json b/.butcher/types/InputChecklist/entity.json new file mode 100644 index 00000000..f2c45f06 --- /dev/null +++ b/.butcher/types/InputChecklist/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputchecklist", + "name": "InputChecklist", + "description": "Describes a checklist to create.", + "html_description": "

Describes a checklist to create.

", + "rst_description": "Describes a checklist to create.", + "annotations": [ + { + "type": "String", + "description": "Title of the checklist; 1-255 characters after entities parsing", + "html_description": "Title of the checklist; 1-255 characters after entities parsing", + "rst_description": "Title of the checklist; 1-255 characters after entities parsing\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Mode for parsing entities in the title. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the title. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the title. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.", + "html_description": "Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.", + "rst_description": "*Optional*. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities are allowed.\n", + "name": "title_entities", + "required": false + }, + { + "type": "Array of InputChecklistTask", + "description": "List of 1-30 tasks in the checklist", + "html_description": "List of 1-30 tasks in the checklist", + "rst_description": "List of 1-30 tasks in the checklist\n", + "name": "tasks", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True if other users can add tasks to the checklist", + "html_description": "Optional. Pass True if other users can add tasks to the checklist", + "rst_description": "*Optional*. Pass :code:`True` if other users can add tasks to the checklist\n", + "name": "others_can_add_tasks", + "required": false + }, + { + "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", + "name": "others_can_mark_tasks_as_done", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputChecklistTask/entity.json b/.butcher/types/InputChecklistTask/entity.json new file mode 100644 index 00000000..b12d4239 --- /dev/null +++ b/.butcher/types/InputChecklistTask/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputchecklisttask", + "name": "InputChecklistTask", + "description": "Describes a task to add to a checklist.", + "html_description": "

Describes a task to add to a checklist.

", + "rst_description": "Describes a task to add to a checklist.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist", + "html_description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist", + "rst_description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Text of the task; 1-100 characters after entities parsing", + "html_description": "Text of the task; 1-100 characters after entities parsing", + "rst_description": "Text of the task; 1-100 characters after entities parsing\n", + "name": "text", + "required": true + }, + { + "type": "String", + "description": "Mode for parsing entities in the text. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the text. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the text. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.", + "html_description": "Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.", + "rst_description": "*Optional*. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities are allowed.\n", + "name": "text_entities", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputInvoiceMessageContent/entity.json b/.butcher/types/InputInvoiceMessageContent/entity.json index bed9e656..76d2f39b 100644 --- a/.butcher/types/InputInvoiceMessageContent/entity.json +++ b/.butcher/types/InputInvoiceMessageContent/entity.json @@ -29,9 +29,9 @@ }, { "type": "String", - "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", - "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.\n", "name": "payload", "required": true }, diff --git a/.butcher/types/InputMediaAnimation/entity.json b/.butcher/types/InputMediaAnimation/entity.json index e311a1ee..f64c7e1e 100644 --- a/.butcher/types/InputMediaAnimation/entity.json +++ b/.butcher/types/InputMediaAnimation/entity.json @@ -28,7 +28,7 @@ "required": true }, { - "type": "InputFile or String", + "type": "String", "description": "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 . More information on Sending Files", "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", "rst_description": "*Optional*. 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 » `\n", diff --git a/.butcher/types/InputMediaAudio/entity.json b/.butcher/types/InputMediaAudio/entity.json index 5f10ad67..95af3e81 100644 --- a/.butcher/types/InputMediaAudio/entity.json +++ b/.butcher/types/InputMediaAudio/entity.json @@ -28,7 +28,7 @@ "required": true }, { - "type": "InputFile or String", + "type": "String", "description": "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 . More information on Sending Files", "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", "rst_description": "*Optional*. 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 » `\n", diff --git a/.butcher/types/InputMediaDocument/entity.json b/.butcher/types/InputMediaDocument/entity.json index 676d6947..71be2aaa 100644 --- a/.butcher/types/InputMediaDocument/entity.json +++ b/.butcher/types/InputMediaDocument/entity.json @@ -28,7 +28,7 @@ "required": true }, { - "type": "InputFile or String", + "type": "String", "description": "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 . More information on Sending Files", "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", "rst_description": "*Optional*. 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 » `\n", diff --git a/.butcher/types/InputMediaVideo/entity.json b/.butcher/types/InputMediaVideo/entity.json index f1dc1989..0dbf3767 100644 --- a/.butcher/types/InputMediaVideo/entity.json +++ b/.butcher/types/InputMediaVideo/entity.json @@ -28,13 +28,29 @@ "required": true }, { - "type": "InputFile or String", + "type": "String", "description": "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 . More information on Sending Files", "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", "rst_description": "*Optional*. 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 » `\n", "name": "thumbnail", "required": false }, + { + "type": "String", + "description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "*Optional*. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `\n", + "name": "cover", + "required": false + }, + { + "type": "Integer", + "description": "Start timestamp for the video in the message", + "html_description": "Optional. Start timestamp for the video in the message", + "rst_description": "*Optional*. Start timestamp for the video in the message\n", + "name": "start_timestamp", + "required": false + }, { "type": "String", "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", diff --git a/.butcher/types/InputMediaVideo/replace.yml b/.butcher/types/InputMediaVideo/replace.yml index efa1d506..c7ee44f0 100644 --- a/.butcher/types/InputMediaVideo/replace.yml +++ b/.butcher/types/InputMediaVideo/replace.yml @@ -9,9 +9,29 @@ annotations: references: category: types name: InputFile + cover: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile thumbnail: parsed_type: type: entity references: category: types name: InputFile + start_timestamp: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/types/InputPaidMediaVideo/entity.json b/.butcher/types/InputPaidMediaVideo/entity.json index a04bf3df..9ba408e5 100644 --- a/.butcher/types/InputPaidMediaVideo/entity.json +++ b/.butcher/types/InputPaidMediaVideo/entity.json @@ -28,13 +28,29 @@ "required": true }, { - "type": "InputFile or String", + "type": "String", "description": "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 . More information on Sending Files", "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", "rst_description": "*Optional*. 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 » `\n", "name": "thumbnail", "required": false }, + { + "type": "String", + "description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "*Optional*. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `\n", + "name": "cover", + "required": false + }, + { + "type": "Integer", + "description": "Start timestamp for the video in the message", + "html_description": "Optional. Start timestamp for the video in the message", + "rst_description": "*Optional*. Start timestamp for the video in the message\n", + "name": "start_timestamp", + "required": false + }, { "type": "Integer", "description": "Video width", diff --git a/.butcher/types/InputPaidMediaVideo/replace.yml b/.butcher/types/InputPaidMediaVideo/replace.yml index 17ac606b..c7ee44f0 100644 --- a/.butcher/types/InputPaidMediaVideo/replace.yml +++ b/.butcher/types/InputPaidMediaVideo/replace.yml @@ -9,3 +9,29 @@ annotations: references: category: types name: InputFile + cover: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile + thumbnail: + parsed_type: + type: entity + references: + category: types + name: InputFile + start_timestamp: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/types/InputProfilePhoto/entity.json b/.butcher/types/InputProfilePhoto/entity.json new file mode 100644 index 00000000..f3ae06fd --- /dev/null +++ b/.butcher/types/InputProfilePhoto/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputprofilephoto", + "name": "InputProfilePhoto", + "description": "This object describes a profile photo to set. Currently, it can be one of\n - InputProfilePhotoStatic\n - InputProfilePhotoAnimated", + "html_description": "

This object describes a profile photo to set. Currently, it can be one of

", + "rst_description": "This object describes a profile photo to set. Currently, it can be one of\n\n - :class:`aiogram.types.input_profile_photo_static.InputProfilePhotoStatic`\n - :class:`aiogram.types.input_profile_photo_animated.InputProfilePhotoAnimated`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InputProfilePhoto/subtypes.yml b/.butcher/types/InputProfilePhoto/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/InputProfilePhoto/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/InputProfilePhotoAnimated/entity.json b/.butcher/types/InputProfilePhotoAnimated/entity.json new file mode 100644 index 00000000..01083ce1 --- /dev/null +++ b/.butcher/types/InputProfilePhotoAnimated/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputprofilephotoanimated", + "name": "InputProfilePhotoAnimated", + "description": "An animated profile photo in the MPEG4 format.", + "html_description": "

An animated profile photo in the MPEG4 format.

", + "rst_description": "An animated profile photo in the MPEG4 format.", + "annotations": [ + { + "type": "String", + "description": "Type of the profile photo, must be animated", + "html_description": "Type of the profile photo, must be animated", + "rst_description": "Type of the profile photo, must be *animated*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `\n", + "name": "animation", + "required": true + }, + { + "type": "Float", + "description": "Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.", + "html_description": "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.", + "rst_description": "*Optional*. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.\n", + "name": "main_frame_timestamp", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputProfilePhotoAnimated/replace.yml b/.butcher/types/InputProfilePhotoAnimated/replace.yml new file mode 100644 index 00000000..0e02dfd7 --- /dev/null +++ b/.butcher/types/InputProfilePhotoAnimated/replace.yml @@ -0,0 +1,11 @@ +annotations: + animation: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile diff --git a/.butcher/types/InputProfilePhotoStatic/entity.json b/.butcher/types/InputProfilePhotoStatic/entity.json new file mode 100644 index 00000000..e2eaa906 --- /dev/null +++ b/.butcher/types/InputProfilePhotoStatic/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputprofilephotostatic", + "name": "InputProfilePhotoStatic", + "description": "A static profile photo in the .JPG format.", + "html_description": "

A static profile photo in the .JPG format.

", + "rst_description": "A static profile photo in the .JPG format.", + "annotations": [ + { + "type": "String", + "description": "Type of the profile photo, must be static", + "html_description": "Type of the profile photo, must be static", + "rst_description": "Type of the profile photo, must be *static*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `\n", + "name": "photo", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputProfilePhotoStatic/replace.yml b/.butcher/types/InputProfilePhotoStatic/replace.yml new file mode 100644 index 00000000..e622cb80 --- /dev/null +++ b/.butcher/types/InputProfilePhotoStatic/replace.yml @@ -0,0 +1,11 @@ +annotations: + photo: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile diff --git a/.butcher/types/InputSticker/entity.json b/.butcher/types/InputSticker/entity.json index 2df660ae..e3d58c12 100644 --- a/.butcher/types/InputSticker/entity.json +++ b/.butcher/types/InputSticker/entity.json @@ -12,18 +12,18 @@ "rst_description": "This object describes a sticker to be added to a sticker set.", "annotations": [ { - "type": "InputFile or String", - "description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass 'attach://' to upload a new one using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files", - "html_description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »", - "rst_description": "The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass 'attach://' to upload a new one using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » `\n", + "type": "String", + "description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass 'attach://' to upload a new file using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files", + "html_description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new file using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »", + "rst_description": "The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass 'attach://' to upload a new file using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » `\n", "name": "sticker", "required": true }, { "type": "String", - "description": "Format of the added sticker, must be one of 'static' for a .WEBP or .PNG image, 'animated' for a .TGS animation, 'video' for a WEBM video", - "html_description": "Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a WEBM video", - "rst_description": "Format of the added sticker, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, 'video' for a **WEBM** video\n", + "description": "Format of the added sticker, must be one of 'static' for a .WEBP or .PNG image, 'animated' for a .TGS animation, 'video' for a .WEBM video", + "html_description": "Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a .WEBM video", + "rst_description": "Format of the added sticker, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, 'video' for a **.WEBM** video\n", "name": "format", "required": true }, diff --git a/.butcher/types/InputSticker/replace.yml b/.butcher/types/InputSticker/replace.yml new file mode 100644 index 00000000..ae080950 --- /dev/null +++ b/.butcher/types/InputSticker/replace.yml @@ -0,0 +1,11 @@ +annotations: + sticker: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile diff --git a/.butcher/types/InputStoryContent/entity.json b/.butcher/types/InputStoryContent/entity.json new file mode 100644 index 00000000..6869136e --- /dev/null +++ b/.butcher/types/InputStoryContent/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputstorycontent", + "name": "InputStoryContent", + "description": "This object describes the content of a story to post. Currently, it can be one of\n - InputStoryContentPhoto\n - InputStoryContentVideo", + "html_description": "

This object describes the content of a story to post. Currently, it can be one of

", + "rst_description": "This object describes the content of a story to post. Currently, it can be one of\n\n - :class:`aiogram.types.input_story_content_photo.InputStoryContentPhoto`\n - :class:`aiogram.types.input_story_content_video.InputStoryContentVideo`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InputStoryContent/subtypes.yml b/.butcher/types/InputStoryContent/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/InputStoryContent/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/InputStoryContentPhoto/entity.json b/.butcher/types/InputStoryContentPhoto/entity.json new file mode 100644 index 00000000..d7829f09 --- /dev/null +++ b/.butcher/types/InputStoryContentPhoto/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputstorycontentphoto", + "name": "InputStoryContentPhoto", + "description": "Describes a photo to post as a story.", + "html_description": "

Describes a photo to post as a story.

", + "rst_description": "Describes a photo to post as a story.", + "annotations": [ + { + "type": "String", + "description": "Type of the content, must be photo", + "html_description": "Type of the content, must be photo", + "rst_description": "Type of the content, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `\n", + "name": "photo", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputStoryContentVideo/entity.json b/.butcher/types/InputStoryContentVideo/entity.json new file mode 100644 index 00000000..182825d2 --- /dev/null +++ b/.butcher/types/InputStoryContentVideo/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputstorycontentvideo", + "name": "InputStoryContentVideo", + "description": "Describes a video to post as a story.", + "html_description": "

Describes a video to post as a story.

", + "rst_description": "Describes a video to post as a story.", + "annotations": [ + { + "type": "String", + "description": "Type of the content, must be video", + "html_description": "Type of the content, must be video", + "rst_description": "Type of the content, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the video was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the video was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `\n", + "name": "video", + "required": true + }, + { + "type": "Float", + "description": "Precise duration of the video in seconds; 0-60", + "html_description": "Optional. Precise duration of the video in seconds; 0-60", + "rst_description": "*Optional*. Precise duration of the video in seconds; 0-60\n", + "name": "duration", + "required": false + }, + { + "type": "Float", + "description": "Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.", + "html_description": "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.", + "rst_description": "*Optional*. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.\n", + "name": "cover_frame_timestamp", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the video has no sound", + "html_description": "Optional. Pass True if the video has no sound", + "rst_description": "*Optional*. Pass :code:`True` if the video has no sound\n", + "name": "is_animation", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputTextMessageContent/default.yml b/.butcher/types/InputTextMessageContent/default.yml index d973b1cd..5ca2d0cb 100644 --- a/.butcher/types/InputTextMessageContent/default.yml +++ b/.butcher/types/InputTextMessageContent/default.yml @@ -1,2 +1,2 @@ -disable_web_page_preview: disable_web_page_preview +link_preview_options: link_preview parse_mode: parse_mode diff --git a/.butcher/types/KeyboardButton/entity.json b/.butcher/types/KeyboardButton/entity.json index f98688ff..fae93931 100644 --- a/.butcher/types/KeyboardButton/entity.json +++ b/.butcher/types/KeyboardButton/entity.json @@ -7,34 +7,58 @@ "object": { "anchor": "keyboardbutton", "name": "KeyboardButton", - "description": "This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text.\nNote: request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message.", - "html_description": "

This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text.

Note: request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message.

", - "rst_description": "This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, *String* can be used instead of this object to specify the button text.\n**Note:** *request_users* and *request_chat* options will only work in Telegram versions released after 3 February, 2023. Older clients will display *unsupported message*.", + "description": "This object represents one button of the reply keyboard. At most one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button. For simple text buttons, String can be used instead of this object to specify the button text.", + "html_description": "

This object represents one button of the reply keyboard. At most one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button. For simple text buttons, String can be used instead of this object to specify the button text.

", + "rst_description": "This object represents one button of the reply keyboard. At most one of the fields other than *text*, *icon_custom_emoji_id*, and *style* must be used to specify the type of the button. For simple text buttons, *String* can be used instead of this object to specify the button text.", "annotations": [ { "type": "String", - "description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed", - "html_description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed", - "rst_description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed\n", + "description": "Text of the button. If none of the fields other than text, icon_custom_emoji_id, and style are used, it will be sent as a message when the button is pressed", + "html_description": "Text of the button. If none of the fields other than text, icon_custom_emoji_id, and style are used, it will be sent as a message when the button is pressed", + "rst_description": "Text of the button. If none of the fields other than *text*, *icon_custom_emoji_id*, and *style* are used, it will be sent as a message when the button is pressed\n", "name": "text", "required": true }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.", + "html_description": "Optional. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.", + "rst_description": "*Optional*. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on `Fragment `_ or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.\n", + "name": "icon_custom_emoji_id", + "required": false + }, + { + "type": "String", + "description": "Style of the button. Must be one of 'danger' (red), 'success' (green) or 'primary' (blue). If omitted, then an app-specific style is used.", + "html_description": "Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used.", + "rst_description": "*Optional*. Style of the button. Must be one of 'danger' (red), 'success' (green) or 'primary' (blue). If omitted, then an app-specific style is used.\n", + "name": "style", + "required": false + }, { "type": "KeyboardButtonRequestUsers", "description": "If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.", - "html_description": "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.", - "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.\n", + "html_description": "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.", + "rst_description": "*Optional*. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.\n", "name": "request_users", "required": false }, { "type": "KeyboardButtonRequestChat", "description": "If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.", - "html_description": "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.", - "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n", + "html_description": "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.", + "rst_description": "*Optional*. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n", "name": "request_chat", "required": false }, + { + "type": "KeyboardButtonRequestManagedBot", + "description": "If specified, pressing the button will ask the user to create and share a bot that will be managed by the current bot. Available for bots that enabled management of other bots in the @BotFather Mini App. Available in private chats only.", + "html_description": "Optional. If specified, pressing the button will ask the user to create and share a bot that will be managed by the current bot. Available for bots that enabled management of other bots in the @BotFather Mini App. Available in private chats only.", + "rst_description": "*Optional*. If specified, pressing the button will ask the user to create and share a bot that will be managed by the current bot. Available for bots that enabled management of other bots in the `@BotFather `_ Mini App. Available in private chats only.\n", + "name": "request_managed_bot", + "required": false + }, { "type": "Boolean", "description": "If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.", diff --git a/.butcher/types/KeyboardButtonRequestManagedBot/entity.json b/.butcher/types/KeyboardButtonRequestManagedBot/entity.json new file mode 100644 index 00000000..7db0dc16 --- /dev/null +++ b/.butcher/types/KeyboardButtonRequestManagedBot/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "keyboardbuttonrequestmanagedbot", + "name": "KeyboardButtonRequestManagedBot", + "description": "This object defines the parameters for the creation of a managed bot. Information about the created bot will be shared with the bot using the update managed_bot and a Message with the field managed_bot_created.", + "html_description": "

This object defines the parameters for the creation of a managed bot. Information about the created bot will be shared with the bot using the update managed_bot and a Message with the field managed_bot_created.

", + "rst_description": "This object defines the parameters for the creation of a managed bot. Information about the created bot will be shared with the bot using the update *managed_bot* and a :class:`aiogram.types.message.Message` with the field *managed_bot_created*.", + "annotations": [ + { + "type": "Integer", + "description": "Signed 32-bit identifier of the request. Must be unique within the message", + "html_description": "Signed 32-bit identifier of the request. Must be unique within the message", + "rst_description": "Signed 32-bit identifier of the request. Must be unique within the message\n", + "name": "request_id", + "required": true + }, + { + "type": "String", + "description": "Suggested name for the bot", + "html_description": "Optional. Suggested name for the bot", + "rst_description": "*Optional*. Suggested name for the bot\n", + "name": "suggested_name", + "required": false + }, + { + "type": "String", + "description": "Suggested username for the bot", + "html_description": "Optional. Suggested username for the bot", + "rst_description": "*Optional*. Suggested username for the bot\n", + "name": "suggested_username", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/LocationAddress/entity.json b/.butcher/types/LocationAddress/entity.json new file mode 100644 index 00000000..dbf523c3 --- /dev/null +++ b/.butcher/types/LocationAddress/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "locationaddress", + "name": "LocationAddress", + "description": "Describes the physical address of a location.", + "html_description": "

Describes the physical address of a location.

", + "rst_description": "Describes the physical address of a location.", + "annotations": [ + { + "type": "String", + "description": "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located", + "html_description": "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located", + "rst_description": "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located\n", + "name": "country_code", + "required": true + }, + { + "type": "String", + "description": "State of the location", + "html_description": "Optional. State of the location", + "rst_description": "*Optional*. State of the location\n", + "name": "state", + "required": false + }, + { + "type": "String", + "description": "City of the location", + "html_description": "Optional. City of the location", + "rst_description": "*Optional*. City of the location\n", + "name": "city", + "required": false + }, + { + "type": "String", + "description": "Street address of the location", + "html_description": "Optional. Street address of the location", + "rst_description": "*Optional*. Street address of the location\n", + "name": "street", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ManagedBotCreated/entity.json b/.butcher/types/ManagedBotCreated/entity.json new file mode 100644 index 00000000..89e8f85c --- /dev/null +++ b/.butcher/types/ManagedBotCreated/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "managedbotcreated", + "name": "ManagedBotCreated", + "description": "This object contains information about the bot that was created to be managed by the current bot.", + "html_description": "

This object contains information about the bot that was created to be managed by the current bot.

", + "rst_description": "This object contains information about the bot that was created to be managed by the current bot.", + "annotations": [ + { + "type": "User", + "description": "Information about the bot. The bot's token can be fetched using the method getManagedBotToken.", + "html_description": "Information about the bot. The bot's token can be fetched using the method getManagedBotToken.", + "rst_description": "Information about the bot. The bot's token can be fetched using the method :class:`aiogram.methods.get_managed_bot_token.GetManagedBotToken`.\n", + "name": "bot", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ManagedBotUpdated/entity.json b/.butcher/types/ManagedBotUpdated/entity.json new file mode 100644 index 00000000..323cb0b9 --- /dev/null +++ b/.butcher/types/ManagedBotUpdated/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "managedbotupdated", + "name": "ManagedBotUpdated", + "description": "This object contains information about the creation or token update of a bot that is managed by the current bot.", + "html_description": "

This object contains information about the creation or token update of a bot that is managed by the current bot.

", + "rst_description": "This object contains information about the creation or token update of a bot that is managed by the current bot.", + "annotations": [ + { + "type": "User", + "description": "User that created the bot", + "html_description": "User that created the bot", + "rst_description": "User that created the bot\n", + "name": "user", + "required": true + }, + { + "type": "User", + "description": "Information about the bot. Token of the bot can be fetched using the method getManagedBotToken.", + "html_description": "Information about the bot. Token of the bot can be fetched using the method getManagedBotToken.", + "rst_description": "Information about the bot. Token of the bot can be fetched using the method :class:`aiogram.methods.get_managed_bot_token.GetManagedBotToken`.\n", + "name": "bot", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Message/aliases.yml b/.butcher/types/Message/aliases.yml index d68f3060..b49f4ee0 100644 --- a/.butcher/types/Message/aliases.yml +++ b/.butcher/types/Message/aliases.yml @@ -12,7 +12,9 @@ reply: code: *assert-chat fill: &fill-reply <<: *fill-answer - reply_to_message_id: self.message_id + reply_parameters: self.as_reply_parameters() + ignore: &ignore-reply + - reply_to_message_id answer_animation: method: sendAnimation @@ -23,6 +25,7 @@ reply_animation: method: sendAnimation code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_audio: method: sendAudio @@ -33,6 +36,7 @@ reply_audio: method: sendAudio code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_contact: method: sendContact @@ -43,6 +47,7 @@ reply_contact: method: sendContact code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_document: method: sendDocument @@ -53,6 +58,7 @@ reply_document: method: sendDocument code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_game: method: sendGame @@ -63,6 +69,7 @@ reply_game: method: sendGame code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_invoice: method: sendInvoice @@ -73,6 +80,7 @@ reply_invoice: method: sendInvoice code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_location: method: sendLocation @@ -83,6 +91,7 @@ reply_location: method: sendLocation code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_media_group: method: sendMediaGroup @@ -93,6 +102,7 @@ reply_media_group: method: sendMediaGroup code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_photo: method: sendPhoto @@ -103,6 +113,7 @@ reply_photo: method: sendPhoto code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_poll: method: sendPoll @@ -113,6 +124,7 @@ reply_poll: method: sendPoll code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_dice: method: sendDice @@ -123,6 +135,7 @@ reply_dice: method: sendDice code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_sticker: method: sendSticker @@ -133,6 +146,7 @@ reply_sticker: method: sendSticker code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_venue: method: sendVenue @@ -143,6 +157,7 @@ reply_venue: method: sendVenue code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_video: method: sendVideo @@ -153,6 +168,7 @@ reply_video: method: sendVideo code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_video_note: method: sendVideoNote @@ -163,6 +179,7 @@ reply_video_note: method: sendVideoNote code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_voice: method: sendVoice @@ -173,12 +190,19 @@ reply_voice: method: sendVoice code: *assert-chat fill: *fill-reply + ignore: *ignore-reply answer_paid_media: method: sendPaidMedia code: *assert-chat fill: *fill-answer +reply_paid_media: + method: sendPaidMedia + code: *assert-chat + fill: *fill-reply + ignore: *ignore-reply + copy_to: method: copyMessage code: *assert-chat @@ -199,6 +223,7 @@ edit_text: fill: &message-target chat_id: self.chat.id message_id: self.message_id + business_connection_id: self.business_connection_id edit_media: method: editMessageMedia diff --git a/.butcher/types/Message/entity.json b/.butcher/types/Message/entity.json index 3a90d9fd..1cf9a3e2 100644 --- a/.butcher/types/Message/entity.json +++ b/.butcher/types/Message/entity.json @@ -13,33 +13,41 @@ "annotations": [ { "type": "Integer", - "description": "Unique message identifier inside this chat", - "html_description": "Unique message identifier inside this chat", - "rst_description": "Unique message identifier inside this chat\n", + "description": "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent", + "html_description": "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent", + "rst_description": "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent\n", "name": "message_id", "required": true }, { "type": "Integer", - "description": "Unique identifier of a message thread to which the message belongs; for supergroups only", - "html_description": "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only", - "rst_description": "*Optional*. Unique identifier of a message thread to which the message belongs; for supergroups only\n", + "description": "Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only", + "html_description": "Optional. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only", + "rst_description": "*Optional*. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only\n", "name": "message_thread_id", "required": false }, + { + "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; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", - "html_description": "Optional. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", - "rst_description": "*Optional*. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.\n", + "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", + "html_description": "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", + "rst_description": "*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\n", "name": "from", "required": false }, { "type": "Chat", - "description": "Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", - "html_description": "Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", - "rst_description": "*Optional*. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field *from* contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.\n", + "description": "Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.", + "html_description": "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.", + "rst_description": "*Optional*. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field *from* contains a fake sender user in non-channel chats.\n", "name": "sender_chat", "required": false }, @@ -59,6 +67,14 @@ "name": "sender_business_bot", "required": false }, + { + "type": "String", + "description": "Tag or custom title of the sender of the message; for supergroups only", + "html_description": "Optional. Tag or custom title of the sender of the message; for supergroups only", + "rst_description": "*Optional*. Tag or custom title of the sender of the message; for supergroups only\n", + "name": "sender_tag", + "required": false + }, { "type": "Integer", "description": "Date the message was sent in Unix time. It is always a positive number, representing a valid date.", @@ -93,9 +109,9 @@ }, { "type": "True", - "description": "True, if the message is sent to a forum topic", - "html_description": "Optional. True, if the message is sent to a forum topic", - "rst_description": "*Optional*. :code:`True`, if the message is sent to a forum topic\n", + "description": "True, if the message is sent to a topic in a forum supergroup or a private chat with the bot", + "html_description": "Optional. True, if the message is sent to a topic in a forum supergroup or a private chat with the bot", + "rst_description": "*Optional*. :code:`True`, if the message is sent to a topic in a forum supergroup or a private chat with the bot\n", "name": "is_topic_message", "required": false }, @@ -110,8 +126,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 +155,22 @@ "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": "String", + "description": "Persistent identifier of the specific poll option that is being replied to", + "html_description": "Optional. Persistent identifier of the specific poll option that is being replied to", + "rst_description": "*Optional*. Persistent identifier of the specific poll option that is being replied to\n", + "name": "reply_to_poll_option_id", + "required": false + }, { "type": "User", "description": "Bot through which the message was sent", @@ -166,16 +198,24 @@ { "type": "True", "description": "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", - "html_description": "Optional. 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", - "rst_description": "*Optional*. 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\n", + "html_description": "Optional. 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", + "rst_description": "*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\n", "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", - "html_description": "Optional. The unique identifier of a media message group this message belongs to", - "rst_description": "*Optional*. The unique identifier of a media message group this message belongs to\n", + "description": "The unique identifier inside this chat of a media message group this message belongs to", + "html_description": "Optional. The unique identifier inside this chat of a media message group this message belongs to", + "rst_description": "*Optional*. The unique identifier inside this chat of a media message group this message belongs to\n", "name": "media_group_id", "required": false }, @@ -187,6 +227,14 @@ "name": "author_signature", "required": false }, + { + "type": "Integer", + "description": "The number of Telegram Stars that were paid by the sender of the message to send it", + "html_description": "Optional. The number of Telegram Stars that were paid by the sender of the message to send it", + "rst_description": "*Optional*. The number of Telegram Stars that were paid by the sender of the message to send it\n", + "name": "paid_star_count", + "required": false + }, { "type": "String", "description": "For text messages, the actual UTF-8 text of the message", @@ -211,6 +259,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", @@ -318,8 +374,8 @@ { "type": "True", "description": "True, if the caption must be shown above the message media", - "html_description": "Optional. True, if the caption must be shown above the message media", - "rst_description": "*Optional*. True, if the caption must be shown above the message media\n", + "html_description": "Optional. True, if the caption must be shown above the message media", + "rst_description": "*Optional*. :code:`True`, if the caption must be shown above the message media\n", "name": "show_caption_above_media", "required": false }, @@ -331,6 +387,14 @@ "name": "has_media_spoiler", "required": false }, + { + "type": "Checklist", + "description": "Message is a checklist", + "html_description": "Optional. Message is a checklist", + "rst_description": "*Optional*. Message is a checklist\n", + "name": "checklist", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", @@ -395,6 +459,22 @@ "name": "left_chat_member", "required": false }, + { + "type": "ChatOwnerLeft", + "description": "Service message: chat owner has left", + "html_description": "Optional. Service message: chat owner has left", + "rst_description": "*Optional*. Service message: chat owner has left\n", + "name": "chat_owner_left", + "required": false + }, + { + "type": "ChatOwnerChanged", + "description": "Service message: chat owner has changed", + "html_description": "Optional. Service message: chat owner has changed", + "rst_description": "*Optional*. Service message: chat owner has changed\n", + "name": "chat_owner_changed", + "required": false + }, { "type": "String", "description": "A chat title was changed to this value", @@ -470,8 +550,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 }, @@ -491,6 +571,14 @@ "name": "successful_payment", "required": false }, + { + "type": "RefundedPayment", + "description": "Message is a service message about a refunded payment, information about the payment.", + "html_description": "Optional. Message is a service message about a refunded payment, information about the payment. More about payments »", + "rst_description": "*Optional*. Message is a service message about a refunded payment, information about the payment. `More about payments » `_\n", + "name": "refunded_payment", + "required": false + }, { "type": "UsersShared", "description": "Service message: users were shared with the bot", @@ -507,6 +595,30 @@ "name": "chat_shared", "required": false }, + { + "type": "GiftInfo", + "description": "Service message: a regular gift was sent or received", + "html_description": "Optional. Service message: a regular gift was sent or received", + "rst_description": "*Optional*. Service message: a regular gift was sent or received\n", + "name": "gift", + "required": false + }, + { + "type": "UniqueGiftInfo", + "description": "Service message: a unique gift was sent or received", + "html_description": "Optional. Service message: a unique gift was sent or received", + "rst_description": "*Optional*. Service message: a unique gift was sent or received\n", + "name": "unique_gift", + "required": false + }, + { + "type": "GiftInfo", + "description": "Service message: upgrade of a gift was purchased after the gift was sent", + "html_description": "Optional. Service message: upgrade of a gift was purchased after the gift was sent", + "rst_description": "*Optional*. Service message: upgrade of a gift was purchased after the gift was sent\n", + "name": "gift_upgrade_sent", + "required": false + }, { "type": "String", "description": "The domain name of the website on which the user has logged in.", @@ -555,6 +667,30 @@ "name": "chat_background_set", "required": false }, + { + "type": "ChecklistTasksDone", + "description": "Service message: some tasks in a checklist were marked as done or not done", + "html_description": "Optional. Service message: some tasks in a checklist were marked as done or not done", + "rst_description": "*Optional*. Service message: some tasks in a checklist were marked as done or not done\n", + "name": "checklist_tasks_done", + "required": false + }, + { + "type": "ChecklistTasksAdded", + "description": "Service message: tasks were added to a checklist", + "html_description": "Optional. Service message: tasks were added to a checklist", + "rst_description": "*Optional*. Service message: tasks were added to a checklist\n", + "name": "checklist_tasks_added", + "required": false + }, + { + "type": "DirectMessagePriceChanged", + "description": "Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed", + "html_description": "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed", + "rst_description": "*Optional*. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed\n", + "name": "direct_message_price_changed", + "required": false + }, { "type": "ForumTopicCreated", "description": "Service message: forum topic created", @@ -635,6 +771,78 @@ "name": "giveaway_completed", "required": false }, + { + "type": "ManagedBotCreated", + "description": "Service message: user created a bot that will be managed by the current bot", + "html_description": "Optional. Service message: user created a bot that will be managed by the current bot", + "rst_description": "*Optional*. Service message: user created a bot that will be managed by the current bot\n", + "name": "managed_bot_created", + "required": false + }, + { + "type": "PaidMessagePriceChanged", + "description": "Service message: the price for paid messages has changed in the chat", + "html_description": "Optional. Service message: the price for paid messages has changed in the chat", + "rst_description": "*Optional*. Service message: the price for paid messages has changed in the chat\n", + "name": "paid_message_price_changed", + "required": false + }, + { + "type": "PollOptionAdded", + "description": "Service message: answer option was added to a poll", + "html_description": "Optional. Service message: answer option was added to a poll", + "rst_description": "*Optional*. Service message: answer option was added to a poll\n", + "name": "poll_option_added", + "required": false + }, + { + "type": "PollOptionDeleted", + "description": "Service message: answer option was deleted from a poll", + "html_description": "Optional. Service message: answer option was deleted from a poll", + "rst_description": "*Optional*. Service message: answer option was deleted from a poll\n", + "name": "poll_option_deleted", + "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", @@ -678,8 +886,8 @@ { "type": "InlineKeyboardMarkup", "description": "Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.", - "html_description": "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.", - "rst_description": "*Optional*. Inline keyboard attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.\n", + "html_description": "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.\n", "name": "reply_markup", "required": false }, diff --git a/.butcher/types/MessageEntity/entity.json b/.butcher/types/MessageEntity/entity.json index 1ffb569b..37dc6cf4 100644 --- a/.butcher/types/MessageEntity/entity.json +++ b/.butcher/types/MessageEntity/entity.json @@ -13,9 +13,9 @@ "annotations": [ { "type": "String", - "description": "Type of the entity. Currently, can be 'mention' (@username), 'hashtag' (#hashtag), 'cashtag' ($USD), 'bot_command' (/start@jobs_bot), 'url' (https://telegram.org), 'email' (do-not-reply@telegram.org), 'phone_number' (+1-212-555-0123), 'bold' (bold text), 'italic' (italic text), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'expandable_blockquote' (collapsed-by-default block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users without usernames), 'custom_emoji' (for inline custom emoji stickers)", - "html_description": "Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)", - "rst_description": "Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag`), 'cashtag' (:code:`$USD`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'expandable_blockquote' (collapsed-by-default block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames `_), 'custom_emoji' (for inline custom emoji stickers)\n", + "description": "Type of the entity. Currently, can be 'mention' (@username), 'hashtag' (#hashtag or #hashtag@chatusername), 'cashtag' ($USD or $USD@chatusername), 'bot_command' (/start@jobs_bot), 'url' (https://telegram.org), 'email' (do-not-reply@telegram.org), 'phone_number' (+1-212-555-0123), 'bold' (bold text), 'italic' (italic text), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'expandable_blockquote' (collapsed-by-default block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users without usernames), 'custom_emoji' (for inline custom emoji stickers), or 'date_time' (for formatted date and time)", + "html_description": "Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag or #hashtag@chatusername), “cashtag” ($USD or $USD@chatusername), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers), or “date_time” (for formatted date and time)", + "rst_description": "Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag` or :code:`#hashtag@chatusername`), 'cashtag' (:code:`$USD` or :code:`$USD@chatusername`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'expandable_blockquote' (collapsed-by-default block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames `_), 'custom_emoji' (for inline custom emoji stickers), or 'date_time' (for formatted date and time)\n", "name": "type", "required": true }, @@ -66,6 +66,22 @@ "rst_description": "*Optional*. For 'custom_emoji' only, unique identifier of the custom emoji. Use :class:`aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers` to get full information about the sticker\n", "name": "custom_emoji_id", "required": false + }, + { + "type": "Integer", + "description": "For 'date_time' only, the Unix time associated with the entity", + "html_description": "Optional. For “date_time” only, the Unix time associated with the entity", + "rst_description": "*Optional*. For 'date_time' only, the Unix time associated with the entity\n", + "name": "unix_time", + "required": false + }, + { + "type": "String", + "description": "For 'date_time' only, the string that defines the formatting of the date and time. See date-time entity formatting for more details.", + "html_description": "Optional. For “date_time” only, the string that defines the formatting of the date and time. See date-time entity formatting for more details.", + "rst_description": "*Optional*. For 'date_time' only, the string that defines the formatting of the date and time. See `date-time entity formatting `_ for more details.\n", + "name": "date_time_format", + "required": false } ], "category": "types" diff --git a/.butcher/types/MessageId/entity.json b/.butcher/types/MessageId/entity.json index 69fce170..a886bf17 100644 --- a/.butcher/types/MessageId/entity.json +++ b/.butcher/types/MessageId/entity.json @@ -13,9 +13,9 @@ "annotations": [ { "type": "Integer", - "description": "Unique message identifier", - "html_description": "Unique message identifier", - "rst_description": "Unique message identifier\n", + "description": "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent", + "html_description": "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent", + "rst_description": "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent\n", "name": "message_id", "required": true } diff --git a/.butcher/types/OwnedGift/entity.json b/.butcher/types/OwnedGift/entity.json new file mode 100644 index 00000000..4b68f768 --- /dev/null +++ b/.butcher/types/OwnedGift/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "ownedgift", + "name": "OwnedGift", + "description": "This object describes a gift received and owned by a user or a chat. Currently, it can be one of\n - OwnedGiftRegular\n - OwnedGiftUnique", + "html_description": "

This object describes a gift received and owned by a user or a chat. Currently, it can be one of

", + "rst_description": "This object describes a gift received and owned by a user or a chat. Currently, it can be one of\n\n - :class:`aiogram.types.owned_gift_regular.OwnedGiftRegular`\n - :class:`aiogram.types.owned_gift_unique.OwnedGiftUnique`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/OwnedGift/subtypes.yml b/.butcher/types/OwnedGift/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/OwnedGift/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/OwnedGiftRegular/entity.json b/.butcher/types/OwnedGiftRegular/entity.json new file mode 100644 index 00000000..27c3d590 --- /dev/null +++ b/.butcher/types/OwnedGiftRegular/entity.json @@ -0,0 +1,137 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "ownedgiftregular", + "name": "OwnedGiftRegular", + "description": "Describes a regular gift owned by a user or a chat.", + "html_description": "

Describes a regular gift owned by a user or a chat.

", + "rst_description": "Describes a regular gift owned by a user or a chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the gift, always 'regular'", + "html_description": "Type of the gift, always “regular”", + "rst_description": "Type of the gift, always 'regular'\n", + "name": "type", + "required": true + }, + { + "type": "Gift", + "description": "Information about the regular gift", + "html_description": "Information about the regular gift", + "rst_description": "Information about the regular gift\n", + "name": "gift", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only", + "html_description": "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only\n", + "name": "owned_gift_id", + "required": false + }, + { + "type": "User", + "description": "Sender of the gift if it is a known user", + "html_description": "Optional. Sender of the gift if it is a known user", + "rst_description": "*Optional*. Sender of the gift if it is a known user\n", + "name": "sender_user", + "required": false + }, + { + "type": "Integer", + "description": "Date the gift was sent in Unix time", + "html_description": "Date the gift was sent in Unix time", + "rst_description": "Date the gift was sent in Unix time\n", + "name": "send_date", + "required": true + }, + { + "type": "String", + "description": "Text of the message that was added to the gift", + "html_description": "Optional. Text of the message that was added to the gift", + "rst_description": "*Optional*. Text of the message that was added to the gift\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the text", + "html_description": "Optional. Special entities that appear in the text", + "rst_description": "*Optional*. Special entities that appear in the text\n", + "name": "entities", + "required": false + }, + { + "type": "True", + "description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "html_description": "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them", + "rst_description": "*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them\n", + "name": "is_private", + "required": false + }, + { + "type": "True", + "description": "True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", + "name": "is_saved", + "required": false + }, + { + "type": "True", + "description": "True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only", + "html_description": "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only\n", + "name": "can_be_upgraded", + "required": false + }, + { + "type": "True", + "description": "True, if the gift was refunded and isn't available anymore", + "html_description": "Optional. True, if the gift was refunded and isn't available anymore", + "rst_description": "*Optional*. :code:`True`, if the gift was refunded and isn't available anymore\n", + "name": "was_refunded", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only", + "html_description": "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only\n", + "name": "convert_star_count", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that were paid for the ability to upgrade the gift", + "html_description": "Optional. Number of Telegram Stars that were paid for the ability to upgrade the gift", + "rst_description": "*Optional*. Number of Telegram Stars that were paid for the ability to upgrade the gift\n", + "name": "prepaid_upgrade_star_count", + "required": false + }, + { + "type": "True", + "description": "True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only", + "html_description": "Optional. True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only\n", + "name": "is_upgrade_separate", + "required": false + }, + { + "type": "Integer", + "description": "Unique number reserved for this gift when upgraded. See the number field in UniqueGift", + "html_description": "Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift", + "rst_description": "*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`\n", + "name": "unique_gift_number", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/OwnedGiftUnique/entity.json b/.butcher/types/OwnedGiftUnique/entity.json new file mode 100644 index 00000000..7a9b46bb --- /dev/null +++ b/.butcher/types/OwnedGiftUnique/entity.json @@ -0,0 +1,89 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "ownedgiftunique", + "name": "OwnedGiftUnique", + "description": "Describes a unique gift received and owned by a user or a chat.", + "html_description": "

Describes a unique gift received and owned by a user or a chat.

", + "rst_description": "Describes a unique gift received and owned by a user or a chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the gift, always 'unique'", + "html_description": "Type of the gift, always “unique”", + "rst_description": "Type of the gift, always 'unique'\n", + "name": "type", + "required": true + }, + { + "type": "UniqueGift", + "description": "Information about the unique gift", + "html_description": "Information about the unique gift", + "rst_description": "Information about the unique gift\n", + "name": "gift", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only", + "html_description": "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only\n", + "name": "owned_gift_id", + "required": false + }, + { + "type": "User", + "description": "Sender of the gift if it is a known user", + "html_description": "Optional. Sender of the gift if it is a known user", + "rst_description": "*Optional*. Sender of the gift if it is a known user\n", + "name": "sender_user", + "required": false + }, + { + "type": "Integer", + "description": "Date the gift was sent in Unix time", + "html_description": "Date the gift was sent in Unix time", + "rst_description": "Date the gift was sent in Unix time\n", + "name": "send_date", + "required": true + }, + { + "type": "True", + "description": "True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "html_description": "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only\n", + "name": "is_saved", + "required": false + }, + { + "type": "True", + "description": "True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only", + "html_description": "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only", + "rst_description": "*Optional*. :code:`True`, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only\n", + "name": "can_be_transferred", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift", + "html_description": "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift", + "rst_description": "*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift\n", + "name": "transfer_star_count", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "html_description": "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now\n", + "name": "next_transfer_date", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/OwnedGiftUnique/replace.yml b/.butcher/types/OwnedGiftUnique/replace.yml new file mode 100644 index 00000000..17326632 --- /dev/null +++ b/.butcher/types/OwnedGiftUnique/replace.yml @@ -0,0 +1,5 @@ +annotations: + next_transfer_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/OwnedGifts/entity.json b/.butcher/types/OwnedGifts/entity.json new file mode 100644 index 00000000..eb6d2e47 --- /dev/null +++ b/.butcher/types/OwnedGifts/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "ownedgifts", + "name": "OwnedGifts", + "description": "Contains the list of gifts received and owned by a user or a chat.", + "html_description": "

Contains the list of gifts received and owned by a user or a chat.

", + "rst_description": "Contains the list of gifts received and owned by a user or a chat.", + "annotations": [ + { + "type": "Integer", + "description": "The total number of gifts owned by the user or the chat", + "html_description": "The total number of gifts owned by the user or the chat", + "rst_description": "The total number of gifts owned by the user or the chat\n", + "name": "total_count", + "required": true + }, + { + "type": "Array of OwnedGift", + "description": "The list of gifts", + "html_description": "The list of gifts", + "rst_description": "The list of gifts\n", + "name": "gifts", + "required": true + }, + { + "type": "String", + "description": "Offset for the next request. If empty, then there are no more results", + "html_description": "Optional. Offset for the next request. If empty, then there are no more results", + "rst_description": "*Optional*. Offset for the next request. If empty, then there are no more results\n", + "name": "next_offset", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PaidMediaPurchased/entity.json b/.butcher/types/PaidMediaPurchased/entity.json new file mode 100644 index 00000000..0823946e --- /dev/null +++ b/.butcher/types/PaidMediaPurchased/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "paidmediapurchased", + "name": "PaidMediaPurchased", + "description": "This object contains information about a paid media purchase.", + "html_description": "

This object contains information about a paid media purchase.

", + "rst_description": "This object contains information about a paid media purchase.", + "annotations": [ + { + "type": "User", + "description": "User who purchased the media", + "html_description": "User who purchased the media", + "rst_description": "User who purchased the media\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Bot-specified paid media payload", + "html_description": "Bot-specified paid media payload", + "rst_description": "Bot-specified paid media payload\n", + "name": "paid_media_payload", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PaidMessagePriceChanged/entity.json b/.butcher/types/PaidMessagePriceChanged/entity.json new file mode 100644 index 00000000..6301d55e --- /dev/null +++ b/.butcher/types/PaidMessagePriceChanged/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "paidmessagepricechanged", + "name": "PaidMessagePriceChanged", + "description": "Describes a service message about a change in the price of paid messages within a chat.", + "html_description": "

Describes a service message about a change in the price of paid messages within a chat.

", + "rst_description": "Describes a service message about a change in the price of paid messages within a chat.", + "annotations": [ + { + "type": "Integer", + "description": "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message", + "html_description": "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message", + "rst_description": "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message\n", + "name": "paid_message_star_count", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Poll/entity.json b/.butcher/types/Poll/entity.json index 00b93cc3..2c5ef7f1 100644 --- a/.butcher/types/Poll/entity.json +++ b/.butcher/types/Poll/entity.json @@ -84,11 +84,19 @@ "required": true }, { - "type": "Integer", - "description": "0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.", - "html_description": "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.", - "rst_description": "*Optional*. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.\n", - "name": "correct_option_id", + "type": "Boolean", + "description": "True, if the poll allows to change the chosen answer options", + "html_description": "True, if the poll allows to change the chosen answer options", + "rst_description": ":code:`True`, if the poll allows to change the chosen answer options\n", + "name": "allows_revoting", + "required": true + }, + { + "type": "Array of Integer", + "description": "Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which are closed or were sent (not forwarded) by the bot or to the private chat with the bot.", + "html_description": "Optional. Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which are closed or were sent (not forwarded) by the bot or to the private chat with the bot.", + "rst_description": "*Optional*. Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which are closed or were sent (not forwarded) by the bot or to the private chat with the bot.\n", + "name": "correct_option_ids", "required": false }, { @@ -122,6 +130,34 @@ "rst_description": "*Optional*. Point in time (Unix timestamp) when the poll will be automatically closed\n", "name": "close_date", "required": false + }, + { + "type": "String", + "description": "Description of the poll; for polls inside the Message object only", + "html_description": "Optional. Description of the poll; for polls inside the Message object only", + "rst_description": "*Optional*. Description of the poll; for polls inside the :class:`aiogram.types.message.Message` object only\n", + "name": "description", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities like usernames, URLs, bot commands, etc. that appear in the description", + "html_description": "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the description", + "rst_description": "*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the description\n", + "name": "description_entities", + "required": false + }, + { + "type": "Integer", + "description": "0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.", + "html_description": "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.", + "rst_description": "*Optional*. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.\n", + "name": "correct_option_id", + "required": false, + "deprecated": { + "version": "9.6", + "release_date": "2026-04-03" + } } ], "category": "types" diff --git a/.butcher/types/PollAnswer/entity.json b/.butcher/types/PollAnswer/entity.json index 3b14d6dc..b1e0007c 100644 --- a/.butcher/types/PollAnswer/entity.json +++ b/.butcher/types/PollAnswer/entity.json @@ -42,6 +42,14 @@ "rst_description": "0-based identifiers of chosen answer options. May be empty if the vote was retracted.\n", "name": "option_ids", "required": true + }, + { + "type": "Array of String", + "description": "Persistent identifiers of the chosen answer options. May be empty if the vote was retracted.", + "html_description": "Persistent identifiers of the chosen answer options. May be empty if the vote was retracted.", + "rst_description": "Persistent identifiers of the chosen answer options. May be empty if the vote was retracted.\n", + "name": "option_persistent_ids", + "required": true } ], "category": "types" diff --git a/.butcher/types/PollOption/entity.json b/.butcher/types/PollOption/entity.json index 5c5efa26..c592d13a 100644 --- a/.butcher/types/PollOption/entity.json +++ b/.butcher/types/PollOption/entity.json @@ -11,6 +11,14 @@ "html_description": "

This object contains information about one answer option in a poll.

", "rst_description": "This object contains information about one answer option in a poll.", "annotations": [ + { + "type": "String", + "description": "Unique identifier of the option, persistent on option addition and deletion", + "html_description": "Unique identifier of the option, persistent on option addition and deletion", + "rst_description": "Unique identifier of the option, persistent on option addition and deletion\n", + "name": "persistent_id", + "required": true + }, { "type": "String", "description": "Option text, 1-100 characters", @@ -29,11 +37,35 @@ }, { "type": "Integer", - "description": "Number of users that voted for this option", - "html_description": "Number of users that voted for this option", - "rst_description": "Number of users that voted for this option\n", + "description": "Number of users who voted for this option; may be 0 if unknown", + "html_description": "Number of users who voted for this option; may be 0 if unknown", + "rst_description": "Number of users who voted for this option; may be 0 if unknown\n", "name": "voter_count", "required": true + }, + { + "type": "User", + "description": "User who added the option; omitted if the option wasn't added by a user after poll creation", + "html_description": "Optional. User who added the option; omitted if the option wasn't added by a user after poll creation", + "rst_description": "*Optional*. User who added the option; omitted if the option wasn't added by a user after poll creation\n", + "name": "added_by_user", + "required": false + }, + { + "type": "Chat", + "description": "Chat that added the option; omitted if the option wasn't added by a chat after poll creation", + "html_description": "Optional. Chat that added the option; omitted if the option wasn't added by a chat after poll creation", + "rst_description": "*Optional*. Chat that added the option; omitted if the option wasn't added by a chat after poll creation\n", + "name": "added_by_chat", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original poll", + "html_description": "Optional. Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original poll", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original poll\n", + "name": "addition_date", + "required": false } ], "category": "types" diff --git a/.butcher/types/PollOption/replace.yml b/.butcher/types/PollOption/replace.yml new file mode 100644 index 00000000..a2abf27d --- /dev/null +++ b/.butcher/types/PollOption/replace.yml @@ -0,0 +1,5 @@ +annotations: + addition_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/PollOptionAdded/entity.json b/.butcher/types/PollOptionAdded/entity.json new file mode 100644 index 00000000..b9e6e987 --- /dev/null +++ b/.butcher/types/PollOptionAdded/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "polloptionadded", + "name": "PollOptionAdded", + "description": "Describes a service message about an option added to a poll.", + "html_description": "

Describes a service message about an option added to a poll.

", + "rst_description": "Describes a service message about an option added to a poll.", + "annotations": [ + { + "type": "MaybeInaccessibleMessage", + "description": "Message containing the poll to which the option was added, if known. 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 poll to which the option was added, if known. 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 poll to which the option was added, if known. 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": "poll_message", + "required": false + }, + { + "type": "String", + "description": "Unique identifier of the added option", + "html_description": "Unique identifier of the added option", + "rst_description": "Unique identifier of the added option\n", + "name": "option_persistent_id", + "required": true + }, + { + "type": "String", + "description": "Option text", + "html_description": "Option text", + "rst_description": "Option text\n", + "name": "option_text", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the option_text", + "html_description": "Optional. Special entities that appear in the option_text", + "rst_description": "*Optional*. Special entities that appear in the *option_text*\n", + "name": "option_text_entities", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PollOptionDeleted/entity.json b/.butcher/types/PollOptionDeleted/entity.json new file mode 100644 index 00000000..0a34b964 --- /dev/null +++ b/.butcher/types/PollOptionDeleted/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "polloptiondeleted", + "name": "PollOptionDeleted", + "description": "Describes a service message about an option deleted from a poll.", + "html_description": "

Describes a service message about an option deleted from a poll.

", + "rst_description": "Describes a service message about an option deleted from a poll.", + "annotations": [ + { + "type": "MaybeInaccessibleMessage", + "description": "Message containing the poll from which the option was deleted, if known. 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 poll from which the option was deleted, if known. 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 poll from which the option was deleted, if known. 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": "poll_message", + "required": false + }, + { + "type": "String", + "description": "Unique identifier of the deleted option", + "html_description": "Unique identifier of the deleted option", + "rst_description": "Unique identifier of the deleted option\n", + "name": "option_persistent_id", + "required": true + }, + { + "type": "String", + "description": "Option text", + "html_description": "Option text", + "rst_description": "Option text\n", + "name": "option_text", + "required": true + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in the option_text", + "html_description": "Optional. Special entities that appear in the option_text", + "rst_description": "*Optional*. Special entities that appear in the *option_text*\n", + "name": "option_text_entities", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PreparedInlineMessage/entity.json b/.butcher/types/PreparedInlineMessage/entity.json new file mode 100644 index 00000000..ab30e165 --- /dev/null +++ b/.butcher/types/PreparedInlineMessage/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "preparedinlinemessage", + "name": "PreparedInlineMessage", + "description": "Describes an inline message to be sent by a user of a Mini App.", + "html_description": "

Describes an inline message to be sent by a user of a Mini App.

", + "rst_description": "Describes an inline message to be sent by a user of a Mini App.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier of the prepared message", + "html_description": "Unique identifier of the prepared message", + "rst_description": "Unique identifier of the prepared message\n", + "name": "id", + "required": true + }, + { + "type": "Integer", + "description": "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used", + "html_description": "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used", + "rst_description": "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used\n", + "name": "expiration_date", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PreparedInlineMessage/replace.yml b/.butcher/types/PreparedInlineMessage/replace.yml new file mode 100644 index 00000000..3b8e5159 --- /dev/null +++ b/.butcher/types/PreparedInlineMessage/replace.yml @@ -0,0 +1,11 @@ +annotations: + expiration_date: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/types/PreparedKeyboardButton/entity.json b/.butcher/types/PreparedKeyboardButton/entity.json new file mode 100644 index 00000000..dde483f0 --- /dev/null +++ b/.butcher/types/PreparedKeyboardButton/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "preparedkeyboardbutton", + "name": "PreparedKeyboardButton", + "description": "Describes a keyboard button to be used by a user of a Mini App.", + "html_description": "

Describes a keyboard button to be used by a user of a Mini App.

", + "rst_description": "Describes a keyboard button to be used by a user of a Mini App.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier of the keyboard button", + "html_description": "Unique identifier of the keyboard button", + "rst_description": "Unique identifier of the keyboard button\n", + "name": "id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ReactionType/entity.json b/.butcher/types/ReactionType/entity.json index e37dcce3..8063b1a7 100644 --- a/.butcher/types/ReactionType/entity.json +++ b/.butcher/types/ReactionType/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "reactiontype", "name": "ReactionType", - "description": "This object describes the type of a reaction. Currently, it can be one of\n - ReactionTypeEmoji\n - ReactionTypeCustomEmoji", - "html_description": "

This object describes the type of a reaction. Currently, it can be one of

", - "rst_description": "This object describes the type of a reaction. Currently, it can be one of\n\n - :class:`aiogram.types.reaction_type_emoji.ReactionTypeEmoji`\n - :class:`aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji`", + "description": "This object describes the type of a reaction. Currently, it can be one of\n - ReactionTypeEmoji\n - ReactionTypeCustomEmoji\n - ReactionTypePaid", + "html_description": "

This object describes the type of a reaction. Currently, it can be one of

", + "rst_description": "This object describes the type of a reaction. Currently, it can be one of\n\n - :class:`aiogram.types.reaction_type_emoji.ReactionTypeEmoji`\n - :class:`aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji`\n - :class:`aiogram.types.reaction_type_paid.ReactionTypePaid`", "annotations": [], "category": "types" } diff --git a/.butcher/types/ReactionTypeEmoji/entity.json b/.butcher/types/ReactionTypeEmoji/entity.json index d371dcd7..263c779c 100644 --- a/.butcher/types/ReactionTypeEmoji/entity.json +++ b/.butcher/types/ReactionTypeEmoji/entity.json @@ -22,8 +22,8 @@ { "type": "String", "description": "Reaction emoji. Currently, it can be one of \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"", - "html_description": "Reaction emoji. Currently, it can be one of \"\"👍\"/\", \"\"👎\"/\", \"\"❤\"/\", \"\"🔥\"/\", \"\"🥰\"/\", \"\"👏\"/\", \"\"😁\"/\", \"\"🤔\"/\", \"\"🤯\"/\", \"\"😱\"/\", \"\"🤬\"/\", \"\"😢\"/\", \"\"🎉\"/\", \"\"🤩\"/\", \"\"🤮\"/\", \"\"💩\"/\", \"\"🙏\"/\", \"\"👌\"/\", \"\"🕊\"/\", \"\"🤡\"/\", \"\"🥱\"/\", \"\"🥴\"/\", \"\"😍\"/\", \"\"🐳\"/\", \"\"❤‍🔥\"/\", \"\"🌚\"/\", \"\"🌭\"/\", \"\"💯\"/\", \"\"🤣\"/\", \"\"⚡\"/\", \"\"🍌\"/\", \"\"🏆\"/\", \"\"💔\"/\", \"\"🤨\"/\", \"\"😐\"/\", \"\"🍓\"/\", \"\"🍾\"/\", \"\"💋\"/\", \"\"🖕\"/\", \"\"😈\"/\", \"\"😴\"/\", \"\"😭\"/\", \"\"🤓\"/\", \"\"👻\"/\", \"\"👨‍💻\"/\", \"\"👀\"/\", \"\"🎃\"/\", \"\"🙈\"/\", \"\"😇\"/\", \"\"😨\"/\", \"\"🤝\"/\", \"\"✍\"/\", \"\"🤗\"/\", \"\"🫡\"/\", \"\"🎅\"/\", \"\"🎄\"/\", \"\"☃\"/\", \"\"💅\"/\", \"\"🤪\"/\", \"\"🗿\"/\", \"\"🆒\"/\", \"\"💘\"/\", \"\"🙉\"/\", \"\"🦄\"/\", \"\"😘\"/\", \"\"💊\"/\", \"\"🙊\"/\", \"\"😎\"/\", \"\"👾\"/\", \"\"🤷‍♂\"/\", \"\"🤷\"/\", \"\"🤷‍♀\"/\", \"\"😡\"/\"", - "rst_description": "Reaction emoji. Currently, it can be one of \"👍\", \"👎\", \"❤\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤‍🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨‍💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷‍♂\", \"🤷\", \"🤷‍♀\", \"😡\"\n", + "html_description": "Reaction emoji. Currently, it can be one of \"\"❤\"/\", \"\"👍\"/\", \"\"👎\"/\", \"\"🔥\"/\", \"\"🥰\"/\", \"\"👏\"/\", \"\"😁\"/\", \"\"🤔\"/\", \"\"🤯\"/\", \"\"😱\"/\", \"\"🤬\"/\", \"\"😢\"/\", \"\"🎉\"/\", \"\"🤩\"/\", \"\"🤮\"/\", \"\"💩\"/\", \"\"🙏\"/\", \"\"👌\"/\", \"\"🕊\"/\", \"\"🤡\"/\", \"\"🥱\"/\", \"\"🥴\"/\", \"\"😍\"/\", \"\"🐳\"/\", \"\"❤‍🔥\"/\", \"\"🌚\"/\", \"\"🌭\"/\", \"\"💯\"/\", \"\"🤣\"/\", \"\"⚡\"/\", \"\"🍌\"/\", \"\"🏆\"/\", \"\"💔\"/\", \"\"🤨\"/\", \"\"😐\"/\", \"\"🍓\"/\", \"\"🍾\"/\", \"\"💋\"/\", \"\"🖕\"/\", \"\"😈\"/\", \"\"😴\"/\", \"\"😭\"/\", \"\"🤓\"/\", \"\"👻\"/\", \"\"👨‍💻\"/\", \"\"👀\"/\", \"\"🎃\"/\", \"\"🙈\"/\", \"\"😇\"/\", \"\"😨\"/\", \"\"🤝\"/\", \"\"✍\"/\", \"\"🤗\"/\", \"\"🫡\"/\", \"\"🎅\"/\", \"\"🎄\"/\", \"\"☃\"/\", \"\"💅\"/\", \"\"🤪\"/\", \"\"🗿\"/\", \"\"🆒\"/\", \"\"💘\"/\", \"\"🙉\"/\", \"\"🦄\"/\", \"\"😘\"/\", \"\"💊\"/\", \"\"🙊\"/\", \"\"😎\"/\", \"\"👾\"/\", \"\"🤷‍♂\"/\", \"\"🤷\"/\", \"\"🤷‍♀\"/\", \"\"😡\"/\"", + "rst_description": "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤‍🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨‍💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷‍♂\", \"🤷\", \"🤷‍♀\", \"😡\"\n", "name": "emoji", "required": true } diff --git a/.butcher/types/ReactionTypePaid/entity.json b/.butcher/types/ReactionTypePaid/entity.json new file mode 100644 index 00000000..9fb16cc7 --- /dev/null +++ b/.butcher/types/ReactionTypePaid/entity.json @@ -0,0 +1,25 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "reactiontypepaid", + "name": "ReactionTypePaid", + "description": "The reaction is paid.", + "html_description": "

The reaction is paid.

", + "rst_description": "The reaction is paid.", + "annotations": [ + { + "type": "String", + "description": "Type of the reaction, always 'paid'", + "html_description": "Type of the reaction, always “paid”", + "rst_description": "Type of the reaction, always 'paid'\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/RefundedPayment/entity.json b/.butcher/types/RefundedPayment/entity.json new file mode 100644 index 00000000..b5b84104 --- /dev/null +++ b/.butcher/types/RefundedPayment/entity.json @@ -0,0 +1,57 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "refundedpayment", + "name": "RefundedPayment", + "description": "This object contains basic information about a refunded payment.", + "html_description": "

This object contains basic information about a refunded payment.

", + "rst_description": "This object contains basic information about a refunded payment.", + "annotations": [ + { + "type": "String", + "description": "Three-letter ISO 4217 currency code, or 'XTR' for payments in Telegram Stars. Currently, always 'XTR'", + "html_description": "Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. Currently, always “XTR”", + "rst_description": "Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_. Currently, always 'XTR'\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_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).", + "html_description": "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_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).", + "rst_description": "Total refunded price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45`, :code:`total_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).\n", + "name": "total_amount", + "required": true + }, + { + "type": "String", + "description": "Bot-specified invoice payload", + "html_description": "Bot-specified invoice payload", + "rst_description": "Bot-specified invoice payload\n", + "name": "invoice_payload", + "required": true + }, + { + "type": "String", + "description": "Telegram payment identifier", + "html_description": "Telegram payment identifier", + "rst_description": "Telegram payment identifier\n", + "name": "telegram_payment_charge_id", + "required": true + }, + { + "type": "String", + "description": "Provider payment identifier", + "html_description": "Optional. Provider payment identifier", + "rst_description": "*Optional*. Provider payment identifier\n", + "name": "provider_payment_charge_id", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ReplyParameters/entity.json b/.butcher/types/ReplyParameters/entity.json index 94a43e43..0d11d31a 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 }, @@ -37,9 +37,9 @@ }, { "type": "String", - "description": "Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message.", - "html_description": "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message.", - "rst_description": "*Optional*. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities. The message will fail to send if the quote isn't found in the original message.\n", + "description": "Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities. The message will fail to send if the quote isn't found in the original message.", + "html_description": "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities. The message will fail to send if the quote isn't found in the original message.", + "rst_description": "*Optional*. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities. The message will fail to send if the quote isn't found in the original message.\n", "name": "quote", "required": false }, @@ -66,6 +66,22 @@ "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 + }, + { + "type": "String", + "description": "Persistent identifier of the specific poll option to be replied to", + "html_description": "Optional. Persistent identifier of the specific poll option to be replied to", + "rst_description": "*Optional*. Persistent identifier of the specific poll option to be replied to\n", + "name": "poll_option_id", + "required": false } ], "category": "types" diff --git a/.butcher/types/SentWebAppMessage/entity.json b/.butcher/types/SentWebAppMessage/entity.json index a70568af..1960264d 100644 --- a/.butcher/types/SentWebAppMessage/entity.json +++ b/.butcher/types/SentWebAppMessage/entity.json @@ -1,8 +1,8 @@ { "meta": {}, "group": { - "title": "Inline mode", - "anchor": "inline-mode" + "title": "Available types", + "anchor": "available-types" }, "object": { "anchor": "sentwebappmessage", diff --git a/.butcher/types/StarAmount/entity.json b/.butcher/types/StarAmount/entity.json new file mode 100644 index 00000000..9462a72b --- /dev/null +++ b/.butcher/types/StarAmount/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "staramount", + "name": "StarAmount", + "description": "Describes an amount of Telegram Stars.", + "html_description": "

Describes an amount of Telegram Stars.

", + "rst_description": "Describes an amount of Telegram Stars.", + "annotations": [ + { + "type": "Integer", + "description": "Integer amount of Telegram Stars, rounded to 0; can be negative", + "html_description": "Integer amount of Telegram Stars, rounded to 0; can be negative", + "rst_description": "Integer amount of Telegram Stars, rounded to 0; can be negative\n", + "name": "amount", + "required": true + }, + { + "type": "Integer", + "description": "The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive", + "html_description": "Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive", + "rst_description": "*Optional*. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if *amount* is non-positive\n", + "name": "nanostar_amount", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/StarTransaction/entity.json b/.butcher/types/StarTransaction/entity.json index 41879b25..7c4dd49b 100644 --- a/.butcher/types/StarTransaction/entity.json +++ b/.butcher/types/StarTransaction/entity.json @@ -7,26 +7,34 @@ "object": { "anchor": "startransaction", "name": "StarTransaction", - "description": "Describes a Telegram Star transaction.", - "html_description": "

Describes a Telegram Star transaction.

", - "rst_description": "Describes a Telegram Star transaction.", + "description": "Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control.", + "html_description": "

Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control.

", + "rst_description": "Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control.", "annotations": [ { "type": "String", - "description": "Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.", - "html_description": "Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.", - "rst_description": "Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with *SuccessfulPayment.telegram_payment_charge_id* for successful incoming payments from users.\n", + "description": "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.", + "html_description": "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.", + "rst_description": "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with *SuccessfulPayment.telegram_payment_charge_id* for successful incoming payments from users.\n", "name": "id", "required": true }, { "type": "Integer", - "description": "Number of Telegram Stars transferred by the transaction", - "html_description": "Number of Telegram Stars transferred by the transaction", - "rst_description": "Number of Telegram Stars transferred by the transaction\n", + "description": "Integer amount of Telegram Stars transferred by the transaction", + "html_description": "Integer amount of Telegram Stars transferred by the transaction", + "rst_description": "Integer amount of Telegram Stars transferred by the transaction\n", "name": "amount", "required": true }, + { + "type": "Integer", + "description": "The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999", + "html_description": "Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999", + "rst_description": "*Optional*. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999\n", + "name": "nanostar_amount", + "required": false + }, { "type": "Integer", "description": "Date the transaction was created in Unix time", diff --git a/.butcher/types/StoryArea/entity.json b/.butcher/types/StoryArea/entity.json new file mode 100644 index 00000000..ff040f52 --- /dev/null +++ b/.butcher/types/StoryArea/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "storyarea", + "name": "StoryArea", + "description": "Describes a clickable area on a story media.", + "html_description": "

Describes a clickable area on a story media.

", + "rst_description": "Describes a clickable area on a story media.", + "annotations": [ + { + "type": "StoryAreaPosition", + "description": "Position of the area", + "html_description": "Position of the area", + "rst_description": "Position of the area\n", + "name": "position", + "required": true + }, + { + "type": "StoryAreaType", + "description": "Type of the area", + "html_description": "Type of the area", + "rst_description": "Type of the area\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/StoryAreaPosition/entity.json b/.butcher/types/StoryAreaPosition/entity.json new file mode 100644 index 00000000..53c062b1 --- /dev/null +++ b/.butcher/types/StoryAreaPosition/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "storyareaposition", + "name": "StoryAreaPosition", + "description": "Describes the position of a clickable area within a story.", + "html_description": "

Describes the position of a clickable area within a story.

", + "rst_description": "Describes the position of a clickable area within a story.", + "annotations": [ + { + "type": "Float", + "description": "The abscissa of the area's center, as a percentage of the media width", + "html_description": "The abscissa of the area's center, as a percentage of the media width", + "rst_description": "The abscissa of the area's center, as a percentage of the media width\n", + "name": "x_percentage", + "required": true + }, + { + "type": "Float", + "description": "The ordinate of the area's center, as a percentage of the media height", + "html_description": "The ordinate of the area's center, as a percentage of the media height", + "rst_description": "The ordinate of the area's center, as a percentage of the media height\n", + "name": "y_percentage", + "required": true + }, + { + "type": "Float", + "description": "The width of the area's rectangle, as a percentage of the media width", + "html_description": "The width of the area's rectangle, as a percentage of the media width", + "rst_description": "The width of the area's rectangle, as a percentage of the media width\n", + "name": "width_percentage", + "required": true + }, + { + "type": "Float", + "description": "The height of the area's rectangle, as a percentage of the media height", + "html_description": "The height of the area's rectangle, as a percentage of the media height", + "rst_description": "The height of the area's rectangle, as a percentage of the media height\n", + "name": "height_percentage", + "required": true + }, + { + "type": "Float", + "description": "The clockwise rotation angle of the rectangle, in degrees; 0-360", + "html_description": "The clockwise rotation angle of the rectangle, in degrees; 0-360", + "rst_description": "The clockwise rotation angle of the rectangle, in degrees; 0-360\n", + "name": "rotation_angle", + "required": true + }, + { + "type": "Float", + "description": "The radius of the rectangle corner rounding, as a percentage of the media width", + "html_description": "The radius of the rectangle corner rounding, as a percentage of the media width", + "rst_description": "The radius of the rectangle corner rounding, as a percentage of the media width\n", + "name": "corner_radius_percentage", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/StoryAreaType/entity.json b/.butcher/types/StoryAreaType/entity.json new file mode 100644 index 00000000..641fa4df --- /dev/null +++ b/.butcher/types/StoryAreaType/entity.json @@ -0,0 +1,16 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "storyareatype", + "name": "StoryAreaType", + "description": "Describes the type of a clickable area on a story. Currently, it can be one of\n - StoryAreaTypeLocation\n - StoryAreaTypeSuggestedReaction\n - StoryAreaTypeLink\n - StoryAreaTypeWeather\n - StoryAreaTypeUniqueGift", + "html_description": "

Describes the type of a clickable area on a story. Currently, it can be one of

", + "rst_description": "Describes the type of a clickable area on a story. Currently, it can be one of\n\n - :class:`aiogram.types.story_area_type_location.StoryAreaTypeLocation`\n - :class:`aiogram.types.story_area_type_suggested_reaction.StoryAreaTypeSuggestedReaction`\n - :class:`aiogram.types.story_area_type_link.StoryAreaTypeLink`\n - :class:`aiogram.types.story_area_type_weather.StoryAreaTypeWeather`\n - :class:`aiogram.types.story_area_type_unique_gift.StoryAreaTypeUniqueGift`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/StoryAreaType/subtypes.yml b/.butcher/types/StoryAreaType/subtypes.yml new file mode 100644 index 00000000..6756ad51 --- /dev/null +++ b/.butcher/types/StoryAreaType/subtypes.yml @@ -0,0 +1 @@ +discriminator: "type" diff --git a/.butcher/types/StoryAreaTypeLink/entity.json b/.butcher/types/StoryAreaTypeLink/entity.json new file mode 100644 index 00000000..b18335d2 --- /dev/null +++ b/.butcher/types/StoryAreaTypeLink/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "storyareatypelink", + "name": "StoryAreaTypeLink", + "description": "Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas.", + "html_description": "

Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas.

", + "rst_description": "Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas.", + "annotations": [ + { + "type": "String", + "description": "Type of the area, always 'link'", + "html_description": "Type of the area, always “link”", + "rst_description": "Type of the area, always 'link'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "HTTP or tg:// URL to be opened when the area is clicked", + "html_description": "HTTP or tg:// URL to be opened when the area is clicked", + "rst_description": "HTTP or tg:// URL to be opened when the area is clicked\n", + "name": "url", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/StoryAreaTypeLocation/entity.json b/.butcher/types/StoryAreaTypeLocation/entity.json new file mode 100644 index 00000000..86ade963 --- /dev/null +++ b/.butcher/types/StoryAreaTypeLocation/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "storyareatypelocation", + "name": "StoryAreaTypeLocation", + "description": "Describes a story area pointing to a location. Currently, a story can have up to 10 location areas.", + "html_description": "

Describes a story area pointing to a location. Currently, a story can have up to 10 location areas.

", + "rst_description": "Describes a story area pointing to a location. Currently, a story can have up to 10 location areas.", + "annotations": [ + { + "type": "String", + "description": "Type of the area, always 'location'", + "html_description": "Type of the area, always “location”", + "rst_description": "Type of the area, always 'location'\n", + "name": "type", + "required": true + }, + { + "type": "Float", + "description": "Location latitude in degrees", + "html_description": "Location latitude in degrees", + "rst_description": "Location latitude in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Location longitude in degrees", + "html_description": "Location longitude in degrees", + "rst_description": "Location longitude in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "LocationAddress", + "description": "Address of the location", + "html_description": "Optional. Address of the location", + "rst_description": "*Optional*. Address of the location\n", + "name": "address", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/StoryAreaTypeSuggestedReaction/entity.json b/.butcher/types/StoryAreaTypeSuggestedReaction/entity.json new file mode 100644 index 00000000..29eddea3 --- /dev/null +++ b/.butcher/types/StoryAreaTypeSuggestedReaction/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "storyareatypesuggestedreaction", + "name": "StoryAreaTypeSuggestedReaction", + "description": "Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas.", + "html_description": "

Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas.

", + "rst_description": "Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas.", + "annotations": [ + { + "type": "String", + "description": "Type of the area, always 'suggested_reaction'", + "html_description": "Type of the area, always “suggested_reaction”", + "rst_description": "Type of the area, always 'suggested_reaction'\n", + "name": "type", + "required": true + }, + { + "type": "ReactionType", + "description": "Type of the reaction", + "html_description": "Type of the reaction", + "rst_description": "Type of the reaction\n", + "name": "reaction_type", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True if the reaction area has a dark background", + "html_description": "Optional. Pass True if the reaction area has a dark background", + "rst_description": "*Optional*. Pass :code:`True` if the reaction area has a dark background\n", + "name": "is_dark", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if reaction area corner is flipped", + "html_description": "Optional. Pass True if reaction area corner is flipped", + "rst_description": "*Optional*. Pass :code:`True` if reaction area corner is flipped\n", + "name": "is_flipped", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/StoryAreaTypeUniqueGift/entity.json b/.butcher/types/StoryAreaTypeUniqueGift/entity.json new file mode 100644 index 00000000..374e4f30 --- /dev/null +++ b/.butcher/types/StoryAreaTypeUniqueGift/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "storyareatypeuniquegift", + "name": "StoryAreaTypeUniqueGift", + "description": "Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area.", + "html_description": "

Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area.

", + "rst_description": "Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area.", + "annotations": [ + { + "type": "String", + "description": "Type of the area, always 'unique_gift'", + "html_description": "Type of the area, always “unique_gift”", + "rst_description": "Type of the area, always 'unique_gift'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique name of the gift", + "html_description": "Unique name of the gift", + "rst_description": "Unique name of the gift\n", + "name": "name", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/StoryAreaTypeWeather/entity.json b/.butcher/types/StoryAreaTypeWeather/entity.json new file mode 100644 index 00000000..f1b7895d --- /dev/null +++ b/.butcher/types/StoryAreaTypeWeather/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "storyareatypeweather", + "name": "StoryAreaTypeWeather", + "description": "Describes a story area containing weather information. Currently, a story can have up to 3 weather areas.", + "html_description": "

Describes a story area containing weather information. Currently, a story can have up to 3 weather areas.

", + "rst_description": "Describes a story area containing weather information. Currently, a story can have up to 3 weather areas.", + "annotations": [ + { + "type": "String", + "description": "Type of the area, always 'weather'", + "html_description": "Type of the area, always “weather”", + "rst_description": "Type of the area, always 'weather'\n", + "name": "type", + "required": true + }, + { + "type": "Float", + "description": "Temperature, in degree Celsius", + "html_description": "Temperature, in degree Celsius", + "rst_description": "Temperature, in degree Celsius\n", + "name": "temperature", + "required": true + }, + { + "type": "String", + "description": "Emoji representing the weather", + "html_description": "Emoji representing the weather", + "rst_description": "Emoji representing the weather\n", + "name": "emoji", + "required": true + }, + { + "type": "Integer", + "description": "A color of the area background in the ARGB format", + "html_description": "A color of the area background in the ARGB format", + "rst_description": "A color of the area background in the ARGB format\n", + "name": "background_color", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/SuccessfulPayment/entity.json b/.butcher/types/SuccessfulPayment/entity.json index 4ae3510e..4dabc153 100644 --- a/.butcher/types/SuccessfulPayment/entity.json +++ b/.butcher/types/SuccessfulPayment/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "successfulpayment", "name": "SuccessfulPayment", - "description": "This object contains basic information about a successful payment.", - "html_description": "

This object contains basic information about a successful payment.

", - "rst_description": "This object contains basic information about a successful payment.", + "description": "This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control.", + "html_description": "

This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control.

", + "rst_description": "This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control.", "annotations": [ { "type": "String", @@ -35,6 +35,30 @@ "name": "invoice_payload", "required": true }, + { + "type": "Integer", + "description": "Expiration date of the subscription, in Unix time; for recurring payments only", + "html_description": "Optional. Expiration date of the subscription, in Unix time; for recurring payments only", + "rst_description": "*Optional*. Expiration date of the subscription, in Unix time; for recurring payments only\n", + "name": "subscription_expiration_date", + "required": false + }, + { + "type": "True", + "description": "True, if the payment is a recurring payment for a subscription", + "html_description": "Optional. True, if the payment is a recurring payment for a subscription", + "rst_description": "*Optional*. :code:`True`, if the payment is a recurring payment for a subscription\n", + "name": "is_recurring", + "required": false + }, + { + "type": "True", + "description": "True, if the payment is the first payment for a subscription", + "html_description": "Optional. True, if the payment is the first payment for a subscription", + "rst_description": "*Optional*. :code:`True`, if the payment is the first payment for a subscription\n", + "name": "is_first_recurring", + "required": false + }, { "type": "String", "description": "Identifier of the shipping option chosen by the user", 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..192a6984 --- /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": "Describes the price of a suggested post.", + "html_description": "

Describes the price of a suggested post.

", + "rst_description": "Describes the price of a suggested post.", + "annotations": [ + { + "type": "String", + "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/SwitchInlineQueryChosenChat/entity.json b/.butcher/types/SwitchInlineQueryChosenChat/entity.json index f36f3c33..08cf6edf 100644 --- a/.butcher/types/SwitchInlineQueryChosenChat/entity.json +++ b/.butcher/types/SwitchInlineQueryChosenChat/entity.json @@ -22,32 +22,32 @@ { "type": "Boolean", "description": "True, if private chats with users can be chosen", - "html_description": "Optional. True, if private chats with users can be chosen", - "rst_description": "*Optional*. True, if private chats with users can be chosen\n", + "html_description": "Optional. True, if private chats with users can be chosen", + "rst_description": "*Optional*. :code:`True`, if private chats with users can be chosen\n", "name": "allow_user_chats", "required": false }, { "type": "Boolean", "description": "True, if private chats with bots can be chosen", - "html_description": "Optional. True, if private chats with bots can be chosen", - "rst_description": "*Optional*. True, if private chats with bots can be chosen\n", + "html_description": "Optional. True, if private chats with bots can be chosen", + "rst_description": "*Optional*. :code:`True`, if private chats with bots can be chosen\n", "name": "allow_bot_chats", "required": false }, { "type": "Boolean", "description": "True, if group and supergroup chats can be chosen", - "html_description": "Optional. True, if group and supergroup chats can be chosen", - "rst_description": "*Optional*. True, if group and supergroup chats can be chosen\n", + "html_description": "Optional. True, if group and supergroup chats can be chosen", + "rst_description": "*Optional*. :code:`True`, if group and supergroup chats can be chosen\n", "name": "allow_group_chats", "required": false }, { "type": "Boolean", "description": "True, if channel chats can be chosen", - "html_description": "Optional. True, if channel chats can be chosen", - "rst_description": "*Optional*. True, if channel chats can be chosen\n", + "html_description": "Optional. True, if channel chats can be chosen", + "rst_description": "*Optional*. :code:`True`, if channel chats can be chosen\n", "name": "allow_channel_chats", "required": false } diff --git a/.butcher/types/TextQuote/entity.json b/.butcher/types/TextQuote/entity.json index f1be593c..26b587e9 100644 --- a/.butcher/types/TextQuote/entity.json +++ b/.butcher/types/TextQuote/entity.json @@ -21,9 +21,9 @@ }, { "type": "Array of MessageEntity", - "description": "Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.", - "html_description": "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.", - "rst_description": "*Optional*. Special entities that appear in the quote. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are kept in quotes.\n", + "description": "Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are kept in quotes.", + "html_description": "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are kept in quotes.", + "rst_description": "*Optional*. Special entities that appear in the quote. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities are kept in quotes.\n", "name": "entities", "required": false }, @@ -38,8 +38,8 @@ { "type": "True", "description": "True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", - "html_description": "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", - "rst_description": "*Optional*. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.\n", + "html_description": "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", + "rst_description": "*Optional*. :code:`True`, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.\n", "name": "is_manual", "required": false } diff --git a/.butcher/types/TransactionPartner/entity.json b/.butcher/types/TransactionPartner/entity.json index ae4ca0e6..0216005e 100644 --- a/.butcher/types/TransactionPartner/entity.json +++ b/.butcher/types/TransactionPartner/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "transactionpartner", "name": "TransactionPartner", - "description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n - TransactionPartnerUser\n - TransactionPartnerFragment\n - TransactionPartnerTelegramAds\n - TransactionPartnerOther", - "html_description": "

This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of

", - "rst_description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n\n - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`\n - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`\n - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`\n - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`", + "description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n - TransactionPartnerUser\n - TransactionPartnerChat\n - TransactionPartnerAffiliateProgram\n - TransactionPartnerFragment\n - TransactionPartnerTelegramAds\n - TransactionPartnerTelegramApi\n - TransactionPartnerOther", + "html_description": "

This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of

", + "rst_description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n\n - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`\n - :class:`aiogram.types.transaction_partner_chat.TransactionPartnerChat`\n - :class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram`\n - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`\n - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`\n - :class:`aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi`\n - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`", "annotations": [], "category": "types" } diff --git a/.butcher/types/TransactionPartnerAffiliateProgram/entity.json b/.butcher/types/TransactionPartnerAffiliateProgram/entity.json new file mode 100644 index 00000000..a637836c --- /dev/null +++ b/.butcher/types/TransactionPartnerAffiliateProgram/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "transactionpartneraffiliateprogram", + "name": "TransactionPartnerAffiliateProgram", + "description": "Describes the affiliate program that issued the affiliate commission received via this transaction.", + "html_description": "

Describes the affiliate program that issued the affiliate commission received via this transaction.

", + "rst_description": "Describes the affiliate program that issued the affiliate commission received via this transaction.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'affiliate_program'", + "html_description": "Type of the transaction partner, always “affiliate_program”", + "rst_description": "Type of the transaction partner, always 'affiliate_program'\n", + "name": "type", + "required": true + }, + { + "type": "User", + "description": "Information about the bot that sponsored the affiliate program", + "html_description": "Optional. Information about the bot that sponsored the affiliate program", + "rst_description": "*Optional*. Information about the bot that sponsored the affiliate program\n", + "name": "sponsor_user", + "required": false + }, + { + "type": "Integer", + "description": "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users", + "html_description": "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users", + "rst_description": "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users\n", + "name": "commission_per_mille", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/TransactionPartnerChat/entity.json b/.butcher/types/TransactionPartnerChat/entity.json new file mode 100644 index 00000000..be4e3bc4 --- /dev/null +++ b/.butcher/types/TransactionPartnerChat/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "transactionpartnerchat", + "name": "TransactionPartnerChat", + "description": "Describes a transaction with a chat.", + "html_description": "

Describes a transaction with a chat.

", + "rst_description": "Describes a transaction with a chat.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'chat'", + "html_description": "Type of the transaction partner, always “chat”", + "rst_description": "Type of the transaction partner, always 'chat'\n", + "name": "type", + "required": true + }, + { + "type": "Chat", + "description": "Information about the chat", + "html_description": "Information about the chat", + "rst_description": "Information about the chat\n", + "name": "chat", + "required": true + }, + { + "type": "Gift", + "description": "The gift sent to the chat by the bot", + "html_description": "Optional. The gift sent to the chat by the bot", + "rst_description": "*Optional*. The gift sent to the chat by the bot\n", + "name": "gift", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/TransactionPartnerTelegramApi/entity.json b/.butcher/types/TransactionPartnerTelegramApi/entity.json new file mode 100644 index 00000000..ab951c14 --- /dev/null +++ b/.butcher/types/TransactionPartnerTelegramApi/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "transactionpartnertelegramapi", + "name": "TransactionPartnerTelegramApi", + "description": "Describes a transaction with payment for paid broadcasting.", + "html_description": "

Describes a transaction with payment for paid broadcasting.

", + "rst_description": "Describes a transaction with payment for `paid broadcasting `_.", + "annotations": [ + { + "type": "String", + "description": "Type of the transaction partner, always 'telegram_api'", + "html_description": "Type of the transaction partner, always “telegram_api”", + "rst_description": "Type of the transaction partner, always 'telegram_api'\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "The number of successful requests that exceeded regular limits and were therefore billed", + "html_description": "The number of successful requests that exceeded regular limits and were therefore billed", + "rst_description": "The number of successful requests that exceeded regular limits and were therefore billed\n", + "name": "request_count", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/TransactionPartnerUser/entity.json b/.butcher/types/TransactionPartnerUser/entity.json index b8a616fc..83ef4671 100644 --- a/.butcher/types/TransactionPartnerUser/entity.json +++ b/.butcher/types/TransactionPartnerUser/entity.json @@ -19,6 +19,14 @@ "name": "type", "required": true }, + { + "type": "String", + "description": "Type of the transaction, currently one of 'invoice_payment' for payments via invoices, 'paid_media_payment' for payments for paid media, 'gift_purchase' for gifts sent by the bot, 'premium_purchase' for Telegram Premium subscriptions gifted by the bot, 'business_account_transfer' for direct transfers from managed business accounts", + "html_description": "Type of the transaction, currently one of “invoice_payment” for payments via invoices, “paid_media_payment” for payments for paid media, “gift_purchase” for gifts sent by the bot, “premium_purchase” for Telegram Premium subscriptions gifted by the bot, “business_account_transfer” for direct transfers from managed business accounts", + "rst_description": "Type of the transaction, currently one of 'invoice_payment' for payments via invoices, 'paid_media_payment' for payments for paid media, 'gift_purchase' for gifts sent by the bot, 'premium_purchase' for Telegram Premium subscriptions gifted by the bot, 'business_account_transfer' for direct transfers from managed business accounts\n", + "name": "transaction_type", + "required": true + }, { "type": "User", "description": "Information about the user", @@ -27,13 +35,61 @@ "name": "user", "required": true }, + { + "type": "AffiliateInfo", + "description": "Information about the affiliate that received a commission via this transaction. Can be available only for 'invoice_payment' and 'paid_media_payment' transactions.", + "html_description": "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for “invoice_payment” and “paid_media_payment” transactions.", + "rst_description": "*Optional*. Information about the affiliate that received a commission via this transaction. Can be available only for 'invoice_payment' and 'paid_media_payment' transactions.\n", + "name": "affiliate", + "required": false + }, { "type": "String", - "description": "Bot-specified invoice payload", - "html_description": "Optional. Bot-specified invoice payload", - "rst_description": "*Optional*. Bot-specified invoice payload\n", + "description": "Bot-specified invoice payload. Can be available only for 'invoice_payment' transactions.", + "html_description": "Optional. Bot-specified invoice payload. Can be available only for “invoice_payment” transactions.", + "rst_description": "*Optional*. Bot-specified invoice payload. Can be available only for 'invoice_payment' transactions.\n", "name": "invoice_payload", "required": false + }, + { + "type": "Integer", + "description": "The duration of the paid subscription. Can be available only for 'invoice_payment' transactions.", + "html_description": "Optional. The duration of the paid subscription. Can be available only for “invoice_payment” transactions.", + "rst_description": "*Optional*. The duration of the paid subscription. Can be available only for 'invoice_payment' transactions.\n", + "name": "subscription_period", + "required": false + }, + { + "type": "Array of PaidMedia", + "description": "Information about the paid media bought by the user; for 'paid_media_payment' transactions only", + "html_description": "Optional. Information about the paid media bought by the user; for “paid_media_payment” transactions only", + "rst_description": "*Optional*. Information about the paid media bought by the user; for 'paid_media_payment' transactions only\n", + "name": "paid_media", + "required": false + }, + { + "type": "String", + "description": "Bot-specified paid media payload. Can be available only for 'paid_media_payment' transactions.", + "html_description": "Optional. Bot-specified paid media payload. Can be available only for “paid_media_payment” transactions.", + "rst_description": "*Optional*. Bot-specified paid media payload. Can be available only for 'paid_media_payment' transactions.\n", + "name": "paid_media_payload", + "required": false + }, + { + "type": "Gift", + "description": "The gift sent to the user by the bot; for 'gift_purchase' transactions only", + "html_description": "Optional. The gift sent to the user by the bot; for “gift_purchase” transactions only", + "rst_description": "*Optional*. The gift sent to the user by the bot; for 'gift_purchase' transactions only\n", + "name": "gift", + "required": false + }, + { + "type": "Integer", + "description": "Number of months the gifted Telegram Premium subscription will be active for; for 'premium_purchase' transactions only", + "html_description": "Optional. Number of months the gifted Telegram Premium subscription will be active for; for “premium_purchase” transactions only", + "rst_description": "*Optional*. Number of months the gifted Telegram Premium subscription will be active for; for 'premium_purchase' transactions only\n", + "name": "premium_subscription_duration", + "required": false } ], "category": "types" diff --git a/.butcher/types/UniqueGift/entity.json b/.butcher/types/UniqueGift/entity.json new file mode 100644 index 00000000..4b4427ae --- /dev/null +++ b/.butcher/types/UniqueGift/entity.json @@ -0,0 +1,113 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "uniquegift", + "name": "UniqueGift", + "description": "This object describes a unique gift that was upgraded from a regular gift.", + "html_description": "

This object describes a unique gift that was upgraded from a regular gift.

", + "rst_description": "This object describes a unique gift that was upgraded from a regular gift.", + "annotations": [ + { + "type": "String", + "description": "Identifier of the regular gift from which the gift was upgraded", + "html_description": "Identifier of the regular gift from which the gift was upgraded", + "rst_description": "Identifier of the regular gift from which the gift was upgraded\n", + "name": "gift_id", + "required": true + }, + { + "type": "String", + "description": "Human-readable name of the regular gift from which this unique gift was upgraded", + "html_description": "Human-readable name of the regular gift from which this unique gift was upgraded", + "rst_description": "Human-readable name of the regular gift from which this unique gift was upgraded\n", + "name": "base_name", + "required": true + }, + { + "type": "String", + "description": "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas", + "html_description": "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas", + "rst_description": "Unique name of the gift. This name can be used in :code:`https://t.me/nft/...` links and story areas\n", + "name": "name", + "required": true + }, + { + "type": "Integer", + "description": "Unique number of the upgraded gift among gifts upgraded from the same regular gift", + "html_description": "Unique number of the upgraded gift among gifts upgraded from the same regular gift", + "rst_description": "Unique number of the upgraded gift among gifts upgraded from the same regular gift\n", + "name": "number", + "required": true + }, + { + "type": "UniqueGiftModel", + "description": "Model of the gift", + "html_description": "Model of the gift", + "rst_description": "Model of the gift\n", + "name": "model", + "required": true + }, + { + "type": "UniqueGiftSymbol", + "description": "Symbol of the gift", + "html_description": "Symbol of the gift", + "rst_description": "Symbol of the gift\n", + "name": "symbol", + "required": true + }, + { + "type": "UniqueGiftBackdrop", + "description": "Backdrop of the gift", + "html_description": "Backdrop of the gift", + "rst_description": "Backdrop of the gift\n", + "name": "backdrop", + "required": true + }, + { + "type": "True", + "description": "True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers", + "html_description": "Optional. True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers", + "rst_description": "*Optional*. :code:`True`, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers\n", + "name": "is_premium", + "required": false + }, + { + "type": "True", + "description": "True, if the gift was used to craft another gift and isn't available anymore", + "html_description": "Optional. True, if the gift was used to craft another gift and isn't available anymore", + "rst_description": "*Optional*. :code:`True`, if the gift was used to craft another gift and isn't available anymore\n", + "name": "is_burned", + "required": false + }, + { + "type": "True", + "description": "True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram", + "html_description": "Optional. True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram", + "rst_description": "*Optional*. :code:`True`, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram\n", + "name": "is_from_blockchain", + "required": false + }, + { + "type": "UniqueGiftColors", + "description": "The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only", + "html_description": "Optional. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only", + "rst_description": "*Optional*. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only\n", + "name": "colors", + "required": false + }, + { + "type": "Chat", + "description": "Information about the chat that published the gift", + "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/UniqueGiftBackdrop/entity.json b/.butcher/types/UniqueGiftBackdrop/entity.json new file mode 100644 index 00000000..299a9d16 --- /dev/null +++ b/.butcher/types/UniqueGiftBackdrop/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "uniquegiftbackdrop", + "name": "UniqueGiftBackdrop", + "description": "This object describes the backdrop of a unique gift.", + "html_description": "

This object describes the backdrop of a unique gift.

", + "rst_description": "This object describes the backdrop of a unique gift.", + "annotations": [ + { + "type": "String", + "description": "Name of the backdrop", + "html_description": "Name of the backdrop", + "rst_description": "Name of the backdrop\n", + "name": "name", + "required": true + }, + { + "type": "UniqueGiftBackdropColors", + "description": "Colors of the backdrop", + "html_description": "Colors of the backdrop", + "rst_description": "Colors of the backdrop\n", + "name": "colors", + "required": true + }, + { + "type": "Integer", + "description": "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded", + "html_description": "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded", + "rst_description": "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded\n", + "name": "rarity_per_mille", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/UniqueGiftBackdropColors/entity.json b/.butcher/types/UniqueGiftBackdropColors/entity.json new file mode 100644 index 00000000..ae66442d --- /dev/null +++ b/.butcher/types/UniqueGiftBackdropColors/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "uniquegiftbackdropcolors", + "name": "UniqueGiftBackdropColors", + "description": "This object describes the colors of the backdrop of a unique gift.", + "html_description": "

This object describes the colors of the backdrop of a unique gift.

", + "rst_description": "This object describes the colors of the backdrop of a unique gift.", + "annotations": [ + { + "type": "Integer", + "description": "The color in the center of the backdrop in RGB format", + "html_description": "The color in the center of the backdrop in RGB format", + "rst_description": "The color in the center of the backdrop in RGB format\n", + "name": "center_color", + "required": true + }, + { + "type": "Integer", + "description": "The color on the edges of the backdrop in RGB format", + "html_description": "The color on the edges of the backdrop in RGB format", + "rst_description": "The color on the edges of the backdrop in RGB format\n", + "name": "edge_color", + "required": true + }, + { + "type": "Integer", + "description": "The color to be applied to the symbol in RGB format", + "html_description": "The color to be applied to the symbol in RGB format", + "rst_description": "The color to be applied to the symbol in RGB format\n", + "name": "symbol_color", + "required": true + }, + { + "type": "Integer", + "description": "The color for the text on the backdrop in RGB format", + "html_description": "The color for the text on the backdrop in RGB format", + "rst_description": "The color for the text on the backdrop in RGB format\n", + "name": "text_color", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/UniqueGiftColors/entity.json b/.butcher/types/UniqueGiftColors/entity.json new file mode 100644 index 00000000..70d9d3c9 --- /dev/null +++ b/.butcher/types/UniqueGiftColors/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "uniquegiftcolors", + "name": "UniqueGiftColors", + "description": "This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.", + "html_description": "

This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.

", + "rst_description": "This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.", + "annotations": [ + { + "type": "String", + "description": "Custom emoji identifier of the unique gift's model", + "html_description": "Custom emoji identifier of the unique gift's model", + "rst_description": "Custom emoji identifier of the unique gift's model\n", + "name": "model_custom_emoji_id", + "required": true + }, + { + "type": "String", + "description": "Custom emoji identifier of the unique gift's symbol", + "html_description": "Custom emoji identifier of the unique gift's symbol", + "rst_description": "Custom emoji identifier of the unique gift's symbol\n", + "name": "symbol_custom_emoji_id", + "required": true + }, + { + "type": "Integer", + "description": "Main color used in light themes; RGB format", + "html_description": "Main color used in light themes; RGB format", + "rst_description": "Main color used in light themes; RGB format\n", + "name": "light_theme_main_color", + "required": true + }, + { + "type": "Array of Integer", + "description": "List of 1-3 additional colors used in light themes; RGB format", + "html_description": "List of 1-3 additional colors used in light themes; RGB format", + "rst_description": "List of 1-3 additional colors used in light themes; RGB format\n", + "name": "light_theme_other_colors", + "required": true + }, + { + "type": "Integer", + "description": "Main color used in dark themes; RGB format", + "html_description": "Main color used in dark themes; RGB format", + "rst_description": "Main color used in dark themes; RGB format\n", + "name": "dark_theme_main_color", + "required": true + }, + { + "type": "Array of Integer", + "description": "List of 1-3 additional colors used in dark themes; RGB format", + "html_description": "List of 1-3 additional colors used in dark themes; RGB format", + "rst_description": "List of 1-3 additional colors used in dark themes; RGB format\n", + "name": "dark_theme_other_colors", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/UniqueGiftInfo/entity.json b/.butcher/types/UniqueGiftInfo/entity.json new file mode 100644 index 00000000..c6693e33 --- /dev/null +++ b/.butcher/types/UniqueGiftInfo/entity.json @@ -0,0 +1,85 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "uniquegiftinfo", + "name": "UniqueGiftInfo", + "description": "Describes a service message about a unique gift that was sent or received.", + "html_description": "

Describes a service message about a unique gift that was sent or received.

", + "rst_description": "Describes a service message about a unique gift that was sent or received.", + "annotations": [ + { + "type": "UniqueGift", + "description": "Information about the gift", + "html_description": "Information about the gift", + "rst_description": "Information about the gift\n", + "name": "gift", + "required": true + }, + { + "type": "String", + "description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, 'resale' for gifts bought from other users, 'gifted_upgrade' for upgrades purchased after the gift was sent, or 'offer' for gifts bought or sold through gift purchase offers", + "html_description": "Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, “resale” for gifts bought from other users, “gifted_upgrade” for upgrades purchased after the gift was sent, or “offer” for gifts bought or sold through gift purchase offers", + "rst_description": "Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, 'resale' for gifts bought from other users, 'gifted_upgrade' for upgrades purchased after the gift was sent, or 'offer' for gifts bought or sold through gift purchase offers\n", + "name": "origin", + "required": true + }, + { + "type": "String", + "description": "For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins.", + "html_description": "Optional. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins.", + "rst_description": "*Optional*. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins.\n", + "name": "last_resale_currency", + "required": false + }, + { + "type": "Integer", + "description": "For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins", + "html_description": "Optional. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins", + "rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins\n", + "name": "last_resale_amount", + "required": false + }, + { + "type": "String", + "description": "Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts", + "html_description": "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts", + "rst_description": "*Optional*. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts\n", + "name": "owned_gift_id", + "required": false + }, + { + "type": "Integer", + "description": "Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift", + "html_description": "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift", + "rst_description": "*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift\n", + "name": "transfer_star_count", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "html_description": "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now\n", + "name": "next_transfer_date", + "required": false + }, + { + "type": "Integer", + "description": "For gifts bought from other users, the price paid for the gift", + "html_description": "Optional. For gifts bought from other users, the price paid for the gift", + "rst_description": "*Optional*. For gifts bought from other users, the price paid for the gift\n", + "name": "last_resale_star_count", + "required": false, + "deprecated": { + "version": "9.3", + "release_date": "2025-12-31" + } + } + ], + "category": "types" + } +} diff --git a/.butcher/types/UniqueGiftInfo/replace.yml b/.butcher/types/UniqueGiftInfo/replace.yml new file mode 100644 index 00000000..17326632 --- /dev/null +++ b/.butcher/types/UniqueGiftInfo/replace.yml @@ -0,0 +1,5 @@ +annotations: + next_transfer_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/UniqueGiftModel/entity.json b/.butcher/types/UniqueGiftModel/entity.json new file mode 100644 index 00000000..6573026a --- /dev/null +++ b/.butcher/types/UniqueGiftModel/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "uniquegiftmodel", + "name": "UniqueGiftModel", + "description": "This object describes the model of a unique gift.", + "html_description": "

This object describes the model of a unique gift.

", + "rst_description": "This object describes the model of a unique gift.", + "annotations": [ + { + "type": "String", + "description": "Name of the model", + "html_description": "Name of the model", + "rst_description": "Name of the model\n", + "name": "name", + "required": true + }, + { + "type": "Sticker", + "description": "The sticker that represents the unique gift", + "html_description": "The sticker that represents the unique gift", + "rst_description": "The sticker that represents the unique gift\n", + "name": "sticker", + "required": true + }, + { + "type": "Integer", + "description": "The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0 for crafted gifts.", + "html_description": "The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0 for crafted gifts.", + "rst_description": "The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0 for crafted gifts.\n", + "name": "rarity_per_mille", + "required": true + }, + { + "type": "String", + "description": "Rarity of the model if it is a crafted model. Currently, can be 'uncommon', 'rare', 'epic', or 'legendary'.", + "html_description": "Optional. Rarity of the model if it is a crafted model. Currently, can be “uncommon”, “rare”, “epic”, or “legendary”.", + "rst_description": "*Optional*. Rarity of the model if it is a crafted model. Currently, can be 'uncommon', 'rare', 'epic', or 'legendary'.\n", + "name": "rarity", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/UniqueGiftSymbol/entity.json b/.butcher/types/UniqueGiftSymbol/entity.json new file mode 100644 index 00000000..90ed0814 --- /dev/null +++ b/.butcher/types/UniqueGiftSymbol/entity.json @@ -0,0 +1,41 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "uniquegiftsymbol", + "name": "UniqueGiftSymbol", + "description": "This object describes the symbol shown on the pattern of a unique gift.", + "html_description": "

This object describes the symbol shown on the pattern of a unique gift.

", + "rst_description": "This object describes the symbol shown on the pattern of a unique gift.", + "annotations": [ + { + "type": "String", + "description": "Name of the symbol", + "html_description": "Name of the symbol", + "rst_description": "Name of the symbol\n", + "name": "name", + "required": true + }, + { + "type": "Sticker", + "description": "The sticker that represents the unique gift", + "html_description": "The sticker that represents the unique gift", + "rst_description": "The sticker that represents the unique gift\n", + "name": "sticker", + "required": true + }, + { + "type": "Integer", + "description": "The number of unique gifts that receive this model for every 1000 gifts upgraded", + "html_description": "The number of unique gifts that receive this model for every 1000 gifts upgraded", + "rst_description": "The number of unique gifts that receive this model for every 1000 gifts upgraded\n", + "name": "rarity_per_mille", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Update/entity.json b/.butcher/types/Update/entity.json index ce43e9f9..47b1c70c 100644 --- a/.butcher/types/Update/entity.json +++ b/.butcher/types/Update/entity.json @@ -139,6 +139,14 @@ "name": "pre_checkout_query", "required": false }, + { + "type": "PaidMediaPurchased", + "description": "A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat", + "html_description": "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat", + "rst_description": "*Optional*. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat\n", + "name": "purchased_paid_media", + "required": false + }, { "type": "Poll", "description": "New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot", @@ -194,6 +202,14 @@ "rst_description": "*Optional*. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.\n", "name": "removed_chat_boost", "required": false + }, + { + "type": "ManagedBotUpdated", + "description": "A new bot was created to be managed by the bot or token of a bot was changed", + "html_description": "Optional. A new bot was created to be managed by the bot or token of a bot was changed", + "rst_description": "*Optional*. A new bot was created to be managed by the bot or token of a bot was changed\n", + "name": "managed_bot", + "required": false } ], "category": "types" diff --git a/.butcher/types/User/aliases.yml b/.butcher/types/User/aliases.yml index 85d2188d..51e3e370 100644 --- a/.butcher/types/User/aliases.yml +++ b/.butcher/types/User/aliases.yml @@ -2,3 +2,7 @@ get_profile_photos: method: getUserProfilePhotos fill: user_id: self.id +get_profile_audios: + method: getUserProfileAudios + fill: + user_id: self.id diff --git a/.butcher/types/User/entity.json b/.butcher/types/User/entity.json index f502c62b..ce116110 100644 --- a/.butcher/types/User/entity.json +++ b/.butcher/types/User/entity.json @@ -106,6 +106,38 @@ "rst_description": "*Optional*. :code:`True`, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", "name": "can_connect_to_business", "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot has a main Web App. Returned only in getMe.", + "html_description": "Optional. True, if the bot has a main Web App. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot has a main Web App. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "has_main_web_app", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.", + "html_description": "Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot has forum topic mode enabled in private chats. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "has_topics_enabled", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.", + "html_description": "Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot allows users to create and delete topics in private chats. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "allows_users_to_create_topics", + "required": false + }, + { + "type": "Boolean", + "description": "True, if other bots can be created to be controlled by the bot. Returned only in getMe.", + "html_description": "Optional. True, if other bots can be created to be controlled by the bot. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if other bots can be created to be controlled by the bot. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "can_manage_bots", + "required": false } ], "category": "types" diff --git a/.butcher/types/UserProfileAudios/entity.json b/.butcher/types/UserProfileAudios/entity.json new file mode 100644 index 00000000..77e373ce --- /dev/null +++ b/.butcher/types/UserProfileAudios/entity.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "userprofileaudios", + "name": "UserProfileAudios", + "description": "This object represents the audios displayed on a user's profile.", + "html_description": "

This object represents the audios displayed on a user's profile.

", + "rst_description": "This object represents the audios displayed on a user's profile.", + "annotations": [ + { + "type": "Integer", + "description": "Total number of profile audios for the target user", + "html_description": "Total number of profile audios for the target user", + "rst_description": "Total number of profile audios for the target user\n", + "name": "total_count", + "required": true + }, + { + "type": "Array of Audio", + "description": "Requested profile audios", + "html_description": "Requested profile audios", + "rst_description": "Requested profile audios\n", + "name": "audios", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/UserRating/entity.json b/.butcher/types/UserRating/entity.json new file mode 100644 index 00000000..fb49d5b2 --- /dev/null +++ b/.butcher/types/UserRating/entity.json @@ -0,0 +1,49 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "userrating", + "name": "UserRating", + "description": "This object describes the rating of a user based on their Telegram Star spendings.", + "html_description": "

This object describes the rating of a user based on their Telegram Star spendings.

", + "rst_description": "This object describes the rating of a user based on their Telegram Star spendings.", + "annotations": [ + { + "type": "Integer", + "description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.", + "html_description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.", + "rst_description": "Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.\n", + "name": "level", + "required": true + }, + { + "type": "Integer", + "description": "Numerical value of the user's rating; the higher the rating, the better", + "html_description": "Numerical value of the user's rating; the higher the rating, the better", + "rst_description": "Numerical value of the user's rating; the higher the rating, the better\n", + "name": "rating", + "required": true + }, + { + "type": "Integer", + "description": "The rating value required to get the current level", + "html_description": "The rating value required to get the current level", + "rst_description": "The rating value required to get the current level\n", + "name": "current_level_rating", + "required": true + }, + { + "type": "Integer", + "description": "The rating value required to get to the next level; omitted if the maximum level was reached", + "html_description": "Optional. The rating value required to get to the next level; omitted if the maximum level was reached", + "rst_description": "*Optional*. The rating value required to get to the next level; omitted if the maximum level was reached\n", + "name": "next_level_rating", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Video/entity.json b/.butcher/types/Video/entity.json index b025a605..41ec3bb6 100644 --- a/.butcher/types/Video/entity.json +++ b/.butcher/types/Video/entity.json @@ -59,6 +59,30 @@ "name": "thumbnail", "required": false }, + { + "type": "Array of PhotoSize", + "description": "Available sizes of the cover of the video in the message", + "html_description": "Optional. Available sizes of the cover of the video in the message", + "rst_description": "*Optional*. Available sizes of the cover of the video in the message\n", + "name": "cover", + "required": false + }, + { + "type": "Integer", + "description": "Timestamp in seconds from which the video will play in the message", + "html_description": "Optional. Timestamp in seconds from which the video will play in the message", + "rst_description": "*Optional*. Timestamp in seconds from which the video will play in the message\n", + "name": "start_timestamp", + "required": false + }, + { + "type": "Array of VideoQuality", + "description": "List of available qualities of the video", + "html_description": "Optional. List of available qualities of the video", + "rst_description": "*Optional*. List of available qualities of the video\n", + "name": "qualities", + "required": false + }, { "type": "String", "description": "Original filename as defined by the sender", diff --git a/.butcher/types/Video/replace.yml b/.butcher/types/Video/replace.yml new file mode 100644 index 00000000..21adcdaa --- /dev/null +++ b/.butcher/types/Video/replace.yml @@ -0,0 +1,5 @@ +annotations: + start_timestamp: + parsed_type: + type: std + name: datetime.datetime diff --git a/.butcher/types/VideoQuality/entity.json b/.butcher/types/VideoQuality/entity.json new file mode 100644 index 00000000..0ba0b78a --- /dev/null +++ b/.butcher/types/VideoQuality/entity.json @@ -0,0 +1,65 @@ +{ + "meta": {}, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "videoquality", + "name": "VideoQuality", + "description": "This object represents a video file of a specific quality.", + "html_description": "

This object represents a video file of a specific quality.

", + "rst_description": "This object represents a video file of a specific quality.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Video width", + "rst_description": "Video width\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Video height", + "rst_description": "Video height\n", + "name": "height", + "required": true + }, + { + "type": "String", + "description": "Codec that was used to encode the video, for example, 'h264', 'h265', or 'av01'", + "html_description": "Codec that was used to encode the video, for example, “h264”, “h265”, or “av01”", + "rst_description": "Codec that was used to encode the video, for example, 'h264', 'h265', or 'av01'\n", + "name": "codec", + "required": true + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 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 value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 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 value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 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 value.\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/WriteAccessAllowed/entity.json b/.butcher/types/WriteAccessAllowed/entity.json index d054736a..50d990bc 100644 --- a/.butcher/types/WriteAccessAllowed/entity.json +++ b/.butcher/types/WriteAccessAllowed/entity.json @@ -14,8 +14,8 @@ { "type": "Boolean", "description": "True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", - "html_description": "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", - "rst_description": "*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_\n", + "html_description": "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess", + "rst_description": "*Optional*. :code:`True`, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_\n", "name": "from_request", "required": false }, @@ -30,8 +30,8 @@ { "type": "Boolean", "description": "True, if the access was granted when the bot was added to the attachment or side menu", - "html_description": "Optional. True, if the access was granted when the bot was added to the attachment or side menu", - "rst_description": "*Optional*. True, if the access was granted when the bot was added to the attachment or side menu\n", + "html_description": "Optional. True, if the access was granted when the bot was added to the attachment or side menu", + "rst_description": "*Optional*. :code:`True`, if the access was granted when the bot was added to the attachment or side menu\n", "name": "from_attachment_menu", "required": false } diff --git a/.claude/commands/aiogram-api-changelog.md b/.claude/commands/aiogram-api-changelog.md new file mode 100644 index 00000000..909187a1 --- /dev/null +++ b/.claude/commands/aiogram-api-changelog.md @@ -0,0 +1,50 @@ +Generate a Bot API changelog fragment for aiogram. + +Arguments: $ARGUMENTS (format: ` `) + +## Steps + +1. Parse `$ARGUMENTS`: the first token is the issue/PR number (e.g. `1792`), the rest is the changelog URL (e.g. `https://core.telegram.org/bots/api-changelog#april-3-2026`). + +2. Fetch the changelog URL using WebFetch. Extract **all** changes for the Bot API version anchored by that URL: new methods, new types, new/changed fields, new parameters, renamed fields, and any other notable changes. + +3. Discover which aiogram modules were generated for the new symbols: + - New methods → search `aiogram/methods/.py` via Glob + - New types → search `aiogram/types/.py` via Glob + - Confirm every referenced module exists before writing it into the RST. + +4. Create `CHANGES/.misc.rst` (overwrite if it exists) with the following RST structure, following the style used for previous Bot API updates in `CHANGES.rst`: + +```rst +Updated to `Bot API X.Y <{url}>`_ + +**{Section heading — e.g. "Feature Area"}** + +*New Methods:* + +- Added :class:`aiogram.methods..` method - + +*New Types:* + +- Added :class:`aiogram.types..` type - + +*New Fields:* + +- Added :code:`` field to :class:`aiogram.types..` - + +*New Parameters for* :class:`aiogram.methods..`: + +- Added :code:`` - +``` + +Rules for writing the RST: +- Use `:class:`` for types and methods, `:meth:`` for shortcuts, `:code:`` for field/parameter names. +- Module paths must be the full dotted path (e.g. `aiogram.types.poll_option.PollOption`), always verified against real files. +- If a symbol has a shortcut method on a type, mention it with `:meth:`. +- Group related changes under bold section headings (e.g. **Polls**, **Managed Bots**). +- Within each section use italic sub-headings (*New Methods:*, *New Types:*, *New Fields:*, *New Parameters for ...:*) — omit a sub-heading if there is nothing to list under it. +- Describe each item with a brief, user-facing sentence after the dash. +- Do not add a trailing newline after the last bullet. +- Do not include an issue/PR back-reference link (towncrier adds that automatically). + +5. Print the path of the created file and confirm it is done. 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/.github/FUNDING.yml b/.github/FUNDING.yml index 6b2da3b6..c4430ef6 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1 @@ open_collective: aiogram - diff --git a/.github/workflows/pull_request_changelog.yml b/.github/workflows/pull_request_changelog.yml index c481bc9b..ecbfd2bc 100644 --- a/.github/workflows/pull_request_changelog.yml +++ b/.github/workflows/pull_request_changelog.yml @@ -19,13 +19,13 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: '0' - - name: Set up Python 3.10 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.12" - name: Install towncrier - run: pip install towncrier + run: pip install -U towncrier - name: Check changelog env: @@ -36,7 +36,7 @@ jobs: - name: Find bot comment if: "always()" - uses: peter-evans/find-comment@v2 + uses: peter-evans/find-comment@v3 id: fc with: issue-number: ${{ github.event.pull_request.number }} @@ -45,7 +45,7 @@ jobs: - name: Ask for changelog if: "failure()" - uses: peter-evans/create-or-update-comment@v2 + uses: peter-evans/create-or-update-comment@v4 with: edit-mode: replace comment-id: ${{ steps.fc.outputs.comment-id }} @@ -65,7 +65,7 @@ jobs: - name: Changelog found if: "success()" - uses: peter-evans/create-or-update-comment@v2 + uses: peter-evans/create-or-update-comment@v4 with: edit-mode: replace comment-id: ${{ steps.fc.outputs.comment-id }} @@ -80,7 +80,7 @@ jobs: if: "contains(github.event.pull_request.labels.*.name, 'skip news')" steps: - name: Find bot comment - uses: peter-evans/find-comment@v2 + uses: peter-evans/find-comment@v3 id: fc with: issue-number: ${{ github.event.pull_request.number }} @@ -88,7 +88,7 @@ jobs: body-includes: Changelog - name: Comment when docs is not needed - uses: peter-evans/create-or-update-comment@v2 + uses: peter-evans/create-or-update-comment@v4 with: edit-mode: replace comment-id: ${{ steps.fc.outputs.comment-id }} diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 7b3e86dd..d0084593 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -10,25 +10,22 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - name: Set up Python 3.11 - uses: actions/setup-python@v5 + - name: Set up Python 3.14 + uses: actions/setup-python@v6 with: - python-version: "3.11" + python-version: "3.14" - - name: Install build dependencies - run: python -m pip install --upgrade build + - name: Install uv + uses: astral-sh/setup-uv@v7 - name: Resolve version id: package-version run: echo "value=$(echo ${{ github.ref }} | sed -e 's/refs\/tags\/v//')" >> $GITHUB_OUTPUT - # - name: Bump version - # run: hatch version ${{ steps.package-version.outputs.value }} - - - name: Build source distribution - run: python -m build . + - name: Build distribution + run: uv build - name: Try install wheel run: | @@ -39,7 +36,7 @@ jobs: venv/bin/pip install ../dist/aiogram-*.whl venv/bin/python -c "import aiogram; print(aiogram.__version__)" - name: Publish artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v6 with: name: dist path: dist/* @@ -55,7 +52,7 @@ jobs: id-token: write steps: - name: Download artifacts - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v7 with: name: dist path: dist diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0d95be48..2937cb60 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,11 +29,11 @@ jobs: - macos-latest - windows-latest python-version: - - '3.8' - - '3.9' - - '3.10' - - '3.11' - - '3.12' + - "3.10" + - "3.11" + - "3.12" + - "3.13" + - "3.14" defaults: # Windows sucks. Force use bash instead of PowerShell @@ -58,30 +58,33 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - cache: "pip" - cache-dependency-path: pyproject.toml + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true - name: Install project dependencies run: | - pip install -e .[dev,test,redis,mongo,proxy,i18n,fast] + uv sync --all-extras --group dev --group test - name: Lint code run: | - ruff check --output-format=github aiogram examples - mypy aiogram - black --check --diff aiogram tests + uv run ruff check --output-format=github aiogram examples + uv run mypy aiogram + uv run ruff format --check --diff aiogram tests scripts examples - name: Setup redis if: ${{ env.IS_WINDOWS == 'false' }} uses: shogo82148/actions-setup-redis@v1 with: - redis-version: 6 + redis-version: "8" - name: Setup mongodb if: ${{ env.IS_UBUNTU == 'true' }} - uses: supercharge/mongodb-github-action@1.10.0 + uses: supercharge/mongodb-github-action@1.12.0 with: - mongodb-version: '7.0' + mongodb-version: "8" mongodb-username: mongo mongodb-password: mongo mongodb-port: 27017 @@ -91,10 +94,10 @@ jobs: flags="$flags --cov=aiogram --cov-config .coveragerc --cov-report=xml" [[ "$IS_WINDOWS" == "false" ]] && flags="$flags --redis redis://localhost:6379/0" [[ "$IS_UBUNTU" == "true" ]] && flags="$flags --mongo mongodb://mongo:mongo@localhost:27017" - pytest $flags + uv run pytest $flags - name: Upload coverage data - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} files: coverage.xml @@ -111,9 +114,8 @@ jobs: - macos-latest # - windows-latest python-version: - - 'pypy3.8' - - 'pypy3.9' - - 'pypy3.10' + - "pypy3.10" + - "pypy3.11" defaults: # Windows sucks. Force use bash instead of PowerShell @@ -124,20 +126,23 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - cache: "pip" - cache-dependency-path: pyproject.toml + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true - name: Install project dependencies run: | - pip install -e .[dev,test,redis,mongo,proxy,i18n,fast] + uv sync --all-extras --group dev --group test - name: Run tests run: | flags="" - pytest $flags + uv run pytest $flags diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c42ea91e..891f4221 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v6.0.0 hooks: - id: "trailing-whitespace" - id: "check-case-conflict" @@ -13,13 +13,10 @@ repos: - id: "check-toml" - id: "check-json" - - repo: https://github.com/psf/black - rev: 24.4.2 - hooks: - - id: black - files: &files '^(aiogram|tests|examples)' - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.4.9' + rev: 'v0.14.0' hooks: - id: ruff + files: &files '^(aiogram|tests|examples)' + - id: ruff-format + files: *files diff --git a/.serena/.gitignore b/.serena/.gitignore new file mode 100644 index 00000000..2e510aff --- /dev/null +++ b/.serena/.gitignore @@ -0,0 +1,2 @@ +/cache +/project.local.yml diff --git a/.serena/memories/code_style.md b/.serena/memories/code_style.md new file mode 100644 index 00000000..75ec81b9 --- /dev/null +++ b/.serena/memories/code_style.md @@ -0,0 +1,42 @@ +# Code Style & Conventions + +## General +- `from __future__ import annotations` at the top of every Python file +- Full type hints on all function signatures and class fields +- Max line length: **99** characters (ruff enforced) +- snake_case for Python names; camelCase used only in `__api_method__` strings + +## Pydantic models +- All Telegram types extend `TelegramObject(BotContextController, BaseModel)` from `aiogram/types/base.py` +- `TelegramObject` is frozen; use `MutableTelegramObject` when mutation is needed +- Fields default to `None` for optional API parameters; use `Field(None, json_schema_extra={"deprecated": True})` for deprecated fields +- Use `Default("key")` sentinel (from `aiogram.client.default`) for user-configurable defaults like `parse_mode`, `protect_content` +- `TYPE_CHECKING` guards for circular imports — keep runtime imports lean + +## API Methods +- Each method is a class inheriting `TelegramMethod[ReturnType]` from `aiogram/methods/base.py` +- Required class attrs: `__returning__` (return type), `__api_method__` (camelCase string) +- Fields with `None` default = optional param +- Method docstring format: short description + `Source: https://core.telegram.org/bots/api#methodname` +- File name: snake_case of method name (e.g., `SendMessage` → `send_message.py`) + +## Imports order (ruff/isort enforced) +1. stdlib +2. third-party +3. `aiogram` (first-party) +4. relative imports + +## Ruff rules enforced +- A (annotations), B (bugbear), C4 (comprehensions), DTZ (datetimez), E, F, I (isort), PERF, PL (pylint), Q (quotes), RET, SIM, T10, T20, UP (pyupgrade) +- Several PLR rules disabled (Telegram API naturally has many params/methods) +- `F401` disabled (re-exports in `__init__.py` intentional) + +## Code generation convention +- **Never hand-edit generated files** (`.butcher/**/entity.json`, auto-generated `aiogram/types/*.py`, `aiogram/methods/*.py`, `aiogram/enums/*.py`) +- Add features via `.butcher` YAML config/aliases + templates, then regenerate +- After codegen: always run lint + mypy + +## Naming patterns +- Enums: PascalCase class, UPPER_SNAKE members (e.g., `ContentType.TEXT`) +- Test files: `test_.py` +- Test classes: `Test` with `async def test_(self, bot: MockedBot)` diff --git a/.serena/memories/codebase_structure.md b/.serena/memories/codebase_structure.md new file mode 100644 index 00000000..8c8d87fc --- /dev/null +++ b/.serena/memories/codebase_structure.md @@ -0,0 +1,84 @@ +# Codebase Structure + +## Top-level layout +``` +aiogram/ # Main package +.butcher/ # Code generation inputs (DO NOT edit entity.json files) +tests/ # Test suite +docs/ # Sphinx documentation (RST) +examples/ # Example bot scripts +scripts/ # Version bump scripts +CHANGES/ # Towncrier changelog fragments (CHANGES/..rst) +``` + +## aiogram/ package +``` +aiogram/ +├── __init__.py # Public API re-exports +├── __meta__.py # Version (hatch reads this) +├── exceptions.py # Framework exceptions +├── loggers.py # Named loggers +├── client/ +│ ├── bot.py # Bot class — all API methods as async shortcuts +│ ├── session/ # HTTP session backends (aiohttp, base) +│ ├── default.py # Default() sentinel for configurable defaults +│ └── context_controller.py # Bot context injection into models +├── types/ +│ ├── base.py # TelegramObject (Pydantic BaseModel), MutableTelegramObject +│ ├── *.py # One file per Telegram type +│ └── __init__.py # Exports all types +├── methods/ +│ ├── base.py # TelegramMethod[T] base class +│ ├── *.py # One file per API method (e.g., send_message.py → SendMessage) +│ └── __init__.py +├── enums/ +│ ├── content_type.py # ContentType enum +│ ├── update_type.py # UpdateType enum +│ └── *.py +├── dispatcher/ +│ ├── dispatcher.py # Dispatcher (main update processor) +│ ├── router.py # Router (Blueprint-style routing) +│ ├── middlewares/ # Middleware system +│ ├── event/ # Event observer, typed decorators +│ └── flags/ # Handler flags +├── filters/ # Built-in filters (Command, StateFilter, etc.) +├── fsm/ +│ ├── context.py # FSMContext +│ ├── state.py # State, StatesGroup +│ └── storage/ # Memory, Redis, MongoDB storage backends +├── handlers/ # Base handler types +├── utils/ +│ ├── keyboard.py # Keyboard builder utilities +│ ├── text_decorations.py # HTML/Markdown formatting +│ └── i18n/ # Internationalization support +└── webhook/ # Webhook integrations (aiohttp, SimpleRequestHandler, etc.) +``` + +## .butcher/ (Code generation) +``` +.butcher/ +├── schema/schema.json # Full Bot API schema (source of truth) +├── types/ # Per-type entity.json + optional alias YAML overrides +├── methods/ # Per-method entity.json + optional alias YAML overrides +├── enums/ # Per-enum entity.json + optional YAML overrides +└── templates/ # Jinja2 templates for generated Python files +``` + +**Rule**: Edit `.yml` alias files or templates in `.butcher/`, never `.entity.json` files directly. Regenerate after changes. + +## tests/ layout +``` +tests/ +├── conftest.py # Shared fixtures (bot, dispatcher, etc.) +├── mocked_bot.py # MockedBot for testing without real HTTP +├── test_api/ +│ ├── test_types/ # Tests for Telegram types +│ ├── test_methods/ # Tests for API method classes +│ └── test_client/ # HTTP client tests +├── test_dispatcher/ # Dispatcher/Router/Middleware tests +├── test_filters/ # Filter tests +├── test_fsm/ # FSM and storage tests +├── test_handler/ # Handler tests +├── test_utils/ # Utility tests +└── test_webhook/ # Webhook integration tests +``` diff --git a/.serena/memories/codegen_workflow.md b/.serena/memories/codegen_workflow.md new file mode 100644 index 00000000..d3b1984e --- /dev/null +++ b/.serena/memories/codegen_workflow.md @@ -0,0 +1,44 @@ +# Bot API Codegen Workflow + +## How code generation works +aiogram uses `butcher` (via `aiogram-cli`) to auto-generate Python files from the Telegram Bot API schema. + +### Source of truth +- `.butcher/schema/schema.json` — full parsed Bot API schema +- `.butcher/types//entity.json` — parsed entity metadata (DO NOT edit) +- `.butcher/methods//entity.json` — parsed method metadata (DO NOT edit) +- `.butcher/enums//entity.json` — parsed enum metadata (DO NOT edit) +- `.butcher/templates/` — Jinja2 templates that produce Python code +- YAML alias/override files in `.butcher/types/`, `.butcher/methods/` — edit these for customizations + +### Generated files (DO NOT hand-edit) +- `aiogram/types/*.py` (except `base.py`, `custom.py`, `_union.py` — framework internals) +- `aiogram/methods/*.py` (except `base.py`) +- `aiogram/enums/*.py` +- `aiogram/client/bot.py` (the `Bot` class shortcuts) +- `aiogram/types/__init__.py`, `aiogram/methods/__init__.py` + +### Regeneration commands +```bash +uv run --extra cli butcher parse # re-parse from API schema +uv run --extra cli butcher refresh # refresh entity JSON from parsed schema +uv run --extra cli butcher apply all # apply templates → generate Python files +``` + +### Adding a new type/method/shortcut +1. Update the `.butcher` YAML alias/config file for the entity +2. Run regeneration (parse → refresh → apply) +3. Run lint + mypy + tests +4. Commit both the `.butcher` config changes AND the generated Python files + +### API version bumps (maintainers) +```bash +make update-api args=patch # or minor/major +``` +This runs butcher parse/refresh/apply + version bump scripts that update: +- `aiogram/__meta__.py` +- `README.rst` +- `docs/index.rst` + +## Key constraint +The maintainers enforce: **never add types/methods/shortcuts by hand-editing generated files**. All changes must go through `.butcher` config so future regenerations preserve them. diff --git a/.serena/memories/dispatcher/adding_new_event_types.md b/.serena/memories/dispatcher/adding_new_event_types.md new file mode 100644 index 00000000..1196bf13 --- /dev/null +++ b/.serena/memories/dispatcher/adding_new_event_types.md @@ -0,0 +1,43 @@ +# Adding a New Update/Event Type to aiogram Dispatcher + +When Telegram Bot API adds a new update type (e.g. `managed_bot`, `purchased_paid_media`), the following files must be touched. Types, enums, and butcher configs are generated — the dispatcher integration is manual. + +## Checklist (in order) + +### Generated / butcher layer (run `butcher parse && butcher refresh && butcher apply all`) +- `.butcher/types//entity.json` — type definition +- `.butcher/types/Update/entity.json` — add field to Update entity +- `aiogram/types/.py` — generated type class +- `aiogram/types/__init__.py` — export +- `aiogram/enums/update_type.py` — `NEW_TYPE = "new_type"` enum member +- `aiogram/types/update.py` — `new_type: NewType | None = None` field + TYPE_CHECKING import + `__init__` signature + +### Manual dispatcher integration (NOT generated) + +1. **`aiogram/types/update.py`** — `event_type` property (lines ~161-215): add `if self.new_type: return "new_type"` before the `raise UpdateTypeLookupError` line + +2. **`aiogram/dispatcher/router.py`** — two places in `Router.__init__`: + - Add `self.new_type = TelegramEventObserver(router=self, event_name="new_type")` after the last observer attribute (before `self.errors`) + - Add `"new_type": self.new_type,` to the `self.observers` dict (before `"error"`) + +3. **`aiogram/dispatcher/middlewares/user_context.py`** — `resolve_event_context()` method: add `if event.new_type: return EventContext(user=..., chat=...)` before `return EventContext()`. Use `user` field for user-scoped events, `chat` for chat-scoped. No `business_connection_id` unless the event has one. + +### Tests (manual) + +4. **`tests/test_dispatcher/test_dispatcher.py`** — add `pytest.param("new_type", Update(update_id=42, new_type=NewType(...)), has_chat, has_user)` to `test_listen_update` parametrize list. Import `NewType` in the imports block. + +5. **`tests/test_dispatcher/test_router.py`** — add `assert router.observers["new_type"] == router.new_type` to `test_observers_config` + +### Docs (generated or manual stub) +- `docs/api/types/.rst` — RST stub +- `docs/api/types/index.rst` — add to index + +## Key invariants +- The snake_case name must be identical across: `UpdateType` enum value, `Update` field name, `event_type` return string, Router attribute name, observers dict key, and `TelegramEventObserver(event_name=...)`. +- `Update.event_type` uses `@lru_cache()` — never mutate Update fields after construction. +- The routing machinery (`propagate_event`, middleware chains, sub-router propagation) requires **zero changes** — it operates on observer names looked up dynamically. + +## Example: `managed_bot` (API 9.6) +- Type: `ManagedBotUpdated` with fields `user: User` (creator) and `bot_user: User` (the managed bot) +- user_context: `EventContext(user=event.managed_bot.user)` — user only, no chat +- `has_chat=False, has_user=True` in test parametrization diff --git a/.serena/memories/project_overview.md b/.serena/memories/project_overview.md new file mode 100644 index 00000000..f11d32cc --- /dev/null +++ b/.serena/memories/project_overview.md @@ -0,0 +1,43 @@ +# Project Overview: aiogram + +## Purpose +**aiogram** is a modern, fully asynchronous Python framework for the Telegram Bot API (currently supports Bot API 9.5+). It provides a high-level interface for building Telegram bots using asyncio. + +## Tech Stack +- **Python**: 3.10–3.14 (also supports PyPy) +- **Async runtime**: asyncio + aiohttp (HTTP client) +- **Data validation**: Pydantic v2 +- **Package manager**: `uv` +- **Linter/formatter**: `ruff` (check + format) +- **Type checker**: `mypy` +- **Testing**: `pytest` with `pytest-asyncio`, `aresponses` +- **Docs**: Sphinx (reStructuredText), `sphinx-autobuild` +- **Changelog**: `towncrier` +- **Code generation**: `butcher` (aiogram-cli) — generates types, methods, enums from Bot API schema + +## Key Links +- Docs (English): https://docs.aiogram.dev/en/dev-3.x/ +- GitHub: https://github.com/aiogram/aiogram/ +- Bot API schema: `.butcher/schema/schema.json` + +## Architecture Summary +The framework is layered: +1. **`aiogram/client/`** — `Bot` class (all API methods as shortcuts), session management, context controller +2. **`aiogram/types/`** — Pydantic models for all Telegram types (`TelegramObject` base) +3. **`aiogram/methods/`** — `TelegramMethod[ReturnType]` subclasses, one per Bot API method +4. **`aiogram/dispatcher/`** — Dispatcher, Router (blueprints), middleware, event observers +5. **`aiogram/filters/`** — Filter classes for routing +6. **`aiogram/fsm/`** — Finite State Machine (states, storage backends) +7. **`aiogram/enums/`** — Enumerations (ContentType, UpdateType, etc.) +8. **`aiogram/utils/`** — Text decoration, keyboards, i18n, etc. +9. **`aiogram/webhook/`** — Webhook server integrations (aiohttp, FastAPI, etc.) +10. **`.butcher/`** — Code generation inputs: YAML/JSON configs for types/methods/enums + Jinja2 templates + +## Optional extras +- `fast` — uvloop + aiodns +- `redis` — Redis FSM storage +- `mongo` — MongoDB FSM storage +- `proxy` — SOCKS proxy support +- `i18n` — Babel-based i18n +- `cli` — `butcher` codegen CLI +- `signature` — cryptographic signature verification diff --git a/.serena/memories/suggested_commands.md b/.serena/memories/suggested_commands.md new file mode 100644 index 00000000..b17b204d --- /dev/null +++ b/.serena/memories/suggested_commands.md @@ -0,0 +1,66 @@ +# Suggested Commands + +## Setup +```bash +uv sync --all-extras --group dev --group test +uv run pre-commit install +``` + +## Lint & Format (quick loop — use before every commit) +```bash +uv run ruff check --show-fixes --preview aiogram examples +uv run ruff format --check --diff aiogram tests scripts examples +uv run mypy aiogram +``` + +## Auto-fix formatting +```bash +uv run ruff format aiogram tests scripts examples +uv run ruff check --fix aiogram tests scripts examples +``` + +## Run tests +```bash +uv run pytest tests # basic +uv run pytest tests --redis redis://localhost:6379/0 # with Redis +uv run pytest tests --mongo mongodb://mongo:mongo@localhost:27017 # with MongoDB +``` + +## Build docs +```bash +# Live-reload dev server +uv run --extra docs sphinx-autobuild --watch aiogram/ --watch CHANGES.rst --watch README.rst docs/ docs/_build/ +# One-shot build +uv run --extra docs bash -c 'cd docs && make html' +``` + +## Code generation (Bot API codegen) +```bash +# After editing .butcher/*.yml or templates: +uv run --extra cli butcher parse +uv run --extra cli butcher refresh +uv run --extra cli butcher apply all +``` + +## API version bump (maintainers only) +```bash +make update-api args=patch # runs butcher parse/refresh/apply + version bump +``` + +## Changelog +```bash +# Preview draft +uv run --extra docs towncrier build --draft +# Build final +uv run --extra docs towncrier build --yes +``` + +## Clean build artifacts +```bash +make clean +``` + +## Build package +```bash +uv build +``` diff --git a/.serena/memories/task_completion.md b/.serena/memories/task_completion.md new file mode 100644 index 00000000..e25dd178 --- /dev/null +++ b/.serena/memories/task_completion.md @@ -0,0 +1,43 @@ +# Task Completion Checklist + +Run these before marking any task done or requesting review. + +## Quick loop (every PR) +```bash +uv run ruff check --show-fixes --preview aiogram examples +uv run ruff format --check --diff aiogram tests scripts examples +uv run mypy aiogram +uv run pytest tests +``` + +## Codegen tasks (when touching .butcher/ or generated API files) +```bash +uv run --extra cli butcher parse +uv run --extra cli butcher refresh +uv run --extra cli butcher apply all +# Then re-run quick loop +``` + +## Integration tests (only if Redis/Mongo storage touched) +```bash +uv run pytest --redis redis://localhost:6379/0 tests +uv run pytest --mongo mongodb://mongo:mongo@localhost:27017 tests +``` + +## Docs (only if docs/ or public API changed) +```bash +uv run --extra docs bash -c 'cd docs && make html' +``` + +## Changelog fragment (required unless PR has `skip news` label) +- Create `CHANGES/..rst` +- Valid categories: `feature`, `bugfix`, `doc`, `removal`, `misc` +- Content: user-visible behavior description (not internal/process details) +- Do NOT edit `CHANGES.rst` directly + +## PR quality checklist +1. Tests added/updated for all behavior changes +2. Quick loop passes (ruff + mypy + pytest) +3. Changelog fragment added (or justified `skip news`) +4. If codegen-related: both `.butcher` source config AND generated files updated +5. PR body has clear reproduction/validation steps diff --git a/.serena/memories/testing_patterns.md b/.serena/memories/testing_patterns.md new file mode 100644 index 00000000..7914d508 --- /dev/null +++ b/.serena/memories/testing_patterns.md @@ -0,0 +1,45 @@ +# Testing Patterns + +## Framework +- pytest with async support +- No `pytest-asyncio` explicit marks needed (configured globally in pyproject.toml) +- `MockedBot` (tests/mocked_bot.py) — use for all bot method tests, no real HTTP + +## MockedBot pattern +```python +from tests.mocked_bot import MockedBot +from aiogram.methods import SendMessage +from aiogram.types import Message, Chat +import datetime + +class TestSendMessage: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SendMessage, + ok=True, + result=Message( + message_id=42, + date=datetime.datetime.now(), + text="test", + chat=Chat(id=42, type="private"), + ), + ) + response: Message = await bot.send_message(chat_id=42, text="test") + bot.get_request() + assert response == prepare_result.result +``` + +## Test structure +- Class per type/method: `class TestSendMessage:` +- One test per scenario: `async def test_(self, ...)` +- `bot` fixture comes from `tests/conftest.py` + +## Integration tests +- Redis: `uv run pytest --redis redis://localhost:6379/0 tests` +- MongoDB: `uv run pytest --mongo mongodb://mongo:mongo@localhost:27017 tests` +- Only run these when Redis/Mongo storage code is affected + +## What NOT to do +- Do not mock the database/storage in FSM tests — use real backends or memory storage +- Do not introduce new test dependencies for small tests +- Keep test style consistent with existing suite diff --git a/.serena/project.yml b/.serena/project.yml new file mode 100644 index 00000000..b751e51f --- /dev/null +++ b/.serena/project.yml @@ -0,0 +1,152 @@ +# the name by which the project can be referenced within Serena +project_name: "aiogram3" + + +# list of languages for which language servers are started; choose from: +# al bash clojure cpp csharp +# csharp_omnisharp dart elixir elm erlang +# fortran fsharp go groovy haskell +# java julia kotlin lua markdown +# matlab nix pascal perl php +# php_phpactor powershell python python_jedi r +# rego ruby ruby_solargraph rust scala +# swift terraform toml typescript typescript_vts +# vue yaml zig +# (This list may be outdated. For the current list, see values of Language enum here: +# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py +# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.) +# Note: +# - For C, use cpp +# - For JavaScript, use typescript +# - For Free Pascal/Lazarus, use pascal +# Special requirements: +# Some languages require additional setup/installations. +# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers +# When using multiple languages, the first language server that supports a given file will be used for that file. +# The first language is the default language and the respective language server will be used as a fallback. +# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored. +languages: +- python + +# the encoding used by text files in the project +# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings +encoding: "utf-8" + +# line ending convention to use when writing source files. +# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default) +# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings. +line_ending: + +# The language backend to use for this project. +# If not set, the global setting from serena_config.yml is used. +# Valid values: LSP, JetBrains +# Note: the backend is fixed at startup. If a project with a different backend +# is activated post-init, an error will be returned. +language_backend: + +# whether to use project's .gitignore files to ignore files +ignore_all_files_in_gitignore: true + +# advanced configuration option allowing to configure language server-specific options. +# Maps the language key to the options. +# Have a look at the docstring of the constructors of the LS implementations within solidlsp (e.g., for C# or PHP) to see which options are available. +# No documentation on options means no options are available. +ls_specific_settings: {} + +# list of additional paths to ignore in this project. +# Same syntax as gitignore, so you can use * and **. +# Note: global ignored_paths from serena_config.yml are also applied additively. +ignored_paths: [] + +# whether the project is in read-only mode +# If set to true, all editing tools will be disabled and attempts to use them will result in an error +# Added on 2025-04-18 +read_only: false + +# list of tool names to exclude. +# This extends the existing exclusions (e.g. from the global configuration) +# +# Below is the complete list of tools for convenience. +# To make sure you have the latest list of tools, and to view their descriptions, +# execute `uv run scripts/print_tool_overview.py`. +# +# * `activate_project`: Activates a project by name. +# * `check_onboarding_performed`: Checks whether project onboarding was already performed. +# * `create_text_file`: Creates/overwrites a file in the project directory. +# * `delete_lines`: Deletes a range of lines within a file. +# * `delete_memory`: Deletes a memory from Serena's project-specific memory store. +# * `execute_shell_command`: Executes a shell command. +# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced. +# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type). +# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type). +# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes. +# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file. +# * `initial_instructions`: Gets the initial instructions for the current project. +# Should only be used in settings where the system prompt cannot be set, +# e.g. in clients you have no control over, like Claude Desktop. +# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol. +# * `insert_at_line`: Inserts content at a given line in a file. +# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol. +# * `list_dir`: Lists files and directories in the given directory (optionally with recursion). +# * `list_memories`: Lists memories in Serena's project-specific memory store. +# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building). +# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context). +# * `read_file`: Reads a file within the project directory. +# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store. +# * `remove_project`: Removes a project from the Serena configuration. +# * `replace_lines`: Replaces a range of lines within a file with new content. +# * `replace_symbol_body`: Replaces the full definition of a symbol. +# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen. +# * `search_for_pattern`: Performs a search for a pattern in the project. +# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase. +# * `switch_modes`: Activates modes by providing a list of their names +# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information. +# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task. +# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed. +# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store. +excluded_tools: [] + +# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default). +# This extends the existing inclusions (e.g. from the global configuration). +included_optional_tools: [] + +# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools. +# This cannot be combined with non-empty excluded_tools or included_optional_tools. +fixed_tools: [] + +# list of mode names to that are always to be included in the set of active modes +# The full set of modes to be activated is base_modes + default_modes. +# If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply. +# Otherwise, this setting overrides the global configuration. +# Set this to [] to disable base modes for this project. +# Set this to a list of mode names to always include the respective modes for this project. +base_modes: + +# list of mode names that are to be activated by default. +# The full set of modes to be activated is base_modes + default_modes. +# If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply. +# Otherwise, this overrides the setting from the global configuration (serena_config.yml). +# This setting can, in turn, be overridden by CLI parameters (--mode). +default_modes: + +# initial prompt for the project. It will always be given to the LLM upon activating the project +# (contrary to the memories, which are loaded on demand). +initial_prompt: "" + +# time budget (seconds) per tool call for the retrieval of additional symbol information +# such as docstrings or parameter information. +# This overrides the corresponding setting in the global configuration; see the documentation there. +# If null or missing, use the setting from the global configuration. +symbol_info_budget: + +# list of regex patterns which, when matched, mark a memory entry as read‑only. +# Extends the list from the global configuration, merging the two lists. +read_only_memory_patterns: [] + +# list of regex patterns for memories to completely ignore. +# Matching memories will not appear in list_memories or activate_project output +# and cannot be accessed via read_memory or write_memory. +# To access ignored memory files, use the read_file tool on the raw file path. +# Extends the list from the global configuration, merging the two lists. +# Example: ["_archive/.*", "_episodes/.*"] +ignored_memory_patterns: [] diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..2caf7949 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,131 @@ +# AGENTS.md + +This file defines how coding agents should contribute to `aiogram` on `dev-3.x`. + +## Scope and defaults + +- Base branch: `dev-3.x` +- Python: `>=3.10` +- Main tooling: `uv`, `ruff`, `mypy`, `pytest`, `towncrier`, `butcher` +- Keep diffs focused; avoid unrelated refactors/reformatting. + +## Setup + +```bash +uv sync --all-extras --group dev --group test +uv run pre-commit install +``` + +Note: `uv run pre-commit install` writes hooks to the shared repository `.git/hooks` +(common for all worktrees), not only for the current worktree. + +## Codebase Navigation + +Use **Serena MCP** for all codebase navigation tasks. Serena provides semantic, symbol-aware tools that are more efficient than raw file reads: + +- `get_symbols_overview` — list classes/methods in a file without reading the full body +- `find_symbol` — locate a specific class, method, or field by name path +- `find_referencing_symbols` — find all usages of a symbol across the codebase +- `search_for_pattern` — regex search when symbol names are unknown + +Prefer Serena's symbol tools over `Read`/`Grep` for source code exploration. Only fall back to file-based tools when Serena is unavailable or for non-code files (JSON configs, Markdown, etc.). + +## Mandatory local checks before PR + +Code style/lint in this repository is enforced via Ruff (`ruff check` + `ruff format`). + +Quick loop (recommended for most PR iterations): + +```bash +uv run ruff check --show-fixes --preview aiogram examples +uv run ruff format --check --diff aiogram tests scripts examples +uv run mypy aiogram +uv run pytest tests +``` + +Full loop (run before final review request): + +```bash +# Run quick loop first, then: +uv run pytest --redis redis://:/ tests # when Redis storage paths are affected +uv run pytest --mongo mongodb://:@: tests # when Mongo storage paths are affected +uv run --extra docs bash -c 'cd docs && make html' # when docs or generated API docs are affected +``` + +If changes touch Redis/Mongo storage behavior, run integration variants too: + +```bash +uv run pytest --redis redis://:/ tests +uv run pytest --mongo mongodb://:@: tests +``` + +Run these only if you have accessible Redis/Mongo instances in your environment. + + +## Changelog rules (CI-gated) + +- Add `CHANGES/..rst` unless PR has `skip news` label. +- Valid categories: `feature`, `bugfix`, `doc`, `removal`, `misc`. +- Changelog text must describe user-visible behavior changes, not process/org details. +- Do not edit `CHANGES.rst` directly for regular PRs. + +## Bot API/codegen workflow (critical) + +`aiogram` API layers are generated. For Bot API related work: + +- Prefer editing generator inputs (`.butcher/**/*.yml`, aliases, templates) instead of hand-editing generated code. +- Do not manually edit `.butcher/**/entity.json` (parser/codegen will overwrite it). +- For new shortcuts, add alias/config in `.butcher` and regenerate. +- Regeneration flow: + +```bash +uv run --extra cli butcher parse +uv run --extra cli butcher refresh +uv run --extra cli butcher apply all +``` + +For maintainers preparing an API/version bump only: + +```bash +make update-api args=patch +``` + +`make update-api args=...` also runs version bump scripts and updates version-related files +(`aiogram/__meta__.py`, `README.rst`, `docs/index.rst`). + +After regeneration, run lint/type/tests again. + +## Maintainer review signals (recent PRs) + +These patterns repeatedly appeared in maintainer feedback and should be treated as hard constraints: + +- Keep generation path consistent: shortcuts/features should be added through `.butcher` config + generation, not ad-hoc manual edits. +- Keep test style consistent with existing suite; avoid introducing new dependencies for small tests. +- Preserve framework contracts (e.g., dispatcher/workflow data passed to startup/shutdown callbacks). +- When fixing generated API metadata/docs, update the source mapping in `.butcher` so future regenerations keep the fix. + +## Documentation work + +For docs changes: + +```bash +uv run --extra docs sphinx-autobuild --watch aiogram/ --watch CHANGES.rst --watch README.rst docs/ docs/_build/ +``` + +`sphinx-autobuild` is long-running by design. + +Or quick build: + +```bash +uv run --extra docs bash -c 'cd docs && make html' +``` + +## PR quality checklist + +Before requesting review: + +1. Tests added/updated for behavior changes. +2. Local lint/type/tests pass. +3. Changelog fragment added (or `skip news` is justified). +4. If codegen-related: generated files and source config are both updated coherently. +5. PR body includes clear reproduction/validation steps. diff --git a/CHANGES.rst b/CHANGES.rst index 7c39814b..4e67682c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -16,6 +16,1089 @@ Changelog .. towncrier release notes start +3.27.0 (2026-04-04) +==================== + +Features +-------- + +- Added `__eq__` and `__hash__` methods to the `Default` class. + `#1707 `_ + + +Bugfixes +-------- + +- ``CommandStart(deep_link=False)`` now correctly rejects messages that contain deep-link arguments. Previously ``deep_link=False`` (the default) did not distinguish between ``/start`` and ``/start ``. The default is changed to ``None`` (accept both) to preserve backward compatibility. + `#1713 `_ +- Fixed ``HtmlDecoration.custom_emoji()`` to use the correct ``emoji-id`` attribute name instead of ``emoji_id`` in the ```` tag, matching the Telegram Bot API specification. + `#1782 `_ +- Remove redundant list() around sorted() and fix router type name in validation error message + `#1788 `_ + + +Misc +---- + +- Updated to `Bot API 9.6 `_ + + **Managed Bots** + + *New Methods:* + + - Added :class:`aiogram.methods.get_managed_bot_token.GetManagedBotToken` method - retrieves the token of a managed bot + - Added :class:`aiogram.methods.replace_managed_bot_token.ReplaceManagedBotToken` method - generates a new token for a managed bot, invalidating the previous one + - Added :class:`aiogram.methods.save_prepared_keyboard_button.SavePreparedKeyboardButton` method - saves a keyboard button to be used in Mini Apps via :code:`requestChat` + + *New Types:* + + - Added :class:`aiogram.types.keyboard_button_request_managed_bot.KeyboardButtonRequestManagedBot` type - defines criteria for selecting a managed bot via a keyboard button + - Added :class:`aiogram.types.managed_bot_created.ManagedBotCreated` type - describes a service message about a managed bot being created + - Added :class:`aiogram.types.managed_bot_updated.ManagedBotUpdated` type - describes updates to a managed bot + - Added :class:`aiogram.types.prepared_keyboard_button.PreparedKeyboardButton` type - represents a prepared keyboard button for use in Mini Apps + + *New Fields:* + + - Added :code:`can_manage_bots` field to :class:`aiogram.types.user.User` - indicates whether the bot can manage other bots + - Added :code:`request_managed_bot` field to :class:`aiogram.types.keyboard_button.KeyboardButton` - requests the user to select a managed bot + - Added :code:`managed_bot_created` field to :class:`aiogram.types.message.Message` - service message about a managed bot being created (type: :class:`aiogram.types.managed_bot_created.ManagedBotCreated`) + - Added :code:`managed_bot` field to :class:`aiogram.types.update.Update` - contains updates received by a managed bot + + **Polls** + + *New Types:* + + - Added :class:`aiogram.types.poll_option_added.PollOptionAdded` type - describes a service message about a new option added to a poll + - Added :class:`aiogram.types.poll_option_deleted.PollOptionDeleted` type - describes a service message about a poll option being deleted + + *New Fields:* + + - Replaced :code:`correct_option_id` with :code:`correct_option_ids` in :class:`aiogram.types.poll.Poll` - supports multiple correct answers for quiz polls + - Added :code:`allows_revoting` field to :class:`aiogram.types.poll.Poll` - indicates whether users are allowed to change their vote + - Added :code:`description` and :code:`description_entities` fields to :class:`aiogram.types.poll.Poll` - optional poll description with formatting entities + - Added :code:`persistent_id` field to :class:`aiogram.types.poll_option.PollOption` - stable identifier for a poll option + - Added :code:`added_by_user` and :code:`added_by_chat` fields to :class:`aiogram.types.poll_option.PollOption` - identifies who added the option + - Added :code:`addition_date` field to :class:`aiogram.types.poll_option.PollOption` - date when the option was added + - Added :code:`option_persistent_ids` field to :class:`aiogram.types.poll_answer.PollAnswer` - persistent IDs of the chosen options + - Added :code:`poll_option_id` field to :class:`aiogram.types.reply_parameters.ReplyParameters` - allows replying to a specific poll option + - Added :code:`reply_to_poll_option_id` field to :class:`aiogram.types.message.Message` - the persistent ID of the poll option the message replies to + + *New Parameters for* :class:`aiogram.methods.send_poll.SendPoll`: + + - Replaced :code:`correct_option_id` with :code:`correct_option_ids` - supports multiple correct answers for quiz polls + - Added :code:`allows_revoting` - allows users to change their vote after submission + - Added :code:`shuffle_options` - randomizes the order of poll options for each user + - Added :code:`allow_adding_options` - allows users to add their own poll options + - Added :code:`hide_results_until_closes` - hides vote results until the poll is closed + - Added :code:`description`, :code:`description_parse_mode`, :code:`description_entities` - optional poll description with parse mode and formatting + `#1792 `_ + + +3.26.0 (2026-03-03) +==================== + +Bugfixes +-------- + +- Fixed scene transitions to preserve middleware-injected data when moving between scenes via ``SceneWizard.goto``. + `#1687 `_ +- Added ``icon_custom_emoji_id`` and ``style`` parameters to ``InlineKeyboardBuilder.button`` and ``ReplyKeyboardBuilder.button`` signatures. + `#1768 `_ +- Fixed Pydantic protected namespace warning for `model_custom_emoji_id` by adding `protected_namespaces=()` to `model_config`. + `#1772 `_ + + +Misc +---- + +- Documented webhook security constraints for proxy deployments, including trust requirements for :code:`X-Forwarded-For` and recommended defense-in-depth checks. + `#47 `_ +- Updated to `Bot API 9.5 `_ + + **New Methods:** + + - Added :class:`aiogram.methods.send_message_draft.SendMessageDraft` method - allowed for all bots to stream partial messages while they are being generated + - Added :class:`aiogram.methods.set_chat_member_tag.SetChatMemberTag` method - allows bots to set a custom tag for a chat member; available via :meth:`aiogram.types.chat.Chat.set_member_tag` shortcut + + **New Fields:** + + - Added :code:`date_time` type to :class:`aiogram.types.message_entity.MessageEntity` with :code:`unix_time` and :code:`date_time_format` fields - allows bots to display a formatted date and time to the user + - Added :code:`tag` field to :class:`aiogram.types.chat_member_member.ChatMemberMember` and :class:`aiogram.types.chat_member_restricted.ChatMemberRestricted` - the custom tag set for the chat member + - Added :code:`can_edit_tag` field to :class:`aiogram.types.chat_member_restricted.ChatMemberRestricted` and :class:`aiogram.types.chat_permissions.ChatPermissions` - indicates whether the user is allowed to edit their own tag + - Added :code:`can_manage_tags` field to :class:`aiogram.types.chat_member_administrator.ChatMemberAdministrator` and :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` - indicates whether the administrator can manage tags of other chat members + - Added :code:`can_manage_tags` parameter to :class:`aiogram.methods.promote_chat_member.PromoteChatMember` method + - Added :code:`sender_tag` field to :class:`aiogram.types.message.Message` - the tag of the message sender in the chat + `#1780 `_ + + +3.25.0 (2026-02-10) +==================== + +Features +-------- + +- Add full_name property to Contact and corresponding tests + `#1758 `_ +- Updated to `Bot API 9.4 (February 9, 2026) `_ + + **New Features:** + + - Bots with Premium subscriptions can now use custom emoji directly in messages to private, group, and supergroup chats + - Bots can create topics in private chats via the :class:`aiogram.methods.create_forum_topic.CreateForumTopic` method + - Bots can prevent users from creating/deleting topics in private chats through BotFather settings + + **New Fields:** + + - Added :code:`allows_users_to_create_topics` field to :class:`aiogram.types.user.User` class - indicates whether the user allows others to create topics in chats with them + - Added :code:`icon_custom_emoji_id` field to :class:`aiogram.types.keyboard_button.KeyboardButton` and :class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` classes - allows displaying custom emoji icons on buttons + - Added :code:`style` field to :class:`aiogram.types.keyboard_button.KeyboardButton` and :class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` classes - changes button color/style + - Added :code:`chat_owner_left` field to :class:`aiogram.types.message.Message` class - service message indicating chat owner has left (type: :class:`aiogram.types.chat_owner_left.ChatOwnerLeft`) + - Added :code:`chat_owner_changed` field to :class:`aiogram.types.message.Message` class - service message indicating chat ownership has transferred (type: :class:`aiogram.types.chat_owner_changed.ChatOwnerChanged`) + - Added :code:`qualities` field to :class:`aiogram.types.video.Video` class - list of available video quality options (type: :code:`list[`:class:`aiogram.types.video_quality.VideoQuality`:code:`]`) + - Added :code:`first_profile_audio` field to :class:`aiogram.types.chat_full_info.ChatFullInfo` class - user's first profile audio + - Added :code:`rarity` field to :class:`aiogram.types.unique_gift_model.UniqueGiftModel` class + - Added :code:`is_burned` field to :class:`aiogram.types.unique_gift.UniqueGift` class + + **New Methods:** + + - Added :class:`aiogram.methods.set_my_profile_photo.SetMyProfilePhoto` method - allows bots to set their profile photo + - Added :class:`aiogram.methods.remove_my_profile_photo.RemoveMyProfilePhoto` method - allows bots to remove their profile photo + - Added :class:`aiogram.methods.get_user_profile_audios.GetUserProfileAudios` method - retrieves a user's profile audio list + - Added :meth:`aiogram.types.user.User.get_profile_audios` shortcut - creates a prefilled :class:`aiogram.methods.get_user_profile_audios.GetUserProfileAudios` request with :code:`user_id` + + **New Types:** + + - Added :class:`aiogram.types.chat_owner_left.ChatOwnerLeft` type - describes a service message about the chat owner leaving the chat + - Added :class:`aiogram.types.chat_owner_changed.ChatOwnerChanged` type - describes a service message about an ownership change in the chat + - Added :class:`aiogram.types.video_quality.VideoQuality` type - describes available video quality options + - Added :class:`aiogram.types.user_profile_audios.UserProfileAudios` type - represents the collection of audios displayed on a user's profile + + `#1761 `_ + + +Bugfixes +-------- + +- Fixed scene handling for ``channel_post`` and ``edited_channel_post`` when Scenes are registered but FSM state is unavailable, and added channel-scoped FSM context support for ``CHAT``/``CHAT_TOPIC`` strategies. + `#1743 `_ + + +Misc +---- + +- Migrated from Black and isort to Ruff for code formatting and linting, a modern, blazingly fast formatter and linter written in Rust. + + Enabled additional ruff rule sets. + + **For end users:** + + No changes required. This is purely a development tooling change that doesn't affect the library API or behavior. + + **For contributors:** + + - Use ``make reformat`` or ``uv run ruff format`` to format code (replaces ``black`` and ``isort``) + - Use ``make lint`` to check code quality (now includes formatting, linting, and type checking) + - Pre-commit hooks automatically updated to use ``ruff`` and ``ruff-format`` + - CI/CD pipelines updated to use ruff in GitHub Actions workflows + + **Benefits:** + + - 10-100x faster formatting and linting compared to Black + isort + flake8 + - Single tool for formatting, import sorting, and linting + - More comprehensive code quality checks out of the box + - Auto-fixes for many common issues (33 issues auto-fixed during migration) + - Better integration with modern Python development workflows + + This change improves the developer experience and code quality while maintaining the same code style standards. + `#1750 `_ + + +3.24.0 (2026-01-02) +==================== + +Features +-------- + +- Added full support for Telegram Bot API 9.3 + + **Topics in Private Chats** + + Bot API 9.3 introduces forum topics functionality for private chats: + + - Added new ``sendMessageDraft`` method for streaming partial messages while being generated (requires forum topic mode enabled) + - Added ``has_topics_enabled`` field to the ``User`` class to determine if forum topic mode is enabled in private chats + - Added ``message_thread_id`` and ``is_topic_message`` fields to the ``Message`` class for private chat topic support + - Added ``message_thread_id`` parameter support to messaging methods: ``sendMessage``, ``sendPhoto``, ``sendVideo``, ``sendAnimation``, ``sendAudio``, ``sendDocument``, ``sendPaidMedia``, ``sendSticker``, ``sendVideoNote``, ``sendVoice``, ``sendLocation``, ``sendVenue``, ``sendContact``, ``sendPoll``, ``sendDice``, ``sendInvoice``, ``sendGame``, ``sendMediaGroup``, ``copyMessage``, ``copyMessages``, ``forwardMessage``, ``forwardMessages`` + - Updated ``sendChatAction`` to support ``message_thread_id`` parameter in private chats + - Updated ``editForumTopic``, ``deleteForumTopic``, ``unpinAllForumTopicMessages`` methods to manage private chat topics + - Added ``is_name_implicit`` field to ``ForumTopic`` class + + **Gifts System Enhancements** + + Enhanced gifts functionality with new methods and extended capabilities: + + - Added ``getUserGifts`` method to retrieve gifts owned and hosted by a user + - Added ``getChatGifts`` method to retrieve gifts owned by a chat + - Updated ``UniqueGiftInfo`` class: replaced ``last_resale_star_count`` with ``last_resale_currency`` and ``last_resale_amount`` fields, added "gifted_upgrade" and "offer" as origin values + - Updated ``getBusinessAccountGifts`` method: replaced ``exclude_limited`` parameter with ``exclude_limited_upgradable`` and ``exclude_limited_non_upgradable``, added ``exclude_from_blockchain`` parameter + - Added new fields to ``Gift`` class: ``personal_total_count``, ``personal_remaining_count``, ``is_premium``, ``has_colors``, ``unique_gift_variant_count``, ``gift_background`` + - Added new fields to ``UniqueGift`` class: ``gift_id``, ``is_from_blockchain``, ``is_premium``, ``colors`` + - Added new fields to gift info classes: ``is_upgrade_separate``, ``unique_gift_number`` + - Added ``gift_upgrade_sent`` field to the ``Message`` class + - Added ``gifts_from_channels`` field to the ``AcceptedGiftTypes`` class + - Added new ``UniqueGiftColors`` class for color schemes in user names and link previews + - Added new ``GiftBackground`` class for gift background styling + + **Business Accounts & Stories** + + - Added ``repostStory`` method to enable reposting stories across managed business accounts + + **Miscellaneous Updates** + + - Bots can now disable main usernames and set ``can_restrict_members`` rights in channels + - Maximum paid media price increased to 25000 Telegram Stars + - Added new ``UserRating`` class + - Added ``rating``, ``paid_message_star_count``, ``unique_gift_colors`` fields to the ``ChatFullInfo`` class + - Added support for ``message_effect_id`` parameter in forward/copy operations + - Added ``completed_by_chat`` field to the ``ChecklistTask`` class + `#1747 `_ + + +Bugfixes +-------- + +- Fixed I18n initialization with relative path + `#1740 `_ +- Fixed dependency injection for arguments that have "ForwardRef" annotations in Py3.14+ + since `inspect.getfullargspec(callback)` can't process callback if it's arguments have "ForwardRef" annotations + `#1741 `_ + + +Misc +---- + +- Migrated from ``hatch`` to ``uv`` for dependency management and development workflows. + + This change improves developer experience with significantly faster dependency resolution (10-100x faster than pip), automatic virtual environment management, and reproducible builds through lockfile support. + + **What changed for contributors:** + + - Install dependencies with ``uv sync --all-extras --group dev --group test`` instead of ``pip install -e .[dev,test,docs]`` + - Run commands with ``uv run`` prefix (e.g., ``uv run pytest``, ``uv run black``) + - All Makefile commands now use ``uv`` internally (``make install``, ``make test``, ``make lint``, etc.) + - Version bumping now uses a custom ``scripts/bump_version.py`` script instead of ``hatch version`` + + **What stayed the same:** + + - Build backend remains ``hatchling`` (no changes to package building) + - Dynamic version reading from ``aiogram/__meta__.py`` still works + - All GitHub Actions CI/CD workflows updated to use ``uv`` + - ReadTheDocs builds continue to work without changes + - Development dependencies (``dev``, ``test``) moved to ``[dependency-groups]`` section + - Documentation dependencies (``docs``) remain in ``[project.optional-dependencies]`` for compatibility + + Contributors can use either the traditional ``pip``/``venv`` workflow or the new ``uv`` workflow - both are documented in the contributing guide. + `#1748 `_ +- Updated type hints in the codebase to Python 3.10+ style unions and optionals. + `#1749 `_ + + +3.23.0 (2025-12-07) +==================== + +Features +-------- + +- This PR updates the codebase to support Python 3.14. + + - Updated project dep `aiohttp` + - Updated development deps + - Fixed tests to support Py3.14 + - Refactored `uvloop` using due to deprecation of `asyncio.set_event_loop_police` + `#1730 `_ + + +Deprecations and Removals +------------------------- + +- This PR updates the codebase following the end of life for Python 3.9. + + Reference: https://devguide.python.org/versions/ + + - Updated type annotations to Python 3.10+ style, replacing deprecated ``List``, ``Set``, etc., with built-in ``list``, ``set``, and related types. + - Refactored code by simplifying nested ``if`` expressions. + - Updated several dependencies, including security-related upgrades. + `#1726 `_ + + +Misc +---- + +- Updated pydantic to 2.12, which supports Python 3.14 + `#1729 `_ +- Temporary silents warn when `uvloop` uses deprecated `asyncio.iscoroutinefunction` function in py3.14+ in tests + `#1739 `_ + + +3.22.0 (2025-08-17) +==================== + +Features +-------- + +- Support validating init data using only bot id. + `#1715 `_ +- 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. + `#1720 `_ + + +Bugfixes +-------- + +- Use `hmac.compare_digest` for validating WebApp data to prevent timing attacks. + `#1709 `_ + + +Misc +---- + +- Migrated `MongoStorage` from relying on deprecated `motor` package to using new async `PyMongo`. To use mongo storage with new async `PyMongo`, you need to install the `PyMongo` package instead of `motor` and just substitute deprecated `MongoStorage` with `PyMongoStorage` class, no other action needed. + `#1705 `_ + + +3.21.0 (2025-07-05) +==================== + +Features +-------- + +- Refactor methods input types to calm down MyPy. #1682 + + `Dict[str, Any]` is replaced with `Mapping[str, Any]` in the following methods: + + - `FSMContext.set_data` + - `FSMContext.update_data` + - `BaseStorage.set_data` + - `BaseStorage.update_data` + - `BaseStorage's child methods` + - `SceneWizard.set_data` + - `SceneWizard.update_data` + `#1683 `_ +- Add support for `State` type in scenes methods like `goto`, `enter`, `get` + `#1685 `_ +- Added full support for the `Bot API 9.1 `_: + + **Checklists** + + - Added the class :class:`aiogram.types.checklist_task.ChecklistTask` representing a task in a checklist. + - Added the class :class:`aiogram.types.checklist.Checklist` representing a checklist. + - Added the class :class:`aiogram.types.input_checklist_task.InputChecklistTask` representing a task to add to a checklist. + - Added the class :class:`aiogram.types.input_checklist.InputChecklist` representing a checklist to create. + - Added the field :code:`checklist` to the classes :class:`aiogram.types.message.Message` and :class:`aiogram.types.external_reply_info.ExternalReplyInfo`, describing a checklist in a message. + - Added the class :class:`aiogram.types.checklist_tasks_done.ChecklistTasksDone` and the field :code:`checklist_tasks_done` to the class :class:`aiogram.types.message.Message`, describing a service message about status changes for tasks in a checklist (i.e., marked as done/not done). + - Added the class :class:`aiogram.types.checklist_tasks_added.ChecklistTasksAdded` and the field :code:`checklist_tasks_added` to the class :class:`aiogram.types.message.Message`, describing a service message about the addition of new tasks to a checklist. + - Added the method :class:`aiogram.methods.send_checklist.SendChecklist`, allowing bots to send a checklist on behalf of a business account. + - Added the method :class:`aiogram.methods.edit_message_checklist.EditMessageChecklist`, allowing bots to edit a checklist on behalf of a business account. + + **Gifts** + + - Added the field :code:`next_transfer_date` to the classes :class:`aiogram.types.owned_gift_unique.OwnedGiftUnique` and :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. + - Added the field :code:`last_resale_star_count` to the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. + - Added "resale" as the possible value of the field :code:`origin` in the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. + + **General** + + - Increased the maximum number of options in a poll to 12. + - Added the method :class:`aiogram.methods.get_my_star_balance.GetMyStarBalance`, allowing bots to get their current balance of Telegram Stars. + - Added the class :class:`aiogram.types.direct_message_price_changed.DirectMessagePriceChanged` and the field :code:`direct_message_price_changed` to the class :class:`aiogram.types.message.Message`, describing a service message about a price change for direct messages sent to the channel chat. + `#1704 `_ + + +Bugfixes +-------- + +- Fixed an issue where the scene entry handler (:code:`enter`) was not receiving data + passed to the context by middleware, which could result in a :code:`TypeError`. + + Also updated the documentation to clarify how to enter the scene. + `#1672 `_ +- Correctly pass error message in TelegramMigrateToChat. + `#1694 `_ + + +Improved Documentation +---------------------- + +- Added documentation for changing state of another user in FSM + `#1633 `_ + + +Misc +---- + +- Fixed MyPy [return-value] error in `InlineKeyboardBuilder().as_markup()`. + `as_markup` method now overloads parent class method and uses `super()`, to call parent's + `as_markup` method. + Also added correct type hint to `as_markup`'s return in `InlineKeyboardBuilder` and + `ReplyKeyboardBuilder` classes. + `#1677 `_ +- Changed Babel's pinned version from minor to major. + `#1681 `_ +- Increased max :code:`aiohttp` version support from “<3.12” to “<3.13” + `#1700 `_ + + +3.20.0 (2025-04-14) +==================== + +Features +-------- + +- Add different shortcut methods for ``aiogram.utils.formatting.Text.as_kwargs()`` + `#1657 `_ +- Added full support for the `Bot API 9.0 `_: + + **Business Accounts** + + - Added the class :class:`aiogram.types.business_bot_rights.BusinessBotRights` and replaced + the field :code:`can_reply` with the field :code:`rights` of the type + :class:`aiogram.types.business_bot_rights.BusinessBotRights` in the class + :class:`aiogram.types.business_connection.BusinessConnection`. + - Added the method :class:`aiogram.methods.read_business_message.ReadBusinessMessage`, + allowing bots to mark incoming messages as read on behalf of a business account. + - Added the method :class:`aiogram.methods.delete_business_messages.DeleteBusinessMessages`, + allowing bots to delete messages on behalf of a business account. + - Added the method :class:`aiogram.methods.set_business_account_name.SetBusinessAccountName`, + allowing bots to change the first and last name of a managed business account. + - Added the method :class:`aiogram.methods.set_business_account_username.SetBusinessAccountUsername`, + allowing bots to change the username of a managed business account. + - Added the method :class:`aiogram.methods.set_business_account_bio.SetBusinessAccountBio`, + allowing bots to change the bio of a managed business account. + - Added the class :class:`aiogram.types.input_profile_photo.InputProfilePhoto`, + describing a profile photo to be set. + - Added the methods :class:`aiogram.methods.set_business_account_profile_photo.SetBusinessAccountProfilePhoto` + and :class:`aiogram.methods.remove_business_account_profile_photo.RemoveBusinessAccountProfilePhoto`, + allowing bots to change the profile photo of a managed business account. + - Added the method :class:`aiogram.methods.set_business_account_gift_settings.SetBusinessAccountGiftSettings`, + allowing bots to change the privacy settings pertaining to incoming gifts in a managed business account. + - Added the class :class:`aiogram.types.star_amount.StarAmount` and the method + :class:`aiogram.methods.get_business_account_star_balance.GetBusinessAccountStarBalance`, + allowing bots to check the current Telegram Star balance of a managed business account. + - Added the method :class:`aiogram.methods.transfer_business_account_stars.TransferBusinessAccountStars`, + allowing bots to transfer Telegram Stars from the balance of a managed business account to their own balance + for withdrawal. + - Added the classes :class:`aiogram.types.owned_gift_regular.OwnedGiftRegular`, + :class:`aiogram.types.owned_gift_unique.OwnedGiftUnique`, :class:`aiogram.types.owned_gifts.OwnedGifts` + and the method :class:`aiogram.methods.get_business_account_gifts.GetBusinessAccountGifts`, + allowing bots to fetch the list of gifts owned by a managed business account. + - Added the method :class:`aiogram.methods.convert_gift_to_stars.ConvertGiftToStars`, + allowing bots to convert gifts received by a managed business account to Telegram Stars. + - Added the method :class:`aiogram.methods.upgrade_gift.UpgradeGift`, + allowing bots to upgrade regular gifts received by a managed business account to unique gifts. + - Added the method :class:`aiogram.methods.transfer_gift.TransferGift`, + allowing bots to transfer unique gifts owned by a managed business account. + - Added the classes :class:`aiogram.types.input_story_content_photo.InputStoryContentPhoto` + and :class:`aiogram.types.input_story_content_video.InputStoryContentVideo` + representing the content of a story to post. + - Added the classes :class:`aiogram.types.story_area.StoryArea`, + :class:`aiogram.types.story_area_position.StoryAreaPosition`, + :class:`aiogram.types.location_address.LocationAddress`, + :class:`aiogram.types.story_area_type_location.StoryAreaTypeLocation`, + :class:`aiogram.types.story_area_type_suggested_reaction.StoryAreaTypeSuggestedReaction`, + :class:`aiogram.types.story_area_type_link.StoryAreaTypeLink`, + :class:`aiogram.types.story_area_type_weather.StoryAreaTypeWeather` + and :class:`aiogram.types.story_area_type_unique_gift.StoryAreaTypeUniqueGift`, + describing clickable active areas on stories. + - Added the methods :class:`aiogram.methods.post_story.PostStory`, + :class:`aiogram.methods.edit_story.EditStory` + and :class:`aiogram.methods.delete_story.DeleteStory`, + allowing bots to post, edit and delete stories on behalf of a managed business account. + + **Mini Apps** + + - Added the field :code:`DeviceStorage`, allowing Mini Apps to use persistent + local storage on the user's device. + - Added the field :code:`SecureStorage`, allowing Mini Apps to use a secure local + storage on the user's device for sensitive data. + + **Gifts** + + - Added the classes :class:`aiogram.types.unique_gift_model.UniqueGiftModel`, + :class:`aiogram.types.unique_gift_symbol.UniqueGiftSymbol`, + :class:`aiogram.types.unique_gift_backdrop_colors.UniqueGiftBackdropColors`, + and :class:`aiogram.types.unique_gift_backdrop.UniqueGiftBackdrop` + to describe the properties of a unique gift. + - Added the class :class:`aiogram.types.unique_gift.UniqueGift` describing + a gift that was upgraded to a unique one. + - Added the class :class:`aiogram.types.accepted_gift_types.AcceptedGiftTypes` + describing the types of gifts that are accepted by a user or a chat. + - Replaced the field :code:`can_send_gift` with the field :code:`accepted_gift_types` + of the type :class:`aiogram.types.accepted_gift_types.AcceptedGiftTypes` + in the class :class:`aiogram.types.chat_full_info.ChatFullInfo`. + - Added the class :class:`aiogram.types.gift_info.GiftInfo` and the field :code:`gift` + to the class :class:`aiogram.types.message.Message`, + describing a service message about a regular gift that was sent or received. + - Added the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo` + and the field :code:`unique_gift` to the class :class:`aiogram.types.message.Message`, + describing a service message about a unique gift that was sent or received. + + **Telegram Premium** + + - Added the method :class:`aiogram.methods.gift_premium_subscription.GiftPremiumSubscription`, + allowing bots to gift a user a Telegram Premium subscription paid in Telegram Stars. + - Added the field :code:`premium_subscription_duration` to the class + :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser` + for transactions involving a Telegram Premium subscription purchased by the bot. + - Added the field :code:`transaction_type` to the class + :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`, + simplifying the differentiation and processing of all transaction types. + + **General** + + - Increased the maximum price for paid media to 10000 Telegram Stars. + - Increased the maximum price for a subscription period to 10000 Telegram Stars. + - Added the class :class:`aiogram.types.paid_message_price_changed.PaidMessagePriceChanged` + and the field :code:`paid_message_price_changed` to the class + :class:`aiogram.types.message.Message`, describing a service message about a price change + for paid messages sent to the chat. + - Added the field :code:`paid_star_count` to the class :class:`aiogram.types.message.Message`, + containing the number of Telegram Stars that were paid to send the message. + `#1671 `_ + + +Bugfixes +-------- + +- Fix memory exhaustion in polling mode with concurrent updates. + + Added a semaphore-based solution to limit the number of concurrent tasks when using :code:`handle_as_tasks=True` in polling mode. + This prevents Out of Memory (OOM) errors in memory-limited containers when there's a large queue of updates to process. + You can now control the maximum number of concurrent updates with the new :code:`tasks_concurrency_limit` + parameter in :code:`start_polling()` and :code:`run_polling()` methods. + `#1658 `_ +- Fix empty response into webhook. + + We need to return something “empty”, and “empty” form doesn’t work since + it’s sending only “end” boundary w/o “start”. + + An empty formdata should look smth like this for Telegram to understand: + + :: + + --webhookBoundaryvsF_aMHhspPjfOq7O0JNRg + --webhookBoundaryvsF_aMHhspPjfOq7O0JNRg-- + + But aiohttp sends only the ending boundary: + + :: + + --webhookBoundaryvsF_aMHhspPjfOq7O0JNRg-- + + Such response doesn't suit Telegram servers. + + The fix replaces empty response with empty JSON response: + + :: + + {} + `#1664 `_ + + +Improved Documentation +---------------------- + +- Fixed broken code block formatting in ``router.rst`` caused by incorrect indentation of directive options. + `#1666 `_ + + +Misc +---- + +- Bump pydantic upper bound from <2.11 to <2.12. + Upgrading `pydantic` to version 2.11 significantly reduces resource consumption, more details on the `pydantic blog post `_ + `#1659 `_ +- Replaced ```loop.run_in_executor``` with ```asyncio.to_thread``` for improved readability and consistency. + `#1661 `_ + + +3.19.0 (2025-03-19) +==================== + +Features +-------- + +- Added TypedDict definitions for middleware context data to the dispatcher dependency injection docs. + + So, now you can use :class:`aiogram.dispatcher.middleware.data.MiddlewareData` directly or + extend it with your own data in the middlewares. + `#1637 `_ +- Added new method :func:`aiogram.utils.deep_linking.create_startapp_link` to deep-linking module + for creating "startapp" deep links. + See also https://core.telegram.org/api/links#main-mini-app-links and https://core.telegram.org/api/links#direct-mini-app-links + `#1648 `_, `#1651 `_ + + +Bugfixes +-------- + +- Fixed handling of default empty string ("") in CallbackData filter + `#1493 `_ +- Resolved incorrect ordering of registered handlers in the :class:`aiogram.fsm.scene.Scene` + object caused by :code:`inspect.getmembers` returning sorted members. + Handlers are now registered in the order of their definition within the class, + ensuring proper execution sequence, especially when handling filters with different + levels of specificity. + + For backward compatibility, the old behavior can be restored by setting the + :code:`attrs_resolver=inspect_members_resolver` parameter in the :class:`aiogram.fsm.scene.Scene`: + + .. code-block:: python + + from aiogram.utils.class_attrs_resolver import inspect_members_resolver + + + class MyScene(Scene, attrs_resolver=inspect_members_resolver): + + In this case, the handlers will be registered in the order returned by :code:`inspect.getmembers`. + + By default, the :code:`attrs_resolver` parameter is set to :code:`get_sorted_mro_attrs_resolver` now, + so you **don't need** to specify it explicitly. + `#1641 `_ + + +Improved Documentation +---------------------- + +- Updated 🇺🇦Ukrainian docs translation + `#1650 `_ + + +Misc +---- + +- Introduce Union types for streamlined type handling. + + Implemented Union types across various modules to consolidate and simplify type annotations. + This change replaces repetitive union declarations with reusable Union aliases, + improving code readability and maintainability. + `#1592 `_ + + +3.18.0 (2025-02-16) +==================== + +Features +-------- + +- Added full support for the `Bot API 8.3 `_: + + - Added the parameter :code:`chat_id` to the method :class:`aiogram.methods.send_gift.SendGift`, allowing bots to send gifts to channel chats. + - Added the field :code:`can_send_gift` to the class :class:`aiogram.types.chat_full_info.ChatFullInfo`. + - Added the class :class:`aiogram.types.transaction_partner_chat.TransactionPartnerChat` describing transactions with chats. + - Added the fields :code:`cover` and :code:`start_timestamp` to the class :class:`aiogram.types.video.Video`, containing a message-specific cover and a start timestamp for the video. + - Added the parameters :code:`cover` and :code:`start_timestamp` to the method :class:`aiogram.methods.send_video.SendVideo`, allowing bots to specify a cover and a start timestamp for the videos they send. + - Added the fields :code:`cover` and :code:`start_timestamp` to the classes :class:`aiogram.types.input_media_video.InputMediaVideo` and :class:`aiogram.types.input_paid_media_video.InputPaidMediaVideo`, allowing bots to edit video covers and start timestamps, and specify them for videos in albums and paid media. + - Added the parameter :code:`video_start_timestamp` to the methods :class:`aiogram.methods.forward_message.ForwardMessage` and :class:`aiogram.methods.copy_message.CopyMessage`, allowing bots to change the start timestamp for forwarded and copied videos. + - Allowed adding reactions to most types of service messages. + `#1638 `_ + + +Bugfixes +-------- + +- Fixed endless loop while adding buttons to the :code:`KeyboardBuilder`. + `#1595 `_ +- Change the :code:`Downloadable` protocol to be non-writable to shut up type checking that checks code that uses the :code:`bot.download(...)` method + `#1628 `_ +- Fix the regex pattern that finds the "bad characters" for deeplink payload. + `#1630 `_ + + +Improved Documentation +---------------------- + +- Update :code:`data: Dict[Any, str]` to :code:`data: Dict[str, Any]` + `#1634 `_ +- Fix small typo in the Scenes documentation + `#1640 `_ + +Misc +---- + +- Removed redundant :code:`Path` to :code:`str` convertion on file download. + `#1612 `_ +- Increased max :code:`redis` version support from “<5.1.0” to “<5.3.0” + `#1631 `_ + + +3.17.0 (2025-01-02) +==================== + +Features +-------- + +- Added full support of the `Bot API 8.2 `_ + + - Added the methods :class:`aiogram.methods.verify_user.VerifyUser`, :class:`aiogram.methods.verify_chat.VerifyChat`, :class:`aiogram.methods.remove_user_verification.RemoveUserVerification` and :class:`aiogram.methods.remove_chat_verification.RemoveChatVerification`, allowing bots to manage verifications on behalf of an organization. + - Added the field :code:`upgrade_star_count` to the class :class:`aiogram.types.gift.Gift`. + - Added the parameter :code:`pay_for_upgrade` to the method :class:`aiogram.methods.send_gift.SendGift`. + - Removed the field :code:`hide_url` from the class :class:`aiogram.types.inline_query_result_article.InlineQueryResultArticle`. Pass an empty string as :code:`url` instead. + `#1623 `_ + + +3.16.0 (2024-12-21) +==================== + +Features +-------- + +- Added full support of `Bot API 8.1 `_: + + - Added the field :code:`nanostar_amount` to the class :class:`aiogram.types.star_transaction.StarTransaction`. + - Added the class :class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram` for transactions pertaining to incoming affiliate commissions. + - Added the class :class:`aiogram.types.affiliate_info.AffiliateInfo` and the field :code:`affiliate` to the class :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`, allowing bots to identify the relevant affiliate in transactions with an affiliate commission. + `#1617 `_ + + +Bugfixes +-------- + +- Corrected the exception text of `aiogram.methods.base.TelegramMethod.__await__` method. + `#1616 `_ + + +Misc +---- + +- Increased max :code:`pydantic` version support from “<2.10” to “<2.11” + `#1607 `_ +- Fixed closing tag for :code:`tg-emoji` in the :class:`aiogram.utils.text_decoration.HtmlDecoration`: use the same constant as for tag opening + `#1608 `_ +- Increased max :code:`aiohttp` version support from “<3.11” to “<3.12” + `#1615 `_ + + +3.15.0 (2024-11-17) +==================== + +Features +-------- + +- Added full support for `Bot API 8.0 `_ + + - Added the parameter :code:`subscription_period` to the method + :class:`aiogram.methods.create_invoice_link.CreateInvoiceLink` + to support the creation of links that are billed periodically. + - Added the parameter :code:`business_connection_id` to the method + :class:`aiogram.methods.create_invoice_link.CreateInvoiceLink` + to support the creation of invoice links on behalf of business accounts. + - Added the fields :code:`subscription_expiration_date`, + :code:`is_recurring` and :code:`is_first_recurring` to the class + :class:`aiogram.types.successful_payment.SuccessfulPayment`. + - Added the method :class:`aiogram.methods.edit_user_star_subscription.EditUserStarSubscription`. + - Added the field :code:`subscription_period` to the class + :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`. + - Added the method :class:`aiogram.methods.set_user_emoji_status.SetUserEmojiStatus`. + The user must allow the bot to manage their emoji status. + - Added the class :class:`aiogram.types.prepared_inline_message.PreparedInlineMessage` + and the method :class:`aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage`, + allowing bots to suggest users send a specific message from a Mini App via the method + :class:`aiogram.methods.share_message.ShareMessage`. + - Added the classes :class:`aiogram.types.gift.Gift` and :class:`aiogram.types.gifts.Gifts` + and the method :class:`aiogram.methods.get_available_gifts.GetAvailableGifts`, + allowing bots to get all gifts available for sending. + - Added the field :code:`gift` to the class + :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`. + `#1606 `_ + + +3.14.0 (2024-11-02) +==================== + +Misc +---- + +- Checked compatibility with Python 3.13 (added to the CI/CD processes), + so now aiogram is totally compatible with it. + + Dropped compatibility with Python 3.8 due to this version being `EOL `_. + + .. warning:: + + In some cases you will need to have the installed compiler (Rust or C++) + to install some of the dependencies to compile packages from source on `pip install` command. + + - If you are using Windows, you will need to have the `Visual Studio `_ installed. + - If you are using Linux, you will need to have the `build-essential` package installed. + - If you are using macOS, you will need to have the `Xcode `_ installed. + + When developers of this dependencies will release new versions with precompiled wheels for Windows, Linux and macOS, + this action will not be necessary anymore until the next version of the Python interpreter. + `#1589 `_ +- Added business_connection_id to the :class:`aiogram.types.message.Message` API methods shortcuts. + + Integrated the :code:`business_connection_id` attribute into various message manipulation methods, + ensuring consistent data handling. This update eliminates the need to pass the + :code:`business_connection_id` as a parameter, + instead directly accessing it from the instance attributes. + `#1586 `_ + +Features +-------- + +- Add function ``get_value`` to all built-in storage implementations, ``FSMContext`` and ``SceneWizard`` + `#1431 `_ +- Enhanced the inheritance of handlers and actions in :ref:`Scenes `. + Refactored to eliminate the copying of previously connected handlers and actions from parent scenes. + Now, handlers are dynamically rebuilt based on the current class, properly utilizing class inheritance and enabling handler overrides. + + That's mean that you can now override handlers and actions in the child scene, instead of copying and duplicating them. + `#1583 `_ +- Added full support of `Bot API 7.11 `_ + + - Added the class :class:`aiogram.types.copy_text_button.CopyTextButton` + and the field :code:`copy_text` in the class + :class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton`, + allowing bots to send and receive inline buttons that copy arbitrary text. + - Added the parameter :code:`allow_paid_broadcast` to the methods + :class:`aiogram.methods.send_message.SendMessage`, + :class:`aiogram.methods.send_photo.SendPhoto`, + :class:`aiogram.methods.send_video.SendVideo`, + :class:`aiogram.methods.send_animation.SendAnimation`, + :class:`aiogram.methods.send_audio.SendAudio`, + :class:`aiogram.methods.send_document.SendDocument`, + :class:`aiogram.methods.send_paid_media.SendPaidMedia`, + :class:`aiogram.methods.send_sticker.SendSticker`, + :class:`aiogram.methods.send_video_note.SendVideoNote`, + :class:`aiogram.methods.send_voice.SendVoice`, + :class:`aiogram.methods.send_location.SendLocation`, + :class:`aiogram.methods.send_venue.SendVenue`, + :class:`aiogram.methods.send_contact.SendContact`, + :class:`aiogram.methods.send_poll.SendPoll`, + :class:`aiogram.methods.send_dice.SendDice`, + :class:`aiogram.methods.send_invoice.SendInvoice`, + :class:`aiogram.methods.send_game.SendGame`, + :class:`aiogram.methods.send_media_group.SendMediaGroup` + and :class:`aiogram.methods.copy_message.CopyMessage`. + - Added the class + :class:`aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi` + for transactions related to paid broadcasted messages. + - Introduced the ability to add media to existing text messages using the method + :class:`aiogram.methods.edit_message_media.EditMessageMedia`. + - Added support for hashtag and cashtag entities with a specified chat username + that opens a search for the relevant tag within the specified chat. + `#1601 `_ + + +Bugfixes +-------- + +- Fix PytestDeprecationWarning thrown by pytest-asyncio when running the tests + `#1584 `_ +- Fixed customized serialization in the :class:`aiogram.filters.callback_data.CallbackData` factory. + + From now UUID will have 32 bytes length instead of 36 bytes (with no `-` separators) in the callback data representation. + `#1602 `_ + + +Improved Documentation +---------------------- + +- Add missing closing tag for bold. + `#1599 `_ + + +3.13.1 (2024-09-18) +==================== + +.. warning:: + + **Python 3.8 End of Life**: Python 3.8 will reach its end of life (EOL) soon and will no longer + be supported by aiogram in the next releases (1-2 months ETA). + + Please upgrade to a newer version of Python to ensure compatibility and receive future updates. + +Misc +---- + +- Increase max pydantic version support "<2.9" -> "<2.10" (only For Python >=3.9) + `#1576 `_ +- Bump aiofiles version upper bound to <24.2 + `#1577 `_ + + +Bugfixes +-------- + +- Fixed `Default` object annotation resolution using `pydantic` + `#1579 `_ + + +3.13.0 (2024-09-08) +==================== + +Features +-------- + +- - Added updates about purchased paid media, represented by the class + :class:`aiogram.types.paid_media_purchased.PaidMediaPurchased` + and the field :code:`purchased_paid_media` in the class + :class:`aiogram.types.update.Update`. + - Added the ability to specify a payload in + :class:`aiogram.methods.send_paid_media.SendPaidMedia` that is received back by the bot in + :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser` + and :code:`purchased_paid_media` updates. + - Added the field :code:`prize_star_count` to the classes + :class:`aiogram.types.giveaway_created.GiveawayCreated`, + :class:`aiogram.types.giveaway.Giveaway`, + :class:`aiogram.types.giveaway_winners.GiveawayWinners` + and :class:`aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway`. + - Added the field :code:`is_star_giveaway` to the class + :class:`aiogram.types.giveaway_completed.GiveawayCompleted`. + `#1510 `_ +- Added missing method aliases such as `.answer()`, `.reply()`, and others to `InaccessibleMessage`. + This change ensures consistency and improves usability by aligning the functionality of `InaccessibleMessage` with the `Message` type. + `#1574 `_ + + +Bugfixes +-------- + +- Fixed link preview options to use global defaults in various types and methods + to use global defaults for `link_preview_options`. + This change ensures consistency and enhances flexibility in handling link preview options + across different components. + `#1543 `_ + + +3.12.0 (2024-08-16) +==================== + +Features +-------- + +- Added **message_thread_id** parameter to **message.get_url()**. + `#1451 `_ +- Added getting user from `chat_boost` with source `ChatBoostSourcePremium` in `UserContextMiddleware` for `EventContext` + `#1474 `_ +- Added full support of `Bot API 7.8 `_ + + - Added the ability to send paid media to any chat. + - Added the parameter :code:`business_connection_id` to the method + :class:`aiogram.methods.send_paid_media.SendPaidMedia`, + allowing bots to send paid media on behalf of a business account. + - Added the field :code:`paid_media` to the class + :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser` + for transactions involving paid media. + - Added the method + :class:`aiogram.methods.create_chat_subscription_invite_link.CreateChatSubscriptionInviteLink`, + allowing bots to create subscription invite links. + - Added the method + :class:`aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink`, + allowing bots to edit the name of subscription invite links. + - Added the field :code:`until_date` to the class + :class:`aiogram.types.chat_member_member.ChatMemberMember` for members with an active subscription. + - Added support for paid reactions and the class + :class:`aiogram.types.reaction_type_paid.ReactionTypePaid`. + `#1560 `_ + + +Misc +---- + +- Improved performance of StatesGroup + `#1507 `_ + + +3.11.0 (2024-08-09) +==================== + +Features +-------- + +- Added full support of `Bot API 7.8 `_ + + - Added the field :code:`has_main_web_app` to the class :class:`aiogram.types.user.User`, + which is returned in the response to :class:`aiogram.methods.get_me.GetMe`. + - Added the parameter :code:`business_connection_id` to the methods + :class:`aiogram.methods.pin_chat_message.PinChatMessage` + and :class:`aiogram.methods.unpin_chat_message.UnpinChatMessage`, + allowing bots to manage pinned messages on behalf of a business account. + `#1551 `_ + + +Bugfixes +-------- + +- Fixed URL path in the "Open" button at the "demo/sendMessage" endpoint in the web_app example. + `#1546 `_ + + +Misc +---- + +- Added method :func:`aiogram.types.message.Message.as_reply_parameters`. + Replaced usage of the argument :code:`reply_to_message_id` with :code:`reply_parameters` + in all Message reply methods. + `#1538 `_ +- Added `aiohttp v3.10 `_ ` support. + `#1548 `_ + + +3.10.0 (2024-07-07) +==================== + +Features +-------- + +- Added full support of `Bot API 7.7 `_ + + - Added the class :class:`aiogram.types.refunded_payment.RefundedPayment`, + containing information about a refunded payment. + - Added the field :code:`refunded_payment` to the class + :class:`aiogram.types.message.Message`, + describing a service message about a refunded payment. + `#1536 `_ + + 3.9.0 (2024-07-06) =================== @@ -24,7 +1107,7 @@ Features - Added ChatMember resolution tool and updated 2.x migration guide. `#1525 `_ -- Added full support of `Bot API 7.6 `_ +- Added full support of `Bot API 7.6 `_ - Added the classes :class:`aiogram.types.paid_media.PaidMedia`, :class:`aiogram.types.paid_media_info.PaidMediaInfo`, diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..a97d7a44 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,3 @@ +# CLAUDE.md + +Use @AGENTS.md as the source of truth for contribution workflow, checks, and Bot API codegen rules in this repository. diff --git a/Makefile b/Makefile index 41eaba49..a92db1f8 100644 --- a/Makefile +++ b/Makefile @@ -28,8 +28,8 @@ clean: .PHONY: install install: clean - pip install -e ."[dev,test,docs]" -U --upgrade-strategy=eager - pre-commit install + uv sync --all-extras --group dev --group test + uv run pre-commit install # ================================================================================================= # Code quality @@ -37,15 +37,14 @@ install: clean .PHONY: lint lint: - isort --check-only $(code_dir) - black --check --diff $(code_dir) - ruff check $(package_dir) $(examples_dir) - mypy $(package_dir) + uv run ruff format --check --diff $(package_dir) + uv run ruff check --show-fixes --preview $(package_dir) $(examples_dir) + uv run mypy $(package_dir) .PHONY: reformat reformat: - black $(code_dir) - isort $(code_dir) + uv run ruff format $(code_dir) + uv run ruff check --fix $(code_dir) # ================================================================================================= # Tests @@ -56,18 +55,18 @@ test-run-services: .PHONY: test test: test-run-services - pytest --cov=aiogram --cov-config .coveragerc tests/ --redis $(redis_connection) --mongo $(mongo_connection) + uv run pytest --cov=aiogram --cov-config .coveragerc tests/ --redis $(redis_connection) --mongo $(mongo_connection) .PHONY: test-coverage test-coverage: test-run-services mkdir -p $(reports_dir)/tests/ - pytest --cov=aiogram --cov-config .coveragerc --html=$(reports_dir)/tests/index.html tests/ --redis $(redis_connection) --mongo $(mongo_connection) - coverage html -d $(reports_dir)/coverage + uv run pytest --cov=aiogram --cov-config .coveragerc --html=$(reports_dir)/tests/index.html tests/ --redis $(redis_connection) --mongo $(mongo_connection) + uv run coverage html -d $(reports_dir)/coverage .PHONY: test-coverage-view test-coverage-view: - coverage html -d $(reports_dir)/coverage - python -c "import webbrowser; webbrowser.open('file://$(shell pwd)/reports/coverage/index.html')" + uv run coverage html -d $(reports_dir)/coverage + uv run python -c "import webbrowser; webbrowser.open('file://$(shell pwd)/reports/coverage/index.html')" # ================================================================================================= # Docs @@ -79,12 +78,12 @@ locales_pot := _build/gettext docs_dir := docs docs-gettext: - hatch run docs:bash -c 'cd $(docs_dir) && make gettext' - hatch run docs:bash -c 'cd $(docs_dir) && sphinx-intl update -p $(locales_pot) $(addprefix -l , $(locales))' + uv run --extra docs bash -c 'cd $(docs_dir) && make gettext' + uv run --extra docs bash -c 'cd $(docs_dir) && sphinx-intl update -p $(locales_pot) $(addprefix -l , $(locales))' .PHONY: docs-gettext docs-serve: - hatch run docs:sphinx-autobuild --watch aiogram/ --watch CHANGELOG.rst --watch README.rst docs/ docs/_build/ $(OPTS) + uv run --extra docs sphinx-autobuild --watch aiogram/ --watch CHANGES.rst --watch README.rst docs/ docs/_build/ $(OPTS) .PHONY: docs-serve $(locale_targets): docs-serve-%: @@ -97,25 +96,31 @@ $(locale_targets): docs-serve-%: .PHONY: build build: clean - hatch build + uv build .PHONY: bump bump: - hatch version $(args) - python scripts/bump_versions.py + uv run python scripts/bump_version.py $(args) + uv run python scripts/bump_versions.py + +update-api: + uv run --extra cli butcher parse + uv run --extra cli butcher refresh + uv run --extra cli butcher apply all + @$(MAKE) bump .PHONY: towncrier-build towncrier-build: - hatch run docs:towncrier build --yes + uv run --extra docs towncrier build --yes .PHONY: towncrier-draft towncrier-draft: - towncrier build --draft + uv run --extra docs towncrier build --draft .PHONY: towncrier-draft-github towncrier-draft-github: mkdir -p dist - towncrier build --draft | pandoc - -o dist/release.md + uv run --extra docs towncrier build --draft | pandoc - -o dist/release.md .PHONY: prepare-release prepare-release: bump towncrier-build @@ -123,5 +128,5 @@ prepare-release: bump towncrier-build .PHONY: release release: git add . - git commit -m "Release $(shell poetry version -s)" - git tag v$(shell hatch version -s) + git commit -m "Release $(shell uv run python -c 'from aiogram import __version__; print(__version__)')" + git tag v$(shell uv run python -c 'from aiogram import __version__; print(__version__)') diff --git a/README.rst b/README.rst index 71c9e92a..94c8da9f 100644 --- a/README.rst +++ b/README.rst @@ -35,7 +35,7 @@ aiogram :alt: Codecov **aiogram** is a modern and fully asynchronous framework for -`Telegram Bot API `_ written in Python 3.8+ using +`Telegram Bot API `_ written in Python 3.10+ using `asyncio `_ and `aiohttp `_. @@ -52,7 +52,7 @@ Features - Asynchronous (`asyncio docs `_, :pep:`492`) - Has type hints (:pep:`484`) and can be used with `mypy `_ - Supports `PyPy `_ -- Supports `Telegram Bot API 7.6 `_ and gets fast updates to the latest versions of the Bot API +- Supports `Telegram Bot API 9.6 `_ and gets fast updates to the latest versions of the Bot API - Telegram Bot API integration code was `autogenerated `_ and can be easily re-generated when API gets updated - Updates router (Blueprints) - Has Finite State Machine diff --git a/aiogram/__init__.py b/aiogram/__init__.py index 1fbee0ec..e38c03b1 100644 --- a/aiogram/__init__.py +++ b/aiogram/__init__.py @@ -1,6 +1,3 @@ -import asyncio as _asyncio -from contextlib import suppress - from aiogram.dispatcher.flags import FlagGenerator from . import enums, methods, types @@ -14,28 +11,22 @@ from .utils.magic_filter import MagicFilter from .utils.text_decorations import html_decoration as html from .utils.text_decorations import markdown_decoration as md -with suppress(ImportError): - import uvloop as _uvloop - - _asyncio.set_event_loop_policy(_uvloop.EventLoopPolicy()) - - F = MagicFilter() flags = FlagGenerator() __all__ = ( + "BaseMiddleware", + "Bot", + "Dispatcher", + "F", + "Router", "__api_version__", "__version__", - "types", - "methods", "enums", - "Bot", - "session", - "Dispatcher", - "Router", - "BaseMiddleware", - "F", + "flags", "html", "md", - "flags", + "methods", + "session", + "types", ) diff --git a/aiogram/__meta__.py b/aiogram/__meta__.py index 2463588f..f60aa330 100644 --- a/aiogram/__meta__.py +++ b/aiogram/__meta__.py @@ -1,2 +1,2 @@ -__version__ = "3.9.0" -__api_version__ = "7.6" +__version__ = "3.27.0" +__api_version__ = "9.6" diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index 0981bbf5..e85c1367 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -1,20 +1,14 @@ from __future__ import annotations -import datetime import io import pathlib +from collections.abc import AsyncGenerator, AsyncIterator from contextlib import asynccontextmanager from types import TracebackType from typing import ( Any, - AsyncGenerator, - AsyncIterator, BinaryIO, - List, - Optional, - Type, TypeVar, - Union, cast, ) @@ -30,18 +24,23 @@ from ..methods import ( AnswerShippingQuery, AnswerWebAppQuery, ApproveChatJoinRequest, + ApproveSuggestedPost, BanChatMember, BanChatSenderChat, Close, CloseForumTopic, CloseGeneralForumTopic, + ConvertGiftToStars, CopyMessage, CopyMessages, CreateChatInviteLink, + CreateChatSubscriptionInviteLink, CreateForumTopic, CreateInvoiceLink, CreateNewStickerSet, DeclineChatJoinRequest, + DeclineSuggestedPost, + DeleteBusinessMessages, DeleteChatPhoto, DeleteChatStickerSet, DeleteForumTopic, @@ -50,21 +49,30 @@ from ..methods import ( DeleteMyCommands, DeleteStickerFromSet, DeleteStickerSet, + DeleteStory, DeleteWebhook, EditChatInviteLink, + EditChatSubscriptionInviteLink, EditForumTopic, EditGeneralForumTopic, EditMessageCaption, + EditMessageChecklist, EditMessageLiveLocation, EditMessageMedia, EditMessageReplyMarkup, EditMessageText, + EditStory, + EditUserStarSubscription, ExportChatInviteLink, ForwardMessage, ForwardMessages, + GetAvailableGifts, + GetBusinessAccountGifts, + GetBusinessAccountStarBalance, GetBusinessConnection, GetChat, GetChatAdministrators, + GetChatGifts, GetChatMember, GetChatMemberCount, GetChatMenuButton, @@ -72,40 +80,58 @@ from ..methods import ( GetFile, GetForumTopicIconStickers, GetGameHighScores, + GetManagedBotToken, GetMe, GetMyCommands, GetMyDefaultAdministratorRights, GetMyDescription, GetMyName, GetMyShortDescription, + GetMyStarBalance, GetStarTransactions, GetStickerSet, GetUpdates, GetUserChatBoosts, + GetUserGifts, + GetUserProfileAudios, GetUserProfilePhotos, GetWebhookInfo, + GiftPremiumSubscription, HideGeneralForumTopic, LeaveChat, LogOut, PinChatMessage, + PostStory, PromoteChatMember, + ReadBusinessMessage, RefundStarPayment, + RemoveBusinessAccountProfilePhoto, + RemoveChatVerification, + RemoveMyProfilePhoto, + RemoveUserVerification, ReopenForumTopic, ReopenGeneralForumTopic, + ReplaceManagedBotToken, ReplaceStickerInSet, + RepostStory, RestrictChatMember, RevokeChatInviteLink, + SavePreparedInlineMessage, + SavePreparedKeyboardButton, SendAnimation, SendAudio, SendChatAction, + SendChecklist, SendContact, SendDice, SendDocument, SendGame, + SendGift, SendInvoice, SendLocation, SendMediaGroup, SendMessage, + SendMessageDraft, SendPaidMedia, SendPhoto, SendPoll, @@ -114,8 +140,14 @@ from ..methods import ( SendVideo, SendVideoNote, SendVoice, + SetBusinessAccountBio, + SetBusinessAccountGiftSettings, + SetBusinessAccountName, + SetBusinessAccountProfilePhoto, + SetBusinessAccountUsername, SetChatAdministratorCustomTitle, SetChatDescription, + SetChatMemberTag, SetChatMenuButton, SetChatPermissions, SetChatPhoto, @@ -128,6 +160,7 @@ from ..methods import ( SetMyDefaultAdministratorRights, SetMyDescription, SetMyName, + SetMyProfilePhoto, SetMyShortDescription, SetPassportDataErrors, SetStickerEmojiList, @@ -136,10 +169,13 @@ from ..methods import ( SetStickerPositionInSet, SetStickerSetThumbnail, SetStickerSetTitle, + SetUserEmojiStatus, SetWebhook, StopMessageLiveLocation, StopPoll, TelegramMethod, + TransferBusinessAccountStars, + TransferGift, UnbanChatMember, UnbanChatSenderChat, UnhideGeneralForumTopic, @@ -147,100 +183,74 @@ from ..methods import ( UnpinAllForumTopicMessages, UnpinAllGeneralForumTopicMessages, UnpinChatMessage, + UpgradeGift, UploadStickerFile, + VerifyChat, + VerifyUser, ) from ..types import ( + AcceptedGiftTypes, BotCommand, - BotCommandScopeAllChatAdministrators, - BotCommandScopeAllGroupChats, - BotCommandScopeAllPrivateChats, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - BotCommandScopeDefault, + BotCommandScopeUnion, BotDescription, BotName, BotShortDescription, BusinessConnection, ChatAdministratorRights, ChatFullInfo, + ChatIdUnion, ChatInviteLink, - ChatMemberAdministrator, - ChatMemberBanned, - ChatMemberLeft, - ChatMemberMember, - ChatMemberOwner, - ChatMemberRestricted, ChatPermissions, + DateTimeUnion, Downloadable, File, - ForceReply, ForumTopic, GameHighScore, + Gifts, InlineKeyboardMarkup, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultContact, - InlineQueryResultDocument, - InlineQueryResultGame, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, InlineQueryResultsButton, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, + InlineQueryResultUnion, + InputChecklist, InputFile, - InputMediaAnimation, - InputMediaAudio, - InputMediaDocument, - InputMediaPhoto, - InputMediaVideo, - InputPaidMediaPhoto, - InputPaidMediaVideo, - InputPollOption, + InputFileUnion, + InputMediaUnion, + InputPaidMediaUnion, + InputPollOptionUnion, + InputProfilePhotoUnion, InputSticker, + InputStoryContentUnion, + KeyboardButton, LabeledPrice, LinkPreviewOptions, MaskPosition, - MenuButtonCommands, - MenuButtonDefault, - MenuButtonWebApp, + MediaUnion, + MenuButtonUnion, Message, MessageEntity, MessageId, - PassportElementErrorDataField, - PassportElementErrorFile, - PassportElementErrorFiles, - PassportElementErrorFrontSide, - PassportElementErrorReverseSide, - PassportElementErrorSelfie, - PassportElementErrorTranslationFile, - PassportElementErrorTranslationFiles, - PassportElementErrorUnspecified, + OwnedGifts, + PassportElementErrorUnion, Poll, - ReactionTypeCustomEmoji, - ReactionTypeEmoji, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + PreparedInlineMessage, + PreparedKeyboardButton, + ReactionTypeUnion, + ReplyMarkupUnion, ReplyParameters, + ResultChatMemberUnion, + ResultMenuButtonUnion, SentWebAppMessage, ShippingOption, + StarAmount, StarTransactions, Sticker, StickerSet, + Story, + StoryArea, + SuggestedPostParameters, Update, User, UserChatBoosts, + UserProfileAudios, UserProfilePhotos, WebhookInfo, ) @@ -255,8 +265,8 @@ class Bot: def __init__( self, token: str, - session: Optional[BaseSession] = None, - default: Optional[DefaultBotProperties] = None, + session: BaseSession | None = None, + default: DefaultBotProperties | None = None, **kwargs: Any, ) -> None: """ @@ -282,9 +292,9 @@ class Bot: # Few arguments are completely removed in 3.7.0 version # Temporary solution to raise an error if user passed these arguments # with explanation how to fix it - parse_mode = kwargs.get("parse_mode", None) - link_preview_is_disabled = kwargs.get("disable_web_page_preview", None) - protect_content = kwargs.get("protect_content", None) + parse_mode = kwargs.get("parse_mode") + link_preview_is_disabled = kwargs.get("disable_web_page_preview") + protect_content = kwargs.get("protect_content") if ( parse_mode is not None or link_preview_is_disabled is not None @@ -307,16 +317,16 @@ class Bot: self.default = default self.__token = token - self._me: Optional[User] = None + self._me: User | None = None - async def __aenter__(self) -> "Bot": + async def __aenter__(self) -> Bot: return self async def __aexit__( self, - exc_type: Optional[Type[BaseException]], - exc_value: Optional[BaseException], - traceback: Optional[TracebackType], + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + traceback: TracebackType | None, ) -> None: await self.session.close() @@ -370,7 +380,7 @@ class Bot: @classmethod async def __download_file( - cls, destination: Union[str, pathlib.Path], stream: AsyncGenerator[bytes, None] + cls, destination: str | pathlib.Path, stream: AsyncGenerator[bytes, None] ) -> None: async with aiofiles.open(destination, "wb") as f: async for chunk in stream: @@ -378,7 +388,7 @@ class Bot: @classmethod async def __aiofiles_reader( - cls, file: str, chunk_size: int = 65536 + cls, file: str | pathlib.Path, chunk_size: int = 65536 ) -> AsyncGenerator[bytes, None]: async with aiofiles.open(file, "rb") as f: while chunk := await f.read(chunk_size): @@ -386,12 +396,12 @@ class Bot: async def download_file( self, - file_path: str, - destination: Optional[Union[BinaryIO, pathlib.Path, str]] = None, + file_path: str | pathlib.Path, + destination: BinaryIO | pathlib.Path | str | None = None, timeout: int = 30, chunk_size: int = 65536, seek: bool = True, - ) -> Optional[BinaryIO]: + ) -> BinaryIO | None: """ Download file by file_path to destination. @@ -410,7 +420,7 @@ class Bot: close_stream = False if self.session.api.is_local: stream = self.__aiofiles_reader( - str(self.session.api.wrap_local_file.to_local(file_path)), chunk_size=chunk_size + self.session.api.wrap_local_file.to_local(file_path), chunk_size=chunk_size ) close_stream = True else: @@ -435,12 +445,12 @@ class Bot: async def download( self, - file: Union[str, Downloadable], - destination: Optional[Union[BinaryIO, pathlib.Path, str]] = None, + file: str | Downloadable, + destination: BinaryIO | pathlib.Path | str | None = None, timeout: int = 30, chunk_size: int = 65536, seek: bool = True, - ) -> Optional[BinaryIO]: + ) -> BinaryIO | None: """ Download file by file_id or Downloadable object to destination. @@ -457,7 +467,7 @@ class Bot: file_id = file else: # type is ignored in due to: - # Incompatible types in assignment (expression has type "Optional[Any]", variable has type "str") + # Incompatible types in assignment (expression has type "Any | None", variable has type "str") file_id = getattr(file, "file_id", None) # type: ignore if file_id is None: raise TypeError("file can only be of the string or Downloadable type") @@ -473,9 +483,7 @@ class Bot: file_path, destination=destination, timeout=timeout, chunk_size=chunk_size, seek=seek ) - async def __call__( - self, method: TelegramMethod[T], request_timeout: Optional[int] = None - ) -> T: + async def __call__(self, method: TelegramMethod[T], request_timeout: int | None = None) -> T: """ Call API method @@ -508,7 +516,7 @@ class Bot: user_id: int, name: str, sticker: InputSticker, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns :code:`True` on success. @@ -532,11 +540,11 @@ class Bot: async def answer_callback_query( self, callback_query_id: str, - text: Optional[str] = None, - show_alert: Optional[bool] = None, - url: Optional[str] = None, - cache_time: Optional[int] = None, - request_timeout: Optional[int] = None, + text: str | None = None, + show_alert: bool | None = None, + url: str | None = None, + cache_time: int | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to send answers to callback queries sent from `inline keyboards `_. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, :code:`True` is returned. @@ -566,37 +574,14 @@ class Bot: async def answer_inline_query( self, inline_query_id: str, - results: List[ - Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ] - ], - cache_time: Optional[int] = None, - is_personal: Optional[bool] = None, - next_offset: Optional[str] = None, - button: Optional[InlineQueryResultsButton] = None, - switch_pm_parameter: Optional[str] = None, - switch_pm_text: Optional[str] = None, - request_timeout: Optional[int] = None, + results: list[InlineQueryResultUnion], + cache_time: int | None = None, + is_personal: bool | None = None, + next_offset: str | None = None, + button: InlineQueryResultsButton | None = None, + switch_pm_parameter: str | None = None, + switch_pm_text: str | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to send answers to an inline query. On success, :code:`True` is returned. @@ -633,8 +618,8 @@ class Bot: self, pre_checkout_query_id: str, ok: bool, - error_message: Optional[str] = None, - request_timeout: Optional[int] = None, + error_message: str | None = None, + request_timeout: int | None = None, ) -> bool: """ Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an :class:`aiogram.types.update.Update` with the field *pre_checkout_query*. Use this method to respond to such pre-checkout queries. On success, :code:`True` is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. @@ -659,9 +644,9 @@ class Bot: self, shipping_query_id: str, ok: bool, - shipping_options: Optional[List[ShippingOption]] = None, - error_message: Optional[str] = None, - request_timeout: Optional[int] = None, + shipping_options: list[ShippingOption] | None = None, + error_message: str | None = None, + request_timeout: int | None = None, ) -> bool: """ If you sent an invoice requesting a shipping address and the parameter *is_flexible* was specified, the Bot API will send an :class:`aiogram.types.update.Update` with a *shipping_query* field to the bot. Use this method to reply to shipping queries. On success, :code:`True` is returned. @@ -671,7 +656,7 @@ class Bot: :param shipping_query_id: Unique identifier for the query to be answered :param ok: Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible) :param shipping_options: Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options. - :param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user. + :param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user. :param request_timeout: Request timeout :return: On success, :code:`True` is returned. """ @@ -687,29 +672,8 @@ class Bot: async def answer_web_app_query( self, web_app_query_id: str, - result: Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ], - request_timeout: Optional[int] = None, + result: InlineQueryResultUnion, + request_timeout: int | None = None, ) -> SentWebAppMessage: """ Use this method to set the result of an interaction with a `Web App `_ and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned. @@ -730,9 +694,9 @@ class Bot: async def approve_chat_join_request( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. @@ -753,11 +717,11 @@ class Bot: async def ban_chat_member( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - revoke_messages: Optional[bool] = None, - request_timeout: Optional[int] = None, + until_date: DateTimeUnion | None = None, + revoke_messages: bool | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless `unbanned `_ first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. @@ -782,9 +746,9 @@ class Bot: async def ban_chat_sender_chat( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, sender_chat_id: int, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to ban a channel chat in a supergroup or a channel. Until the chat is `unbanned `_, the owner of the banned chat won't be able to send messages on behalf of **any of their channels**. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. @@ -805,7 +769,7 @@ class Bot: async def close( self, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns :code:`True` on success. Requires no parameters. @@ -821,9 +785,9 @@ class Bot: async def close_forum_topic( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_thread_id: int, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. @@ -844,25 +808,26 @@ class Bot: async def copy_message( self, - chat_id: Union[int, str], - from_chat_id: Union[int, str], + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, message_id: int, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + video_start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> MessageId: """ Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_message.ForwardMessage`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. @@ -872,13 +837,18 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`) :param message_id: Message identifier in the chat specified in *from_chat_id* - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param video_start_timestamp: New start timestamp for the copied video in the message :param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept :param parse_mode: Mode for parsing entities in the new caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode* :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media. Ignored if a new caption isn't specified. :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving + :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance + :param message_effect_id: Unique identifier of the message effect to be added to the message; only available when copying to private chats + :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. :param reply_parameters: Description of the message to reply to :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -892,12 +862,17 @@ 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, caption_entities=caption_entities, show_caption_above_media=show_caption_above_media, 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, @@ -907,12 +882,12 @@ class Bot: async def create_chat_invite_link( self, - chat_id: Union[int, str], - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + name: str | None = None, + expire_date: DateTimeUnion | None = None, + member_limit: int | None = None, + creates_join_request: bool | None = None, + request_timeout: int | None = None, ) -> ChatInviteLink: """ Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. @@ -939,14 +914,14 @@ class Bot: async def create_forum_topic( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, name: str, - icon_color: Optional[int] = None, - icon_custom_emoji_id: Optional[str] = None, - request_timeout: Optional[int] = None, + icon_color: int | None = None, + icon_custom_emoji_id: str | None = None, + request_timeout: int | None = None, ) -> ForumTopic: """ - Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object. + Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator right. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object. Source: https://core.telegram.org/bots/api#createforumtopic @@ -972,23 +947,25 @@ class Bot: description: str, payload: str, currency: str, - prices: List[LabeledPrice], - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - request_timeout: Optional[int] = None, + prices: list[LabeledPrice], + business_connection_id: str | None = None, + provider_token: str | None = None, + subscription_period: int | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, + request_timeout: int | None = None, ) -> str: """ Use this method to create a link for an invoice. Returns the created invoice link as *String* on success. @@ -997,10 +974,12 @@ class Bot: :param title: Product name, 1-32 characters :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + :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 business_connection_id: Unique identifier of the business connection on behalf of which the link will be created. For payments in `Telegram Stars `_ only. :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. + :param subscription_period: The number of seconds the subscription will be active for before the next payment. The currency must be set to 'XTR' (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 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*. :param provider_data: JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. @@ -1025,7 +1004,9 @@ class Bot: payload=payload, currency=currency, prices=prices, + business_connection_id=business_connection_id, provider_token=provider_token, + subscription_period=subscription_period, max_tip_amount=max_tip_amount, suggested_tip_amounts=suggested_tip_amounts, provider_data=provider_data, @@ -1048,11 +1029,11 @@ class Bot: user_id: int, name: str, title: str, - stickers: List[InputSticker], - sticker_type: Optional[str] = None, - needs_repainting: Optional[bool] = None, - sticker_format: Optional[str] = None, - request_timeout: Optional[int] = None, + stickers: list[InputSticker], + sticker_type: str | None = None, + needs_repainting: bool | None = None, + sticker_format: str | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns :code:`True` on success. @@ -1083,9 +1064,9 @@ class Bot: async def decline_chat_join_request( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. @@ -1106,8 +1087,8 @@ class Bot: async def delete_chat_photo( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = None, ) -> bool: """ Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. @@ -1126,8 +1107,8 @@ class Bot: async def delete_chat_sticker_set( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = None, ) -> bool: """ Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. @@ -1146,12 +1127,12 @@ class Bot: async def delete_forum_topic( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_thread_id: int, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ - Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success. + Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#deleteforumtopic @@ -1169,9 +1150,9 @@ class Bot: async def delete_message( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_id: int, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to delete a message, including service messages, with the following limitations: @@ -1190,7 +1171,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. @@ -1210,19 +1193,9 @@ class Bot: async def delete_my_commands( self, - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, + scope: BotCommandScopeUnion | None = None, + language_code: str | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, `higher level commands `_ will be shown to affected users. Returns :code:`True` on success. @@ -1244,7 +1217,7 @@ class Bot: async def delete_sticker_from_set( self, sticker: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success. @@ -1263,8 +1236,8 @@ class Bot: async def delete_webhook( self, - drop_pending_updates: Optional[bool] = None, - request_timeout: Optional[int] = None, + drop_pending_updates: bool | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to remove webhook integration if you decide to switch back to :class:`aiogram.methods.get_updates.GetUpdates`. Returns :code:`True` on success. @@ -1283,13 +1256,13 @@ class Bot: async def edit_chat_invite_link( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, invite_link: str, - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, - request_timeout: Optional[int] = None, + name: str | None = None, + expire_date: DateTimeUnion | None = None, + member_limit: int | None = None, + creates_join_request: bool | None = None, + request_timeout: int | None = None, ) -> ChatInviteLink: """ Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. @@ -1318,14 +1291,14 @@ class Bot: async def edit_forum_topic( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_thread_id: int, - name: Optional[str] = None, - icon_custom_emoji_id: Optional[str] = None, - request_timeout: Optional[int] = None, + name: str | None = None, + icon_custom_emoji_id: str | None = None, + request_timeout: int | None = None, ) -> bool: """ - Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. + Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#editforumtopic @@ -1347,19 +1320,17 @@ class Bot: async def edit_message_caption( self, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + reply_markup: InlineKeyboardMarkup | None = None, + request_timeout: int | None = None, + ) -> Message | bool: """ 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. @@ -1395,17 +1366,17 @@ class Bot: self, latitude: float, longitude: float, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - live_period: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + live_period: int | None = None, + horizontal_accuracy: float | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + request_timeout: int | None = None, + ) -> Message | bool: """ 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. @@ -1443,22 +1414,16 @@ class Bot: async def edit_message_media( self, - media: Union[ - InputMediaAnimation, - InputMediaDocument, - InputMediaAudio, - InputMediaPhoto, - InputMediaVideo, - ], - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: + media: InputMediaUnion, + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + request_timeout: int | None = None, + ) -> Message | bool: """ - Use this method to edit animation, audio, document, photo, or video 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. + 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. Source: https://core.telegram.org/bots/api#editmessagemedia @@ -1484,13 +1449,13 @@ class Bot: async def edit_message_reply_markup( self, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + request_timeout: int | None = None, + ) -> Message | bool: """ 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. @@ -1517,19 +1482,17 @@ class Bot: async def edit_message_text( self, text: str, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + reply_markup: InlineKeyboardMarkup | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), + request_timeout: int | None = None, + ) -> Message | bool: """ 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. @@ -1565,8 +1528,8 @@ class Bot: async def export_chat_invite_link( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = None, ) -> str: """ Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as *String* on success. @@ -1587,13 +1550,17 @@ class Bot: async def forward_message( self, - chat_id: Union[int, str], - from_chat_id: Union[int, str], + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, message_id: int, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - request_timeout: Optional[int] = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + video_start_timestamp: DateTimeUnion | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -1603,9 +1570,13 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`) :param message_id: Message identifier in the chat specified in *from_chat_id* - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat + :param video_start_timestamp: New start timestamp for the forwarded video in the message :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the forwarded message from forwarding and saving + :param message_effect_id: Unique identifier of the message effect to be added to the message; only available when forwarding to private chats + :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only :param request_timeout: Request timeout :return: On success, the sent :class:`aiogram.types.message.Message` is returned. """ @@ -1615,15 +1586,19 @@ 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, + message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, ) return await self(call, request_timeout=request_timeout) async def get_chat( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = None, ) -> ChatFullInfo: """ Use this method to get up-to-date information about the chat. Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success. @@ -1642,18 +1617,9 @@ class Bot: async def get_chat_administrators( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> List[ - Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - ]: + chat_id: ChatIdUnion, + request_timeout: int | None = None, + ) -> list[ResultChatMemberUnion]: """ Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects. @@ -1671,17 +1637,10 @@ class Bot: async def get_chat_member( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, - request_timeout: Optional[int] = None, - ) -> Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ]: + request_timeout: int | None = None, + ) -> ResultChatMemberUnion: """ Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. @@ -1701,8 +1660,8 @@ class Bot: async def get_chat_member_count( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = None, ) -> int: """ Use this method to get the number of members in a chat. Returns *Int* on success. @@ -1721,9 +1680,9 @@ class Bot: async def get_chat_menu_button( self, - chat_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands]: + chat_id: int | None = None, + request_timeout: int | None = None, + ) -> ResultMenuButtonUnion: """ Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns :class:`aiogram.types.menu_button.MenuButton` on success. @@ -1741,9 +1700,9 @@ class Bot: async def get_custom_emoji_stickers( self, - custom_emoji_ids: List[str], - request_timeout: Optional[int] = None, - ) -> List[Sticker]: + custom_emoji_ids: list[str], + request_timeout: int | None = None, + ) -> list[Sticker]: """ Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. @@ -1762,7 +1721,7 @@ class Bot: async def get_file( self, file_id: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> File: """ Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again. @@ -1782,8 +1741,8 @@ class Bot: async def get_forum_topic_icon_stickers( self, - request_timeout: Optional[int] = None, - ) -> List[Sticker]: + request_timeout: int | None = None, + ) -> list[Sticker]: """ Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. @@ -1799,11 +1758,11 @@ class Bot: async def get_game_high_scores( self, user_id: int, - chat_id: Optional[int] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> List[GameHighScore]: + chat_id: int | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + request_timeout: int | None = None, + ) -> list[GameHighScore]: """ Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of :class:`aiogram.types.game_high_score.GameHighScore` objects. @@ -1829,7 +1788,7 @@ class Bot: async def get_me( self, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> User: """ A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a :class:`aiogram.types.user.User` object. @@ -1845,20 +1804,10 @@ class Bot: async def get_my_commands( self, - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> List[BotCommand]: + scope: BotCommandScopeUnion | None = None, + language_code: str | None = None, + request_timeout: int | None = None, + ) -> list[BotCommand]: """ Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of :class:`aiogram.types.bot_command.BotCommand` objects. If commands aren't set, an empty list is returned. @@ -1878,8 +1827,8 @@ class Bot: async def get_my_default_administrator_rights( self, - for_channels: Optional[bool] = None, - request_timeout: Optional[int] = None, + for_channels: bool | None = None, + request_timeout: int | None = None, ) -> ChatAdministratorRights: """ Use this method to get the current default administrator rights of the bot. Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success. @@ -1899,7 +1848,7 @@ class Bot: async def get_sticker_set( self, name: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> StickerSet: """ Use this method to get a sticker set. On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned. @@ -1918,12 +1867,12 @@ class Bot: async def get_updates( self, - offset: Optional[int] = None, - limit: Optional[int] = None, - timeout: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, - request_timeout: Optional[int] = None, - ) -> List[Update]: + offset: int | None = None, + limit: int | None = None, + timeout: int | None = None, + allowed_updates: list[str] | None = None, + request_timeout: int | None = None, + ) -> list[Update]: """ Use this method to receive incoming updates using long polling (`wiki `_). Returns an Array of :class:`aiogram.types.update.Update` objects. @@ -1954,9 +1903,9 @@ class Bot: async def get_user_profile_photos( self, user_id: int, - offset: Optional[int] = None, - limit: Optional[int] = None, - request_timeout: Optional[int] = None, + offset: int | None = None, + limit: int | None = None, + request_timeout: int | None = None, ) -> UserProfilePhotos: """ Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object. @@ -1979,7 +1928,7 @@ class Bot: async def get_webhook_info( self, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> WebhookInfo: """ Use this method to get current webhook status. Requires no parameters. On success, returns a :class:`aiogram.types.webhook_info.WebhookInfo` object. If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty. @@ -1995,15 +1944,15 @@ class Bot: async def leave_chat( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = None, ) -> bool: """ Use this method for your bot to leave a group, supergroup or channel. Returns :code:`True` on success. 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. """ @@ -2015,7 +1964,7 @@ class Bot: async def log_out( self, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns :code:`True` on success. Requires no parameters. @@ -2031,18 +1980,20 @@ class Bot: async def pin_chat_message( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_id: int, - disable_notification: Optional[bool] = None, - request_timeout: Optional[int] = None, + business_connection_id: str | None = None, + disable_notification: bool | None = None, + request_timeout: int | None = 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 :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param message_id: Identifier of a message to pin + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be pinned :param disable_notification: Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. :param request_timeout: Request timeout :return: Returns :code:`True` on success. @@ -2051,30 +2002,33 @@ class Bot: call = PinChatMessage( chat_id=chat_id, message_id=message_id, + business_connection_id=business_connection_id, disable_notification=disable_notification, ) return await self(call, request_timeout=request_timeout) async def promote_chat_member( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, - is_anonymous: Optional[bool] = None, - can_manage_chat: Optional[bool] = None, - can_delete_messages: Optional[bool] = None, - can_manage_video_chats: Optional[bool] = None, - can_restrict_members: Optional[bool] = None, - can_promote_members: Optional[bool] = None, - can_change_info: Optional[bool] = None, - can_invite_users: Optional[bool] = None, - can_post_stories: Optional[bool] = None, - can_edit_stories: Optional[bool] = None, - can_delete_stories: Optional[bool] = None, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, - request_timeout: Optional[int] = None, + is_anonymous: bool | None = None, + can_manage_chat: bool | None = None, + can_delete_messages: bool | None = None, + can_manage_video_chats: bool | None = None, + can_restrict_members: bool | None = None, + can_promote_members: bool | None = None, + can_change_info: bool | None = None, + can_invite_users: bool | None = None, + can_post_stories: bool | None = None, + can_edit_stories: bool | None = None, + can_delete_stories: bool | None = None, + can_post_messages: bool | None = None, + can_edit_messages: bool | None = None, + can_pin_messages: bool | None = None, + can_manage_topics: bool | None = None, + can_manage_direct_messages: bool | None = None, + can_manage_tags: bool | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass :code:`False` for all boolean parameters to demote a user. Returns :code:`True` on success. @@ -2084,20 +2038,22 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param user_id: Unique identifier of the target user :param is_anonymous: Pass :code:`True` if the administrator's presence in the chat is hidden - :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. + :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. :param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users :param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats - :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics + :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to :code:`True` for promotions of channel administrators :param can_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him) :param can_change_info: Pass :code:`True` if the administrator can change chat title, photo and other settings :param can_invite_users: Pass :code:`True` if the administrator can invite new users to the chat :param can_post_stories: Pass :code:`True` if the administrator can post stories to the chat :param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive :param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users - :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only + :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only :param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only :param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only :param can_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 can_manage_tags: Pass :code:`True` if the administrator can edit the tags of regular members; for groups and supergroups only :param request_timeout: Request timeout :return: Returns :code:`True` on success. """ @@ -2120,14 +2076,16 @@ 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, + can_manage_tags=can_manage_tags, ) return await self(call, request_timeout=request_timeout) async def reopen_forum_topic( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_thread_id: int, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. @@ -2148,12 +2106,12 @@ class Bot: async def restrict_chat_member( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - request_timeout: Optional[int] = None, + use_independent_chat_permissions: bool | None = None, + until_date: DateTimeUnion | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass :code:`True` for all permissions to lift restrictions from a user. Returns :code:`True` on success. @@ -2180,9 +2138,9 @@ class Bot: async def revoke_chat_invite_link( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, invite_link: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> ChatInviteLink: """ Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. @@ -2203,31 +2161,30 @@ class Bot: async def send_animation( self, - chat_id: Union[int, str], - animation: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + animation: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. @@ -2237,7 +2194,8 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent animation in seconds :param width: Animation width :param height: Animation height @@ -2249,7 +2207,9 @@ class Bot: :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :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 @@ -2263,6 +2223,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, @@ -2274,7 +2235,9 @@ class Bot: has_spoiler=has_spoiler, 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, @@ -2284,27 +2247,28 @@ class Bot: async def send_audio( self, - chat_id: Union[int, str], - audio: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + audio: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. @@ -2315,7 +2279,8 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Audio caption, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -2325,7 +2290,9 @@ class Bot: :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 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 @@ -2339,6 +2306,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, @@ -2348,7 +2316,9 @@ class Bot: thumbnail=thumbnail, 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, @@ -2358,11 +2328,11 @@ class Bot: async def send_chat_action( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, action: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - request_timeout: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns :code:`True` on success. @@ -2373,10 +2343,10 @@ 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 + :param message_thread_id: Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only :param request_timeout: Request timeout :return: The user will see a 'sending photo' status for the bot. """ @@ -2391,23 +2361,24 @@ class Bot: async def send_contact( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, phone_number: str, first_name: str, - business_connection_id: Optional[str] = None, - message_thread_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"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + last_name: str | None = None, + vcard: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -2418,12 +2389,15 @@ class Bot: :param phone_number: Contact's phone number :param first_name: Contact's first name :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param last_name: Contact's last name :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes :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 @@ -2438,11 +2412,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, @@ -2452,20 +2429,21 @@ class Bot: async def send_dice( self, - chat_id: Union[int, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -2474,11 +2452,14 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :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 @@ -2491,10 +2472,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, @@ -2504,25 +2488,26 @@ class Bot: async def send_document( self, - chat_id: Union[int, str], - document: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + document: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. @@ -2532,7 +2517,8 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details. @@ -2540,7 +2526,9 @@ class Bot: :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data :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 @@ -2554,6 +2542,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, @@ -2561,7 +2550,9 @@ class Bot: disable_content_type_detection=disable_content_type_detection, 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, @@ -2573,28 +2564,30 @@ class Bot: self, chat_id: int, game_short_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. 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 + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving + :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only :param reply_parameters: Description of the message to reply to :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. @@ -2611,6 +2604,7 @@ class Bot: message_thread_id=message_thread_id, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, @@ -2621,37 +2615,40 @@ class Bot: async def send_invoice( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, title: str, description: str, payload: str, currency: str, - prices: List[LabeledPrice], - message_thread_id: Optional[int] = None, - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + prices: list[LabeledPrice], + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + provider_token: str | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + start_parameter: str | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -2661,10 +2658,11 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param title: Product name, 1-32 characters :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_. :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*. @@ -2683,7 +2681,9 @@ class Bot: :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. :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: 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 @@ -2700,6 +2700,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, @@ -2718,7 +2719,9 @@ class Bot: is_flexible=is_flexible, 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, @@ -2728,25 +2731,26 @@ class Bot: async def send_location( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, latitude: float, longitude: float, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -2757,14 +2761,17 @@ class Bot: :param latitude: Latitude of the location :param longitude: Longitude of the location :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. :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 @@ -2779,13 +2786,16 @@ 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, proximity_alert_radius=proximity_alert_radius, 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, @@ -2795,35 +2805,39 @@ class Bot: async def send_media_group( self, - chat_id: Union[int, str], - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> List[Message]: + chat_id: ChatIdUnion, + media: list[MediaUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = 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 :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param media: A JSON-serialized array describing messages to be sent, must include 2-10 items :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent messages from forwarding and saving + :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 reply_parameters: Description of the message to reply to :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( @@ -2831,8 +2845,10 @@ 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, message_effect_id=message_effect_id, reply_parameters=reply_parameters, allow_sending_without_reply=allow_sending_without_reply, @@ -2842,28 +2858,25 @@ class Bot: async def send_message( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, text: str, - business_connection_id: Optional[str] = None, - message_thread_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( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -2873,13 +2886,16 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param text: Text of the message to be sent, 1-4096 characters after entities parsing :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* :param link_preview_options: Link preview generation options for 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 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 @@ -2894,12 +2910,15 @@ 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, 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, @@ -2910,27 +2929,26 @@ class Bot: async def send_photo( self, - chat_id: Union[int, str], - photo: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + photo: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -2940,7 +2958,8 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -2948,7 +2967,9 @@ class Bot: :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :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 @@ -2962,6 +2983,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, @@ -2969,7 +2991,9 @@ class Bot: has_spoiler=has_spoiler, 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, @@ -2979,62 +3003,78 @@ class Bot: async def send_poll( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, question: str, - options: List[Union[InputPollOption, str]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + options: list[InputPollOptionUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + question_parse_mode: str | Default | None = Default("parse_mode"), + question_entities: list[MessageEntity] | None = None, + is_anonymous: bool | None = None, + type: str | None = None, + allows_multiple_answers: bool | None = None, + allows_revoting: bool | None = None, + shuffle_options: bool | None = None, + allow_adding_options: bool | None = None, + hide_results_until_closes: bool | None = None, + correct_option_ids: list[int] | None = None, + explanation: str | None = None, + explanation_parse_mode: str | Default | None = Default("parse_mode"), + explanation_entities: list[MessageEntity] | None = None, + open_period: int | None = None, + close_date: DateTimeUnion | None = None, + is_closed: bool | None = None, + description: str | None = None, + description_parse_mode: str | Default | None = Default("parse_mode"), + description_entities: list[MessageEntity] | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + correct_option_id: int | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. 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-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode + :param allows_multiple_answers: Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False` + :param allows_revoting: Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls + :param shuffle_options: Pass :code:`True`, if the poll options must be shown in random order + :param allow_adding_options: Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes + :param hide_results_until_closes: Pass :code:`True`, if poll results must be shown only after the poll closes + :param correct_option_ids: A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. + :param open_period: Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*. + :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*. :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. + :param description: Description of the poll to be sent, 0-1024 characters after entities parsing + :param description_parse_mode: Mode for parsing entities in the poll description. See `formatting options `_ for more details. + :param description_entities: A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode* :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 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 + :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param reply_to_message_id: If the message is a reply, ID of the original message :param request_timeout: Request timeout :return: On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -3051,40 +3091,50 @@ class Bot: is_anonymous=is_anonymous, type=type, allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, + allows_revoting=allows_revoting, + shuffle_options=shuffle_options, + allow_adding_options=allow_adding_options, + hide_results_until_closes=hide_results_until_closes, + correct_option_ids=correct_option_ids, explanation=explanation, explanation_parse_mode=explanation_parse_mode, explanation_entities=explanation_entities, open_period=open_period, close_date=close_date, is_closed=is_closed, + description=description, + description_parse_mode=description_parse_mode, + description_entities=description_entities, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, + correct_option_id=correct_option_id, reply_to_message_id=reply_to_message_id, ) return await self(call, request_timeout=request_timeout) async def send_sticker( self, - chat_id: Union[int, str], - sticker: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + sticker: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -3094,11 +3144,14 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param emoji: Emoji associated with the sticker; only for just uploaded stickers :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :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 @@ -3112,10 +3165,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, @@ -3125,27 +3181,28 @@ class Bot: async def send_venue( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, latitude: float, longitude: float, title: str, address: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -3158,14 +3215,17 @@ class Bot: :param title: Name of the venue :param address: Address of the venue :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param foursquare_id: Foursquare identifier of the venue :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) :param google_place_id: Google Places identifier of the venue :param google_place_type: Google Places type of the venue. (See `supported types `_.) :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 @@ -3182,13 +3242,16 @@ 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, google_place_type=google_place_type, 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, @@ -3198,32 +3261,33 @@ class Bot: async def send_video( self, - chat_id: Union[int, str], - video: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + video: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + cover: InputFileUnion | None = None, + start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + supports_streaming: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. @@ -3233,11 +3297,14 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent video in seconds :param width: Video width :param height: Video height :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 cover: Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » ` + :param start_timestamp: Start timestamp for the video in the message :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the video 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* @@ -3246,7 +3313,9 @@ class Bot: :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming :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 @@ -3260,10 +3329,13 @@ 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, thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -3272,7 +3344,9 @@ class Bot: supports_streaming=supports_streaming, 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, @@ -3282,23 +3356,24 @@ class Bot: async def send_video_note( self, - chat_id: Union[int, str], - video_note: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + video_note: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + length: int | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -3308,13 +3383,16 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent video in seconds :param length: Video width and height, i.e. diameter of the video message :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 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 @@ -3328,12 +3406,15 @@ 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, 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, @@ -3343,24 +3424,25 @@ class Bot: async def send_voice( self, - chat_id: Union[int, str], - voice: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + voice: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + request_timeout: int | None = None, ) -> Message: """ Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. @@ -3370,14 +3452,17 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Voice message caption, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param duration: Duration of the voice message in seconds :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 @@ -3391,13 +3476,16 @@ 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, duration=duration, 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, @@ -3407,10 +3495,10 @@ class Bot: async def set_chat_administrator_custom_title( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, custom_title: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns :code:`True` on success. @@ -3433,9 +3521,9 @@ class Bot: async def set_chat_description( self, - chat_id: Union[int, str], - description: Optional[str] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + description: str | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. @@ -3456,11 +3544,9 @@ class Bot: async def set_chat_menu_button( self, - chat_id: Optional[int] = None, - menu_button: Optional[ - Union[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault] - ] = None, - request_timeout: Optional[int] = None, + chat_id: int | None = None, + menu_button: MenuButtonUnion | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to change the bot's menu button in a private chat, or the default menu button. Returns :code:`True` on success. @@ -3481,10 +3567,10 @@ class Bot: async def set_chat_permissions( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, - request_timeout: Optional[int] = None, + use_independent_chat_permissions: bool | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the *can_restrict_members* administrator rights. Returns :code:`True` on success. @@ -3507,9 +3593,9 @@ class Bot: async def set_chat_photo( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, photo: InputFile, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. @@ -3530,9 +3616,9 @@ class Bot: async def set_chat_sticker_set( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, sticker_set_name: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. @@ -3553,9 +3639,9 @@ class Bot: async def set_chat_title( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, title: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. @@ -3578,13 +3664,13 @@ class Bot: self, user_id: int, score: int, - force: Optional[bool] = None, - disable_edit_message: Optional[bool] = None, - chat_id: Optional[int] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: + force: bool | None = None, + disable_edit_message: bool | None = None, + chat_id: int | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + request_timeout: int | None = None, + ) -> Message | bool: """ Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Returns an error, if the new score is not greater than the user's current score in the chat and *force* is :code:`False`. @@ -3614,20 +3700,10 @@ class Bot: async def set_my_commands( self, - commands: List[BotCommand], - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, + commands: list[BotCommand], + scope: BotCommandScopeUnion | None = None, + language_code: str | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to change the list of the bot's commands. See `this manual `_ for more details about bot commands. Returns :code:`True` on success. @@ -3650,9 +3726,9 @@ class Bot: async def set_my_default_administrator_rights( self, - rights: Optional[ChatAdministratorRights] = None, - for_channels: Optional[bool] = None, - request_timeout: Optional[int] = None, + rights: ChatAdministratorRights | None = None, + for_channels: bool | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns :code:`True` on success. @@ -3674,20 +3750,8 @@ class Bot: async def set_passport_data_errors( self, user_id: int, - errors: List[ - Union[ - PassportElementErrorDataField, - PassportElementErrorFrontSide, - PassportElementErrorReverseSide, - PassportElementErrorSelfie, - PassportElementErrorFile, - PassportElementErrorFiles, - PassportElementErrorTranslationFile, - PassportElementErrorTranslationFiles, - PassportElementErrorUnspecified, - ] - ], - request_timeout: Optional[int] = None, + errors: list[PassportElementErrorUnion], + request_timeout: int | None = None, ) -> bool: """ Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns :code:`True` on success. @@ -3711,7 +3775,7 @@ class Bot: self, sticker: str, position: int, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success. @@ -3733,16 +3797,16 @@ class Bot: async def set_webhook( self, url: str, - certificate: Optional[InputFile] = None, - ip_address: Optional[str] = None, - max_connections: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, - drop_pending_updates: Optional[bool] = None, - secret_token: Optional[str] = None, - request_timeout: Optional[int] = None, + certificate: InputFile | None = None, + ip_address: str | None = None, + max_connections: int | None = None, + allowed_updates: list[str] | None = None, + drop_pending_updates: bool | None = None, + secret_token: str | None = None, + request_timeout: int | None = None, ) -> bool: """ - Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success. + Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request (a request with response `HTTP status code `_ different from :code:`2XY`), we will repeat the request and give up after a reasonable amount of attempts. Returns :code:`True` on success. If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content. **Notes** @@ -3780,13 +3844,13 @@ class Bot: async def stop_message_live_location( self, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + request_timeout: int | None = None, + ) -> Message | bool: """ 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. @@ -3812,11 +3876,11 @@ class Bot: async def stop_poll( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_id: int, - business_connection_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, + business_connection_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + request_timeout: int | None = None, ) -> Poll: """ Use this method to stop a poll which was sent by the bot. On success, the stopped :class:`aiogram.types.poll.Poll` is returned. @@ -3841,10 +3905,10 @@ class Bot: async def unban_chat_member( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, - only_if_banned: Optional[bool] = None, - request_timeout: Optional[int] = None, + only_if_banned: bool | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to unban a previously banned user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don't want this, use the parameter *only_if_banned*. Returns :code:`True` on success. @@ -3867,9 +3931,9 @@ class Bot: async def unban_chat_sender_chat( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, sender_chat_id: int, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. @@ -3890,11 +3954,11 @@ class Bot: async def unpin_all_chat_messages( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = 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 @@ -3910,12 +3974,12 @@ class Bot: async def unpin_all_forum_topic_messages( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_thread_id: int, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ - Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. + Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#unpinallforumtopicmessages @@ -3933,23 +3997,26 @@ class Bot: async def unpin_chat_message( self, - chat_id: Union[int, str], - message_id: Optional[int] = None, - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + business_connection_id: str | None = None, + message_id: int | None = None, + request_timeout: int | None = 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 :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned. + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be unpinned + :param message_id: Identifier of the message to unpin. Required if *business_connection_id* is specified. If not specified, the most recent pinned message (by sending date) will be unpinned. :param request_timeout: Request timeout :return: Returns :code:`True` on success. """ call = UnpinChatMessage( chat_id=chat_id, + business_connection_id=business_connection_id, message_id=message_id, ) return await self(call, request_timeout=request_timeout) @@ -3959,7 +4026,7 @@ class Bot: user_id: int, sticker: InputFile, sticker_format: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> File: """ Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet`, :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, or :class:`aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success. @@ -3982,8 +4049,8 @@ class Bot: async def close_general_forum_topic( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = None, ) -> bool: """ Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. @@ -4002,12 +4069,12 @@ class Bot: async def edit_general_forum_topic( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, name: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ - Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights. Returns :code:`True` on success. + Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#editgeneralforumtopic @@ -4025,8 +4092,8 @@ class Bot: async def hide_general_forum_topic( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = None, ) -> bool: """ Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically closed if it was open. Returns :code:`True` on success. @@ -4045,8 +4112,8 @@ class Bot: async def reopen_general_forum_topic( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = None, ) -> bool: """ Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically unhidden if it was hidden. Returns :code:`True` on success. @@ -4065,8 +4132,8 @@ class Bot: async def unhide_general_forum_topic( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = None, ) -> bool: """ Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. @@ -4086,7 +4153,7 @@ class Bot: async def delete_sticker_set( self, name: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to delete a sticker set that was created by the bot. Returns :code:`True` on success. @@ -4105,8 +4172,8 @@ class Bot: async def get_my_description( self, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, + language_code: str | None = None, + request_timeout: int | None = None, ) -> BotDescription: """ Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success. @@ -4125,8 +4192,8 @@ class Bot: async def get_my_short_description( self, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, + language_code: str | None = None, + request_timeout: int | None = None, ) -> BotShortDescription: """ Use this method to get the current bot short description for the given user language. Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success. @@ -4146,8 +4213,8 @@ class Bot: async def set_custom_emoji_sticker_set_thumbnail( self, name: str, - custom_emoji_id: Optional[str] = None, - request_timeout: Optional[int] = None, + custom_emoji_id: str | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to set the thumbnail of a custom emoji sticker set. Returns :code:`True` on success. @@ -4168,9 +4235,9 @@ class Bot: async def set_my_description( self, - description: Optional[str] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, + description: str | None = None, + language_code: str | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns :code:`True` on success. @@ -4191,9 +4258,9 @@ class Bot: async def set_my_short_description( self, - short_description: Optional[str] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, + short_description: str | None = None, + language_code: str | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns :code:`True` on success. @@ -4215,8 +4282,8 @@ class Bot: async def set_sticker_emoji_list( self, sticker: str, - emoji_list: List[str], - request_timeout: Optional[int] = None, + emoji_list: list[str], + request_timeout: int | None = None, ) -> bool: """ Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success. @@ -4238,8 +4305,8 @@ class Bot: async def set_sticker_keywords( self, sticker: str, - keywords: Optional[List[str]] = None, - request_timeout: Optional[int] = None, + keywords: list[str] | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success. @@ -4261,8 +4328,8 @@ class Bot: async def set_sticker_mask_position( self, sticker: str, - mask_position: Optional[MaskPosition] = None, - request_timeout: Optional[int] = None, + mask_position: MaskPosition | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to change the `mask position `_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success. @@ -4286,8 +4353,8 @@ class Bot: name: str, user_id: int, format: str, - thumbnail: Optional[Union[InputFile, str]] = None, - request_timeout: Optional[int] = None, + thumbnail: InputFileUnion | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns :code:`True` on success. @@ -4296,8 +4363,8 @@ class Bot: :param name: Sticker set name :param user_id: User identifier of the sticker set owner - :param format: Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **WEBM** video - :param thumbnail: A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, 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 » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail. + :param format: Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **.WEBM** video + :param thumbnail: A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animation-requirements `_`https://core.telegram.org/stickers#animation-requirements `_ for animated sticker technical requirements), or a **.WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-requirements `_`https://core.telegram.org/stickers#video-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, 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 » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail. :param request_timeout: Request timeout :return: Returns :code:`True` on success. """ @@ -4314,7 +4381,7 @@ class Bot: self, name: str, title: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to set the title of a created sticker set. Returns :code:`True` on success. @@ -4335,8 +4402,8 @@ class Bot: async def get_my_name( self, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, + language_code: str | None = None, + request_timeout: int | None = None, ) -> BotName: """ Use this method to get the current bot name for the given user language. Returns :class:`aiogram.types.bot_name.BotName` on success. @@ -4355,9 +4422,9 @@ class Bot: async def set_my_name( self, - name: Optional[str] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, + name: str | None = None, + language_code: str | None = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to change the bot's name. Returns :code:`True` on success. @@ -4378,8 +4445,8 @@ class Bot: async def unpin_all_general_forum_topic_messages( self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + request_timeout: int | None = None, ) -> bool: """ Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. @@ -4398,15 +4465,16 @@ class Bot: async def copy_messages( self, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_ids: List[int], - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - remove_caption: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> List[MessageId]: + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, + message_ids: list[int], + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | None = None, + remove_caption: bool | None = None, + request_timeout: int | None = None, + ) -> list[MessageId]: """ Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_messages.ForwardMessages`, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. @@ -4415,7 +4483,8 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param from_chat_id: Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`) :param message_ids: A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat :param disable_notification: Sends the messages `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent messages from forwarding and saving :param remove_caption: Pass :code:`True` to copy the messages without their captions @@ -4428,6 +4497,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, @@ -4436,9 +4506,9 @@ class Bot: async def delete_messages( self, - chat_id: Union[int, str], - message_ids: List[int], - request_timeout: Optional[int] = None, + chat_id: ChatIdUnion, + message_ids: list[int], + request_timeout: int | None = None, ) -> bool: """ 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. @@ -4459,14 +4529,15 @@ class Bot: async def forward_messages( self, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_ids: List[int], - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> List[MessageId]: + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, + message_ids: list[int], + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | None = None, + request_timeout: int | None = None, + ) -> list[MessageId]: """ Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. @@ -4475,7 +4546,8 @@ class Bot: :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param from_chat_id: Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`) :param message_ids: A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat :param disable_notification: Sends the messages `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the forwarded messages from forwarding and saving :param request_timeout: Request timeout @@ -4487,6 +4559,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, ) @@ -4494,9 +4567,9 @@ class Bot: async def get_user_chat_boosts( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> UserChatBoosts: """ Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a :class:`aiogram.types.user_chat_boosts.UserChatBoosts` object. @@ -4517,20 +4590,20 @@ class Bot: async def set_message_reaction( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_id: int, - reaction: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = None, - is_big: Optional[bool] = None, - request_timeout: Optional[int] = None, + reaction: list[ReactionTypeUnion] | None = None, + is_big: bool | None = None, + request_timeout: int | None = None, ) -> bool: """ - Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns :code:`True` on success. + Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#setmessagereaction :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param message_id: Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead. - :param reaction: A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. + :param reaction: A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots. :param is_big: Pass :code:`True` to set the reaction with a big animation :param request_timeout: Request timeout :return: Returns :code:`True` on success. @@ -4547,7 +4620,7 @@ class Bot: async def get_business_connection( self, business_connection_id: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> BusinessConnection: """ Use this method to get information about the connection of the bot with a business account. Returns a :class:`aiogram.types.business_connection.BusinessConnection` object on success. @@ -4570,7 +4643,7 @@ class Bot: name: str, old_sticker: str, sticker: InputSticker, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling :class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet`, then :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, then :class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet`. Returns :code:`True` on success. @@ -4597,7 +4670,7 @@ class Bot: self, user_id: int, telegram_payment_charge_id: str, - request_timeout: Optional[int] = None, + request_timeout: int | None = None, ) -> bool: """ Refunds a successful payment in `Telegram Stars `_. Returns :code:`True` on success. @@ -4618,9 +4691,9 @@ class Bot: async def get_star_transactions( self, - offset: Optional[int] = None, - limit: Optional[int] = None, - request_timeout: Optional[int] = None, + offset: int | None = None, + limit: int | None = None, + request_timeout: int | None = None, ) -> StarTransactions: """ Returns the bot's Telegram Star transactions in chronological order. On success, returns a :class:`aiogram.types.star_transactions.StarTransactions` object. @@ -4641,35 +4714,45 @@ class Bot: async def send_paid_media( self, - chat_id: Union[int, str], + chat_id: ChatIdUnion, star_count: int, - media: List[Union[InputPaidMediaPhoto, InputPaidMediaVideo]], - caption: Optional[str] = None, - parse_mode: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, + media: list[InputPaidMediaUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + payload: str | None = None, + caption: str | None = None, + parse_mode: str | None = None, + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | None = None, + allow_paid_broadcast: bool | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + request_timeout: int | None = None, ) -> Message: """ - Use this method to send paid media to channel chats. On success, the sent :class:`aiogram.types.message.Message` is returned. + Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned. Source: https://core.telegram.org/bots/api#sendpaidmedia - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param star_count: The number of Telegram Stars that must be paid to buy access to the media + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance. + :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-25000 :param media: A JSON-serialized array describing the media to be sent; up to 10 items + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes. :param caption: Media caption, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the media 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* :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media :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 @@ -4680,13 +4763,1270 @@ class Bot: chat_id=chat_id, 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, caption_entities=caption_entities, show_caption_above_media=show_caption_above_media, 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, ) return await self(call, request_timeout=request_timeout) + + async def create_chat_subscription_invite_link( + self, + chat_id: ChatIdUnion, + subscription_period: DateTimeUnion, + subscription_price: int, + name: str | None = None, + request_timeout: int | None = None, + ) -> ChatInviteLink: + """ + Use this method to create a `subscription invite link `_ for a channel chat. The bot must have the *can_invite_users* administrator rights. The link can be edited using the method :class:`aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink` or revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + Source: https://core.telegram.org/bots/api#createchatsubscriptioninvitelink + + :param chat_id: Unique identifier for the target channel chat or username of the target channel (in the format :code:`@channelusername`) + :param subscription_period: The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days). + :param subscription_price: The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000 + :param name: Invite link name; 0-32 characters + :param request_timeout: Request timeout + :return: Returns the new invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + """ + + call = CreateChatSubscriptionInviteLink( + chat_id=chat_id, + subscription_period=subscription_period, + subscription_price=subscription_price, + name=name, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_chat_subscription_invite_link( + self, + chat_id: ChatIdUnion, + invite_link: str, + name: str | None = None, + request_timeout: int | None = None, + ) -> ChatInviteLink: + """ + Use this method to edit a subscription invite link created by the bot. The bot must have the *can_invite_users* administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + Source: https://core.telegram.org/bots/api#editchatsubscriptioninvitelink + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param invite_link: The invite link to edit + :param name: Invite link name; 0-32 characters + :param request_timeout: Request timeout + :return: Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + """ + + call = EditChatSubscriptionInviteLink( + chat_id=chat_id, + invite_link=invite_link, + name=name, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_user_star_subscription( + self, + user_id: int, + telegram_payment_charge_id: str, + is_canceled: bool, + request_timeout: int | None = None, + ) -> bool: + """ + Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#edituserstarsubscription + + :param user_id: Identifier of the user whose subscription will be edited + :param telegram_payment_charge_id: Telegram payment identifier for the subscription + :param is_canceled: Pass :code:`True` to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass :code:`False` to allow the user to re-enable a subscription that was previously canceled by the bot. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = EditUserStarSubscription( + user_id=user_id, + telegram_payment_charge_id=telegram_payment_charge_id, + is_canceled=is_canceled, + ) + return await self(call, request_timeout=request_timeout) + + async def get_available_gifts( + self, + request_timeout: int | None = None, + ) -> Gifts: + """ + Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object. + + Source: https://core.telegram.org/bots/api#getavailablegifts + + :param request_timeout: Request timeout + :return: Returns a :class:`aiogram.types.gifts.Gifts` object. + """ + + call = GetAvailableGifts() + return await self(call, request_timeout=request_timeout) + + async def save_prepared_inline_message( + self, + user_id: int, + result: InlineQueryResultUnion, + allow_user_chats: bool | None = None, + allow_bot_chats: bool | None = None, + allow_group_chats: bool | None = None, + allow_channel_chats: bool | None = None, + request_timeout: int | None = None, + ) -> PreparedInlineMessage: + """ + Stores a message that can be sent by a user of a Mini App. Returns a :class:`aiogram.types.prepared_inline_message.PreparedInlineMessage` object. + + Source: https://core.telegram.org/bots/api#savepreparedinlinemessage + + :param user_id: Unique identifier of the target user that can use the prepared message + :param result: A JSON-serialized object describing the message to be sent + :param allow_user_chats: Pass :code:`True` if the message can be sent to private chats with users + :param allow_bot_chats: Pass :code:`True` if the message can be sent to private chats with bots + :param allow_group_chats: Pass :code:`True` if the message can be sent to group and supergroup chats + :param allow_channel_chats: Pass :code:`True` if the message can be sent to channel chats + :param request_timeout: Request timeout + :return: Returns a :class:`aiogram.types.prepared_inline_message.PreparedInlineMessage` object. + """ + + call = SavePreparedInlineMessage( + user_id=user_id, + result=result, + allow_user_chats=allow_user_chats, + allow_bot_chats=allow_bot_chats, + allow_group_chats=allow_group_chats, + allow_channel_chats=allow_channel_chats, + ) + return await self(call, request_timeout=request_timeout) + + async def send_gift( + self, + gift_id: str, + user_id: int | None = None, + chat_id: ChatIdUnion | None = None, + pay_for_upgrade: bool | None = None, + text: str | None = None, + text_parse_mode: str | None = None, + text_entities: list[MessageEntity] | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#sendgift + + :param gift_id: Identifier of the gift; limited gifts can't be sent to channel chats + :param user_id: Required if *chat_id* is not specified. Unique identifier of the target user who will receive the gift. + :param chat_id: Required if *user_id* is not specified. Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`) that will receive the gift. + :param pay_for_upgrade: Pass :code:`True` to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver + :param text: Text that will be shown along with the gift; 0-128 characters + :param text_parse_mode: Mode for parsing entities in the text. See `formatting options `_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored. + :param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SendGift( + gift_id=gift_id, + user_id=user_id, + chat_id=chat_id, + pay_for_upgrade=pay_for_upgrade, + text=text, + text_parse_mode=text_parse_mode, + text_entities=text_entities, + ) + return await self(call, request_timeout=request_timeout) + + async def set_user_emoji_status( + self, + user_id: int, + emoji_status_custom_emoji_id: str | None = None, + emoji_status_expiration_date: DateTimeUnion | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method `requestEmojiStatusAccess `_. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setuseremojistatus + + :param user_id: Unique identifier of the target user + :param emoji_status_custom_emoji_id: Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status. + :param emoji_status_expiration_date: Expiration date of the emoji status, if any + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetUserEmojiStatus( + user_id=user_id, + emoji_status_custom_emoji_id=emoji_status_custom_emoji_id, + emoji_status_expiration_date=emoji_status_expiration_date, + ) + return await self(call, request_timeout=request_timeout) + + async def remove_chat_verification( + self, + chat_id: ChatIdUnion, + request_timeout: int | None = None, + ) -> bool: + """ + Removes verification from a chat that is currently verified `on behalf of the organization `_ represented by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#removechatverification + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = RemoveChatVerification( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def remove_user_verification( + self, + user_id: int, + request_timeout: int | None = None, + ) -> bool: + """ + Removes verification from a user who is currently verified `on behalf of the organization `_ represented by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#removeuserverification + + :param user_id: Unique identifier of the target user + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = RemoveUserVerification( + user_id=user_id, + ) + return await self(call, request_timeout=request_timeout) + + async def verify_chat( + self, + chat_id: ChatIdUnion, + custom_description: str | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Verifies a chat `on behalf of the organization `_ which is represented by the bot. Returns :code:`True` on success. + + 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`). 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. + """ + + call = VerifyChat( + chat_id=chat_id, + custom_description=custom_description, + ) + return await self(call, request_timeout=request_timeout) + + async def verify_user( + self, + user_id: int, + custom_description: str | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Verifies a user `on behalf of the organization `_ which is represented by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#verifyuser + + :param user_id: Unique identifier of the target user + :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. + """ + + call = VerifyUser( + user_id=user_id, + custom_description=custom_description, + ) + return await self(call, request_timeout=request_timeout) + + async def convert_gift_to_stars( + self, + business_connection_id: str, + owned_gift_id: str, + request_timeout: int | None = None, + ) -> bool: + """ + Converts a given regular gift to Telegram Stars. Requires the *can_convert_gifts_to_stars* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#convertgifttostars + + :param business_connection_id: Unique identifier of the business connection + :param owned_gift_id: Unique identifier of the regular gift that should be converted to Telegram Stars + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = ConvertGiftToStars( + business_connection_id=business_connection_id, + owned_gift_id=owned_gift_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_business_messages( + self, + business_connection_id: str, + message_ids: list[int], + request_timeout: int | None = None, + ) -> bool: + """ + Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#deletebusinessmessages + + :param business_connection_id: Unique identifier of the business connection on behalf of which to delete the messages + :param message_ids: A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteBusinessMessages( + business_connection_id=business_connection_id, + message_ids=message_ids, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_story( + self, + business_connection_id: str, + story_id: int, + request_timeout: int | None = None, + ) -> bool: + """ + Deletes a story previously posted by the bot on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#deletestory + + :param business_connection_id: Unique identifier of the business connection + :param story_id: Unique identifier of the story to delete + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteStory( + business_connection_id=business_connection_id, + story_id=story_id, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_story( + self, + business_connection_id: str, + story_id: int, + content: InputStoryContentUnion, + caption: str | None = None, + parse_mode: str | None = None, + caption_entities: list[MessageEntity] | None = None, + areas: list[StoryArea] | None = None, + request_timeout: int | None = None, + ) -> Story: + """ + Edits a story previously posted by the bot on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :class:`aiogram.types.story.Story` on success. + + Source: https://core.telegram.org/bots/api#editstory + + :param business_connection_id: Unique identifier of the business connection + :param story_id: Unique identifier of the story to edit + :param content: Content of the story + :param caption: Caption of the story, 0-2048 characters after entities parsing + :param parse_mode: Mode for parsing entities in the story 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* + :param areas: A JSON-serialized list of clickable areas to be shown on the story + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.story.Story` on success. + """ + + call = EditStory( + business_connection_id=business_connection_id, + story_id=story_id, + content=content, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + areas=areas, + ) + return await self(call, request_timeout=request_timeout) + + async def get_business_account_gifts( + self, + business_connection_id: str, + exclude_unsaved: bool | None = None, + exclude_saved: bool | None = None, + exclude_unlimited: bool | None = None, + exclude_limited_upgradable: bool | None = None, + exclude_limited_non_upgradable: bool | None = None, + exclude_unique: bool | None = None, + exclude_from_blockchain: bool | None = None, + sort_by_price: bool | None = None, + offset: str | None = None, + limit: int | None = None, + exclude_limited: bool | None = None, + request_timeout: int | None = None, + ) -> OwnedGifts: + """ + Returns the gifts received and owned by a managed business account. Requires the *can_view_gifts_and_stars* business bot right. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success. + + Source: https://core.telegram.org/bots/api#getbusinessaccountgifts + + :param business_connection_id: Unique identifier of the business connection + :param exclude_unsaved: Pass :code:`True` to exclude gifts that aren't saved to the account's profile page + :param exclude_saved: Pass :code:`True` to exclude gifts that are saved to the account's profile page + :param exclude_unlimited: Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times + :param exclude_limited_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique + :param exclude_limited_non_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique + :param exclude_unique: Pass :code:`True` to exclude unique gifts + :param exclude_from_blockchain: Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram + :param sort_by_price: Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination. + :param offset: Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results + :param limit: The maximum number of gifts to be returned; 1-100. Defaults to 100 + :param exclude_limited: Pass :code:`True` to exclude gifts that can be purchased a limited number of times + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success. + """ + + call = GetBusinessAccountGifts( + business_connection_id=business_connection_id, + exclude_unsaved=exclude_unsaved, + exclude_saved=exclude_saved, + exclude_unlimited=exclude_unlimited, + exclude_limited_upgradable=exclude_limited_upgradable, + exclude_limited_non_upgradable=exclude_limited_non_upgradable, + exclude_unique=exclude_unique, + exclude_from_blockchain=exclude_from_blockchain, + sort_by_price=sort_by_price, + offset=offset, + limit=limit, + exclude_limited=exclude_limited, + ) + return await self(call, request_timeout=request_timeout) + + async def get_business_account_star_balance( + self, + business_connection_id: str, + request_timeout: int | None = None, + ) -> StarAmount: + """ + Returns the amount of Telegram Stars owned by a managed business account. Requires the *can_view_gifts_and_stars* business bot right. Returns :class:`aiogram.types.star_amount.StarAmount` on success. + + Source: https://core.telegram.org/bots/api#getbusinessaccountstarbalance + + :param business_connection_id: Unique identifier of the business connection + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.star_amount.StarAmount` on success. + """ + + call = GetBusinessAccountStarBalance( + business_connection_id=business_connection_id, + ) + return await self(call, request_timeout=request_timeout) + + async def gift_premium_subscription( + self, + user_id: int, + month_count: int, + star_count: int, + text: str | None = None, + text_parse_mode: str | None = None, + text_entities: list[MessageEntity] | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Gifts a Telegram Premium subscription to the given user. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#giftpremiumsubscription + + :param user_id: Unique identifier of the target user who will receive a Telegram Premium subscription + :param month_count: Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12 + :param star_count: Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months + :param text: Text that will be shown along with the service message about the subscription; 0-128 characters + :param text_parse_mode: Mode for parsing entities in the text. See `formatting options `_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored. + :param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = GiftPremiumSubscription( + user_id=user_id, + month_count=month_count, + star_count=star_count, + text=text, + text_parse_mode=text_parse_mode, + text_entities=text_entities, + ) + return await self(call, request_timeout=request_timeout) + + async def post_story( + self, + business_connection_id: str, + content: InputStoryContentUnion, + active_period: int, + caption: str | None = None, + parse_mode: str | None = None, + caption_entities: list[MessageEntity] | None = None, + areas: list[StoryArea] | None = None, + post_to_chat_page: bool | None = None, + protect_content: bool | None = None, + request_timeout: int | None = None, + ) -> Story: + """ + Posts a story on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :class:`aiogram.types.story.Story` on success. + + Source: https://core.telegram.org/bots/api#poststory + + :param business_connection_id: Unique identifier of the business connection + :param content: Content of the story + :param active_period: Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400` + :param caption: Caption of the story, 0-2048 characters after entities parsing + :param parse_mode: Mode for parsing entities in the story 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* + :param areas: A JSON-serialized list of clickable areas to be shown on the story + :param post_to_chat_page: Pass :code:`True` to keep the story accessible after it expires + :param protect_content: Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.story.Story` on success. + """ + + call = PostStory( + business_connection_id=business_connection_id, + content=content, + active_period=active_period, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + areas=areas, + post_to_chat_page=post_to_chat_page, + protect_content=protect_content, + ) + return await self(call, request_timeout=request_timeout) + + async def read_business_message( + self, + business_connection_id: str, + chat_id: int, + message_id: int, + request_timeout: int | None = None, + ) -> bool: + """ + Marks incoming message as read on behalf of a business account. Requires the *can_read_messages* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#readbusinessmessage + + :param business_connection_id: Unique identifier of the business connection on behalf of which to read the message + :param chat_id: Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours. + :param message_id: Unique identifier of the message to mark as read + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = ReadBusinessMessage( + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + ) + return await self(call, request_timeout=request_timeout) + + async def remove_business_account_profile_photo( + self, + business_connection_id: str, + is_public: bool | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Removes the current profile photo of a managed business account. Requires the *can_edit_profile_photo* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#removebusinessaccountprofilephoto + + :param business_connection_id: Unique identifier of the business connection + :param is_public: Pass :code:`True` to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = RemoveBusinessAccountProfilePhoto( + business_connection_id=business_connection_id, + is_public=is_public, + ) + return await self(call, request_timeout=request_timeout) + + async def set_business_account_bio( + self, + business_connection_id: str, + bio: str | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Changes the bio of a managed business account. Requires the *can_change_bio* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setbusinessaccountbio + + :param business_connection_id: Unique identifier of the business connection + :param bio: The new value of the bio for the business account; 0-140 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetBusinessAccountBio( + business_connection_id=business_connection_id, + bio=bio, + ) + return await self(call, request_timeout=request_timeout) + + async def set_business_account_gift_settings( + self, + business_connection_id: str, + show_gift_button: bool, + accepted_gift_types: AcceptedGiftTypes, + request_timeout: int | None = None, + ) -> bool: + """ + Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the *can_change_gift_settings* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setbusinessaccountgiftsettings + + :param business_connection_id: Unique identifier of the business connection + :param show_gift_button: Pass :code:`True`, if a button for sending a gift to the user or by the business account must always be shown in the input field + :param accepted_gift_types: Types of gifts accepted by the business account + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetBusinessAccountGiftSettings( + business_connection_id=business_connection_id, + show_gift_button=show_gift_button, + accepted_gift_types=accepted_gift_types, + ) + return await self(call, request_timeout=request_timeout) + + async def set_business_account_name( + self, + business_connection_id: str, + first_name: str, + last_name: str | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Changes the first and last name of a managed business account. Requires the *can_change_name* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setbusinessaccountname + + :param business_connection_id: Unique identifier of the business connection + :param first_name: The new value of the first name for the business account; 1-64 characters + :param last_name: The new value of the last name for the business account; 0-64 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetBusinessAccountName( + business_connection_id=business_connection_id, + first_name=first_name, + last_name=last_name, + ) + return await self(call, request_timeout=request_timeout) + + async def set_business_account_profile_photo( + self, + business_connection_id: str, + photo: InputProfilePhotoUnion, + is_public: bool | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Changes the profile photo of a managed business account. Requires the *can_edit_profile_photo* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setbusinessaccountprofilephoto + + :param business_connection_id: Unique identifier of the business connection + :param photo: The new profile photo to set + :param is_public: Pass :code:`True` to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetBusinessAccountProfilePhoto( + business_connection_id=business_connection_id, + photo=photo, + is_public=is_public, + ) + return await self(call, request_timeout=request_timeout) + + async def set_business_account_username( + self, + business_connection_id: str, + username: str | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Changes the username of a managed business account. Requires the *can_change_username* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setbusinessaccountusername + + :param business_connection_id: Unique identifier of the business connection + :param username: The new value of the username for the business account; 0-32 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetBusinessAccountUsername( + business_connection_id=business_connection_id, + username=username, + ) + return await self(call, request_timeout=request_timeout) + + async def transfer_business_account_stars( + self, + business_connection_id: str, + star_count: int, + request_timeout: int | None = None, + ) -> bool: + """ + Transfers Telegram Stars from the business account balance to the bot's balance. Requires the *can_transfer_stars* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#transferbusinessaccountstars + + :param business_connection_id: Unique identifier of the business connection + :param star_count: Number of Telegram Stars to transfer; 1-10000 + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = TransferBusinessAccountStars( + business_connection_id=business_connection_id, + star_count=star_count, + ) + return await self(call, request_timeout=request_timeout) + + async def transfer_gift( + self, + business_connection_id: str, + owned_gift_id: str, + new_owner_chat_id: int, + star_count: int | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Transfers an owned unique gift to another user. Requires the *can_transfer_and_upgrade_gifts* business bot right. Requires *can_transfer_stars* business bot right if the transfer is paid. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#transfergift + + :param business_connection_id: Unique identifier of the business connection + :param owned_gift_id: Unique identifier of the regular gift that should be transferred + :param new_owner_chat_id: Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours. + :param star_count: The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the *can_transfer_stars* business bot right is required. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = TransferGift( + business_connection_id=business_connection_id, + owned_gift_id=owned_gift_id, + new_owner_chat_id=new_owner_chat_id, + star_count=star_count, + ) + return await self(call, request_timeout=request_timeout) + + async def upgrade_gift( + self, + business_connection_id: str, + owned_gift_id: str, + keep_original_details: bool | None = None, + star_count: int | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Upgrades a given regular gift to a unique gift. Requires the *can_transfer_and_upgrade_gifts* business bot right. Additionally requires the *can_transfer_stars* business bot right if the upgrade is paid. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#upgradegift + + :param business_connection_id: Unique identifier of the business connection + :param owned_gift_id: Unique identifier of the regular gift that should be upgraded to a unique one + :param keep_original_details: Pass :code:`True` to keep the original gift text, sender and receiver in the upgraded gift + :param star_count: The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If :code:`gift.prepaid_upgrade_star_count > 0`, then pass 0, otherwise, the *can_transfer_stars* business bot right is required and :code:`gift.upgrade_star_count` must be passed. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UpgradeGift( + business_connection_id=business_connection_id, + owned_gift_id=owned_gift_id, + keep_original_details=keep_original_details, + star_count=star_count, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_message_checklist( + self, + business_connection_id: str, + chat_id: int, + message_id: int, + checklist: InputChecklist, + reply_markup: InlineKeyboardMarkup | None = None, + request_timeout: int | None = None, + ) -> Message: + """ + 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. + + Source: https://core.telegram.org/bots/api#editmessagechecklist + + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param chat_id: Unique identifier for the target chat + :param message_id: Unique identifier for the target message + :param checklist: A JSON-serialized object for the new checklist + :param reply_markup: A JSON-serialized object for the new `inline keyboard `_ for the message + :param request_timeout: Request timeout + :return: On success, the edited :class:`aiogram.types.message.Message` is returned. + """ + + call = EditMessageChecklist( + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + checklist=checklist, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def get_my_star_balance( + self, + request_timeout: int | None = None, + ) -> StarAmount: + """ + A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a :class:`aiogram.types.star_amount.StarAmount` object. + + Source: https://core.telegram.org/bots/api#getmystarbalance + + :param request_timeout: Request timeout + :return: On success, returns a :class:`aiogram.types.star_amount.StarAmount` object. + """ + + call = GetMyStarBalance() + return await self(call, request_timeout=request_timeout) + + async def send_checklist( + self, + business_connection_id: str, + chat_id: int, + checklist: InputChecklist, + disable_notification: bool | None = None, + protect_content: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + request_timeout: int | None = None, + ) -> Message: + """ + Use this method to send a checklist on behalf of a connected business account. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendchecklist + + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param chat_id: Unique identifier for the target chat + :param checklist: A JSON-serialized object for the checklist to send + :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 message_effect_id: Unique identifier of the message effect to be added to the message + :param reply_parameters: A JSON-serialized object for description of the message to reply to + :param reply_markup: A JSON-serialized object for an `inline keyboard `_ + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendChecklist( + business_connection_id=business_connection_id, + chat_id=chat_id, + checklist=checklist, + disable_notification=disable_notification, + protect_content=protect_content, + message_effect_id=message_effect_id, + reply_parameters=reply_parameters, + 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: DateTimeUnion | None = None, + request_timeout: int | None = 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: str | None = None, + request_timeout: int | None = 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) + + async def get_chat_gifts( + self, + chat_id: ChatIdUnion, + exclude_unsaved: bool | None = None, + exclude_saved: bool | None = None, + exclude_unlimited: bool | None = None, + exclude_limited_upgradable: bool | None = None, + exclude_limited_non_upgradable: bool | None = None, + exclude_from_blockchain: bool | None = None, + exclude_unique: bool | None = None, + sort_by_price: bool | None = None, + offset: str | None = None, + limit: int | None = None, + request_timeout: int | None = None, + ) -> OwnedGifts: + """ + Returns the gifts owned by a chat. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success. + + Source: https://core.telegram.org/bots/api#getchatgifts + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param exclude_unsaved: Pass :code:`True` to exclude gifts that aren't saved to the chat's profile page. Always :code:`True`, unless the bot has the *can_post_messages* administrator right in the channel. + :param exclude_saved: Pass :code:`True` to exclude gifts that are saved to the chat's profile page. Always :code:`False`, unless the bot has the *can_post_messages* administrator right in the channel. + :param exclude_unlimited: Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times + :param exclude_limited_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique + :param exclude_limited_non_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique + :param exclude_from_blockchain: Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram + :param exclude_unique: Pass :code:`True` to exclude unique gifts + :param sort_by_price: Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination. + :param offset: Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results + :param limit: The maximum number of gifts to be returned; 1-100. Defaults to 100 + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success. + """ + + call = GetChatGifts( + chat_id=chat_id, + exclude_unsaved=exclude_unsaved, + exclude_saved=exclude_saved, + exclude_unlimited=exclude_unlimited, + exclude_limited_upgradable=exclude_limited_upgradable, + exclude_limited_non_upgradable=exclude_limited_non_upgradable, + exclude_from_blockchain=exclude_from_blockchain, + exclude_unique=exclude_unique, + sort_by_price=sort_by_price, + offset=offset, + limit=limit, + ) + return await self(call, request_timeout=request_timeout) + + async def get_user_gifts( + self, + user_id: int, + exclude_unlimited: bool | None = None, + exclude_limited_upgradable: bool | None = None, + exclude_limited_non_upgradable: bool | None = None, + exclude_from_blockchain: bool | None = None, + exclude_unique: bool | None = None, + sort_by_price: bool | None = None, + offset: str | None = None, + limit: int | None = None, + request_timeout: int | None = None, + ) -> OwnedGifts: + """ + Returns the gifts owned and hosted by a user. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success. + + Source: https://core.telegram.org/bots/api#getusergifts + + :param user_id: Unique identifier of the user + :param exclude_unlimited: Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times + :param exclude_limited_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique + :param exclude_limited_non_upgradable: Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique + :param exclude_from_blockchain: Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram + :param exclude_unique: Pass :code:`True` to exclude unique gifts + :param sort_by_price: Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination. + :param offset: Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results + :param limit: The maximum number of gifts to be returned; 1-100. Defaults to 100 + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success. + """ + + call = GetUserGifts( + user_id=user_id, + exclude_unlimited=exclude_unlimited, + exclude_limited_upgradable=exclude_limited_upgradable, + exclude_limited_non_upgradable=exclude_limited_non_upgradable, + exclude_from_blockchain=exclude_from_blockchain, + exclude_unique=exclude_unique, + sort_by_price=sort_by_price, + offset=offset, + limit=limit, + ) + return await self(call, request_timeout=request_timeout) + + async def repost_story( + self, + business_connection_id: str, + from_chat_id: int, + from_story_id: int, + active_period: int, + post_to_chat_page: bool | None = None, + protect_content: bool | None = None, + request_timeout: int | None = None, + ) -> Story: + """ + Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the *can_manage_stories* business bot right for both business accounts. Returns :class:`aiogram.types.story.Story` on success. + + Source: https://core.telegram.org/bots/api#repoststory + + :param business_connection_id: Unique identifier of the business connection + :param from_chat_id: Unique identifier of the chat which posted the story that should be reposted + :param from_story_id: Unique identifier of the story that should be reposted + :param active_period: Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400` + :param post_to_chat_page: Pass :code:`True` to keep the story accessible after it expires + :param protect_content: Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.story.Story` on success. + """ + + call = RepostStory( + business_connection_id=business_connection_id, + from_chat_id=from_chat_id, + from_story_id=from_story_id, + active_period=active_period, + post_to_chat_page=post_to_chat_page, + protect_content=protect_content, + ) + return await self(call, request_timeout=request_timeout) + + async def send_message_draft( + self, + chat_id: int, + draft_id: int, + text: str, + message_thread_id: int | None = None, + parse_mode: str | None = None, + entities: list[MessageEntity] | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Use this method to stream a partial message to a user while the message is being generated. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#sendmessagedraft + + :param chat_id: Unique identifier for the target private chat + :param draft_id: Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated + :param text: Text of the message to be sent, 1-4096 characters after entities parsing + :param message_thread_id: Unique identifier for the target message thread + :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. + :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SendMessageDraft( + chat_id=chat_id, + draft_id=draft_id, + text=text, + message_thread_id=message_thread_id, + parse_mode=parse_mode, + entities=entities, + ) + return await self(call, request_timeout=request_timeout) + + async def get_user_profile_audios( + self, + user_id: int, + offset: int | None = None, + limit: int | None = None, + request_timeout: int | None = None, + ) -> UserProfileAudios: + """ + Use this method to get a list of profile audios for a user. Returns a :class:`aiogram.types.user_profile_audios.UserProfileAudios` object. + + Source: https://core.telegram.org/bots/api#getuserprofileaudios + + :param user_id: Unique identifier of the target user + :param offset: Sequential number of the first audio to be returned. By default, all audios are returned. + :param limit: Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100. + :param request_timeout: Request timeout + :return: Returns a :class:`aiogram.types.user_profile_audios.UserProfileAudios` object. + """ + + call = GetUserProfileAudios( + user_id=user_id, + offset=offset, + limit=limit, + ) + return await self(call, request_timeout=request_timeout) + + async def remove_my_profile_photo( + self, + request_timeout: int | None = None, + ) -> bool: + """ + Removes the profile photo of the bot. Requires no parameters. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#removemyprofilephoto + + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = RemoveMyProfilePhoto() + return await self(call, request_timeout=request_timeout) + + async def set_my_profile_photo( + self, + photo: InputProfilePhotoUnion, + request_timeout: int | None = None, + ) -> bool: + """ + Changes the profile photo of the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setmyprofilephoto + + :param photo: The new profile photo to set + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetMyProfilePhoto( + photo=photo, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_member_tag( + self, + chat_id: ChatIdUnion, + user_id: int, + tag: str | None = None, + request_timeout: int | None = None, + ) -> bool: + """ + Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the *can_manage_tags* administrator right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setchatmembertag + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param user_id: Unique identifier of the target user + :param tag: New tag for the member; 0-16 characters, emoji are not allowed + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatMemberTag( + chat_id=chat_id, + user_id=user_id, + tag=tag, + ) + return await self(call, request_timeout=request_timeout) + + async def get_managed_bot_token( + self, + user_id: int, + request_timeout: int | None = None, + ) -> str: + """ + Use this method to get the token of a managed bot. Returns the token as *String* on success. + + Source: https://core.telegram.org/bots/api#getmanagedbottoken + + :param user_id: User identifier of the managed bot whose token will be returned + :param request_timeout: Request timeout + :return: Returns the token as *String* on success. + """ + + call = GetManagedBotToken( + user_id=user_id, + ) + return await self(call, request_timeout=request_timeout) + + async def replace_managed_bot_token( + self, + user_id: int, + request_timeout: int | None = None, + ) -> str: + """ + Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as *String* on success. + + Source: https://core.telegram.org/bots/api#replacemanagedbottoken + + :param user_id: User identifier of the managed bot whose token will be replaced + :param request_timeout: Request timeout + :return: Returns the new token as *String* on success. + """ + + call = ReplaceManagedBotToken( + user_id=user_id, + ) + return await self(call, request_timeout=request_timeout) + + async def save_prepared_keyboard_button( + self, + user_id: int, + button: KeyboardButton, + request_timeout: int | None = None, + ) -> PreparedKeyboardButton: + """ + Stores a keyboard button that can be used by a user within a Mini App. Returns a :class:`aiogram.types.prepared_keyboard_button.PreparedKeyboardButton` object. + + Source: https://core.telegram.org/bots/api#savepreparedkeyboardbutton + + :param user_id: Unique identifier of the target user that can use the button + :param button: A JSON-serialized object describing the button to be saved. The button must be of the type *request_users*, *request_chat*, or *request_managed_bot* + :param request_timeout: Request timeout + :return: Returns a :class:`aiogram.types.prepared_keyboard_button.PreparedKeyboardButton` object. + """ + + call = SavePreparedKeyboardButton( + user_id=user_id, + button=button, + ) + return await self(call, request_timeout=request_timeout) diff --git a/aiogram/client/context_controller.py b/aiogram/client/context_controller.py index 97795a73..7f739fc3 100644 --- a/aiogram/client/context_controller.py +++ b/aiogram/client/context_controller.py @@ -1,4 +1,6 @@ -from typing import TYPE_CHECKING, Any, Optional +from __future__ import annotations + +from typing import TYPE_CHECKING, Any from pydantic import BaseModel, PrivateAttr from typing_extensions import Self @@ -8,12 +10,12 @@ if TYPE_CHECKING: class BotContextController(BaseModel): - _bot: Optional["Bot"] = PrivateAttr() + _bot: Bot | None = PrivateAttr() - def model_post_init(self, __context: Any) -> None: + def model_post_init(self, __context: Any) -> None: # noqa: PYI063 self._bot = __context.get("bot") if __context else None - def as_(self, bot: Optional["Bot"]) -> Self: + def as_(self, bot: Bot | None) -> Self: """ Bind object to a bot instance. @@ -24,7 +26,7 @@ class BotContextController(BaseModel): return self @property - def bot(self) -> Optional["Bot"]: + def bot(self) -> Bot | None: """ Get bot instance. diff --git a/aiogram/client/default.py b/aiogram/client/default.py index 6c857be0..00c8645e 100644 --- a/aiogram/client/default.py +++ b/aiogram/client/default.py @@ -1,8 +1,9 @@ from __future__ import annotations -import sys from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Any + +from aiogram.utils.dataclass import dataclass_kwargs if TYPE_CHECKING: from aiogram.types import LinkPreviewOptions @@ -27,38 +28,40 @@ class Default: def __repr__(self) -> str: return f"<{self}>" + def __eq__(self, other: object) -> bool: + if not isinstance(other, Default): + return NotImplemented + return self._name == other._name -_dataclass_properties: Dict[str, Any] = {} -if sys.version_info >= (3, 10): - # Speedup attribute access for dataclasses in Python 3.10+ - _dataclass_properties.update({"slots": True, "kw_only": True}) + def __hash__(self) -> int: + return hash(self._name) -@dataclass(**_dataclass_properties) +@dataclass(**dataclass_kwargs(slots=True, kw_only=True)) class DefaultBotProperties: """ Default bot properties. """ - parse_mode: Optional[str] = None + parse_mode: str | None = None """Default parse mode for messages.""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message silently. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: bool | None = None """Protects content from copying.""" - allow_sending_without_reply: Optional[bool] = None + allow_sending_without_reply: bool | None = None """Allows to send messages without reply.""" - link_preview: Optional[LinkPreviewOptions] = None + link_preview: LinkPreviewOptions | None = None """Link preview settings.""" - link_preview_is_disabled: Optional[bool] = None + link_preview_is_disabled: bool | None = None """Disables link preview.""" - link_preview_prefer_small_media: Optional[bool] = None + link_preview_prefer_small_media: bool | None = None """Prefer small media in link preview.""" - link_preview_prefer_large_media: Optional[bool] = None + link_preview_prefer_large_media: bool | None = None """Prefer large media in link preview.""" - link_preview_show_above_text: Optional[bool] = None + link_preview_show_above_text: bool | None = None """Show link preview above text.""" - show_caption_above_media: Optional[bool] = None + show_caption_above_media: bool | None = None """Show caption above media.""" def __post_init__(self) -> None: @@ -68,11 +71,11 @@ class DefaultBotProperties: self.link_preview_prefer_small_media, self.link_preview_prefer_large_media, self.link_preview_show_above_text, - ) + ), ) if has_any_link_preview_option and self.link_preview is None: - from ..types import LinkPreviewOptions + from aiogram.types import LinkPreviewOptions self.link_preview = LinkPreviewOptions( is_disabled=self.link_preview_is_disabled, diff --git a/aiogram/client/session/aiohttp.py b/aiogram/client/session/aiohttp.py index 69f36bf1..c1d0b291 100644 --- a/aiogram/client/session/aiohttp.py +++ b/aiogram/client/session/aiohttp.py @@ -2,45 +2,35 @@ from __future__ import annotations import asyncio import ssl -from typing import ( - TYPE_CHECKING, - Any, - AsyncGenerator, - Dict, - Iterable, - List, - Optional, - Tuple, - Type, - Union, - cast, -) +from collections.abc import AsyncGenerator, Iterable +from typing import TYPE_CHECKING, Any, cast import certifi from aiohttp import BasicAuth, ClientError, ClientSession, FormData, TCPConnector from aiohttp.hdrs import USER_AGENT from aiohttp.http import SERVER_SOFTWARE +from typing_extensions import Self from aiogram.__meta__ import __version__ -from aiogram.methods import TelegramMethod +from aiogram.exceptions import TelegramNetworkError +from aiogram.methods.base import TelegramType -from ...exceptions import TelegramNetworkError -from ...methods.base import TelegramType -from ...types import InputFile from .base import BaseSession if TYPE_CHECKING: - from ..bot import Bot + from aiogram.client.bot import Bot + from aiogram.methods import TelegramMethod + from aiogram.types import InputFile -_ProxyBasic = Union[str, Tuple[str, BasicAuth]] +_ProxyBasic = str | tuple[str, BasicAuth] _ProxyChain = Iterable[_ProxyBasic] -_ProxyType = Union[_ProxyChain, _ProxyBasic] +_ProxyType = _ProxyChain | _ProxyBasic -def _retrieve_basic(basic: _ProxyBasic) -> Dict[str, Any]: - from aiohttp_socks.utils import parse_proxy_url # type: ignore +def _retrieve_basic(basic: _ProxyBasic) -> dict[str, Any]: + from aiohttp_socks.utils import parse_proxy_url - proxy_auth: Optional[BasicAuth] = None + proxy_auth: BasicAuth | None = None if isinstance(basic, str): proxy_url = basic @@ -62,33 +52,25 @@ def _retrieve_basic(basic: _ProxyBasic) -> Dict[str, Any]: } -def _prepare_connector(chain_or_plain: _ProxyType) -> Tuple[Type["TCPConnector"], Dict[str, Any]]: - from aiohttp_socks import ( # type: ignore - ChainProxyConnector, - ProxyConnector, - ProxyInfo, - ) +def _prepare_connector(chain_or_plain: _ProxyType) -> tuple[type[TCPConnector], dict[str, Any]]: + from aiohttp_socks import ChainProxyConnector, ProxyConnector, ProxyInfo # since tuple is Iterable(compatible with _ProxyChain) object, we assume that # user wants chained proxies if tuple is a pair of string(url) and BasicAuth if isinstance(chain_or_plain, str) or ( - isinstance(chain_or_plain, tuple) and len(chain_or_plain) == 2 + isinstance(chain_or_plain, tuple) and len(chain_or_plain) == 2 # noqa: PLR2004 ): chain_or_plain = cast(_ProxyBasic, chain_or_plain) return ProxyConnector, _retrieve_basic(chain_or_plain) chain_or_plain = cast(_ProxyChain, chain_or_plain) - infos: List[ProxyInfo] = [] - for basic in chain_or_plain: - infos.append(ProxyInfo(**_retrieve_basic(basic))) + infos: list[ProxyInfo] = [ProxyInfo(**_retrieve_basic(basic)) for basic in chain_or_plain] return ChainProxyConnector, {"proxy_infos": infos} class AiohttpSession(BaseSession): - def __init__( - self, proxy: Optional[_ProxyType] = None, limit: int = 100, **kwargs: Any - ) -> None: + def __init__(self, proxy: _ProxyType | None = None, limit: int = 100, **kwargs: Any) -> None: """ Client session based on aiohttp. @@ -98,31 +80,32 @@ class AiohttpSession(BaseSession): """ super().__init__(**kwargs) - self._session: Optional[ClientSession] = None - self._connector_type: Type[TCPConnector] = TCPConnector - self._connector_init: Dict[str, Any] = { + self._session: ClientSession | None = None + self._connector_type: type[TCPConnector] = TCPConnector + self._connector_init: dict[str, Any] = { "ssl": ssl.create_default_context(cafile=certifi.where()), "limit": limit, "ttl_dns_cache": 3600, # Workaround for https://github.com/aiogram/aiogram/issues/1500 } self._should_reset_connector = True # flag determines connector state - self._proxy: Optional[_ProxyType] = None + self._proxy: _ProxyType | None = None if proxy is not None: try: self._setup_proxy_connector(proxy) except ImportError as exc: # pragma: no cover - raise RuntimeError( + msg = ( "In order to use aiohttp client for proxy requests, install " "https://pypi.org/project/aiohttp-socks/" - ) from exc + ) + raise RuntimeError(msg) from exc def _setup_proxy_connector(self, proxy: _ProxyType) -> None: self._connector_type, self._connector_init = _prepare_connector(proxy) self._proxy = proxy @property - def proxy(self) -> Optional[_ProxyType]: + def proxy(self) -> _ProxyType | None: return self._proxy @proxy.setter @@ -155,7 +138,7 @@ class AiohttpSession(BaseSession): def build_form_data(self, bot: Bot, method: TelegramMethod[TelegramType]) -> FormData: form = FormData(quote_fields=False) - files: Dict[str, InputFile] = {} + files: dict[str, InputFile] = {} for key, value in method.model_dump(warnings=False).items(): value = self.prepare_value(value, bot=bot, files=files) if not value: @@ -170,7 +153,10 @@ class AiohttpSession(BaseSession): return form async def make_request( - self, bot: Bot, method: TelegramMethod[TelegramType], timeout: Optional[int] = None + self, + bot: Bot, + method: TelegramMethod[TelegramType], + timeout: int | None = None, ) -> TelegramType: session = await self.create_session() @@ -179,22 +165,27 @@ class AiohttpSession(BaseSession): try: async with session.post( - url, data=form, timeout=self.timeout if timeout is None else timeout + url, + data=form, + timeout=self.timeout if timeout is None else timeout, ) as resp: raw_result = await resp.text() - except asyncio.TimeoutError: - raise TelegramNetworkError(method=method, message="Request timeout error") + except asyncio.TimeoutError as e: + raise TelegramNetworkError(method=method, message="Request timeout error") from e except ClientError as e: - raise TelegramNetworkError(method=method, message=f"{type(e).__name__}: {e}") + raise TelegramNetworkError(method=method, message=f"{type(e).__name__}: {e}") from e response = self.check_response( - bot=bot, method=method, status_code=resp.status, content=raw_result + bot=bot, + method=method, + status_code=resp.status, + content=raw_result, ) return cast(TelegramType, response.result) async def stream_content( self, url: str, - headers: Optional[Dict[str, Any]] = None, + headers: dict[str, Any] | None = None, timeout: int = 30, chunk_size: int = 65536, raise_for_status: bool = True, @@ -205,11 +196,14 @@ class AiohttpSession(BaseSession): session = await self.create_session() async with session.get( - url, timeout=timeout, headers=headers, raise_for_status=raise_for_status + url, + timeout=timeout, + headers=headers, + raise_for_status=raise_for_status, ) as resp: async for chunk in resp.content.iter_chunked(chunk_size): yield chunk - async def __aenter__(self) -> AiohttpSession: + async def __aenter__(self) -> Self: await self.create_session() return self diff --git a/aiogram/client/session/base.py b/aiogram/client/session/base.py index 82ec4691..08c428bd 100644 --- a/aiogram/client/session/base.py +++ b/aiogram/client/session/base.py @@ -4,23 +4,16 @@ import abc import datetime import json import secrets +from collections.abc import AsyncGenerator, Callable from enum import Enum from http import HTTPStatus -from types import TracebackType -from typing import ( - TYPE_CHECKING, - Any, - AsyncGenerator, - Callable, - Dict, - Final, - Optional, - Type, - cast, -) +from typing import TYPE_CHECKING, Any, Final, cast from pydantic import ValidationError +from typing_extensions import Self +from aiogram.client.default import Default +from aiogram.client.telegram import PRODUCTION, TelegramAPIServer from aiogram.exceptions import ( ClientDecodeError, RestartingTelegram, @@ -35,16 +28,16 @@ from aiogram.exceptions import ( TelegramServerError, TelegramUnauthorizedError, ) +from aiogram.methods import Response, TelegramMethod +from aiogram.methods.base import TelegramType +from aiogram.types import InputFile, TelegramObject -from ...methods import Response, TelegramMethod -from ...methods.base import TelegramType -from ...types import InputFile, TelegramObject -from ..default import Default -from ..telegram import PRODUCTION, TelegramAPIServer from .middlewares.manager import RequestMiddlewareManager if TYPE_CHECKING: - from ..bot import Bot + from types import TracebackType + + from aiogram.client.bot import Bot _JsonLoads = Callable[..., Any] _JsonDumps = Callable[..., str] @@ -81,24 +74,30 @@ class BaseSession(abc.ABC): self.middleware = RequestMiddlewareManager() def check_response( - self, bot: Bot, method: TelegramMethod[TelegramType], status_code: int, content: str + self, + bot: Bot, + method: TelegramMethod[TelegramType], + status_code: int, + content: str, ) -> Response[TelegramType]: """ Check response status """ try: json_data = self.json_loads(content) - except Exception as e: + except Exception as e: # noqa: BLE001 # Handled error type can't be classified as specific error # in due to decoder can be customized and raise any exception - raise ClientDecodeError("Failed to decode object", e, content) + msg = "Failed to decode object" + raise ClientDecodeError(msg, e, content) from e try: response_type = Response[method.__returning__] # type: ignore response = response_type.model_validate(json_data, context={"bot": bot}) except ValidationError as e: - raise ClientDecodeError("Failed to deserialize object", e, json_data) + msg = "Failed to deserialize object" + raise ClientDecodeError(msg, e, json_data) from e if HTTPStatus.OK <= status_code <= HTTPStatus.IM_USED and response.ok: return response @@ -108,7 +107,9 @@ class BaseSession(abc.ABC): if parameters := response.parameters: if parameters.retry_after: raise TelegramRetryAfter( - method=method, message=description, retry_after=parameters.retry_after + method=method, + message=description, + retry_after=parameters.retry_after, ) if parameters.migrate_to_chat_id: raise TelegramMigrateToChat( @@ -143,14 +144,13 @@ class BaseSession(abc.ABC): """ Close client session """ - pass @abc.abstractmethod async def make_request( self, bot: Bot, method: TelegramMethod[TelegramType], - timeout: Optional[int] = None, + timeout: int | None = None, ) -> TelegramType: # pragma: no cover """ Make request to Telegram Bot API @@ -161,13 +161,12 @@ class BaseSession(abc.ABC): :return: :raise TelegramApiError: """ - pass @abc.abstractmethod async def stream_content( self, url: str, - headers: Optional[Dict[str, Any]] = None, + headers: dict[str, Any] | None = None, timeout: int = 30, chunk_size: int = 65536, raise_for_status: bool = True, @@ -181,7 +180,7 @@ class BaseSession(abc.ABC): self, value: Any, bot: Bot, - files: Dict[str, Any], + files: dict[str, Any], _dumps_json: bool = True, ) -> Any: """ @@ -204,7 +203,10 @@ class BaseSession(abc.ABC): for key, item in value.items() if ( prepared_item := self.prepare_value( - item, bot=bot, files=files, _dumps_json=False + item, + bot=bot, + files=files, + _dumps_json=False, ) ) is not None @@ -218,7 +220,10 @@ class BaseSession(abc.ABC): for item in value if ( prepared_item := self.prepare_value( - item, bot=bot, files=files, _dumps_json=False + item, + bot=bot, + files=files, + _dumps_json=False, ) ) is not None @@ -227,7 +232,7 @@ class BaseSession(abc.ABC): return self.json_dumps(value) return value if isinstance(value, datetime.timedelta): - now = datetime.datetime.now() + now = datetime.datetime.now() # noqa: DTZ005 return str(round((now + value).timestamp())) if isinstance(value, datetime.datetime): return str(round(value.timestamp())) @@ -248,18 +253,18 @@ class BaseSession(abc.ABC): self, bot: Bot, method: TelegramMethod[TelegramType], - timeout: Optional[int] = None, + timeout: int | None = None, ) -> TelegramType: middleware = self.middleware.wrap_middlewares(self.make_request, timeout=timeout) return cast(TelegramType, await middleware(bot, method)) - async def __aenter__(self) -> BaseSession: + async def __aenter__(self) -> Self: return self async def __aexit__( self, - exc_type: Optional[Type[BaseException]], - exc_value: Optional[BaseException], - traceback: Optional[TracebackType], + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + traceback: TracebackType | None, ) -> None: await self.close() diff --git a/aiogram/client/session/middlewares/base.py b/aiogram/client/session/middlewares/base.py index c5f3e7cf..a933b600 100644 --- a/aiogram/client/session/middlewares/base.py +++ b/aiogram/client/session/middlewares/base.py @@ -3,17 +3,17 @@ from __future__ import annotations from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Protocol -from aiogram.methods import Response, TelegramMethod from aiogram.methods.base import TelegramType if TYPE_CHECKING: - from ...bot import Bot + from aiogram.client.bot import Bot + from aiogram.methods import Response, TelegramMethod class NextRequestMiddlewareType(Protocol[TelegramType]): # pragma: no cover async def __call__( self, - bot: "Bot", + bot: Bot, method: TelegramMethod[TelegramType], ) -> Response[TelegramType]: pass @@ -23,7 +23,7 @@ class RequestMiddlewareType(Protocol): # pragma: no cover async def __call__( self, make_request: NextRequestMiddlewareType[TelegramType], - bot: "Bot", + bot: Bot, method: TelegramMethod[TelegramType], ) -> Response[TelegramType]: pass @@ -38,7 +38,7 @@ class BaseRequestMiddleware(ABC): async def __call__( self, make_request: NextRequestMiddlewareType[TelegramType], - bot: "Bot", + bot: Bot, method: TelegramMethod[TelegramType], ) -> Response[TelegramType]: """ @@ -50,4 +50,3 @@ class BaseRequestMiddleware(ABC): :return: :class:`aiogram.methods.Response` """ - pass diff --git a/aiogram/client/session/middlewares/manager.py b/aiogram/client/session/middlewares/manager.py index 2346715f..14906a4f 100644 --- a/aiogram/client/session/middlewares/manager.py +++ b/aiogram/client/session/middlewares/manager.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable, Sequence from functools import partial -from typing import Any, Callable, List, Optional, Sequence, Union, cast, overload +from typing import Any, cast, overload from aiogram.client.session.middlewares.base import ( NextRequestMiddlewareType, @@ -12,7 +13,7 @@ from aiogram.methods.base import TelegramType class RequestMiddlewareManager(Sequence[RequestMiddlewareType]): def __init__(self) -> None: - self._middlewares: List[RequestMiddlewareType] = [] + self._middlewares: list[RequestMiddlewareType] = [] def register( self, @@ -26,11 +27,8 @@ class RequestMiddlewareManager(Sequence[RequestMiddlewareType]): def __call__( self, - middleware: Optional[RequestMiddlewareType] = None, - ) -> Union[ - Callable[[RequestMiddlewareType], RequestMiddlewareType], - RequestMiddlewareType, - ]: + middleware: RequestMiddlewareType | None = None, + ) -> Callable[[RequestMiddlewareType], RequestMiddlewareType] | RequestMiddlewareType: if middleware is None: return self.register return self.register(middleware) @@ -44,8 +42,9 @@ class RequestMiddlewareManager(Sequence[RequestMiddlewareType]): pass def __getitem__( - self, item: Union[int, slice] - ) -> Union[RequestMiddlewareType, Sequence[RequestMiddlewareType]]: + self, + item: int | slice, + ) -> RequestMiddlewareType | Sequence[RequestMiddlewareType]: return self._middlewares[item] def __len__(self) -> int: diff --git a/aiogram/client/session/middlewares/request_logging.py b/aiogram/client/session/middlewares/request_logging.py index af7b9d6e..f46631bf 100644 --- a/aiogram/client/session/middlewares/request_logging.py +++ b/aiogram/client/session/middlewares/request_logging.py @@ -1,5 +1,5 @@ import logging -from typing import TYPE_CHECKING, Any, List, Optional, Type +from typing import TYPE_CHECKING, Any from aiogram import loggers from aiogram.methods import TelegramMethod @@ -8,19 +8,19 @@ from aiogram.methods.base import Response, TelegramType from .base import BaseRequestMiddleware, NextRequestMiddlewareType if TYPE_CHECKING: - from ...bot import Bot + from aiogram.client.bot import Bot logger = logging.getLogger(__name__) class RequestLogging(BaseRequestMiddleware): - def __init__(self, ignore_methods: Optional[List[Type[TelegramMethod[Any]]]] = None): + def __init__(self, ignore_methods: list[type[TelegramMethod[Any]]] | None = None): """ Middleware for logging outgoing requests :param ignore_methods: methods to ignore in logging middleware """ - self.ignore_methods = ignore_methods if ignore_methods else [] + self.ignore_methods = ignore_methods or [] async def __call__( self, diff --git a/aiogram/client/telegram.py b/aiogram/client/telegram.py index 5e29722f..7e6e04b9 100644 --- a/aiogram/client/telegram.py +++ b/aiogram/client/telegram.py @@ -1,24 +1,24 @@ from abc import ABC, abstractmethod -from dataclasses import dataclass +from dataclasses import dataclass, field from pathlib import Path -from typing import Any, Union +from typing import Any class FilesPathWrapper(ABC): @abstractmethod - def to_local(self, path: Union[Path, str]) -> Union[Path, str]: + def to_local(self, path: Path | str) -> Path | str: pass @abstractmethod - def to_server(self, path: Union[Path, str]) -> Union[Path, str]: + def to_server(self, path: Path | str) -> Path | str: pass class BareFilesPathWrapper(FilesPathWrapper): - def to_local(self, path: Union[Path, str]) -> Union[Path, str]: + def to_local(self, path: Path | str) -> Path | str: return path - def to_server(self, path: Union[Path, str]) -> Union[Path, str]: + def to_server(self, path: Path | str) -> Path | str: return path @@ -29,15 +29,18 @@ class SimpleFilesPathWrapper(FilesPathWrapper): @classmethod def _resolve( - cls, base1: Union[Path, str], base2: Union[Path, str], value: Union[Path, str] + cls, + base1: Path | str, + base2: Path | str, + value: Path | str, ) -> Path: relative = Path(value).relative_to(base1) return base2 / relative - def to_local(self, path: Union[Path, str]) -> Union[Path, str]: + def to_local(self, path: Path | str) -> Path | str: return self._resolve(base1=self.server_path, base2=self.local_path, value=path) - def to_server(self, path: Union[Path, str]) -> Union[Path, str]: + def to_server(self, path: Path | str) -> Path | str: return self._resolve(base1=self.local_path, base2=self.server_path, value=path) @@ -54,7 +57,7 @@ class TelegramAPIServer: is_local: bool = False """Mark this server is in `local mode `_.""" - wrap_local_file: FilesPathWrapper = BareFilesPathWrapper() + wrap_local_file: FilesPathWrapper = field(default=BareFilesPathWrapper()) """Callback to wrap files path in local mode""" def api_url(self, token: str, method: str) -> str: @@ -67,7 +70,7 @@ class TelegramAPIServer: """ return self.base.format(token=token, method=method) - def file_url(self, token: str, path: str) -> str: + def file_url(self, token: str, path: str | Path) -> str: """ Generate URL for downloading files diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 8b6987cb..5aff6a01 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -3,30 +3,35 @@ from __future__ import annotations import asyncio import contextvars import signal +import sys import warnings from asyncio import CancelledError, Event, Future, Lock +from collections.abc import AsyncGenerator, Awaitable from contextlib import suppress -from typing import Any, AsyncGenerator, Dict, List, Optional, Set, Union +from typing import TYPE_CHECKING, Any + +from aiogram import loggers +from aiogram.exceptions import TelegramAPIError +from aiogram.fsm.middleware import FSMContextMiddleware +from aiogram.fsm.storage.base import BaseEventIsolation, BaseStorage +from aiogram.fsm.storage.memory import DisabledEventIsolation, MemoryStorage +from aiogram.fsm.strategy import FSMStrategy +from aiogram.methods import GetUpdates, TelegramMethod +from aiogram.types import Update, User +from aiogram.types.base import UNSET, UNSET_TYPE +from aiogram.types.update import UpdateTypeLookupError +from aiogram.utils.backoff import Backoff, BackoffConfig -from .. import loggers -from ..client.bot import Bot -from ..exceptions import TelegramAPIError -from ..fsm.middleware import FSMContextMiddleware -from ..fsm.storage.base import BaseEventIsolation, BaseStorage -from ..fsm.storage.memory import DisabledEventIsolation, MemoryStorage -from ..fsm.strategy import FSMStrategy -from ..methods import GetUpdates, TelegramMethod -from ..methods.base import TelegramType -from ..types import Update, User -from ..types.base import UNSET, UNSET_TYPE -from ..types.update import UpdateTypeLookupError -from ..utils.backoff import Backoff, BackoffConfig from .event.bases import UNHANDLED, SkipHandler from .event.telegram import TelegramEventObserver from .middlewares.error import ErrorsMiddleware from .middlewares.user_context import UserContextMiddleware from .router import Router +if TYPE_CHECKING: + from aiogram.client.bot import Bot + from aiogram.methods.base import TelegramType + DEFAULT_BACKOFF_CONFIG = BackoffConfig(min_delay=1.0, max_delay=5.0, factor=1.3, jitter=0.1) @@ -38,11 +43,11 @@ class Dispatcher(Router): def __init__( self, *, # * - Preventing to pass instance of Bot to the FSM storage - storage: Optional[BaseStorage] = None, + storage: BaseStorage | None = None, fsm_strategy: FSMStrategy = FSMStrategy.USER_IN_CHAT, - events_isolation: Optional[BaseEventIsolation] = None, + events_isolation: BaseEventIsolation | None = None, disable_fsm: bool = False, - name: Optional[str] = None, + name: str | None = None, **kwargs: Any, ) -> None: """ @@ -55,18 +60,18 @@ class Dispatcher(Router): then you should not use storage and events isolation :param kwargs: Other arguments, will be passed as keyword arguments to handlers """ - super(Dispatcher, self).__init__(name=name) + super().__init__(name=name) if storage and not isinstance(storage, BaseStorage): - raise TypeError( - f"FSM storage should be instance of 'BaseStorage' not {type(storage).__name__}" - ) + msg = f"FSM storage should be instance of 'BaseStorage' not {type(storage).__name__}" + raise TypeError(msg) # Telegram API provides originally only one event type - Update # For making easily interactions with events here is registered handler which helps # to separate Update to different event types like Message, CallbackQuery etc. self.update = self.observers["update"] = TelegramEventObserver( - router=self, event_name="update" + router=self, + event_name="update", ) self.update.register(self._listen_update) @@ -91,11 +96,11 @@ class Dispatcher(Router): self.update.outer_middleware(self.fsm) self.shutdown.register(self.fsm.close) - self.workflow_data: Dict[str, Any] = kwargs + self.workflow_data: dict[str, Any] = kwargs self._running_lock = Lock() - self._stop_signal: Optional[Event] = None - self._stopped_signal: Optional[Event] = None - self._handle_update_tasks: Set[asyncio.Task[Any]] = set() + self._stop_signal: Event | None = None + self._stopped_signal: Event | None = None + self._handle_update_tasks: set[asyncio.Task[Any]] = set() def __getitem__(self, item: str) -> Any: return self.workflow_data[item] @@ -106,7 +111,7 @@ class Dispatcher(Router): def __delitem__(self, key: str) -> None: del self.workflow_data[key] - def get(self, key: str, /, default: Optional[Any] = None) -> Optional[Any]: + def get(self, key: str, /, default: Any | None = None) -> Any | None: return self.workflow_data.get(key, default) @property @@ -114,13 +119,13 @@ class Dispatcher(Router): return self.fsm.storage @property - def parent_router(self) -> Optional[Router]: + def parent_router(self) -> Router | None: """ Dispatcher has no parent router and can't be included to any other routers or dispatchers :return: """ - return None # noqa: RET501 + return None @parent_router.setter def parent_router(self, value: Router) -> None: @@ -130,7 +135,8 @@ class Dispatcher(Router): :param value: :return: """ - raise RuntimeError("Dispatcher can not be attached to another Router.") + msg = "Dispatcher can not be attached to another Router." + raise RuntimeError(msg) async def feed_update(self, bot: Bot, update: Update, **kwargs: Any) -> Any: """ @@ -177,7 +183,7 @@ class Dispatcher(Router): bot.id, ) - async def feed_raw_update(self, bot: Bot, update: Dict[str, Any], **kwargs: Any) -> Any: + async def feed_raw_update(self, bot: Bot, update: dict[str, Any], **kwargs: Any) -> Any: """ Main entry point for incoming updates with automatic Dict->Update serializer @@ -194,7 +200,7 @@ class Dispatcher(Router): bot: Bot, polling_timeout: int = 30, backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, - allowed_updates: Optional[List[str]] = None, + allowed_updates: list[str] | None = None, ) -> AsyncGenerator[Update, None]: """ Endless updates reader with correctly handling any server-side or connection errors. @@ -212,7 +218,7 @@ class Dispatcher(Router): while True: try: updates = await bot(get_updates, **kwargs) - except Exception as e: + except Exception as e: # noqa: BLE001 failed = True # In cases when Telegram Bot API was inaccessible don't need to stop polling # process because some developers can't make auto-restarting of the script @@ -268,6 +274,7 @@ class Dispatcher(Router): "installed not latest version of aiogram framework" f"\nUpdate: {update.model_dump_json(exclude_unset=True)}", RuntimeWarning, + stacklevel=2, ) raise SkipHandler() from e @@ -294,7 +301,11 @@ class Dispatcher(Router): loggers.event.error("Failed to make answer: %s: %s", e.__class__.__name__, e) async def _process_update( - self, bot: Bot, update: Update, call_answer: bool = True, **kwargs: Any + self, + bot: Bot, + update: Update, + call_answer: bool = True, + **kwargs: Any, ) -> bool: """ Propagate update to event listeners @@ -309,9 +320,8 @@ class Dispatcher(Router): response = await self.feed_update(bot, update, **kwargs) if call_answer and isinstance(response, TelegramMethod): await self.silent_call_request(bot=bot, result=response) - return response is not UNHANDLED - except Exception as e: + except Exception as e: # noqa: BLE001 loggers.event.exception( "Cause exception while process update id=%d by bot id=%d\n%s: %s", update.update_id, @@ -321,26 +331,62 @@ class Dispatcher(Router): ) return True # because update was processed but unsuccessful + else: + return response is not UNHANDLED + + async def _process_with_semaphore( + self, + handle_update: Awaitable[bool], + semaphore: asyncio.Semaphore, + ) -> bool: + """ + Process update with semaphore to limit concurrent tasks + + :param handle_update: Coroutine that processes the update + :param semaphore: Semaphore to limit concurrent tasks + :return: bool indicating the result of the update processing + """ + try: + return await handle_update + finally: + semaphore.release() + async def _polling( self, bot: Bot, polling_timeout: int = 30, handle_as_tasks: bool = True, backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, - allowed_updates: Optional[List[str]] = None, + allowed_updates: list[str] | None = None, + tasks_concurrency_limit: int | None = None, **kwargs: Any, ) -> None: """ Internal polling process :param bot: + :param polling_timeout: Long-polling wait time + :param handle_as_tasks: Run task for each event and no wait result + :param backoff_config: backoff-retry config + :param allowed_updates: List of the update types you want your bot to receive + :param tasks_concurrency_limit: Maximum number of concurrent updates to process + (None = no limit), used only if handle_as_tasks is True :param kwargs: :return: """ user: User = await bot.me() loggers.dispatcher.info( - "Run polling for bot @%s id=%d - %r", user.username, bot.id, user.full_name + "Run polling for bot @%s id=%d - %r", + user.username, + bot.id, + user.full_name, ) + + # Create semaphore if tasks_concurrency_limit is specified + semaphore = None + if tasks_concurrency_limit is not None and handle_as_tasks: + semaphore = asyncio.Semaphore(tasks_concurrency_limit) + try: async for update in self._listen_updates( bot, @@ -350,14 +396,25 @@ class Dispatcher(Router): ): handle_update = self._process_update(bot=bot, update=update, **kwargs) if handle_as_tasks: - handle_update_task = asyncio.create_task(handle_update) + if semaphore: + # Use semaphore to limit concurrent tasks + await semaphore.acquire() + handle_update_task = asyncio.create_task( + self._process_with_semaphore(handle_update, semaphore), + ) + else: + handle_update_task = asyncio.create_task(handle_update) + self._handle_update_tasks.add(handle_update_task) handle_update_task.add_done_callback(self._handle_update_tasks.discard) else: await handle_update finally: loggers.dispatcher.info( - "Polling stopped for bot @%s id=%d - %r", user.username, bot.id, user.full_name + "Polling stopped for bot @%s id=%d - %r", + user.username, + bot.id, + user.full_name, ) async def _feed_webhook_update(self, bot: Bot, update: Update, **kwargs: Any) -> Any: @@ -377,8 +434,12 @@ class Dispatcher(Router): raise async def feed_webhook_update( - self, bot: Bot, update: Union[Update, Dict[str, Any]], _timeout: float = 55, **kwargs: Any - ) -> Optional[TelegramMethod[TelegramType]]: + self, + bot: Bot, + update: Update | dict[str, Any], + _timeout: float = 55, + **kwargs: Any, + ) -> TelegramMethod[TelegramType] | None: if not isinstance(update, Update): # Allow to use raw updates update = Update.model_validate(update, context={"bot": bot}) @@ -393,7 +454,7 @@ class Dispatcher(Router): timeout_handle = loop.call_later(_timeout, release_waiter) process_updates: Future[Any] = asyncio.ensure_future( - self._feed_webhook_update(bot=bot, update=update, **kwargs) + self._feed_webhook_update(bot=bot, update=update, **kwargs), ) process_updates.add_done_callback(release_waiter, context=ctx) @@ -404,11 +465,9 @@ class Dispatcher(Router): "For preventing this situation response into webhook returned immediately " "and handler is moved to background and still processing update.", RuntimeWarning, + stacklevel=2, ) - try: - result = task.result() - except Exception as e: - raise e + result = task.result() if isinstance(result, TelegramMethod): asyncio.ensure_future(self.silent_call_request(bot=bot, result=result)) @@ -442,7 +501,8 @@ class Dispatcher(Router): :return: """ if not self._running_lock.locked(): - raise RuntimeError("Polling is not started") + msg = "Polling is not started" + raise RuntimeError(msg) if not self._stop_signal or not self._stopped_signal: return self._stop_signal.set() @@ -463,9 +523,10 @@ class Dispatcher(Router): polling_timeout: int = 10, handle_as_tasks: bool = True, backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, - allowed_updates: Optional[Union[List[str], UNSET_TYPE]] = UNSET, + allowed_updates: list[str] | UNSET_TYPE | None = UNSET, handle_signals: bool = True, close_bot_session: bool = True, + tasks_concurrency_limit: int | None = None, **kwargs: Any, ) -> None: """ @@ -479,16 +540,20 @@ class Dispatcher(Router): By default, all used update types are enabled (resolved from handlers) :param handle_signals: handle signals (SIGINT/SIGTERM) :param close_bot_session: close bot sessions on shutdown + :param tasks_concurrency_limit: Maximum number of concurrent updates to process + (None = no limit), used only if handle_as_tasks is True :param kwargs: contextual data :return: """ if not bots: - raise ValueError("At least one bot instance is required to start polling") + msg = "At least one bot instance is required to start polling" + raise ValueError(msg) if "bot" in kwargs: - raise ValueError( + msg = ( "Keyword argument 'bot' is not acceptable, " "the bot instance should be passed as positional argument" ) + raise ValueError(msg) async with self._running_lock: # Prevent to run this method twice at a once if self._stop_signal is None: @@ -508,10 +573,14 @@ class Dispatcher(Router): # Signals handling is not supported on Windows # It also can't be covered on Windows loop.add_signal_handler( - signal.SIGTERM, self._signal_stop_polling, signal.SIGTERM + signal.SIGTERM, + self._signal_stop_polling, + signal.SIGTERM, ) loop.add_signal_handler( - signal.SIGINT, self._signal_stop_polling, signal.SIGINT + signal.SIGINT, + self._signal_stop_polling, + signal.SIGINT, ) workflow_data = { @@ -526,7 +595,7 @@ class Dispatcher(Router): await self.emit_startup(bot=bots[-1], **workflow_data) loggers.dispatcher.info("Start polling") try: - tasks: List[asyncio.Task[Any]] = [ + tasks: list[asyncio.Task[Any]] = [ asyncio.create_task( self._polling( bot=bot, @@ -534,8 +603,9 @@ class Dispatcher(Router): polling_timeout=polling_timeout, backoff_config=backoff_config, allowed_updates=allowed_updates, + tasks_concurrency_limit=tasks_concurrency_limit, **workflow_data, - ) + ), ) for bot in bots ] @@ -565,9 +635,10 @@ class Dispatcher(Router): polling_timeout: int = 10, handle_as_tasks: bool = True, backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, - allowed_updates: Optional[Union[List[str], UNSET_TYPE]] = UNSET, + allowed_updates: list[str] | UNSET_TYPE | None = UNSET, handle_signals: bool = True, close_bot_session: bool = True, + tasks_concurrency_limit: int | None = None, **kwargs: Any, ) -> None: """ @@ -580,19 +651,34 @@ class Dispatcher(Router): :param allowed_updates: List of the update types you want your bot to receive :param handle_signals: handle signals (SIGINT/SIGTERM) :param close_bot_session: close bot sessions on shutdown + :param tasks_concurrency_limit: Maximum number of concurrent updates to process + (None = no limit), used only if handle_as_tasks is True :param kwargs: contextual data :return: """ with suppress(KeyboardInterrupt): - return asyncio.run( - self.start_polling( - *bots, - **kwargs, - polling_timeout=polling_timeout, - handle_as_tasks=handle_as_tasks, - backoff_config=backoff_config, - allowed_updates=allowed_updates, - handle_signals=handle_signals, - close_bot_session=close_bot_session, - ) + coro = self.start_polling( + *bots, + **kwargs, + polling_timeout=polling_timeout, + handle_as_tasks=handle_as_tasks, + backoff_config=backoff_config, + allowed_updates=allowed_updates, + handle_signals=handle_signals, + close_bot_session=close_bot_session, + tasks_concurrency_limit=tasks_concurrency_limit, ) + + try: + import uvloop + + except ImportError: + return asyncio.run(coro) + + else: + if sys.version_info >= (3, 11): + with asyncio.Runner(loop_factory=uvloop.new_event_loop) as runner: + return runner.run(coro) + else: # pragma: no cover + uvloop.install() + return asyncio.run(coro) diff --git a/aiogram/dispatcher/event/bases.py b/aiogram/dispatcher/event/bases.py index 1765683a..3b09c23d 100644 --- a/aiogram/dispatcher/event/bases.py +++ b/aiogram/dispatcher/event/bases.py @@ -1,20 +1,22 @@ from __future__ import annotations -from typing import Any, Awaitable, Callable, Dict, NoReturn, Optional, TypeVar, Union +from collections.abc import Awaitable, Callable +from typing import Any, NoReturn, TypeVar from unittest.mock import sentinel -from ...types import TelegramObject -from ..middlewares.base import BaseMiddleware +from aiogram.dispatcher.middlewares.base import BaseMiddleware +from aiogram.types import TelegramObject MiddlewareEventType = TypeVar("MiddlewareEventType", bound=TelegramObject) -NextMiddlewareType = Callable[[MiddlewareEventType, Dict[str, Any]], Awaitable[Any]] -MiddlewareType = Union[ - BaseMiddleware, - Callable[ - [NextMiddlewareType[MiddlewareEventType], MiddlewareEventType, Dict[str, Any]], +NextMiddlewareType = Callable[[MiddlewareEventType, dict[str, Any]], Awaitable[Any]] +MiddlewareType = ( + BaseMiddleware + | Callable[ + [NextMiddlewareType[MiddlewareEventType], MiddlewareEventType, dict[str, Any]], Awaitable[Any], - ], -] + ] +) + UNHANDLED = sentinel.UNHANDLED REJECTED = sentinel.REJECTED @@ -28,7 +30,7 @@ class CancelHandler(Exception): pass -def skip(message: Optional[str] = None) -> NoReturn: +def skip(message: str | None = None) -> NoReturn: """ Raise an SkipHandler """ diff --git a/aiogram/dispatcher/event/event.py b/aiogram/dispatcher/event/event.py index 3cbcffef..e9782b0c 100644 --- a/aiogram/dispatcher/event/event.py +++ b/aiogram/dispatcher/event/event.py @@ -1,6 +1,7 @@ from __future__ import annotations -from typing import Any, Callable, List +from collections.abc import Callable +from typing import Any from .handler import CallbackType, HandlerObject @@ -25,7 +26,7 @@ class EventObserver: """ def __init__(self) -> None: - self.handlers: List[HandlerObject] = [] + self.handlers: list[HandlerObject] = [] def register(self, callback: CallbackType) -> None: """ diff --git a/aiogram/dispatcher/event/handler.py b/aiogram/dispatcher/event/handler.py index 8c283dd2..204a548d 100644 --- a/aiogram/dispatcher/event/handler.py +++ b/aiogram/dispatcher/event/handler.py @@ -1,10 +1,11 @@ import asyncio -import contextvars import inspect +import sys import warnings +from collections.abc import Callable from dataclasses import dataclass, field from functools import partial -from typing import Any, Callable, Dict, List, Optional, Set, Tuple +from typing import Any from magic_filter.magic import MagicFilter as OriginalMagicFilter @@ -16,22 +17,49 @@ from aiogram.utils.warnings import Recommendation CallbackType = Callable[..., Any] +_ACCEPTED_PARAM_KINDS = { + inspect.Parameter.POSITIONAL_ONLY, + inspect.Parameter.POSITIONAL_OR_KEYWORD, + inspect.Parameter.KEYWORD_ONLY, +} + @dataclass class CallableObject: callback: CallbackType awaitable: bool = field(init=False) - params: Set[str] = field(init=False) + params: set[str] = field(init=False) varkw: bool = field(init=False) def __post_init__(self) -> None: callback = inspect.unwrap(self.callback) self.awaitable = inspect.isawaitable(callback) or inspect.iscoroutinefunction(callback) - spec = inspect.getfullargspec(callback) - self.params = {*spec.args, *spec.kwonlyargs} - self.varkw = spec.varkw is not None - def _prepare_kwargs(self, kwargs: Dict[str, Any]) -> Dict[str, Any]: + kwargs: dict[str, Any] = {} + if sys.version_info >= (3, 14): + import annotationlib + + kwargs["annotation_format"] = annotationlib.Format.FORWARDREF + + try: + signature = inspect.signature(callback, **kwargs) + except (ValueError, TypeError): # pragma: no cover + self.params = set() + self.varkw = False + return + + params: set[str] = set() + varkw: bool = False + + for p in signature.parameters.values(): + if p.kind in _ACCEPTED_PARAM_KINDS: + params.add(p.name) + elif p.kind == inspect.Parameter.VAR_KEYWORD: + varkw = True + self.params = params + self.varkw = varkw + + def _prepare_kwargs(self, kwargs: dict[str, Any]) -> dict[str, Any]: if self.varkw: return kwargs @@ -41,16 +69,12 @@ class CallableObject: wrapped = partial(self.callback, *args, **self._prepare_kwargs(kwargs)) if self.awaitable: return await wrapped() - - loop = asyncio.get_event_loop() - context = contextvars.copy_context() - wrapped = partial(context.run, wrapped) - return await loop.run_in_executor(None, wrapped) + return await asyncio.to_thread(wrapped) @dataclass class FilterObject(CallableObject): - magic: Optional[MagicFilter] = None + magic: MagicFilter | None = None def __post_init__(self) -> None: if isinstance(self.callback, OriginalMagicFilter): @@ -69,7 +93,7 @@ class FilterObject(CallableObject): stacklevel=6, ) - super(FilterObject, self).__post_init__() + super().__post_init__() if isinstance(self.callback, Filter): self.awaitable = True @@ -77,17 +101,17 @@ class FilterObject(CallableObject): @dataclass class HandlerObject(CallableObject): - filters: Optional[List[FilterObject]] = None - flags: Dict[str, Any] = field(default_factory=dict) + filters: list[FilterObject] | None = None + flags: dict[str, Any] = field(default_factory=dict) def __post_init__(self) -> None: - super(HandlerObject, self).__post_init__() + super().__post_init__() callback = inspect.unwrap(self.callback) if inspect.isclass(callback) and issubclass(callback, BaseHandler): self.awaitable = True self.flags.update(extract_flags_from_object(callback)) - async def check(self, *args: Any, **kwargs: Any) -> Tuple[bool, Dict[str, Any]]: + async def check(self, *args: Any, **kwargs: Any) -> tuple[bool, dict[str, Any]]: if not self.filters: return True, kwargs for event_filter in self.filters: diff --git a/aiogram/dispatcher/event/telegram.py b/aiogram/dispatcher/event/telegram.py index afa8938e..36b3843e 100644 --- a/aiogram/dispatcher/event/telegram.py +++ b/aiogram/dispatcher/event/telegram.py @@ -1,17 +1,18 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional +from collections.abc import Callable +from typing import TYPE_CHECKING, Any from aiogram.dispatcher.middlewares.manager import MiddlewareManager +from aiogram.exceptions import UnsupportedKeywordArgument +from aiogram.filters.base import Filter -from ...exceptions import UnsupportedKeywordArgument -from ...filters.base import Filter -from ...types import TelegramObject -from .bases import REJECTED, UNHANDLED, MiddlewareType, SkipHandler +from .bases import UNHANDLED, MiddlewareType, SkipHandler from .handler import CallbackType, FilterObject, HandlerObject if TYPE_CHECKING: from aiogram.dispatcher.router import Router + from aiogram.types import TelegramObject class TelegramEventObserver: @@ -26,7 +27,7 @@ class TelegramEventObserver: self.router: Router = router self.event_name: str = event_name - self.handlers: List[HandlerObject] = [] + self.handlers: list[HandlerObject] = [] self.middleware = MiddlewareManager() self.outer_middleware = MiddlewareManager() @@ -45,8 +46,8 @@ class TelegramEventObserver: self._handler.filters = [] self._handler.filters.extend([FilterObject(filter_) for filter_ in filters]) - def _resolve_middlewares(self) -> List[MiddlewareType[TelegramObject]]: - middlewares: List[MiddlewareType[TelegramObject]] = [] + def _resolve_middlewares(self) -> list[MiddlewareType[TelegramObject]]: + middlewares: list[MiddlewareType[TelegramObject]] = [] for router in reversed(tuple(self.router.chain_head)): observer = router.observers.get(self.event_name) if observer: @@ -58,14 +59,14 @@ class TelegramEventObserver: self, callback: CallbackType, *filters: CallbackType, - flags: Optional[Dict[str, Any]] = None, + flags: dict[str, Any] | None = None, **kwargs: Any, ) -> CallbackType: """ Register event handler """ if kwargs: - raise UnsupportedKeywordArgument( + msg = ( "Passing any additional keyword arguments to the registrar method " "is not supported.\n" "This error may be caused when you are trying to register filters like in 2.x " @@ -73,6 +74,7 @@ class TelegramEventObserver: "documentation pages.\n" f"Please remove the {set(kwargs.keys())} arguments from this call.\n" ) + raise UnsupportedKeywordArgument(msg) if flags is None: flags = {} @@ -86,13 +88,16 @@ class TelegramEventObserver: callback=callback, filters=[FilterObject(filter_) for filter_ in filters], flags=flags, - ) + ), ) return callback def wrap_outer_middleware( - self, callback: Any, event: TelegramObject, data: Dict[str, Any] + self, + callback: Any, + event: TelegramObject, + data: dict[str, Any], ) -> Any: wrapped_outer = self.middleware.wrap_middlewares( self.outer_middleware, @@ -127,7 +132,7 @@ class TelegramEventObserver: def __call__( self, *filters: CallbackType, - flags: Optional[Dict[str, Any]] = None, + flags: dict[str, Any] | None = None, **kwargs: Any, ) -> Callable[[CallbackType], CallbackType]: """ diff --git a/aiogram/dispatcher/flags.py b/aiogram/dispatcher/flags.py index aad8a29f..f96d5213 100644 --- a/aiogram/dispatcher/flags.py +++ b/aiogram/dispatcher/flags.py @@ -1,5 +1,8 @@ +from __future__ import annotations + +from collections.abc import Callable from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Union, cast, overload +from typing import TYPE_CHECKING, Any, cast, overload from magic_filter import AttrDict, MagicFilter @@ -18,10 +21,10 @@ class FlagDecorator: flag: Flag @classmethod - def _with_flag(cls, flag: Flag) -> "FlagDecorator": + def _with_flag(cls, flag: Flag) -> FlagDecorator: return cls(flag) - def _with_value(self, value: Any) -> "FlagDecorator": + def _with_value(self, value: Any) -> FlagDecorator: new_flag = Flag(self.flag.name, value) return self._with_flag(new_flag) @@ -30,20 +33,21 @@ class FlagDecorator: pass @overload - def __call__(self, value: Any, /) -> "FlagDecorator": + def __call__(self, value: Any, /) -> FlagDecorator: pass @overload - def __call__(self, **kwargs: Any) -> "FlagDecorator": + def __call__(self, **kwargs: Any) -> FlagDecorator: pass def __call__( self, - value: Optional[Any] = None, + value: Any | None = None, **kwargs: Any, - ) -> Union[Callable[..., Any], "FlagDecorator"]: + ) -> Callable[..., Any] | FlagDecorator: if value and kwargs: - raise ValueError("The arguments `value` and **kwargs can not be used together") + msg = "The arguments `value` and **kwargs can not be used together" + raise ValueError(msg) if value is not None and callable(value): value.aiogram_flag = { @@ -70,20 +74,21 @@ if TYPE_CHECKING: class FlagGenerator: def __getattr__(self, name: str) -> FlagDecorator: if name[0] == "_": - raise AttributeError("Flag name must NOT start with underscore") + msg = "Flag name must NOT start with underscore" + raise AttributeError(msg) return FlagDecorator(Flag(name, True)) if TYPE_CHECKING: chat_action: _ChatActionFlagProtocol -def extract_flags_from_object(obj: Any) -> Dict[str, Any]: +def extract_flags_from_object(obj: Any) -> dict[str, Any]: if not hasattr(obj, "aiogram_flag"): return {} - return cast(Dict[str, Any], obj.aiogram_flag) + return cast(dict[str, Any], obj.aiogram_flag) -def extract_flags(handler: Union["HandlerObject", Dict[str, Any]]) -> Dict[str, Any]: +def extract_flags(handler: HandlerObject | dict[str, Any]) -> dict[str, Any]: """ Extract flags from handler or middleware context data @@ -98,10 +103,10 @@ def extract_flags(handler: Union["HandlerObject", Dict[str, Any]]) -> Dict[str, def get_flag( - handler: Union["HandlerObject", Dict[str, Any]], + handler: HandlerObject | dict[str, Any], name: str, *, - default: Optional[Any] = None, + default: Any | None = None, ) -> Any: """ Get flag by name @@ -115,7 +120,7 @@ def get_flag( return flags.get(name, default) -def check_flags(handler: Union["HandlerObject", Dict[str, Any]], magic: MagicFilter) -> Any: +def check_flags(handler: HandlerObject | dict[str, Any], magic: MagicFilter) -> Any: """ Check flags via magic filter diff --git a/aiogram/dispatcher/middlewares/base.py b/aiogram/dispatcher/middlewares/base.py index 15b0b4a3..ff34ddb3 100644 --- a/aiogram/dispatcher/middlewares/base.py +++ b/aiogram/dispatcher/middlewares/base.py @@ -1,5 +1,6 @@ from abc import ABC, abstractmethod -from typing import Any, Awaitable, Callable, Dict, TypeVar +from collections.abc import Awaitable, Callable +from typing import Any, TypeVar from aiogram.types import TelegramObject @@ -14,9 +15,9 @@ class BaseMiddleware(ABC): @abstractmethod async def __call__( self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], + handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]], event: TelegramObject, - data: Dict[str, Any], + data: dict[str, Any], ) -> Any: # pragma: no cover """ Execute middleware @@ -26,4 +27,3 @@ class BaseMiddleware(ABC): :param data: Contextual data. Will be mapped to handler arguments :return: :class:`Any` """ - pass diff --git a/aiogram/dispatcher/middlewares/data.py b/aiogram/dispatcher/middlewares/data.py new file mode 100644 index 00000000..c13797f9 --- /dev/null +++ b/aiogram/dispatcher/middlewares/data.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, TypedDict + +from typing_extensions import NotRequired + +if TYPE_CHECKING: + from aiogram import Bot, Dispatcher, Router + from aiogram.dispatcher.event.handler import HandlerObject + from aiogram.dispatcher.middlewares.user_context import EventContext + from aiogram.fsm.context import FSMContext + from aiogram.fsm.storage.base import BaseStorage + from aiogram.types import Chat, Update, User + from aiogram.utils.i18n import I18n, I18nMiddleware + + +class DispatcherData(TypedDict, total=False): + """ + Dispatcher and bot related data. + """ + + dispatcher: Dispatcher + """Instance of the Dispatcher from which the handler was called.""" + bot: Bot + """Bot that received the update.""" + bots: NotRequired[list[Bot]] + """List of all bots in the Dispatcher. Used only in polling mode.""" + event_update: Update + """Update object that triggered the handler.""" + event_router: Router + """Router that was used to find the handler.""" + handler: NotRequired[HandlerObject] + """Handler object that was called. + Available only in the handler itself and inner middlewares.""" + + +class UserContextData(TypedDict, total=False): + """ + Event context related data about user and chat. + """ + + event_context: EventContext + """Event context object that contains user and chat data.""" + event_from_user: NotRequired[User] + """User object that triggered the handler.""" + event_chat: NotRequired[Chat] + """Chat object that triggered the handler. + .. deprecated:: 3.5.0 + Use :attr:`event_context.chat` instead.""" + event_thread_id: NotRequired[int] + """Thread ID of the chat that triggered the handler. + .. deprecated:: 3.5.0 + Use :attr:`event_context.chat` instead.""" + event_business_connection_id: NotRequired[str] + """Business connection ID of the chat that triggered the handler. + .. deprecated:: 3.5.0 + Use :attr:`event_context.business_connection_id` instead.""" + + +class FSMData(TypedDict, total=False): + """ + FSM related data. + """ + + fsm_storage: BaseStorage + """Storage used for FSM.""" + state: NotRequired[FSMContext] + """Current state of the FSM.""" + raw_state: NotRequired[str | None] + """Raw state of the FSM.""" + + +class I18nData(TypedDict, total=False): + """ + I18n related data. + + Is not included by default, you need to add it to your own Data class if you need it. + """ + + i18n: I18n + """I18n object.""" + i18n_middleware: I18nMiddleware + """I18n middleware.""" + + +class MiddlewareData( + DispatcherData, + UserContextData, + FSMData, + # I18nData, # Disabled by default, add it if you need it to your own Data class. + total=False, +): + """ + Data passed to the handler by the middlewares. + + You can add your own data by extending this class. + """ diff --git a/aiogram/dispatcher/middlewares/error.py b/aiogram/dispatcher/middlewares/error.py index 4b68c0bc..affd38f7 100644 --- a/aiogram/dispatcher/middlewares/error.py +++ b/aiogram/dispatcher/middlewares/error.py @@ -1,14 +1,16 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, cast +from collections.abc import Awaitable, Callable +from typing import TYPE_CHECKING, Any, cast + +from aiogram.dispatcher.event.bases import UNHANDLED, CancelHandler, SkipHandler +from aiogram.types import TelegramObject, Update +from aiogram.types.error_event import ErrorEvent -from ...types import TelegramObject, Update -from ...types.error_event import ErrorEvent -from ..event.bases import UNHANDLED, CancelHandler, SkipHandler from .base import BaseMiddleware if TYPE_CHECKING: - from ..router import Router + from aiogram.dispatcher.router import Router class ErrorsMiddleware(BaseMiddleware): @@ -17,9 +19,9 @@ class ErrorsMiddleware(BaseMiddleware): async def __call__( self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], + handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]], event: TelegramObject, - data: Dict[str, Any], + data: dict[str, Any], ) -> Any: try: return await handler(event, data) diff --git a/aiogram/dispatcher/middlewares/manager.py b/aiogram/dispatcher/middlewares/manager.py index bcad4dee..e5cf73e7 100644 --- a/aiogram/dispatcher/middlewares/manager.py +++ b/aiogram/dispatcher/middlewares/manager.py @@ -1,5 +1,6 @@ import functools -from typing import Any, Callable, Dict, List, Optional, Sequence, Union, overload +from collections.abc import Callable, Sequence +from typing import Any, overload from aiogram.dispatcher.event.bases import ( MiddlewareEventType, @@ -12,7 +13,7 @@ from aiogram.types import TelegramObject class MiddlewareManager(Sequence[MiddlewareType[TelegramObject]]): def __init__(self) -> None: - self._middlewares: List[MiddlewareType[TelegramObject]] = [] + self._middlewares: list[MiddlewareType[TelegramObject]] = [] def register( self, @@ -26,11 +27,11 @@ class MiddlewareManager(Sequence[MiddlewareType[TelegramObject]]): def __call__( self, - middleware: Optional[MiddlewareType[TelegramObject]] = None, - ) -> Union[ - Callable[[MiddlewareType[TelegramObject]], MiddlewareType[TelegramObject]], - MiddlewareType[TelegramObject], - ]: + middleware: MiddlewareType[TelegramObject] | None = None, + ) -> ( + Callable[[MiddlewareType[TelegramObject]], MiddlewareType[TelegramObject]] + | MiddlewareType[TelegramObject] + ): if middleware is None: return self.register return self.register(middleware) @@ -44,8 +45,9 @@ class MiddlewareManager(Sequence[MiddlewareType[TelegramObject]]): pass def __getitem__( - self, item: Union[int, slice] - ) -> Union[MiddlewareType[TelegramObject], Sequence[MiddlewareType[TelegramObject]]]: + self, + item: int | slice, + ) -> MiddlewareType[TelegramObject] | Sequence[MiddlewareType[TelegramObject]]: return self._middlewares[item] def __len__(self) -> int: @@ -53,10 +55,11 @@ class MiddlewareManager(Sequence[MiddlewareType[TelegramObject]]): @staticmethod def wrap_middlewares( - middlewares: Sequence[MiddlewareType[MiddlewareEventType]], handler: CallbackType + middlewares: Sequence[MiddlewareType[MiddlewareEventType]], + handler: CallbackType, ) -> NextMiddlewareType[MiddlewareEventType]: @functools.wraps(handler) - def handler_wrapper(event: TelegramObject, kwargs: Dict[str, Any]) -> Any: + def handler_wrapper(event: TelegramObject, kwargs: dict[str, Any]) -> Any: return handler(event, **kwargs) middleware = handler_wrapper diff --git a/aiogram/dispatcher/middlewares/user_context.py b/aiogram/dispatcher/middlewares/user_context.py index 138be0d1..40b407e9 100644 --- a/aiogram/dispatcher/middlewares/user_context.py +++ b/aiogram/dispatcher/middlewares/user_context.py @@ -1,8 +1,16 @@ +from collections.abc import Awaitable, Callable from dataclasses import dataclass -from typing import Any, Awaitable, Callable, Dict, Optional +from typing import Any from aiogram.dispatcher.middlewares.base import BaseMiddleware -from aiogram.types import Chat, InaccessibleMessage, TelegramObject, Update, User +from aiogram.types import ( + Chat, + ChatBoostSourcePremium, + InaccessibleMessage, + TelegramObject, + Update, + User, +) EVENT_CONTEXT_KEY = "event_context" @@ -13,29 +21,30 @@ EVENT_THREAD_ID_KEY = "event_thread_id" @dataclass(frozen=True) class EventContext: - chat: Optional[Chat] = None - user: Optional[User] = None - thread_id: Optional[int] = None - business_connection_id: Optional[str] = None + chat: Chat | None = None + user: User | None = None + thread_id: int | None = None + business_connection_id: str | None = None @property - def user_id(self) -> Optional[int]: + def user_id(self) -> int | None: return self.user.id if self.user else None @property - def chat_id(self) -> Optional[int]: + def chat_id(self) -> int | None: return self.chat.id if self.chat else None class UserContextMiddleware(BaseMiddleware): async def __call__( self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], + handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]], event: TelegramObject, - data: Dict[str, Any], + data: dict[str, Any], ) -> Any: if not isinstance(event, Update): - raise RuntimeError("UserContextMiddleware got an unexpected event type!") + msg = "UserContextMiddleware got an unexpected event type!" + raise RuntimeError(msg) event_context = data[EVENT_CONTEXT_KEY] = self.resolve_event_context(event=event) # Backward compatibility @@ -109,13 +118,15 @@ class UserContextMiddleware(BaseMiddleware): ) if event.my_chat_member: return EventContext( - chat=event.my_chat_member.chat, user=event.my_chat_member.from_user + chat=event.my_chat_member.chat, + user=event.my_chat_member.from_user, ) if event.chat_member: return EventContext(chat=event.chat_member.chat, user=event.chat_member.from_user) if event.chat_join_request: return EventContext( - chat=event.chat_join_request.chat, user=event.chat_join_request.from_user + chat=event.chat_join_request.chat, + user=event.chat_join_request.from_user, ) if event.message_reaction: return EventContext( @@ -125,6 +136,14 @@ class UserContextMiddleware(BaseMiddleware): if event.message_reaction_count: return EventContext(chat=event.message_reaction_count.chat) if event.chat_boost: + # We only check the premium source, because only it has a sender user, + # other sources have a user, but it is not the sender, but the recipient + if isinstance(event.chat_boost.boost.source, ChatBoostSourcePremium): + return EventContext( + chat=event.chat_boost.chat, + user=event.chat_boost.boost.source.user, + ) + return EventContext(chat=event.chat_boost.chat) if event.removed_chat_boost: return EventContext(chat=event.removed_chat_boost.chat) @@ -160,4 +179,10 @@ class UserContextMiddleware(BaseMiddleware): ), business_connection_id=event.edited_business_message.business_connection_id, ) + if event.purchased_paid_media: + return EventContext( + user=event.purchased_paid_media.from_user, + ) + if event.managed_bot: + return EventContext(user=event.managed_bot.user) return EventContext() diff --git a/aiogram/dispatcher/router.py b/aiogram/dispatcher/router.py index 400c1c09..dde35c3c 100644 --- a/aiogram/dispatcher/router.py +++ b/aiogram/dispatcher/router.py @@ -1,12 +1,15 @@ from __future__ import annotations -from typing import Any, Dict, Final, Generator, List, Optional, Set +from collections.abc import Generator +from typing import TYPE_CHECKING, Any, Final -from ..types import TelegramObject from .event.bases import REJECTED, UNHANDLED from .event.event import EventObserver from .event.telegram import TelegramEventObserver +if TYPE_CHECKING: + from aiogram.types import TelegramObject + INTERNAL_UPDATE_TYPES: Final[frozenset[str]] = frozenset({"update", "error"}) @@ -21,31 +24,34 @@ class Router: - By decorator - :obj:`@router.()` """ - def __init__(self, *, name: Optional[str] = None) -> None: + def __init__(self, *, name: str | None = None) -> None: """ :param name: Optional router name, can be useful for debugging """ self.name = name or hex(id(self)) - self._parent_router: Optional[Router] = None - self.sub_routers: List[Router] = [] + self._parent_router: Router | None = None + self.sub_routers: list[Router] = [] # Observers self.message = TelegramEventObserver(router=self, event_name="message") self.edited_message = TelegramEventObserver(router=self, event_name="edited_message") self.channel_post = TelegramEventObserver(router=self, event_name="channel_post") self.edited_channel_post = TelegramEventObserver( - router=self, event_name="edited_channel_post" + router=self, + event_name="edited_channel_post", ) self.inline_query = TelegramEventObserver(router=self, event_name="inline_query") self.chosen_inline_result = TelegramEventObserver( - router=self, event_name="chosen_inline_result" + router=self, + event_name="chosen_inline_result", ) self.callback_query = TelegramEventObserver(router=self, event_name="callback_query") self.shipping_query = TelegramEventObserver(router=self, event_name="shipping_query") self.pre_checkout_query = TelegramEventObserver( - router=self, event_name="pre_checkout_query" + router=self, + event_name="pre_checkout_query", ) self.poll = TelegramEventObserver(router=self, event_name="poll") self.poll_answer = TelegramEventObserver(router=self, event_name="poll_answer") @@ -54,29 +60,39 @@ class Router: self.chat_join_request = TelegramEventObserver(router=self, event_name="chat_join_request") self.message_reaction = TelegramEventObserver(router=self, event_name="message_reaction") self.message_reaction_count = TelegramEventObserver( - router=self, event_name="message_reaction_count" + router=self, + event_name="message_reaction_count", ) self.chat_boost = TelegramEventObserver(router=self, event_name="chat_boost") self.removed_chat_boost = TelegramEventObserver( - router=self, event_name="removed_chat_boost" + router=self, + event_name="removed_chat_boost", ) self.deleted_business_messages = TelegramEventObserver( - router=self, event_name="deleted_business_messages" + router=self, + event_name="deleted_business_messages", ) self.business_connection = TelegramEventObserver( - router=self, event_name="business_connection" + router=self, + event_name="business_connection", ) self.edited_business_message = TelegramEventObserver( - router=self, event_name="edited_business_message" + router=self, + event_name="edited_business_message", ) self.business_message = TelegramEventObserver(router=self, event_name="business_message") + self.purchased_paid_media = TelegramEventObserver( + router=self, + event_name="purchased_paid_media", + ) + self.managed_bot = TelegramEventObserver(router=self, event_name="managed_bot") self.errors = self.error = TelegramEventObserver(router=self, event_name="error") self.startup = EventObserver() self.shutdown = EventObserver() - self.observers: Dict[str, TelegramEventObserver] = { + self.observers: dict[str, TelegramEventObserver] = { "message": self.message, "edited_message": self.edited_message, "channel_post": self.channel_post, @@ -99,6 +115,8 @@ class Router: "business_connection": self.business_connection, "edited_business_message": self.edited_business_message, "business_message": self.business_message, + "purchased_paid_media": self.purchased_paid_media, + "managed_bot": self.managed_bot, "error": self.errors, } @@ -108,16 +126,16 @@ class Router: def __repr__(self) -> str: return f"<{self}>" - def resolve_used_update_types(self, skip_events: Optional[Set[str]] = None) -> List[str]: + def resolve_used_update_types(self, skip_events: set[str] | None = None) -> list[str]: """ Resolve registered event names Is useful for getting updates only for registered event types. :param skip_events: skip specified event names - :return: set of registered names + :return: sorted list of registered names """ - handlers_in_use: Set[str] = set() + handlers_in_use: set[str] = set() if skip_events is None: skip_events = set() skip_events = {*skip_events, *INTERNAL_UPDATE_TYPES} @@ -127,7 +145,7 @@ class Router: if observer.handlers and update_name not in skip_events: handlers_in_use.add(update_name) - return list(sorted(handlers_in_use)) # NOQA: C413 + return sorted(handlers_in_use) async def propagate_event(self, update_type: str, event: TelegramObject, **kwargs: Any) -> Any: kwargs.update(event_router=self) @@ -135,7 +153,10 @@ class Router: async def _wrapped(telegram_event: TelegramObject, **data: Any) -> Any: return await self._propagate_event( - observer=observer, update_type=update_type, event=telegram_event, **data + observer=observer, + update_type=update_type, + event=telegram_event, + **data, ) if observer: @@ -144,7 +165,7 @@ class Router: async def _propagate_event( self, - observer: Optional[TelegramEventObserver], + observer: TelegramEventObserver | None, update_type: str, event: TelegramObject, **kwargs: Any, @@ -175,7 +196,7 @@ class Router: @property def chain_head(self) -> Generator[Router, None, None]: - router: Optional[Router] = self + router: Router | None = self while router: yield router router = router.parent_router @@ -187,7 +208,7 @@ class Router: yield from router.chain_tail @property - def parent_router(self) -> Optional[Router]: + def parent_router(self) -> Router | None: return self._parent_router @parent_router.setter @@ -202,16 +223,20 @@ class Router: :param router: """ if not isinstance(router, Router): - raise ValueError(f"router should be instance of Router not {type(router).__name__!r}") + msg = f"router should be instance of Router not {type(router).__name__!r}" + raise ValueError(msg) if self._parent_router: - raise RuntimeError(f"Router is already attached to {self._parent_router!r}") + msg = f"Router is already attached to {self._parent_router!r}" + raise RuntimeError(msg) if self == router: - raise RuntimeError("Self-referencing routers is not allowed") + msg = "Self-referencing routers is not allowed" + raise RuntimeError(msg) - parent: Optional[Router] = router + parent: Router | None = router while parent is not None: if parent == self: - raise RuntimeError("Circular referencing of Router is not allowed") + msg = "Circular referencing of Router is not allowed" + raise RuntimeError(msg) parent = parent.parent_router @@ -226,7 +251,8 @@ class Router: :return: """ if not routers: - raise ValueError("At least one router must be provided") + msg = "At least one router must be provided" + raise ValueError(msg) for router in routers: self.include_router(router) @@ -238,9 +264,8 @@ class Router: :return: """ if not isinstance(router, Router): - raise ValueError( - f"router should be instance of Router not {type(router).__class__.__name__}" - ) + msg = f"router should be instance of Router not {type(router).__name__!r}" + raise ValueError(msg) router.parent_router = self return router diff --git a/aiogram/enums/__init__.py b/aiogram/enums/__init__.py index f8c4532a..1a6e5326 100644 --- a/aiogram/enums/__init__.py +++ b/aiogram/enums/__init__.py @@ -1,4 +1,5 @@ from .bot_command_scope_type import BotCommandScopeType +from .button_style import ButtonStyle from .chat_action import ChatAction from .chat_boost_source_type import ChatBoostSourceType from .chat_member_status import ChatMemberStatus @@ -10,11 +11,14 @@ from .encrypted_passport_element import EncryptedPassportElement from .inline_query_result_type import InlineQueryResultType from .input_media_type import InputMediaType from .input_paid_media_type import InputPaidMediaType +from .input_profile_photo_type import InputProfilePhotoType +from .input_story_content_type import InputStoryContentType from .keyboard_button_poll_type_type import KeyboardButtonPollTypeType from .mask_position_point import MaskPositionPoint from .menu_button_type import MenuButtonType from .message_entity_type import MessageEntityType from .message_origin_type import MessageOriginType +from .owned_gift_type import OwnedGiftType from .paid_media_type import PaidMediaType from .parse_mode import ParseMode from .passport_element_error_type import PassportElementErrorType @@ -23,12 +27,17 @@ from .reaction_type_type import ReactionTypeType from .revenue_withdrawal_state_type import RevenueWithdrawalStateType from .sticker_format import StickerFormat from .sticker_type import StickerType +from .story_area_type_type import StoryAreaTypeType from .topic_icon_color import TopicIconColor from .transaction_partner_type import TransactionPartnerType +from .transaction_partner_user_transaction_type_enum import ( + TransactionPartnerUserTransactionTypeEnum, +) from .update_type import UpdateType __all__ = ( "BotCommandScopeType", + "ButtonStyle", "ChatAction", "ChatBoostSourceType", "ChatMemberStatus", @@ -40,11 +49,14 @@ __all__ = ( "InlineQueryResultType", "InputMediaType", "InputPaidMediaType", + "InputProfilePhotoType", + "InputStoryContentType", "KeyboardButtonPollTypeType", "MaskPositionPoint", "MenuButtonType", "MessageEntityType", "MessageOriginType", + "OwnedGiftType", "PaidMediaType", "ParseMode", "PassportElementErrorType", @@ -53,7 +65,9 @@ __all__ = ( "RevenueWithdrawalStateType", "StickerFormat", "StickerType", + "StoryAreaTypeType", "TopicIconColor", "TransactionPartnerType", + "TransactionPartnerUserTransactionTypeEnum", "UpdateType", ) diff --git a/aiogram/enums/button_style.py b/aiogram/enums/button_style.py new file mode 100644 index 00000000..8f633e96 --- /dev/null +++ b/aiogram/enums/button_style.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class ButtonStyle(str, Enum): + """ + This object represents a button style (inline- or reply-keyboard). + + Sources: + * https://core.telegram.org/bots/api#inlinekeyboardbutton + * https://core.telegram.org/bots/api#keyboardbutton + """ + + DANGER = "danger" + SUCCESS = "success" + PRIMARY = "primary" diff --git a/aiogram/enums/content_type.py b/aiogram/enums/content_type.py index 8e40dd42..0c099661 100644 --- a/aiogram/enums/content_type.py +++ b/aiogram/enums/content_type.py @@ -19,6 +19,7 @@ class ContentType(str, Enum): VIDEO = "video" VIDEO_NOTE = "video_note" VOICE = "voice" + CHECKLIST = "checklist" CONTACT = "contact" DICE = "dice" GAME = "game" @@ -27,6 +28,8 @@ class ContentType(str, Enum): LOCATION = "location" NEW_CHAT_MEMBERS = "new_chat_members" LEFT_CHAT_MEMBER = "left_chat_member" + CHAT_OWNER_LEFT = "chat_owner_left" + CHAT_OWNER_CHANGED = "chat_owner_changed" NEW_CHAT_TITLE = "new_chat_title" NEW_CHAT_PHOTO = "new_chat_photo" DELETE_CHAT_PHOTO = "delete_chat_photo" @@ -39,14 +42,21 @@ class ContentType(str, Enum): PINNED_MESSAGE = "pinned_message" INVOICE = "invoice" SUCCESSFUL_PAYMENT = "successful_payment" + REFUNDED_PAYMENT = "refunded_payment" USERS_SHARED = "users_shared" CHAT_SHARED = "chat_shared" + GIFT = "gift" + UNIQUE_GIFT = "unique_gift" + GIFT_UPGRADE_SENT = "gift_upgrade_sent" CONNECTED_WEBSITE = "connected_website" WRITE_ACCESS_ALLOWED = "write_access_allowed" PASSPORT_DATA = "passport_data" PROXIMITY_ALERT_TRIGGERED = "proximity_alert_triggered" BOOST_ADDED = "boost_added" CHAT_BACKGROUND_SET = "chat_background_set" + CHECKLIST_TASKS_DONE = "checklist_tasks_done" + CHECKLIST_TASKS_ADDED = "checklist_tasks_added" + DIRECT_MESSAGE_PRICE_CHANGED = "direct_message_price_changed" FORUM_TOPIC_CREATED = "forum_topic_created" FORUM_TOPIC_EDITED = "forum_topic_edited" FORUM_TOPIC_CLOSED = "forum_topic_closed" @@ -57,6 +67,15 @@ class ContentType(str, Enum): GIVEAWAY = "giveaway" GIVEAWAY_WINNERS = "giveaway_winners" GIVEAWAY_COMPLETED = "giveaway_completed" + MANAGED_BOT_CREATED = "managed_bot_created" + PAID_MESSAGE_PRICE_CHANGED = "paid_message_price_changed" + POLL_OPTION_ADDED = "poll_option_added" + POLL_OPTION_DELETED = "poll_option_deleted" + 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/enums/input_profile_photo_type.py b/aiogram/enums/input_profile_photo_type.py new file mode 100644 index 00000000..08eccbd5 --- /dev/null +++ b/aiogram/enums/input_profile_photo_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class InputProfilePhotoType(str, Enum): + """ + This object represents input profile photo type + + Source: https://core.telegram.org/bots/api#inputprofilephoto + """ + + STATIC = "static" + ANIMATED = "animated" diff --git a/aiogram/enums/input_story_content_type.py b/aiogram/enums/input_story_content_type.py new file mode 100644 index 00000000..78c887ae --- /dev/null +++ b/aiogram/enums/input_story_content_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class InputStoryContentType(str, Enum): + """ + This object represents input story content photo type. + + Source: https://core.telegram.org/bots/api#inputstorycontentphoto + """ + + PHOTO = "photo" + VIDEO = "video" diff --git a/aiogram/enums/message_entity_type.py b/aiogram/enums/message_entity_type.py index b67dc039..e1dba489 100644 --- a/aiogram/enums/message_entity_type.py +++ b/aiogram/enums/message_entity_type.py @@ -27,3 +27,4 @@ class MessageEntityType(str, Enum): TEXT_LINK = "text_link" TEXT_MENTION = "text_mention" CUSTOM_EMOJI = "custom_emoji" + DATE_TIME = "date_time" diff --git a/aiogram/enums/owned_gift_type.py b/aiogram/enums/owned_gift_type.py new file mode 100644 index 00000000..ec0545d1 --- /dev/null +++ b/aiogram/enums/owned_gift_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class OwnedGiftType(str, Enum): + """ + This object represents owned gift type + + Source: https://core.telegram.org/bots/api#ownedgift + """ + + REGULAR = "regular" + UNIQUE = "unique" diff --git a/aiogram/enums/reaction_type_type.py b/aiogram/enums/reaction_type_type.py index 5b0b8804..f4b7c345 100644 --- a/aiogram/enums/reaction_type_type.py +++ b/aiogram/enums/reaction_type_type.py @@ -10,3 +10,4 @@ class ReactionTypeType(str, Enum): EMOJI = "emoji" CUSTOM_EMOJI = "custom_emoji" + PAID = "paid" diff --git a/aiogram/enums/story_area_type_type.py b/aiogram/enums/story_area_type_type.py new file mode 100644 index 00000000..8be38365 --- /dev/null +++ b/aiogram/enums/story_area_type_type.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class StoryAreaTypeType(str, Enum): + """ + This object represents input profile photo type + + Source: https://core.telegram.org/bots/api#storyareatype + """ + + LOCATION = "location" + SUGGESTED_REACTION = "suggested_reaction" + LINK = "link" + WEATHER = "weather" + UNIQUE_GIFT = "unique_gift" diff --git a/aiogram/enums/transaction_partner_type.py b/aiogram/enums/transaction_partner_type.py index b335ac09..4f683e2e 100644 --- a/aiogram/enums/transaction_partner_type.py +++ b/aiogram/enums/transaction_partner_type.py @@ -12,3 +12,6 @@ class TransactionPartnerType(str, Enum): OTHER = "other" USER = "user" TELEGRAM_ADS = "telegram_ads" + TELEGRAM_API = "telegram_api" + AFFILIATE_PROGRAM = "affiliate_program" + CHAT = "chat" diff --git a/aiogram/enums/transaction_partner_user_transaction_type_enum.py b/aiogram/enums/transaction_partner_user_transaction_type_enum.py new file mode 100644 index 00000000..02cf2dc7 --- /dev/null +++ b/aiogram/enums/transaction_partner_user_transaction_type_enum.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class TransactionPartnerUserTransactionTypeEnum(str, Enum): + """ + This object represents type of the transaction that were made by partner user. + + Source: https://core.telegram.org/bots/api#transactionpartneruser + """ + + INVOICE_PAYMENT = "invoice_payment" + PAID_MEDIA_PAYMENT = "paid_media_payment" + GIFT_PURCHASE = "gift_purchase" + PREMIUM_PURCHASE = "premium_purchase" + BUSINESS_ACCOUNT_TRANSFER = "business_account_transfer" diff --git a/aiogram/enums/update_type.py b/aiogram/enums/update_type.py index 16fe0e2c..0534a664 100644 --- a/aiogram/enums/update_type.py +++ b/aiogram/enums/update_type.py @@ -23,6 +23,7 @@ class UpdateType(str, Enum): CALLBACK_QUERY = "callback_query" SHIPPING_QUERY = "shipping_query" PRE_CHECKOUT_QUERY = "pre_checkout_query" + PURCHASED_PAID_MEDIA = "purchased_paid_media" POLL = "poll" POLL_ANSWER = "poll_answer" MY_CHAT_MEMBER = "my_chat_member" @@ -30,3 +31,4 @@ class UpdateType(str, Enum): CHAT_JOIN_REQUEST = "chat_join_request" CHAT_BOOST = "chat_boost" REMOVED_CHAT_BOOST = "removed_chat_boost" + MANAGED_BOT = "managed_bot" diff --git a/aiogram/exceptions.py b/aiogram/exceptions.py index d195aa7b..47feea5f 100644 --- a/aiogram/exceptions.py +++ b/aiogram/exceptions.py @@ -1,4 +1,4 @@ -from typing import Any, Optional +from typing import Any from aiogram.methods import TelegramMethod from aiogram.methods.base import TelegramType @@ -16,7 +16,7 @@ class DetailedAiogramError(AiogramError): Base exception for all aiogram errors with detailed message. """ - url: Optional[str] = None + url: str | None = None def __init__(self, message: str) -> None: self.message = message @@ -119,7 +119,7 @@ class TelegramMigrateToChat(TelegramAPIError): if chat_id := getattr(method, "chat_id", None): description += f" from {chat_id}" description += f"\nOriginal description: {message}" - super().__init__(method=method, message=message) + super().__init__(method=method, message=description) self.migrate_to_chat_id = migrate_to_chat_id @@ -197,3 +197,9 @@ class ClientDecodeError(AiogramError): f"{original_type.__module__}.{original_type.__name__}: {self.original}\n" f"Content: {self.data}" ) + + +class DataNotDictLikeError(DetailedAiogramError): + """ + Exception raised when data is not dict-like. + """ diff --git a/aiogram/filters/__init__.py b/aiogram/filters/__init__.py index bcadc178..e2668830 100644 --- a/aiogram/filters/__init__.py +++ b/aiogram/filters/__init__.py @@ -23,29 +23,29 @@ from .state import StateFilter BaseFilter = Filter __all__ = ( - "Filter", + "ADMINISTRATOR", + "CREATOR", + "IS_ADMIN", + "IS_MEMBER", + "IS_NOT_MEMBER", + "JOIN_TRANSITION", + "KICKED", + "LEAVE_TRANSITION", + "LEFT", + "MEMBER", + "PROMOTED_TRANSITION", + "RESTRICTED", "BaseFilter", + "ChatMemberUpdatedFilter", "Command", "CommandObject", "CommandStart", "ExceptionMessageFilter", "ExceptionTypeFilter", - "StateFilter", + "Filter", "MagicData", - "ChatMemberUpdatedFilter", - "CREATOR", - "ADMINISTRATOR", - "MEMBER", - "RESTRICTED", - "LEFT", - "KICKED", - "IS_MEMBER", - "IS_ADMIN", - "PROMOTED_TRANSITION", - "IS_NOT_MEMBER", - "JOIN_TRANSITION", - "LEAVE_TRANSITION", + "StateFilter", "and_f", - "or_f", "invert_f", + "or_f", ) diff --git a/aiogram/filters/base.py b/aiogram/filters/base.py index 94f9b6d7..e0445cb4 100644 --- a/aiogram/filters/base.py +++ b/aiogram/filters/base.py @@ -1,11 +1,12 @@ from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, Union +from collections.abc import Awaitable, Callable +from typing import TYPE_CHECKING, Any if TYPE_CHECKING: from aiogram.filters.logic import _InvertFilter -class Filter(ABC): +class Filter(ABC): # noqa: B024 """ If you want to register own filters like builtin filters you will need to write subclass of this class with overriding the :code:`__call__` @@ -16,33 +17,31 @@ class Filter(ABC): # This checking type-hint is needed because mypy checks validity of overrides and raises: # error: Signature of "__call__" incompatible with supertype "BaseFilter" [override] # https://mypy.readthedocs.io/en/latest/error_code_list.html#check-validity-of-overrides-override - __call__: Callable[..., Awaitable[Union[bool, Dict[str, Any]]]] + __call__: Callable[..., Awaitable[bool | dict[str, Any]]] else: # pragma: no cover @abstractmethod - async def __call__(self, *args: Any, **kwargs: Any) -> Union[bool, Dict[str, Any]]: + async def __call__(self, *args: Any, **kwargs: Any) -> bool | dict[str, Any]: """ This method should be overridden. Accepts incoming event and should return boolean or dict. - :return: :class:`bool` or :class:`Dict[str, Any]` + :return: :class:`bool` or :class:`dict[str, Any]` """ - pass def __invert__(self) -> "_InvertFilter": from aiogram.filters.logic import invert_f return invert_f(self) - def update_handler_flags(self, flags: Dict[str, Any]) -> None: + def update_handler_flags(self, flags: dict[str, Any]) -> None: # noqa: B027 """ Also if you want to extend handler flags with using this filter you should implement this method :param flags: existing flags, can be updated directly """ - pass def _signature_to_string(self, *args: Any, **kwargs: Any) -> str: items = [repr(arg) for arg in args] diff --git a/aiogram/filters/callback_data.py b/aiogram/filters/callback_data.py index 17ccffbf..fc08994f 100644 --- a/aiogram/filters/callback_data.py +++ b/aiogram/filters/callback_data.py @@ -1,39 +1,30 @@ from __future__ import annotations -import sys import types import typing from decimal import Decimal from enum import Enum from fractions import Fraction -from typing import ( - TYPE_CHECKING, - Any, - ClassVar, - Dict, - Literal, - Optional, - Type, - TypeVar, - Union, -) +from typing import TYPE_CHECKING, Any, ClassVar, Literal, TypeVar from uuid import UUID -from magic_filter import MagicFilter from pydantic import BaseModel -from pydantic.fields import FieldInfo +from pydantic_core import PydanticUndefined +from typing_extensions import Self from aiogram.filters.base import Filter from aiogram.types import CallbackQuery +if TYPE_CHECKING: + from magic_filter import MagicFilter + from pydantic.fields import FieldInfo + T = TypeVar("T", bound="CallbackData") MAX_CALLBACK_LENGTH: int = 64 -_UNION_TYPES = {typing.Union} -if sys.version_info >= (3, 10): # pragma: no cover - _UNION_TYPES.add(types.UnionType) +_UNION_TYPES = {typing.Union, types.UnionType} class CallbackDataException(Exception): @@ -58,17 +49,19 @@ class CallbackData(BaseModel): def __init_subclass__(cls, **kwargs: Any) -> None: if "prefix" not in kwargs: - raise ValueError( + msg = ( f"prefix required, usage example: " f"`class {cls.__name__}(CallbackData, prefix='my_callback'): ...`" ) + raise ValueError(msg) cls.__separator__ = kwargs.pop("sep", ":") cls.__prefix__ = kwargs.pop("prefix") if cls.__separator__ in cls.__prefix__: - raise ValueError( + msg = ( f"Separator symbol {cls.__separator__!r} can not be used " f"inside prefix {cls.__prefix__!r}" ) + raise ValueError(msg) super().__init_subclass__(**kwargs) def _encode_value(self, key: str, value: Any) -> str: @@ -82,10 +75,11 @@ class CallbackData(BaseModel): return str(int(value)) if isinstance(value, (int, str, float, Decimal, Fraction)): return str(value) - raise ValueError( + msg = ( f"Attribute {key}={value!r} of type {type(value).__name__!r}" f" can not be packed to callback data" ) + raise ValueError(msg) def pack(self) -> str: """ @@ -94,24 +88,26 @@ class CallbackData(BaseModel): :return: valid callback data for Telegram Bot API """ result = [self.__prefix__] - for key, value in self.model_dump(mode="json").items(): + for key, value in self.model_dump(mode="python").items(): encoded = self._encode_value(key, value) if self.__separator__ in encoded: - raise ValueError( + msg = ( f"Separator symbol {self.__separator__!r} can not be used " f"in value {key}={encoded!r}" ) + raise ValueError(msg) result.append(encoded) callback_data = self.__separator__.join(result) if len(callback_data.encode()) > MAX_CALLBACK_LENGTH: - raise ValueError( + msg = ( f"Resulted callback data is too long! " f"len({callback_data!r}.encode()) > {MAX_CALLBACK_LENGTH}" ) + raise ValueError(msg) return callback_data @classmethod - def unpack(cls: Type[T], value: str) -> T: + def unpack(cls, value: str) -> Self: """ Parse callback data string @@ -121,22 +117,28 @@ class CallbackData(BaseModel): prefix, *parts = value.split(cls.__separator__) names = cls.model_fields.keys() if len(parts) != len(names): - raise TypeError( + msg = ( f"Callback data {cls.__name__!r} takes {len(names)} arguments " f"but {len(parts)} were given" ) + raise TypeError(msg) if prefix != cls.__prefix__: - raise ValueError(f"Bad prefix ({prefix!r} != {cls.__prefix__!r})") + msg = f"Bad prefix ({prefix!r} != {cls.__prefix__!r})" + raise ValueError(msg) payload = {} - for k, v in zip(names, parts): # type: str, Optional[str] - if field := cls.model_fields.get(k): - if v == "" and _check_field_is_nullable(field): - v = None + for k, v in zip(names, parts, strict=True): # type: str, str + if ( + (field := cls.model_fields.get(k)) + and v == "" + and _check_field_is_nullable(field) + and field.default != "" + ): + v = field.default if field.default is not PydanticUndefined else None payload[k] = v return cls(**payload) @classmethod - def filter(cls, rule: Optional[MagicFilter] = None) -> CallbackQueryFilter: + def filter(cls, rule: MagicFilter | None = None) -> CallbackQueryFilter: """ Generates a filter for callback query with rule @@ -162,8 +164,8 @@ class CallbackQueryFilter(Filter): def __init__( self, *, - callback_data: Type[CallbackData], - rule: Optional[MagicFilter] = None, + callback_data: type[CallbackData], + rule: MagicFilter | None = None, ): """ :param callback_data: Expected type of callback data @@ -178,7 +180,7 @@ class CallbackQueryFilter(Filter): rule=self.rule, ) - async def __call__(self, query: CallbackQuery) -> Union[Literal[False], Dict[str, Any]]: + async def __call__(self, query: CallbackQuery) -> Literal[False] | dict[str, Any]: if not isinstance(query, CallbackQuery) or not query.data: return False try: @@ -203,5 +205,5 @@ def _check_field_is_nullable(field: FieldInfo) -> bool: return True return typing.get_origin(field.annotation) in _UNION_TYPES and type(None) in typing.get_args( - field.annotation + field.annotation, ) diff --git a/aiogram/filters/chat_member_updated.py b/aiogram/filters/chat_member_updated.py index 23cf0e9c..c9f18ea3 100644 --- a/aiogram/filters/chat_member_updated.py +++ b/aiogram/filters/chat_member_updated.py @@ -1,4 +1,8 @@ -from typing import Any, Dict, Optional, TypeVar, Union +from __future__ import annotations + +from typing import Any, TypeVar + +from typing_extensions import Self from aiogram.filters.base import Filter from aiogram.types import ChatMember, ChatMemberUpdated @@ -10,11 +14,11 @@ TransitionT = TypeVar("TransitionT", bound="_MemberStatusTransition") class _MemberStatusMarker: __slots__ = ( - "name", "is_member", + "name", ) - def __init__(self, name: str, *, is_member: Optional[bool] = None) -> None: + def __init__(self, name: str, *, is_member: bool | None = None) -> None: self.name = name self.is_member = is_member @@ -22,53 +26,59 @@ class _MemberStatusMarker: result = self.name.upper() if self.is_member is not None: result = ("+" if self.is_member else "-") + result - return result # noqa: RET504 + return result - def __pos__(self: MarkerT) -> MarkerT: + def __pos__(self) -> Self: return type(self)(name=self.name, is_member=True) - def __neg__(self: MarkerT) -> MarkerT: + def __neg__(self) -> Self: return type(self)(name=self.name, is_member=False) def __or__( - self, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> "_MemberStatusGroupMarker": + self, + other: _MemberStatusMarker | _MemberStatusGroupMarker, + ) -> _MemberStatusGroupMarker: if isinstance(other, _MemberStatusMarker): return _MemberStatusGroupMarker(self, other) if isinstance(other, _MemberStatusGroupMarker): return other | self - raise TypeError( + msg = ( f"unsupported operand type(s) for |: " f"{type(self).__name__!r} and {type(other).__name__!r}" ) + raise TypeError(msg) __ror__ = __or__ def __rshift__( - self, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> "_MemberStatusTransition": + self, + other: _MemberStatusMarker | _MemberStatusGroupMarker, + ) -> _MemberStatusTransition: old = _MemberStatusGroupMarker(self) if isinstance(other, _MemberStatusMarker): return _MemberStatusTransition(old=old, new=_MemberStatusGroupMarker(other)) if isinstance(other, _MemberStatusGroupMarker): return _MemberStatusTransition(old=old, new=other) - raise TypeError( + msg = ( f"unsupported operand type(s) for >>: " f"{type(self).__name__!r} and {type(other).__name__!r}" ) + raise TypeError(msg) def __lshift__( - self, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> "_MemberStatusTransition": + self, + other: _MemberStatusMarker | _MemberStatusGroupMarker, + ) -> _MemberStatusTransition: new = _MemberStatusGroupMarker(self) if isinstance(other, _MemberStatusMarker): return _MemberStatusTransition(old=_MemberStatusGroupMarker(other), new=new) if isinstance(other, _MemberStatusGroupMarker): return _MemberStatusTransition(old=other, new=new) - raise TypeError( + msg = ( f"unsupported operand type(s) for <<: " f"{type(self).__name__!r} and {type(other).__name__!r}" ) + raise TypeError(msg) def __hash__(self) -> int: return hash((self.name, self.is_member)) @@ -87,44 +97,51 @@ class _MemberStatusGroupMarker: def __init__(self, *statuses: _MemberStatusMarker) -> None: if not statuses: - raise ValueError("Member status group should have at least one status included") + msg = "Member status group should have at least one status included" + raise ValueError(msg) self.statuses = frozenset(statuses) def __or__( - self: MarkerGroupT, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> MarkerGroupT: + self, + other: _MemberStatusMarker | _MemberStatusGroupMarker, + ) -> Self: if isinstance(other, _MemberStatusMarker): return type(self)(*self.statuses, other) if isinstance(other, _MemberStatusGroupMarker): return type(self)(*self.statuses, *other.statuses) - raise TypeError( + msg = ( f"unsupported operand type(s) for |: " f"{type(self).__name__!r} and {type(other).__name__!r}" ) + raise TypeError(msg) def __rshift__( - self, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> "_MemberStatusTransition": + self, + other: _MemberStatusMarker | _MemberStatusGroupMarker, + ) -> _MemberStatusTransition: if isinstance(other, _MemberStatusMarker): return _MemberStatusTransition(old=self, new=_MemberStatusGroupMarker(other)) if isinstance(other, _MemberStatusGroupMarker): return _MemberStatusTransition(old=self, new=other) - raise TypeError( + msg = ( f"unsupported operand type(s) for >>: " f"{type(self).__name__!r} and {type(other).__name__!r}" ) + raise TypeError(msg) def __lshift__( - self, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> "_MemberStatusTransition": + self, + other: _MemberStatusMarker | _MemberStatusGroupMarker, + ) -> _MemberStatusTransition: if isinstance(other, _MemberStatusMarker): return _MemberStatusTransition(old=_MemberStatusGroupMarker(other), new=self) if isinstance(other, _MemberStatusGroupMarker): return _MemberStatusTransition(old=other, new=self) - raise TypeError( + msg = ( f"unsupported operand type(s) for <<: " f"{type(self).__name__!r} and {type(other).__name__!r}" ) + raise TypeError(msg) def __str__(self) -> str: result = " | ".join(map(str, sorted(self.statuses, key=str))) @@ -138,8 +155,8 @@ class _MemberStatusGroupMarker: class _MemberStatusTransition: __slots__ = ( - "old", "new", + "old", ) def __init__(self, *, old: _MemberStatusGroupMarker, new: _MemberStatusGroupMarker) -> None: @@ -149,7 +166,7 @@ class _MemberStatusTransition: def __str__(self) -> str: return f"{self.old} >> {self.new}" - def __invert__(self: TransitionT) -> TransitionT: + def __invert__(self) -> Self: return type(self)(old=self.new, new=self.old) def check(self, *, old: ChatMember, new: ChatMember) -> bool: @@ -177,11 +194,9 @@ class ChatMemberUpdatedFilter(Filter): def __init__( self, - member_status_changed: Union[ - _MemberStatusMarker, - _MemberStatusGroupMarker, - _MemberStatusTransition, - ], + member_status_changed: ( + _MemberStatusMarker | _MemberStatusGroupMarker | _MemberStatusTransition + ), ): self.member_status_changed = member_status_changed @@ -190,7 +205,7 @@ class ChatMemberUpdatedFilter(Filter): member_status_changed=self.member_status_changed, ) - async def __call__(self, member_updated: ChatMemberUpdated) -> Union[bool, Dict[str, Any]]: + async def __call__(self, member_updated: ChatMemberUpdated) -> bool | dict[str, Any]: old = member_updated.old_chat_member new = member_updated.new_chat_member rule = self.member_status_changed diff --git a/aiogram/filters/command.py b/aiogram/filters/command.py index f52ac263..ecb03c48 100644 --- a/aiogram/filters/command.py +++ b/aiogram/filters/command.py @@ -1,31 +1,21 @@ from __future__ import annotations import re +from collections.abc import Iterable, Sequence from dataclasses import dataclass, field, replace -from typing import ( - TYPE_CHECKING, - Any, - Dict, - Iterable, - Match, - Optional, - Pattern, - Sequence, - Union, - cast, -) - -from magic_filter import MagicFilter +from re import Match, Pattern +from typing import TYPE_CHECKING, Any, cast from aiogram.filters.base import Filter from aiogram.types import BotCommand, Message from aiogram.utils.deep_linking import decode_payload if TYPE_CHECKING: + from magic_filter import MagicFilter + from aiogram import Bot -# TODO: rm type ignore after py3.8 support expiration or mypy bug fix -CommandPatternType = Union[str, re.Pattern, BotCommand] # type: ignore[type-arg] +CommandPatternType = str | re.Pattern[str] | BotCommand class CommandException(Exception): @@ -41,20 +31,20 @@ class Command(Filter): __slots__ = ( "commands", - "prefix", "ignore_case", "ignore_mention", "magic", + "prefix", ) def __init__( self, *values: CommandPatternType, - commands: Optional[Union[Sequence[CommandPatternType], CommandPatternType]] = None, + commands: Sequence[CommandPatternType] | CommandPatternType | None = None, prefix: str = "/", ignore_case: bool = False, ignore_mention: bool = False, - magic: Optional[MagicFilter] = None, + magic: MagicFilter | None = None, ): """ List of commands (string or compiled regexp patterns) @@ -74,26 +64,28 @@ class Command(Filter): commands = [commands] if not isinstance(commands, Iterable): - raise ValueError( - "Command filter only supports str, re.Pattern, BotCommand object" - " or their Iterable" + msg = ( + "Command filter only supports str, re.Pattern, BotCommand object or their Iterable" ) + raise ValueError(msg) items = [] for command in (*values, *commands): if isinstance(command, BotCommand): command = command.command if not isinstance(command, (str, re.Pattern)): - raise ValueError( + msg = ( "Command filter only supports str, re.Pattern, BotCommand object" " or their Iterable" ) + raise ValueError(msg) if ignore_case and isinstance(command, str): command = command.casefold() items.append(command) if not items: - raise ValueError("At least one command should be specified") + msg = "At least one command should be specified" + raise ValueError(msg) self.commands = tuple(items) self.prefix = prefix @@ -110,11 +102,11 @@ class Command(Filter): magic=self.magic, ) - def update_handler_flags(self, flags: Dict[str, Any]) -> None: + def update_handler_flags(self, flags: dict[str, Any]) -> None: commands = flags.setdefault("commands", []) commands.append(self) - async def __call__(self, message: Message, bot: Bot) -> Union[bool, Dict[str, Any]]: + async def __call__(self, message: Message, bot: Bot) -> bool | dict[str, Any]: if not isinstance(message, Message): return False @@ -131,13 +123,15 @@ class Command(Filter): result.update(command.magic_result) return result - def extract_command(self, text: str) -> CommandObject: + @classmethod + def extract_command(cls, text: str) -> CommandObject: # First step: separate command with arguments # "/command@mention arg1 arg2" -> "/command@mention", ["arg1 arg2"] try: full_command, *args = text.split(maxsplit=1) - except ValueError: - raise CommandException("not enough values to unpack") + except ValueError as e: + msg = "not enough values to unpack" + raise CommandException(msg) from e # Separate command into valuable parts # "/command@mention" -> "/", ("command", "@", "mention") @@ -151,13 +145,15 @@ class Command(Filter): def validate_prefix(self, command: CommandObject) -> None: if command.prefix not in self.prefix: - raise CommandException("Invalid command prefix") + msg = "Invalid command prefix" + raise CommandException(msg) async def validate_mention(self, bot: Bot, command: CommandObject) -> None: if command.mention and not self.ignore_mention: me = await bot.me() if me.username and command.mention.lower() != me.username.lower(): - raise CommandException("Mention did not match") + msg = "Mention did not match" + raise CommandException(msg) def validate_command(self, command: CommandObject) -> CommandObject: for allowed_command in cast(Sequence[CommandPatternType], self.commands): @@ -174,7 +170,8 @@ class Command(Filter): if command_name == allowed_command: # String return command - raise CommandException("Command did not match pattern") + msg = "Command did not match pattern" + raise CommandException(msg) async def parse_command(self, text: str, bot: Bot) -> CommandObject: """ @@ -196,7 +193,8 @@ class Command(Filter): return command result = self.magic.resolve(command) if not result: - raise CommandException("Rejected via magic filter") + msg = "Rejected via magic filter" + raise CommandException(msg) return replace(command, magic_result=result) @@ -211,13 +209,13 @@ class CommandObject: """Command prefix""" command: str = "" """Command without prefix and mention""" - mention: Optional[str] = None + mention: str | None = None """Mention (if available)""" - args: Optional[str] = field(repr=False, default=None) + args: str | None = field(repr=False, default=None) """Command argument""" - regexp_match: Optional[Match[str]] = field(repr=False, default=None) + regexp_match: Match[str] | None = field(repr=False, default=None) """Will be presented match result if the command is presented as regexp in filter""" - magic_result: Optional[Any] = field(repr=False, default=None) + magic_result: Any | None = field(repr=False, default=None) @property def mentioned(self) -> bool: @@ -242,11 +240,11 @@ class CommandObject: class CommandStart(Command): def __init__( self, - deep_link: bool = False, + deep_link: bool | None = None, deep_link_encoded: bool = False, ignore_case: bool = False, ignore_mention: bool = False, - magic: Optional[MagicFilter] = None, + magic: MagicFilter | None = None, ): super().__init__( "start", @@ -284,15 +282,22 @@ class CommandStart(Command): return command # noqa: RET504 def validate_deeplink(self, command: CommandObject) -> CommandObject: - if not self.deep_link: + if self.deep_link is None: + return command + if self.deep_link is False: + if command.args: + msg = "Deep-link was not expected" + raise CommandException(msg) return command if not command.args: - raise CommandException("Deep-link was missing") + msg = "Deep-link was missing" + raise CommandException(msg) args = command.args if self.deep_link_encoded: try: args = decode_payload(args) except UnicodeDecodeError as e: - raise CommandException(f"Failed to decode Base64: {e}") + msg = f"Failed to decode Base64: {e}" + raise CommandException(msg) from e return replace(command, args=args) return command diff --git a/aiogram/filters/exception.py b/aiogram/filters/exception.py index 2530d751..a5109fe1 100644 --- a/aiogram/filters/exception.py +++ b/aiogram/filters/exception.py @@ -1,5 +1,6 @@ import re -from typing import Any, Dict, Pattern, Type, Union, cast +from re import Pattern +from typing import Any, cast from aiogram.filters.base import Filter from aiogram.types import TelegramObject @@ -13,15 +14,16 @@ class ExceptionTypeFilter(Filter): __slots__ = ("exceptions",) - def __init__(self, *exceptions: Type[Exception]): + def __init__(self, *exceptions: type[Exception]): """ :param exceptions: Exception type(s) """ if not exceptions: - raise ValueError("At least one exception type is required") + msg = "At least one exception type is required" + raise ValueError(msg) self.exceptions = exceptions - async def __call__(self, obj: TelegramObject) -> Union[bool, Dict[str, Any]]: + async def __call__(self, obj: TelegramObject) -> bool | dict[str, Any]: return isinstance(cast(ErrorEvent, obj).exception, self.exceptions) @@ -32,7 +34,7 @@ class ExceptionMessageFilter(Filter): __slots__ = ("pattern",) - def __init__(self, pattern: Union[str, Pattern[str]]): + def __init__(self, pattern: str | Pattern[str]): """ :param pattern: Regexp pattern """ @@ -48,7 +50,7 @@ class ExceptionMessageFilter(Filter): async def __call__( self, obj: TelegramObject, - ) -> Union[bool, Dict[str, Any]]: + ) -> bool | dict[str, Any]: result = self.pattern.match(str(cast(ErrorEvent, obj).exception)) if not result: return False diff --git a/aiogram/filters/logic.py b/aiogram/filters/logic.py index 7cd2503c..b85617f5 100644 --- a/aiogram/filters/logic.py +++ b/aiogram/filters/logic.py @@ -1,5 +1,5 @@ from abc import ABC -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any from aiogram.filters import Filter @@ -17,7 +17,7 @@ class _InvertFilter(_LogicFilter): def __init__(self, target: "FilterObject") -> None: self.target = target - async def __call__(self, *args: Any, **kwargs: Any) -> Union[bool, Dict[str, Any]]: + async def __call__(self, *args: Any, **kwargs: Any) -> bool | dict[str, Any]: return not bool(await self.target.call(*args, **kwargs)) @@ -27,7 +27,7 @@ class _AndFilter(_LogicFilter): def __init__(self, *targets: "FilterObject") -> None: self.targets = targets - async def __call__(self, *args: Any, **kwargs: Any) -> Union[bool, Dict[str, Any]]: + async def __call__(self, *args: Any, **kwargs: Any) -> bool | dict[str, Any]: final_result = {} for target in self.targets: @@ -48,7 +48,7 @@ class _OrFilter(_LogicFilter): def __init__(self, *targets: "FilterObject") -> None: self.targets = targets - async def __call__(self, *args: Any, **kwargs: Any) -> Union[bool, Dict[str, Any]]: + async def __call__(self, *args: Any, **kwargs: Any) -> bool | dict[str, Any]: for target in self.targets: result = await target.call(*args, **kwargs) if not result: diff --git a/aiogram/filters/magic_data.py b/aiogram/filters/magic_data.py index 5c0d474f..0059bf8c 100644 --- a/aiogram/filters/magic_data.py +++ b/aiogram/filters/magic_data.py @@ -18,7 +18,7 @@ class MagicData(Filter): async def __call__(self, event: TelegramObject, *args: Any, **kwargs: Any) -> Any: return self.magic_data.resolve( - AttrDict({"event": event, **dict(enumerate(args)), **kwargs}) + AttrDict({"event": event, **dict(enumerate(args)), **kwargs}), ) def __str__(self) -> str: diff --git a/aiogram/filters/state.py b/aiogram/filters/state.py index 82a141c9..5ea4cd0a 100644 --- a/aiogram/filters/state.py +++ b/aiogram/filters/state.py @@ -1,11 +1,12 @@ +from collections.abc import Sequence from inspect import isclass -from typing import Any, Dict, Optional, Sequence, Type, Union, cast +from typing import Any, cast from aiogram.filters.base import Filter from aiogram.fsm.state import State, StatesGroup from aiogram.types import TelegramObject -StateType = Union[str, None, State, StatesGroup, Type[StatesGroup]] +StateType = str | State | StatesGroup | type[StatesGroup] | None class StateFilter(Filter): @@ -17,7 +18,8 @@ class StateFilter(Filter): def __init__(self, *states: StateType) -> None: if not states: - raise ValueError("At least one state is required") + msg = "At least one state is required" + raise ValueError(msg) self.states = states @@ -27,17 +29,22 @@ class StateFilter(Filter): ) async def __call__( - self, obj: TelegramObject, raw_state: Optional[str] = None - ) -> Union[bool, Dict[str, Any]]: + self, + obj: TelegramObject, + raw_state: str | None = None, + ) -> bool | dict[str, Any]: allowed_states = cast(Sequence[StateType], self.states) for allowed_state in allowed_states: if isinstance(allowed_state, str) or allowed_state is None: - if allowed_state == "*" or raw_state == allowed_state: + if allowed_state in {"*", raw_state}: return True elif isinstance(allowed_state, (State, StatesGroup)): if allowed_state(event=obj, raw_state=raw_state): return True - elif isclass(allowed_state) and issubclass(allowed_state, StatesGroup): - if allowed_state()(event=obj, raw_state=raw_state): - return True + elif ( + isclass(allowed_state) + and issubclass(allowed_state, StatesGroup) + and allowed_state()(event=obj, raw_state=raw_state) + ): + return True return False diff --git a/aiogram/fsm/context.py b/aiogram/fsm/context.py index 53a8ea46..b5dd1cc3 100644 --- a/aiogram/fsm/context.py +++ b/aiogram/fsm/context.py @@ -1,4 +1,5 @@ -from typing import Any, Dict, Optional +from collections.abc import Mapping +from typing import Any, overload from aiogram.fsm.storage.base import BaseStorage, StateType, StorageKey @@ -11,18 +12,29 @@ class FSMContext: async def set_state(self, state: StateType = None) -> None: await self.storage.set_state(key=self.key, state=state) - async def get_state(self) -> Optional[str]: + async def get_state(self) -> str | None: return await self.storage.get_state(key=self.key) - async def set_data(self, data: Dict[str, Any]) -> None: + async def set_data(self, data: Mapping[str, Any]) -> None: await self.storage.set_data(key=self.key, data=data) - async def get_data(self) -> Dict[str, Any]: + async def get_data(self) -> dict[str, Any]: return await self.storage.get_data(key=self.key) + @overload + async def get_value(self, key: str) -> Any | None: ... + + @overload + async def get_value(self, key: str, default: Any) -> Any: ... + + async def get_value(self, key: str, default: Any | None = None) -> Any | None: + return await self.storage.get_value(storage_key=self.key, dict_key=key, default=default) + async def update_data( - self, data: Optional[Dict[str, Any]] = None, **kwargs: Any - ) -> Dict[str, Any]: + self, + data: Mapping[str, Any] | None = None, + **kwargs: Any, + ) -> dict[str, Any]: if data: kwargs.update(data) return await self.storage.update_data(key=self.key, data=kwargs) diff --git a/aiogram/fsm/middleware.py b/aiogram/fsm/middleware.py index de934574..effa3f02 100644 --- a/aiogram/fsm/middleware.py +++ b/aiogram/fsm/middleware.py @@ -1,4 +1,5 @@ -from typing import Any, Awaitable, Callable, Dict, Optional, cast +from collections.abc import Awaitable, Callable +from typing import Any, cast from aiogram import Bot from aiogram.dispatcher.middlewares.base import BaseMiddleware @@ -27,9 +28,9 @@ class FSMContextMiddleware(BaseMiddleware): async def __call__( self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], + handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]], event: TelegramObject, - data: Dict[str, Any], + data: dict[str, Any], ) -> Any: bot: Bot = cast(Bot, data["bot"]) context = self.resolve_event_context(bot, data) @@ -45,9 +46,9 @@ class FSMContextMiddleware(BaseMiddleware): def resolve_event_context( self, bot: Bot, - data: Dict[str, Any], + data: dict[str, Any], destiny: str = DEFAULT_DESTINY, - ) -> Optional[FSMContext]: + ) -> FSMContext | None: event_context: EventContext = cast(EventContext, data.get(EVENT_CONTEXT_KEY)) return self.resolve_context( bot=bot, @@ -61,14 +62,17 @@ class FSMContextMiddleware(BaseMiddleware): def resolve_context( self, bot: Bot, - chat_id: Optional[int], - user_id: Optional[int], - thread_id: Optional[int] = None, - business_connection_id: Optional[str] = None, + chat_id: int | None, + user_id: int | None, + thread_id: int | None = None, + business_connection_id: str | None = None, destiny: str = DEFAULT_DESTINY, - ) -> Optional[FSMContext]: + ) -> FSMContext | None: if chat_id is None: chat_id = user_id + elif user_id is None and self.strategy in {FSMStrategy.CHAT, FSMStrategy.CHAT_TOPIC}: + # CHAT/CHAT_TOPIC are chat-scoped, so missing user_id can fallback to chat_id. + user_id = chat_id if chat_id is not None and user_id is not None: chat_id, user_id, thread_id = apply_strategy( @@ -92,8 +96,8 @@ class FSMContextMiddleware(BaseMiddleware): bot: Bot, chat_id: int, user_id: int, - thread_id: Optional[int] = None, - business_connection_id: Optional[str] = None, + thread_id: int | None = None, + business_connection_id: str | None = None, destiny: str = DEFAULT_DESTINY, ) -> FSMContext: return FSMContext( diff --git a/aiogram/fsm/scene.py b/aiogram/fsm/scene.py index fe4de5c4..4c7fa72c 100644 --- a/aiogram/fsm/scene.py +++ b/aiogram/fsm/scene.py @@ -2,15 +2,15 @@ from __future__ import annotations import inspect from collections import defaultdict +from collections.abc import Mapping from dataclasses import dataclass, replace from enum import Enum, auto -from typing import Any, ClassVar, Dict, List, Optional, Tuple, Type, Union +from typing import TYPE_CHECKING, Any, ClassVar, overload from typing_extensions import Self from aiogram import loggers from aiogram.dispatcher.dispatcher import Dispatcher -from aiogram.dispatcher.event.bases import NextMiddlewareType from aiogram.dispatcher.event.handler import CallableObject, CallbackType from aiogram.dispatcher.flags import extract_flags_from_object from aiogram.dispatcher.router import Router @@ -20,6 +20,13 @@ from aiogram.fsm.context import FSMContext from aiogram.fsm.state import State from aiogram.fsm.storage.memory import MemoryStorageRecord from aiogram.types import TelegramObject, Update +from aiogram.utils.class_attrs_resolver import ( + ClassAttrsResolver, + get_sorted_mro_attrs_resolver, +) + +if TYPE_CHECKING: + from aiogram.dispatcher.event.bases import NextMiddlewareType class HistoryManager: @@ -27,10 +34,11 @@ class HistoryManager: self._size = size self._state = state self._history_state = FSMContext( - storage=state.storage, key=replace(state.key, destiny=destiny) + storage=state.storage, + key=replace(state.key, destiny=destiny), ) - async def push(self, state: Optional[str], data: Dict[str, Any]) -> None: + async def push(self, state: str | None, data: dict[str, Any]) -> None: history_data = await self._history_state.get_data() history = history_data.setdefault("history", []) history.append({"state": state, "data": data}) @@ -40,7 +48,7 @@ class HistoryManager: await self._history_state.update_data(history=history) - async def pop(self) -> Optional[MemoryStorageRecord]: + async def pop(self) -> MemoryStorageRecord | None: history_data = await self._history_state.get_data() history = history_data.setdefault("history", []) if not history: @@ -55,14 +63,14 @@ class HistoryManager: loggers.scene.debug("Pop state=%s data=%s from history", state, data) return MemoryStorageRecord(state=state, data=data) - async def get(self) -> Optional[MemoryStorageRecord]: + async def get(self) -> MemoryStorageRecord | None: history_data = await self._history_state.get_data() history = history_data.setdefault("history", []) if not history: return None return MemoryStorageRecord(**history[-1]) - async def all(self) -> List[MemoryStorageRecord]: + async def all(self) -> list[MemoryStorageRecord]: history_data = await self._history_state.get_data() history = history_data.setdefault("history", []) return [MemoryStorageRecord(**item) for item in history] @@ -76,11 +84,11 @@ class HistoryManager: data = await self._state.get_data() await self.push(state, data) - async def _set_state(self, state: Optional[str], data: Dict[str, Any]) -> None: + async def _set_state(self, state: str | None, data: dict[str, Any]) -> None: await self._state.set_state(state) await self._state.set_data(data) - async def rollback(self) -> Optional[str]: + async def rollback(self) -> str | None: previous_state = await self.pop() if not previous_state: await self._set_state(None, {}) @@ -101,18 +109,18 @@ class ObserverDecorator: name: str, filters: tuple[CallbackType, ...], action: SceneAction | None = None, - after: Optional[After] = None, + after: After | None = None, ) -> None: self.name = name self.filters = filters self.action = action self.after = after - def _wrap_filter(self, target: Type[Scene] | CallbackType) -> None: + def _wrap_filter(self, target: type[Scene] | CallbackType) -> None: handlers = getattr(target, "__aiogram_handler__", None) if not handlers: handlers = [] - setattr(target, "__aiogram_handler__", handlers) + target.__aiogram_handler__ = handlers # type: ignore[union-attr] handlers.append( HandlerContainer( @@ -120,7 +128,7 @@ class ObserverDecorator: handler=target, filters=self.filters, after=self.after, - ) + ), ) def _wrap_action(self, target: CallbackType) -> None: @@ -129,7 +137,7 @@ class ObserverDecorator: action = getattr(target, "__aiogram_action__", None) if action is None: action = defaultdict(dict) - setattr(target, "__aiogram_action__", action) + target.__aiogram_action__ = action # type: ignore[attr-defined] action[self.action][self.name] = CallableObject(target) def __call__(self, target: CallbackType) -> CallbackType: @@ -139,13 +147,14 @@ class ObserverDecorator: else: self._wrap_action(target) else: - raise TypeError("Only function or method is allowed") + msg = "Only function or method is allowed" + raise TypeError(msg) return target def leave(self) -> ActionContainer: return ActionContainer(self.name, self.filters, SceneAction.leave) - def enter(self, target: Type[Scene]) -> ActionContainer: + def enter(self, target: type[Scene]) -> ActionContainer: return ActionContainer(self.name, self.filters, SceneAction.enter, target) def exit(self) -> ActionContainer: @@ -166,9 +175,9 @@ class ActionContainer: def __init__( self, name: str, - filters: Tuple[CallbackType, ...], + filters: tuple[CallbackType, ...], action: SceneAction, - target: Optional[Union[Type[Scene], str]] = None, + target: type[Scene] | State | str | None = None, ) -> None: self.name = name self.filters = filters @@ -186,34 +195,37 @@ class ActionContainer: await wizard.back() +@dataclass(slots=True) class HandlerContainer: - def __init__( - self, - name: str, - handler: CallbackType, - filters: Tuple[CallbackType, ...], - after: Optional[After] = None, - ) -> None: - self.name = name - self.handler = handler - self.filters = filters - self.after = after + name: str + handler: CallbackType + filters: tuple[CallbackType, ...] + after: After | None = None -@dataclass() +@dataclass class SceneConfig: - state: Optional[str] + state: str | None """Scene state""" - handlers: List[HandlerContainer] + handlers: list[HandlerContainer] """Scene handlers""" - actions: Dict[SceneAction, Dict[str, CallableObject]] + actions: dict[SceneAction, dict[str, CallableObject]] """Scene actions""" - reset_data_on_enter: Optional[bool] = None + reset_data_on_enter: bool | None = None """Reset scene data on enter""" - reset_history_on_enter: Optional[bool] = None + reset_history_on_enter: bool | None = None """Reset scene history on enter""" - callback_query_without_state: Optional[bool] = None + callback_query_without_state: bool | None = None """Allow callback query without state""" + attrs_resolver: ClassAttrsResolver = get_sorted_mro_attrs_resolver + """ + Attributes resolver. + + .. danger:: + This attribute should only be changed when you know what you are doing. + + .. versionadded:: 3.19.0 + """ async def _empty_handler(*args: Any, **kwargs: Any) -> None: @@ -223,9 +235,9 @@ async def _empty_handler(*args: Any, **kwargs: Any) -> None: class SceneHandlerWrapper: def __init__( self, - scene: Type[Scene], + scene: type[Scene], handler: CallbackType, - after: Optional[After] = None, + after: After | None = None, ) -> None: self.scene = scene self.handler = CallableObject(handler) @@ -236,9 +248,18 @@ class SceneHandlerWrapper: event: TelegramObject, **kwargs: Any, ) -> Any: - state: FSMContext = kwargs["state"] - scenes: ScenesManager = kwargs["scenes"] + try: + state: FSMContext = kwargs["state"] + scenes: ScenesManager = kwargs["scenes"] + except KeyError as error: + missing_key = error.args[0] + msg = ( + f"Scene context key {missing_key!r} is not available. " + "Ensure FSM is enabled and pipeline is intact." + ) + raise SceneException(msg) from None event_update: Update = kwargs["event_update"] + scenes.data = {**scenes.data, **kwargs} scene = self.scene( wizard=SceneWizard( scene_config=self.scene.__scene_config__, @@ -247,7 +268,7 @@ class SceneHandlerWrapper: update_type=event_update.event_type, event=event, data=kwargs, - ) + ), ) result = await self.handler.call(scene, event, **kwargs) @@ -302,11 +323,12 @@ class Scene: reset_data_on_enter = kwargs.pop("reset_data_on_enter", None) reset_history_on_enter = kwargs.pop("reset_history_on_enter", None) callback_query_without_state = kwargs.pop("callback_query_without_state", None) + attrs_resolver = kwargs.pop("attrs_resolver", None) super().__init_subclass__(**kwargs) handlers: list[HandlerContainer] = [] - actions: defaultdict[SceneAction, Dict[str, CallableObject]] = defaultdict(dict) + actions: defaultdict[SceneAction, dict[str, CallableObject]] = defaultdict(dict) for base in cls.__bases__: if not issubclass(base, Scene): @@ -316,20 +338,19 @@ class Scene: if not parent_scene_config: continue - handlers.extend(parent_scene_config.handlers) - for action, action_handlers in parent_scene_config.actions.items(): - actions[action].update(action_handlers) - if reset_data_on_enter is None: reset_data_on_enter = parent_scene_config.reset_data_on_enter if reset_history_on_enter is None: reset_history_on_enter = parent_scene_config.reset_history_on_enter if callback_query_without_state is None: callback_query_without_state = parent_scene_config.callback_query_without_state + if attrs_resolver is None: + attrs_resolver = parent_scene_config.attrs_resolver - for name in vars(cls): - value = getattr(cls, name) + if attrs_resolver is None: + attrs_resolver = get_sorted_mro_attrs_resolver + for _name, value in attrs_resolver(cls): if scene_handlers := getattr(value, "__aiogram_handler__", None): handlers.extend(scene_handlers) if isinstance(value, ObserverDecorator): @@ -339,7 +360,7 @@ class Scene: _empty_handler, value.filters, after=value.after, - ) + ), ) if hasattr(value, "__aiogram_action__"): for action, action_handlers in value.__aiogram_action__.items(): @@ -352,6 +373,7 @@ class Scene: reset_data_on_enter=reset_data_on_enter, reset_history_on_enter=reset_history_on_enter, callback_query_without_state=callback_query_without_state, + attrs_resolver=attrs_resolver, ) @classmethod @@ -383,7 +405,7 @@ class Scene: router.observers[observer_name].filter(StateFilter(scene_config.state)) @classmethod - def as_router(cls, name: Optional[str] = None) -> Router: + def as_router(cls, name: str | None = None) -> Router: """ Returns the scene as a router. @@ -399,7 +421,7 @@ class Scene: return router @classmethod - def as_handler(cls, **kwargs: Any) -> CallbackType: + def as_handler(cls, **handler_kwargs: Any) -> CallbackType: """ Create an entry point handler for the scene, can be used to simplify the handler that starts the scene. @@ -407,8 +429,12 @@ class Scene: >>> router.message.register(MyScene.as_handler(), Command("start")) """ - async def enter_to_scene_handler(event: TelegramObject, scenes: ScenesManager) -> None: - await scenes.enter(cls, **kwargs) + async def enter_to_scene_handler( + event: TelegramObject, + scenes: ScenesManager, + **middleware_kwargs: Any, + ) -> None: + await scenes.enter(cls, **{**handler_kwargs, **middleware_kwargs}) return enter_to_scene_handler @@ -434,7 +460,7 @@ class SceneWizard: state: FSMContext, update_type: str, event: TelegramObject, - data: Dict[str, Any], + data: dict[str, Any], ): """ A class that represents a wizard for managing scenes in a Telegram bot. @@ -453,7 +479,7 @@ class SceneWizard: self.event = event self.data = data - self.scene: Optional[Scene] = None + self.scene: Scene | None = None async def enter(self, **kwargs: Any) -> None: """ @@ -521,14 +547,14 @@ class SceneWizard: assert self.scene_config.state is not None, "Scene state is not specified" await self.goto(self.scene_config.state, **kwargs) - async def goto(self, scene: Union[Type[Scene], str], **kwargs: Any) -> None: + async def goto(self, scene: type[Scene] | State | str, **kwargs: Any) -> None: """ The `goto` method transitions to a new scene. It first calls the `leave` method to perform any necessary cleanup in the current scene, then calls the `enter` event to enter the specified scene. :param scene: The scene to transition to. Can be either a `Scene` instance - or a string representing the scene. + `State` instance or a string representing the scene. :param kwargs: Additional keyword arguments to pass to the `enter` method of the scene manager. :return: None @@ -538,13 +564,16 @@ class SceneWizard: async def _on_action(self, action: SceneAction, **kwargs: Any) -> bool: if not self.scene: - raise SceneException("Scene is not initialized") + msg = "Scene is not initialized" + raise SceneException(msg) loggers.scene.debug("Call action %r in scene %r", action.name, self.scene_config.state) action_config = self.scene_config.actions.get(action, {}) if not action_config: loggers.scene.debug( - "Action %r not found in scene %r", action.name, self.scene_config.state + "Action %r not found in scene %r", + action.name, + self.scene_config.state, ) return False @@ -561,16 +590,16 @@ class SceneWizard: await action_config[event_type].call(self.scene, self.event, **{**self.data, **kwargs}) return True - async def set_data(self, data: Dict[str, Any]) -> None: + async def set_data(self, data: Mapping[str, Any]) -> None: """ Sets custom data in the current state. - :param data: A dictionary containing the custom data to be set in the current state. + :param data: A mapping containing the custom data to be set in the current state. :return: None """ await self.state.set_data(data=data) - async def get_data(self) -> Dict[str, Any]: + async def get_data(self) -> dict[str, Any]: """ This method returns the data stored in the current state. @@ -578,13 +607,39 @@ class SceneWizard: """ return await self.state.get_data() + @overload + async def get_value(self, key: str) -> Any | None: + """ + This method returns the value from key in the data of the current state. + + :param key: The keyname of the item you want to return the value from. + + :return: A dictionary containing the data stored in the scene state. + """ + + @overload + async def get_value(self, key: str, default: Any) -> Any: + """ + This method returns the value from key in the data of the current state. + + :param key: The keyname of the item you want to return the value from. + :param default: Default value to return, if ``key`` was not found. + + :return: A dictionary containing the data stored in the scene state. + """ + + async def get_value(self, key: str, default: Any | None = None) -> Any | None: + return await self.state.get_value(key, default) + async def update_data( - self, data: Optional[Dict[str, Any]] = None, **kwargs: Any - ) -> Dict[str, Any]: + self, + data: Mapping[str, Any] | None = None, + **kwargs: Any, + ) -> dict[str, Any]: """ This method updates the data stored in the current state - :param data: Optional dictionary of data to update. + :param data: Optional mapping of data to update. :param kwargs: Additional key-value pairs of data to update. :return: Dictionary of updated data """ @@ -613,7 +668,7 @@ class ScenesManager: update_type: str, event: TelegramObject, state: FSMContext, - data: Dict[str, Any], + data: dict[str, Any], ) -> None: self.registry = registry self.update_type = update_type @@ -623,7 +678,7 @@ class ScenesManager: self.history = HistoryManager(self.state) - async def _get_scene(self, scene_type: Optional[Union[Type[Scene], str]]) -> Scene: + async def _get_scene(self, scene_type: type[Scene] | State | str | None) -> Scene: scene_type = self.registry.get(scene_type) return scene_type( wizard=SceneWizard( @@ -636,7 +691,7 @@ class ScenesManager: ), ) - async def _get_active_scene(self) -> Optional[Scene]: + async def _get_active_scene(self) -> Scene | None: state = await self.state.get_state() try: return await self._get_scene(state) @@ -645,19 +700,22 @@ class ScenesManager: async def enter( self, - scene_type: Optional[Union[Type[Scene], str]], + scene_type: type[Scene] | State | str | None, _check_active: bool = True, **kwargs: Any, ) -> None: """ Enters the specified scene. - :param scene_type: Optional Type[Scene] or str representing the scene type to enter. + :param scene_type: Optional Type[Scene], State or str representing the scene type to enter. :param _check_active: Optional bool indicating whether to check if there is an active scene to exit before entering the new scene. Defaults to True. :param kwargs: Additional keyword arguments to pass to the scene's wizard.enter() method. :return: None """ + if kwargs: + self.data = {**self.data, **kwargs} + if _check_active: active_scene = await self._get_active_scene() if active_scene is not None: @@ -700,7 +758,7 @@ class SceneRegistry: self.router = router self.register_on_add = register_on_add - self._scenes: Dict[Optional[str], Type[Scene]] = {} + self._scenes: dict[str | None, type[Scene]] = {} self._setup_middleware(router) def _setup_middleware(self, router: Router) -> None: @@ -719,15 +777,18 @@ class SceneRegistry: self, handler: NextMiddlewareType[TelegramObject], event: TelegramObject, - data: Dict[str, Any], + data: dict[str, Any], ) -> Any: assert isinstance(event, Update), "Event must be an Update instance" + state = data.get("state") + if state is None: + return await handler(event, data) data["scenes"] = ScenesManager( registry=self, update_type=event.event_type, event=event.event, - state=data["state"], + state=state, data=data, ) return await handler(event, data) @@ -736,19 +797,23 @@ class SceneRegistry: self, handler: NextMiddlewareType[TelegramObject], event: TelegramObject, - data: Dict[str, Any], + data: dict[str, Any], ) -> Any: + state = data.get("state") + if state is None: + return await handler(event, data) + update: Update = data["event_update"] data["scenes"] = ScenesManager( registry=self, update_type=update.event_type, event=event, - state=data["state"], + state=state, data=data, ) return await handler(event, data) - def add(self, *scenes: Type[Scene], router: Optional[Router] = None) -> None: + def add(self, *scenes: type[Scene], router: Router | None = None) -> None: """ This method adds the specified scenes to the registry and optionally registers it to the router. @@ -767,13 +832,13 @@ class SceneRegistry: :return: None """ if not scenes: - raise ValueError("At least one scene must be specified") + msg = "At least one scene must be specified" + raise ValueError(msg) for scene in scenes: if scene.__scene_config__.state in self._scenes: - raise SceneException( - f"Scene with state {scene.__scene_config__.state!r} already exists" - ) + msg = f"Scene with state {scene.__scene_config__.state!r} already exists" + raise SceneException(msg) self._scenes[scene.__scene_config__.state] = scene @@ -782,7 +847,7 @@ class SceneRegistry: elif self.register_on_add: self.router.include_router(scene.as_router()) - def register(self, *scenes: Type[Scene]) -> None: + def register(self, *scenes: type[Scene]) -> None: """ Registers one or more scenes to the SceneRegistry. @@ -791,18 +856,19 @@ class SceneRegistry: """ self.add(*scenes, router=self.router) - def get(self, scene: Optional[Union[Type[Scene], str]]) -> Type[Scene]: + def get(self, scene: type[Scene] | State | str | None) -> type[Scene]: """ This method returns the registered Scene object for the specified scene. - The scene parameter can be either a Scene object or a string representing + The scene parameter can be either a Scene object, State object or a string representing the name of the scene. If a Scene object is provided, the state attribute of the SceneConfig object associated with the Scene object will be used as the scene name. - If None or an invalid type is provided, a SceneException will be raised. + If a State object is provided, the state attribute of the State object will be used as the + scene name. If None or an invalid type is provided, a SceneException will be raised. If the specified scene is not registered in the SceneRegistry object, a SceneException will be raised. - :param scene: A Scene object or a string representing the name of the scene. + :param scene: A Scene object, State object or a string representing the name of the scene. :return: The registered Scene object corresponding to the given scene parameter. """ @@ -811,18 +877,20 @@ class SceneRegistry: if isinstance(scene, State): scene = scene.state if scene is not None and not isinstance(scene, str): - raise SceneException("Scene must be a subclass of Scene or a string") + msg = "Scene must be a subclass of Scene, State or a string" + raise SceneException(msg) try: return self._scenes[scene] except KeyError: - raise SceneException(f"Scene {scene!r} is not registered") + msg = f"Scene {scene!r} is not registered" + raise SceneException(msg) from None @dataclass class After: action: SceneAction - scene: Optional[Union[Type[Scene], str]] = None + scene: type[Scene] | State | str | None = None @classmethod def exit(cls) -> After: @@ -833,7 +901,7 @@ class After: return cls(action=SceneAction.back) @classmethod - def goto(cls, scene: Optional[Union[Type[Scene], str]]) -> After: + def goto(cls, scene: type[Scene] | State | str | None) -> After: return cls(action=SceneAction.enter, scene=scene) @@ -844,7 +912,7 @@ class ObserverMarker: def __call__( self, *filters: CallbackType, - after: Optional[After] = None, + after: After | None = None, ) -> ObserverDecorator: return ObserverDecorator( self.name, diff --git a/aiogram/fsm/state.py b/aiogram/fsm/state.py index 8b341017..89dbf73b 100644 --- a/aiogram/fsm/state.py +++ b/aiogram/fsm/state.py @@ -1,5 +1,6 @@ import inspect -from typing import Any, Iterator, Optional, Tuple, Type, no_type_check +from collections.abc import Iterator +from typing import Any, no_type_check from aiogram.types import TelegramObject @@ -9,19 +10,20 @@ class State: State object """ - def __init__(self, state: Optional[str] = None, group_name: Optional[str] = None) -> None: + def __init__(self, state: str | None = None, group_name: str | None = None) -> None: self._state = state self._group_name = group_name - self._group: Optional[Type[StatesGroup]] = None + self._group: type[StatesGroup] | None = None @property - def group(self) -> "Type[StatesGroup]": + def group(self) -> "type[StatesGroup]": if not self._group: - raise RuntimeError("This state is not in any group.") + msg = "This state is not in any group." + raise RuntimeError(msg) return self._group @property - def state(self) -> Optional[str]: + def state(self) -> str | None: if self._state is None or self._state == "*": return self._state @@ -34,12 +36,13 @@ class State: return f"{group}:{self._state}" - def set_parent(self, group: "Type[StatesGroup]") -> None: + def set_parent(self, group: "type[StatesGroup]") -> None: if not issubclass(group, StatesGroup): - raise ValueError("Group must be subclass of StatesGroup") + msg = "Group must be subclass of StatesGroup" + raise ValueError(msg) self._group = group - def __set_name__(self, owner: "Type[StatesGroup]", name: str) -> None: + def __set_name__(self, owner: "type[StatesGroup]", name: str) -> None: if self._state is None: self._state = name self.set_parent(owner) @@ -49,12 +52,12 @@ class State: __repr__ = __str__ - def __call__(self, event: TelegramObject, raw_state: Optional[str] = None) -> bool: + def __call__(self, event: TelegramObject, raw_state: str | None = None) -> bool: if self.state == "*": return True return raw_state == self.state - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, self.__class__): return self.state == other.state if isinstance(other, str): @@ -66,54 +69,76 @@ class State: class StatesGroupMeta(type): - __parent__: "Optional[Type[StatesGroup]]" - __childs__: "Tuple[Type[StatesGroup], ...]" - __states__: Tuple[State, ...] - __state_names__: Tuple[str, ...] + __parent__: type["StatesGroup"] | None + __childs__: tuple[type["StatesGroup"], ...] + __states__: tuple[State, ...] + __state_names__: tuple[str, ...] + __all_childs__: tuple[type["StatesGroup"], ...] + __all_states__: tuple[State, ...] + __all_states_names__: tuple[str, ...] @no_type_check def __new__(mcs, name, bases, namespace, **kwargs): - cls = super(StatesGroupMeta, mcs).__new__(mcs, name, bases, namespace) + cls = super().__new__(mcs, name, bases, namespace) states = [] childs = [] - for name, arg in namespace.items(): + for arg in namespace.values(): if isinstance(arg, State): states.append(arg) elif inspect.isclass(arg) and issubclass(arg, StatesGroup): - childs.append(arg) - arg.__parent__ = cls + child = cls._prepare_child(arg) + childs.append(child) cls.__parent__ = None cls.__childs__ = tuple(childs) cls.__states__ = tuple(states) cls.__state_names__ = tuple(state.state for state in states) + cls.__all_childs__ = cls._get_all_childs() + cls.__all_states__ = cls._get_all_states() + + # In order to ensure performance, we calculate this parameter + # in advance already during the production of the class. + # Depending on the relationship, it should be recalculated + cls.__all_states_names__ = cls._get_all_states_names() + return cls @property def __full_group_name__(cls) -> str: if cls.__parent__: - return ".".join((cls.__parent__.__full_group_name__, cls.__name__)) + return f"{cls.__parent__.__full_group_name__}.{cls.__name__}" return cls.__name__ - @property - def __all_childs__(cls) -> Tuple[Type["StatesGroup"], ...]: + def _prepare_child(cls, child: type["StatesGroup"]) -> type["StatesGroup"]: + """Prepare child. + + While adding `cls` for its children, we also need to recalculate + the parameter `__all_states_names__` for each child + `StatesGroup`. Since the child class appears before the + parent, at the time of adding the parent, the child's + `__all_states_names__` is already recorded without taking into + account the name of current parent. + """ + child.__parent__ = cls # type: ignore[assignment] + child.__all_states_names__ = child._get_all_states_names() + return child + + def _get_all_childs(cls) -> tuple[type["StatesGroup"], ...]: result = cls.__childs__ for child in cls.__childs__: result += child.__childs__ return result - @property - def __all_states__(cls) -> Tuple[State, ...]: + def _get_all_states(cls) -> tuple[State, ...]: result = cls.__states__ for group in cls.__childs__: result += group.__all_states__ return result - @property - def __all_states_names__(cls) -> Tuple[str, ...]: + def _get_all_states_names(cls) -> tuple[str, ...]: return tuple(state.state for state in cls.__all_states__ if state.state) def __contains__(cls, item: Any) -> bool: @@ -134,12 +159,12 @@ class StatesGroupMeta(type): class StatesGroup(metaclass=StatesGroupMeta): @classmethod - def get_root(cls) -> Type["StatesGroup"]: + def get_root(cls) -> type["StatesGroup"]: if cls.__parent__ is None: return cls return cls.__parent__.get_root() - def __call__(self, event: TelegramObject, raw_state: Optional[str] = None) -> bool: + def __call__(self, event: TelegramObject, raw_state: str | None = None) -> bool: return raw_state in type(self).__all_states_names__ def __str__(self) -> str: diff --git a/aiogram/fsm/storage/base.py b/aiogram/fsm/storage/base.py index 8e1b206f..4b2f0258 100644 --- a/aiogram/fsm/storage/base.py +++ b/aiogram/fsm/storage/base.py @@ -1,11 +1,12 @@ from abc import ABC, abstractmethod +from collections.abc import AsyncGenerator, Mapping from contextlib import asynccontextmanager from dataclasses import dataclass -from typing import Any, AsyncGenerator, Dict, Literal, Optional, Union +from typing import Any, Literal, overload from aiogram.fsm.state import State -StateType = Optional[Union[str, State]] +StateType = str | State | None DEFAULT_DESTINY = "default" @@ -15,8 +16,8 @@ class StorageKey: bot_id: int chat_id: int user_id: int - thread_id: Optional[int] = None - business_connection_id: Optional[str] = None + thread_id: int | None = None + business_connection_id: str | None = None destiny: str = DEFAULT_DESTINY @@ -27,7 +28,7 @@ class KeyBuilder(ABC): def build( self, key: StorageKey, - part: Optional[Literal["data", "state", "lock"]] = None, + part: Literal["data", "state", "lock"] | None = None, ) -> str: """ Build key to be used in storage's db queries @@ -36,7 +37,6 @@ class KeyBuilder(ABC): :param part: part of the record :return: key to be used in storage's db queries """ - pass class DefaultKeyBuilder(KeyBuilder): @@ -75,7 +75,7 @@ class DefaultKeyBuilder(KeyBuilder): def build( self, key: StorageKey, - part: Optional[Literal["data", "state", "lock"]] = None, + part: Literal["data", "state", "lock"] | None = None, ) -> str: parts = [self.prefix] if self.with_bot_id: @@ -112,39 +112,65 @@ class BaseStorage(ABC): :param key: storage key :param state: new state """ - pass @abstractmethod - async def get_state(self, key: StorageKey) -> Optional[str]: + async def get_state(self, key: StorageKey) -> str | None: """ Get key state :param key: storage key :return: current state """ - pass @abstractmethod - async def set_data(self, key: StorageKey, data: Dict[str, Any]) -> None: + async def set_data(self, key: StorageKey, data: Mapping[str, Any]) -> None: """ Write data (replace) :param key: storage key :param data: new data """ - pass @abstractmethod - async def get_data(self, key: StorageKey) -> Dict[str, Any]: + async def get_data(self, key: StorageKey) -> dict[str, Any]: """ Get current data for key :param key: storage key :return: current data """ - pass - async def update_data(self, key: StorageKey, data: Dict[str, Any]) -> Dict[str, Any]: + @overload + async def get_value(self, storage_key: StorageKey, dict_key: str) -> Any | None: + """ + Get single value from data by key + + :param storage_key: storage key + :param dict_key: value key + :return: value stored in key of dict or ``None`` + """ + + @overload + async def get_value(self, storage_key: StorageKey, dict_key: str, default: Any) -> Any: + """ + Get single value from data by key + + :param storage_key: storage key + :param dict_key: value key + :param default: default value to return + :return: value stored in key of dict or default + """ + + async def get_value( + self, + storage_key: StorageKey, + dict_key: str, + default: Any | None = None, + ) -> Any | None: + data = await self.get_data(storage_key) + return data.get(dict_key, default) + + async def update_data(self, key: StorageKey, data: Mapping[str, Any]) -> dict[str, Any]: """ Update date in the storage for key (like dict.update) @@ -162,7 +188,6 @@ class BaseStorage(ABC): """ Close storage (database connection, file or etc.) """ - pass class BaseEventIsolation(ABC): diff --git a/aiogram/fsm/storage/memory.py b/aiogram/fsm/storage/memory.py index d80a9fff..7f6df34e 100644 --- a/aiogram/fsm/storage/memory.py +++ b/aiogram/fsm/storage/memory.py @@ -1,9 +1,12 @@ from asyncio import Lock from collections import defaultdict +from collections.abc import AsyncGenerator, Hashable, Mapping from contextlib import asynccontextmanager +from copy import copy from dataclasses import dataclass, field -from typing import Any, AsyncGenerator, DefaultDict, Dict, Hashable, Optional +from typing import Any, overload +from aiogram.exceptions import DataNotDictLikeError from aiogram.fsm.state import State from aiogram.fsm.storage.base import ( BaseEventIsolation, @@ -15,8 +18,8 @@ from aiogram.fsm.storage.base import ( @dataclass class MemoryStorageRecord: - data: Dict[str, Any] = field(default_factory=dict) - state: Optional[str] = None + data: dict[str, Any] = field(default_factory=dict) + state: str | None = None class MemoryStorage(BaseStorage): @@ -30,8 +33,8 @@ class MemoryStorage(BaseStorage): """ def __init__(self) -> None: - self.storage: DefaultDict[StorageKey, MemoryStorageRecord] = defaultdict( - MemoryStorageRecord + self.storage: defaultdict[StorageKey, MemoryStorageRecord] = defaultdict( + MemoryStorageRecord, ) async def close(self) -> None: @@ -40,15 +43,33 @@ class MemoryStorage(BaseStorage): async def set_state(self, key: StorageKey, state: StateType = None) -> None: self.storage[key].state = state.state if isinstance(state, State) else state - async def get_state(self, key: StorageKey) -> Optional[str]: + async def get_state(self, key: StorageKey) -> str | None: return self.storage[key].state - async def set_data(self, key: StorageKey, data: Dict[str, Any]) -> None: + async def set_data(self, key: StorageKey, data: Mapping[str, Any]) -> None: + if not isinstance(data, dict): + msg = f"Data must be a dict or dict-like object, got {type(data).__name__}" + raise DataNotDictLikeError(msg) self.storage[key].data = data.copy() - async def get_data(self, key: StorageKey) -> Dict[str, Any]: + async def get_data(self, key: StorageKey) -> dict[str, Any]: return self.storage[key].data.copy() + @overload + async def get_value(self, storage_key: StorageKey, dict_key: str) -> Any | None: ... + + @overload + async def get_value(self, storage_key: StorageKey, dict_key: str, default: Any) -> Any: ... + + async def get_value( + self, + storage_key: StorageKey, + dict_key: str, + default: Any | None = None, + ) -> Any | None: + data = self.storage[storage_key].data + return copy(data.get(dict_key, default)) + class DisabledEventIsolation(BaseEventIsolation): @asynccontextmanager @@ -62,7 +83,7 @@ class DisabledEventIsolation(BaseEventIsolation): class SimpleEventIsolation(BaseEventIsolation): def __init__(self) -> None: # TODO: Unused locks cleaner is needed - self._locks: DefaultDict[Hashable, Lock] = defaultdict(Lock) + self._locks: defaultdict[Hashable, Lock] = defaultdict(Lock) @asynccontextmanager async def lock(self, key: StorageKey) -> AsyncGenerator[None, None]: diff --git a/aiogram/fsm/storage/mongo.py b/aiogram/fsm/storage/mongo.py index b4b1eeaa..531996cb 100644 --- a/aiogram/fsm/storage/mongo.py +++ b/aiogram/fsm/storage/mongo.py @@ -1,7 +1,9 @@ -from typing import Any, Dict, Optional, cast +from collections.abc import Mapping +from typing import Any, cast from motor.motor_asyncio import AsyncIOMotorClient +from aiogram.exceptions import DataNotDictLikeError from aiogram.fsm.state import State from aiogram.fsm.storage.base import ( BaseStorage, @@ -14,13 +16,19 @@ from aiogram.fsm.storage.base import ( class MongoStorage(BaseStorage): """ + + .. warning:: + DEPRECATED: Use :class:`PyMongoStorage` instead. + This class will be removed in future versions. + + MongoDB storage required :code:`motor` package installed (:code:`pip install motor`) """ def __init__( self, client: AsyncIOMotorClient, - key_builder: Optional[KeyBuilder] = None, + key_builder: KeyBuilder | None = None, db_name: str = "aiogram_fsm", collection_name: str = "states_and_data", ) -> None: @@ -39,7 +47,10 @@ class MongoStorage(BaseStorage): @classmethod def from_url( - cls, url: str, connection_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Any + cls, + url: str, + connection_kwargs: dict[str, Any] | None = None, + **kwargs: Any, ) -> "MongoStorage": """ Create an instance of :class:`MongoStorage` with specifying the connection string @@ -58,7 +69,7 @@ class MongoStorage(BaseStorage): """Cleanup client resources and disconnect from MongoDB.""" self._client.close() - def resolve_state(self, value: StateType) -> Optional[str]: + def resolve_state(self, value: StateType) -> str | None: if value is None: return None if isinstance(value, State): @@ -83,14 +94,18 @@ class MongoStorage(BaseStorage): upsert=True, ) - async def get_state(self, key: StorageKey) -> Optional[str]: + async def get_state(self, key: StorageKey) -> str | None: document_id = self._key_builder.build(key) document = await self._collection.find_one({"_id": document_id}) if document is None: return None return document.get("state") - async def set_data(self, key: StorageKey, data: Dict[str, Any]) -> None: + async def set_data(self, key: StorageKey, data: Mapping[str, Any]) -> None: + if not isinstance(data, dict): + msg = f"Data must be a dict or dict-like object, got {type(data).__name__}" + raise DataNotDictLikeError(msg) + document_id = self._key_builder.build(key) if not data: updated = await self._collection.find_one_and_update( @@ -108,14 +123,14 @@ class MongoStorage(BaseStorage): upsert=True, ) - async def get_data(self, key: StorageKey) -> Dict[str, Any]: + async def get_data(self, key: StorageKey) -> dict[str, Any]: document_id = self._key_builder.build(key) document = await self._collection.find_one({"_id": document_id}) if document is None or not document.get("data"): return {} - return cast(Dict[str, Any], document["data"]) + return cast(dict[str, Any], document["data"]) - async def update_data(self, key: StorageKey, data: Dict[str, Any]) -> Dict[str, Any]: + async def update_data(self, key: StorageKey, data: Mapping[str, Any]) -> dict[str, Any]: document_id = self._key_builder.build(key) update_with = {f"data.{key}": value for key, value in data.items()} update_result = await self._collection.find_one_and_update( diff --git a/aiogram/fsm/storage/pymongo.py b/aiogram/fsm/storage/pymongo.py new file mode 100644 index 00000000..15b38eb3 --- /dev/null +++ b/aiogram/fsm/storage/pymongo.py @@ -0,0 +1,139 @@ +from collections.abc import Mapping +from typing import Any, cast + +from pymongo import AsyncMongoClient + +from aiogram.exceptions import DataNotDictLikeError +from aiogram.fsm.state import State +from aiogram.fsm.storage.base import ( + BaseStorage, + DefaultKeyBuilder, + KeyBuilder, + StateType, + StorageKey, +) + + +class PyMongoStorage(BaseStorage): + """ + MongoDB storage required :code:`pymongo` package installed (:code:`pip install pymongo`). + """ + + def __init__( + self, + client: AsyncMongoClient[Any], + key_builder: KeyBuilder | None = None, + db_name: str = "aiogram_fsm", + collection_name: str = "states_and_data", + ) -> None: + """ + :param client: Instance of AsyncMongoClient + :param key_builder: builder that helps to convert contextual key to string + :param db_name: name of the MongoDB database for FSM + :param collection_name: name of the collection for storing FSM states and data + """ + if key_builder is None: + key_builder = DefaultKeyBuilder() + self._client = client + self._database = self._client[db_name] + self._collection = self._database[collection_name] + self._key_builder = key_builder + + @classmethod + def from_url( + cls, + url: str, + connection_kwargs: dict[str, Any] | None = None, + **kwargs: Any, + ) -> "PyMongoStorage": + """ + Create an instance of :class:`PyMongoStorage` with specifying the connection string + + :param url: for example :code:`mongodb://user:password@host:port` + :param connection_kwargs: see :code:`pymongo` docs + :param kwargs: arguments to be passed to :class:`PyMongoStorage` + :return: an instance of :class:`PyMongoStorage` + """ + if connection_kwargs is None: + connection_kwargs = {} + client: AsyncMongoClient[Any] = AsyncMongoClient(url, **connection_kwargs) + return cls(client=client, **kwargs) + + async def close(self) -> None: + """Cleanup client resources and disconnect from MongoDB.""" + return await self._client.close() + + def resolve_state(self, value: StateType) -> str | None: + if value is None: + return None + if isinstance(value, State): + return value.state + return str(value) + + async def set_state(self, key: StorageKey, state: StateType = None) -> None: + document_id = self._key_builder.build(key) + if state is None: + updated = await self._collection.find_one_and_update( + filter={"_id": document_id}, + update={"$unset": {"state": 1}}, + projection={"_id": 0}, + return_document=True, + ) + if updated == {}: + await self._collection.delete_one({"_id": document_id}) + else: + await self._collection.update_one( + filter={"_id": document_id}, + update={"$set": {"state": self.resolve_state(state)}}, + upsert=True, + ) + + async def get_state(self, key: StorageKey) -> str | None: + document_id = self._key_builder.build(key) + document = await self._collection.find_one({"_id": document_id}) + if document is None: + return None + return cast(str | None, document.get("state")) + + async def set_data(self, key: StorageKey, data: Mapping[str, Any]) -> None: + if not isinstance(data, dict): + msg = f"Data must be a dict or dict-like object, got {type(data).__name__}" + raise DataNotDictLikeError(msg) + + document_id = self._key_builder.build(key) + if not data: + updated = await self._collection.find_one_and_update( + filter={"_id": document_id}, + update={"$unset": {"data": 1}}, + projection={"_id": 0}, + return_document=True, + ) + if updated == {}: + await self._collection.delete_one({"_id": document_id}) + else: + await self._collection.update_one( + filter={"_id": document_id}, + update={"$set": {"data": data}}, + upsert=True, + ) + + async def get_data(self, key: StorageKey) -> dict[str, Any]: + document_id = self._key_builder.build(key) + document = await self._collection.find_one({"_id": document_id}) + if document is None or not document.get("data"): + return {} + return cast(dict[str, Any], document["data"]) + + async def update_data(self, key: StorageKey, data: Mapping[str, Any]) -> dict[str, Any]: + document_id = self._key_builder.build(key) + update_with = {f"data.{key}": value for key, value in data.items()} + update_result = await self._collection.find_one_and_update( + filter={"_id": document_id}, + update={"$set": update_with}, + upsert=True, + return_document=True, + projection={"_id": 0}, + ) + if not update_result: + await self._collection.delete_one({"_id": document_id}) + return cast(dict[str, Any], update_result.get("data", {})) diff --git a/aiogram/fsm/storage/redis.py b/aiogram/fsm/storage/redis.py index edcf9d63..1647ab3c 100644 --- a/aiogram/fsm/storage/redis.py +++ b/aiogram/fsm/storage/redis.py @@ -1,12 +1,14 @@ import json +from collections.abc import AsyncGenerator, Callable, Mapping from contextlib import asynccontextmanager -from typing import Any, AsyncGenerator, Callable, Dict, Optional, cast +from typing import Any, cast from redis.asyncio.client import Redis from redis.asyncio.connection import ConnectionPool from redis.asyncio.lock import Lock from redis.typing import ExpiryT +from aiogram.exceptions import DataNotDictLikeError from aiogram.fsm.state import State from aiogram.fsm.storage.base import ( BaseEventIsolation, @@ -30,9 +32,9 @@ class RedisStorage(BaseStorage): def __init__( self, redis: Redis, - key_builder: Optional[KeyBuilder] = None, - state_ttl: Optional[ExpiryT] = None, - data_ttl: Optional[ExpiryT] = None, + key_builder: KeyBuilder | None = None, + state_ttl: ExpiryT | None = None, + data_ttl: ExpiryT | None = None, json_loads: _JsonLoads = json.loads, json_dumps: _JsonDumps = json.dumps, ) -> None: @@ -53,7 +55,10 @@ class RedisStorage(BaseStorage): @classmethod def from_url( - cls, url: str, connection_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Any + cls, + url: str, + connection_kwargs: dict[str, Any] | None = None, + **kwargs: Any, ) -> "RedisStorage": """ Create an instance of :class:`RedisStorage` with specifying the connection string @@ -93,18 +98,22 @@ class RedisStorage(BaseStorage): async def get_state( self, key: StorageKey, - ) -> Optional[str]: + ) -> str | None: redis_key = self.key_builder.build(key, "state") value = await self.redis.get(redis_key) if isinstance(value, bytes): return value.decode("utf-8") - return cast(Optional[str], value) + return cast(str | None, value) async def set_data( self, key: StorageKey, - data: Dict[str, Any], + data: Mapping[str, Any], ) -> None: + if not isinstance(data, dict): + msg = f"Data must be a dict or dict-like object, got {type(data).__name__}" + raise DataNotDictLikeError(msg) + redis_key = self.key_builder.build(key, "data") if not data: await self.redis.delete(redis_key) @@ -118,22 +127,22 @@ class RedisStorage(BaseStorage): async def get_data( self, key: StorageKey, - ) -> Dict[str, Any]: + ) -> dict[str, Any]: redis_key = self.key_builder.build(key, "data") value = await self.redis.get(redis_key) if value is None: return {} if isinstance(value, bytes): value = value.decode("utf-8") - return cast(Dict[str, Any], self.json_loads(value)) + return cast(dict[str, Any], self.json_loads(value)) class RedisEventIsolation(BaseEventIsolation): def __init__( self, redis: Redis, - key_builder: Optional[KeyBuilder] = None, - lock_kwargs: Optional[Dict[str, Any]] = None, + key_builder: KeyBuilder | None = None, + lock_kwargs: dict[str, Any] | None = None, ) -> None: if key_builder is None: key_builder = DefaultKeyBuilder() @@ -147,7 +156,7 @@ class RedisEventIsolation(BaseEventIsolation): def from_url( cls, url: str, - connection_kwargs: Optional[Dict[str, Any]] = None, + connection_kwargs: dict[str, Any] | None = None, **kwargs: Any, ) -> "RedisEventIsolation": if connection_kwargs is None: diff --git a/aiogram/fsm/strategy.py b/aiogram/fsm/strategy.py index f68aa045..6f3559e2 100644 --- a/aiogram/fsm/strategy.py +++ b/aiogram/fsm/strategy.py @@ -1,21 +1,29 @@ from enum import Enum, auto -from typing import Optional, Tuple class FSMStrategy(Enum): + """ + FSM strategy for storage key generation. + """ + USER_IN_CHAT = auto() + """State will be stored for each user in chat.""" CHAT = auto() + """State will be stored for each chat globally without separating by users.""" GLOBAL_USER = auto() + """State will be stored globally for each user globally.""" USER_IN_TOPIC = auto() + """State will be stored for each user in chat and topic.""" CHAT_TOPIC = auto() + """State will be stored for each chat and topic, but not separated by users.""" def apply_strategy( strategy: FSMStrategy, chat_id: int, user_id: int, - thread_id: Optional[int] = None, -) -> Tuple[int, int, Optional[int]]: + thread_id: int | None = None, +) -> tuple[int, int, int | None]: if strategy == FSMStrategy.CHAT: return chat_id, chat_id, None if strategy == FSMStrategy.GLOBAL_USER: diff --git a/aiogram/handlers/base.py b/aiogram/handlers/base.py index 0eb1b420..afc7cd06 100644 --- a/aiogram/handlers/base.py +++ b/aiogram/handlers/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Any, Dict, Generic, TypeVar, cast +from typing import TYPE_CHECKING, Any, Generic, TypeVar, cast from aiogram.types import Update @@ -14,7 +14,7 @@ T = TypeVar("T") class BaseHandlerMixin(Generic[T]): if TYPE_CHECKING: event: T - data: Dict[str, Any] + data: dict[str, Any] class BaseHandler(BaseHandlerMixin[T], ABC): @@ -24,7 +24,7 @@ class BaseHandler(BaseHandlerMixin[T], ABC): def __init__(self, event: T, **kwargs: Any) -> None: self.event: T = event - self.data: Dict[str, Any] = kwargs + self.data: dict[str, Any] = kwargs @property def bot(self) -> Bot: @@ -32,7 +32,8 @@ class BaseHandler(BaseHandlerMixin[T], ABC): if "bot" in self.data: return cast(Bot, self.data["bot"]) - raise RuntimeError("Bot instance not found in the context") + msg = "Bot instance not found in the context" + raise RuntimeError(msg) @property def update(self) -> Update: diff --git a/aiogram/handlers/callback_query.py b/aiogram/handlers/callback_query.py index 342b11b8..a4be9ff3 100644 --- a/aiogram/handlers/callback_query.py +++ b/aiogram/handlers/callback_query.py @@ -1,8 +1,7 @@ from abc import ABC -from typing import Optional from aiogram.handlers import BaseHandler -from aiogram.types import CallbackQuery, MaybeInaccessibleMessage, Message, User +from aiogram.types import CallbackQuery, MaybeInaccessibleMessage, User class CallbackQueryHandler(BaseHandler[CallbackQuery], ABC): @@ -29,14 +28,14 @@ class CallbackQueryHandler(BaseHandler[CallbackQuery], ABC): return self.event.from_user @property - def message(self) -> Optional[MaybeInaccessibleMessage]: + def message(self) -> MaybeInaccessibleMessage | None: """ Is alias for `event.message` """ return self.event.message @property - def callback_data(self) -> Optional[str]: + def callback_data(self) -> str | None: """ Is alias for `event.data` """ diff --git a/aiogram/handlers/message.py b/aiogram/handlers/message.py index 4fbecec2..b726b908 100644 --- a/aiogram/handlers/message.py +++ b/aiogram/handlers/message.py @@ -1,5 +1,5 @@ from abc import ABC -from typing import Optional, cast +from typing import cast from aiogram.filters import CommandObject from aiogram.handlers.base import BaseHandler, BaseHandlerMixin @@ -12,7 +12,7 @@ class MessageHandler(BaseHandler[Message], ABC): """ @property - def from_user(self) -> Optional[User]: + def from_user(self) -> User | None: return self.event.from_user @property @@ -22,7 +22,7 @@ class MessageHandler(BaseHandler[Message], ABC): class MessageHandlerCommandMixin(BaseHandlerMixin[Message]): @property - def command(self) -> Optional[CommandObject]: + def command(self) -> CommandObject | None: if "command" in self.data: return cast(CommandObject, self.data["command"]) return None diff --git a/aiogram/handlers/poll.py b/aiogram/handlers/poll.py index 2183d844..273254b7 100644 --- a/aiogram/handlers/poll.py +++ b/aiogram/handlers/poll.py @@ -1,5 +1,4 @@ from abc import ABC -from typing import List from aiogram.handlers import BaseHandler from aiogram.types import Poll, PollOption @@ -15,5 +14,5 @@ class PollHandler(BaseHandler[Poll], ABC): return self.event.question @property - def options(self) -> List[PollOption]: + def options(self) -> list[PollOption]: return self.event.options diff --git a/aiogram/methods/__init__.py b/aiogram/methods/__init__.py index dca24d62..5a0a66f0 100644 --- a/aiogram/methods/__init__.py +++ b/aiogram/methods/__init__.py @@ -5,19 +5,24 @@ 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 from .close import Close from .close_forum_topic import CloseForumTopic from .close_general_forum_topic import CloseGeneralForumTopic +from .convert_gift_to_stars import ConvertGiftToStars from .copy_message import CopyMessage from .copy_messages import CopyMessages from .create_chat_invite_link import CreateChatInviteLink +from .create_chat_subscription_invite_link import CreateChatSubscriptionInviteLink 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 from .delete_forum_topic import DeleteForumTopic @@ -26,21 +31,30 @@ from .delete_messages import DeleteMessages from .delete_my_commands import DeleteMyCommands from .delete_sticker_from_set import DeleteStickerFromSet from .delete_sticker_set import DeleteStickerSet +from .delete_story import DeleteStory from .delete_webhook import DeleteWebhook from .edit_chat_invite_link import EditChatInviteLink +from .edit_chat_subscription_invite_link import EditChatSubscriptionInviteLink from .edit_forum_topic import EditForumTopic from .edit_general_forum_topic import EditGeneralForumTopic from .edit_message_caption import EditMessageCaption +from .edit_message_checklist import EditMessageChecklist from .edit_message_live_location import EditMessageLiveLocation from .edit_message_media import EditMessageMedia from .edit_message_reply_markup import EditMessageReplyMarkup from .edit_message_text import EditMessageText +from .edit_story import EditStory +from .edit_user_star_subscription import EditUserStarSubscription from .export_chat_invite_link import ExportChatInviteLink from .forward_message import ForwardMessage from .forward_messages import ForwardMessages +from .get_available_gifts import GetAvailableGifts +from .get_business_account_gifts import GetBusinessAccountGifts +from .get_business_account_star_balance import GetBusinessAccountStarBalance from .get_business_connection import GetBusinessConnection from .get_chat import GetChat from .get_chat_administrators import GetChatAdministrators +from .get_chat_gifts import GetChatGifts from .get_chat_member import GetChatMember from .get_chat_member_count import GetChatMemberCount from .get_chat_menu_button import GetChatMenuButton @@ -48,40 +62,58 @@ from .get_custom_emoji_stickers import GetCustomEmojiStickers from .get_file import GetFile from .get_forum_topic_icon_stickers import GetForumTopicIconStickers from .get_game_high_scores import GetGameHighScores +from .get_managed_bot_token import GetManagedBotToken from .get_me import GetMe from .get_my_commands import GetMyCommands from .get_my_default_administrator_rights import GetMyDefaultAdministratorRights from .get_my_description import GetMyDescription from .get_my_name import GetMyName from .get_my_short_description import GetMyShortDescription +from .get_my_star_balance import GetMyStarBalance from .get_star_transactions import GetStarTransactions from .get_sticker_set import GetStickerSet from .get_updates import GetUpdates from .get_user_chat_boosts import GetUserChatBoosts +from .get_user_gifts import GetUserGifts +from .get_user_profile_audios import GetUserProfileAudios from .get_user_profile_photos import GetUserProfilePhotos from .get_webhook_info import GetWebhookInfo +from .gift_premium_subscription import GiftPremiumSubscription from .hide_general_forum_topic import HideGeneralForumTopic from .leave_chat import LeaveChat from .log_out import LogOut from .pin_chat_message import PinChatMessage +from .post_story import PostStory from .promote_chat_member import PromoteChatMember +from .read_business_message import ReadBusinessMessage from .refund_star_payment import RefundStarPayment +from .remove_business_account_profile_photo import RemoveBusinessAccountProfilePhoto +from .remove_chat_verification import RemoveChatVerification +from .remove_my_profile_photo import RemoveMyProfilePhoto +from .remove_user_verification import RemoveUserVerification from .reopen_forum_topic import ReopenForumTopic from .reopen_general_forum_topic import ReopenGeneralForumTopic +from .replace_managed_bot_token import ReplaceManagedBotToken from .replace_sticker_in_set import ReplaceStickerInSet +from .repost_story import RepostStory from .restrict_chat_member import RestrictChatMember from .revoke_chat_invite_link import RevokeChatInviteLink +from .save_prepared_inline_message import SavePreparedInlineMessage +from .save_prepared_keyboard_button import SavePreparedKeyboardButton from .send_animation import SendAnimation from .send_audio import SendAudio from .send_chat_action import SendChatAction +from .send_checklist import SendChecklist from .send_contact import SendContact from .send_dice import SendDice from .send_document import SendDocument from .send_game import SendGame +from .send_gift import SendGift from .send_invoice import SendInvoice from .send_location import SendLocation from .send_media_group import SendMediaGroup from .send_message import SendMessage +from .send_message_draft import SendMessageDraft from .send_paid_media import SendPaidMedia from .send_photo import SendPhoto from .send_poll import SendPoll @@ -90,8 +122,14 @@ from .send_venue import SendVenue from .send_video import SendVideo from .send_video_note import SendVideoNote from .send_voice import SendVoice +from .set_business_account_bio import SetBusinessAccountBio +from .set_business_account_gift_settings import SetBusinessAccountGiftSettings +from .set_business_account_name import SetBusinessAccountName +from .set_business_account_profile_photo import SetBusinessAccountProfilePhoto +from .set_business_account_username import SetBusinessAccountUsername from .set_chat_administrator_custom_title import SetChatAdministratorCustomTitle from .set_chat_description import SetChatDescription +from .set_chat_member_tag import SetChatMemberTag from .set_chat_menu_button import SetChatMenuButton from .set_chat_permissions import SetChatPermissions from .set_chat_photo import SetChatPhoto @@ -104,6 +142,7 @@ from .set_my_commands import SetMyCommands from .set_my_default_administrator_rights import SetMyDefaultAdministratorRights from .set_my_description import SetMyDescription from .set_my_name import SetMyName +from .set_my_profile_photo import SetMyProfilePhoto from .set_my_short_description import SetMyShortDescription from .set_passport_data_errors import SetPassportDataErrors from .set_sticker_emoji_list import SetStickerEmojiList @@ -112,9 +151,12 @@ from .set_sticker_mask_position import SetStickerMaskPosition from .set_sticker_position_in_set import SetStickerPositionInSet from .set_sticker_set_thumbnail import SetStickerSetThumbnail from .set_sticker_set_title import SetStickerSetTitle +from .set_user_emoji_status import SetUserEmojiStatus from .set_webhook import SetWebhook from .stop_message_live_location import StopMessageLiveLocation from .stop_poll import StopPoll +from .transfer_business_account_stars import TransferBusinessAccountStars +from .transfer_gift import TransferGift from .unban_chat_member import UnbanChatMember from .unban_chat_sender_chat import UnbanChatSenderChat from .unhide_general_forum_topic import UnhideGeneralForumTopic @@ -122,7 +164,10 @@ from .unpin_all_chat_messages import UnpinAllChatMessages from .unpin_all_forum_topic_messages import UnpinAllForumTopicMessages from .unpin_all_general_forum_topic_messages import UnpinAllGeneralForumTopicMessages from .unpin_chat_message import UnpinChatMessage +from .upgrade_gift import UpgradeGift from .upload_sticker_file import UploadStickerFile +from .verify_chat import VerifyChat +from .verify_user import VerifyUser __all__ = ( "AddStickerToSet", @@ -132,18 +177,23 @@ __all__ = ( "AnswerShippingQuery", "AnswerWebAppQuery", "ApproveChatJoinRequest", + "ApproveSuggestedPost", "BanChatMember", "BanChatSenderChat", "Close", "CloseForumTopic", "CloseGeneralForumTopic", + "ConvertGiftToStars", "CopyMessage", "CopyMessages", "CreateChatInviteLink", + "CreateChatSubscriptionInviteLink", "CreateForumTopic", "CreateInvoiceLink", "CreateNewStickerSet", "DeclineChatJoinRequest", + "DeclineSuggestedPost", + "DeleteBusinessMessages", "DeleteChatPhoto", "DeleteChatStickerSet", "DeleteForumTopic", @@ -152,21 +202,30 @@ __all__ = ( "DeleteMyCommands", "DeleteStickerFromSet", "DeleteStickerSet", + "DeleteStory", "DeleteWebhook", "EditChatInviteLink", + "EditChatSubscriptionInviteLink", "EditForumTopic", "EditGeneralForumTopic", "EditMessageCaption", + "EditMessageChecklist", "EditMessageLiveLocation", "EditMessageMedia", "EditMessageReplyMarkup", "EditMessageText", + "EditStory", + "EditUserStarSubscription", "ExportChatInviteLink", "ForwardMessage", "ForwardMessages", + "GetAvailableGifts", + "GetBusinessAccountGifts", + "GetBusinessAccountStarBalance", "GetBusinessConnection", "GetChat", "GetChatAdministrators", + "GetChatGifts", "GetChatMember", "GetChatMemberCount", "GetChatMenuButton", @@ -174,42 +233,60 @@ __all__ = ( "GetFile", "GetForumTopicIconStickers", "GetGameHighScores", + "GetManagedBotToken", "GetMe", "GetMyCommands", "GetMyDefaultAdministratorRights", "GetMyDescription", "GetMyName", "GetMyShortDescription", + "GetMyStarBalance", "GetStarTransactions", "GetStickerSet", "GetUpdates", "GetUserChatBoosts", + "GetUserGifts", + "GetUserProfileAudios", "GetUserProfilePhotos", "GetWebhookInfo", + "GiftPremiumSubscription", "HideGeneralForumTopic", "LeaveChat", "LogOut", "PinChatMessage", + "PostStory", "PromoteChatMember", + "ReadBusinessMessage", "RefundStarPayment", + "RemoveBusinessAccountProfilePhoto", + "RemoveChatVerification", + "RemoveMyProfilePhoto", + "RemoveUserVerification", "ReopenForumTopic", "ReopenGeneralForumTopic", + "ReplaceManagedBotToken", "ReplaceStickerInSet", + "RepostStory", "Request", "Response", "RestrictChatMember", "RevokeChatInviteLink", + "SavePreparedInlineMessage", + "SavePreparedKeyboardButton", "SendAnimation", "SendAudio", "SendChatAction", + "SendChecklist", "SendContact", "SendDice", "SendDocument", "SendGame", + "SendGift", "SendInvoice", "SendLocation", "SendMediaGroup", "SendMessage", + "SendMessageDraft", "SendPaidMedia", "SendPhoto", "SendPoll", @@ -218,8 +295,14 @@ __all__ = ( "SendVideo", "SendVideoNote", "SendVoice", + "SetBusinessAccountBio", + "SetBusinessAccountGiftSettings", + "SetBusinessAccountName", + "SetBusinessAccountProfilePhoto", + "SetBusinessAccountUsername", "SetChatAdministratorCustomTitle", "SetChatDescription", + "SetChatMemberTag", "SetChatMenuButton", "SetChatPermissions", "SetChatPhoto", @@ -232,6 +315,7 @@ __all__ = ( "SetMyDefaultAdministratorRights", "SetMyDescription", "SetMyName", + "SetMyProfilePhoto", "SetMyShortDescription", "SetPassportDataErrors", "SetStickerEmojiList", @@ -240,10 +324,13 @@ __all__ = ( "SetStickerPositionInSet", "SetStickerSetThumbnail", "SetStickerSetTitle", + "SetUserEmojiStatus", "SetWebhook", "StopMessageLiveLocation", "StopPoll", "TelegramMethod", + "TransferBusinessAccountStars", + "TransferGift", "UnbanChatMember", "UnbanChatSenderChat", "UnhideGeneralForumTopic", @@ -251,5 +338,8 @@ __all__ = ( "UnpinAllForumTopicMessages", "UnpinAllGeneralForumTopicMessages", "UnpinChatMessage", + "UpgradeGift", "UploadStickerFile", + "VerifyChat", + "VerifyUser", ) diff --git a/aiogram/methods/answer_callback_query.py b/aiogram/methods/answer_callback_query.py index 15ed1bf5..822354ec 100644 --- a/aiogram/methods/answer_callback_query.py +++ b/aiogram/methods/answer_callback_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramMethod @@ -19,13 +19,13 @@ class AnswerCallbackQuery(TelegramMethod[bool]): callback_query_id: str """Unique identifier for the query to be answered""" - text: Optional[str] = None + text: str | None = None """Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters""" - show_alert: Optional[bool] = None + show_alert: bool | None = None """If :code:`True`, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.""" - url: Optional[str] = None + url: str | None = None """URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather `_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button.""" - cache_time: Optional[int] = None + cache_time: int | None = None """The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.""" if TYPE_CHECKING: @@ -36,10 +36,10 @@ class AnswerCallbackQuery(TelegramMethod[bool]): __pydantic__self__, *, callback_query_id: str, - text: Optional[str] = None, - show_alert: Optional[bool] = None, - url: Optional[str] = None, - cache_time: Optional[int] = None, + text: str | None = None, + show_alert: bool | None = None, + url: str | None = None, + cache_time: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/answer_inline_query.py b/aiogram/methods/answer_inline_query.py index acfb80ab..7e4f7191 100644 --- a/aiogram/methods/answer_inline_query.py +++ b/aiogram/methods/answer_inline_query.py @@ -1,32 +1,10 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field -from ..types import ( - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultContact, - InlineQueryResultDocument, - InlineQueryResultGame, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultsButton, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, -) +from ..types import InlineQueryResultsButton, InlineQueryResultUnion from .base import TelegramMethod @@ -44,45 +22,22 @@ class AnswerInlineQuery(TelegramMethod[bool]): inline_query_id: str """Unique identifier for the answered query""" - results: List[ - Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ] - ] + results: list[InlineQueryResultUnion] """A JSON-serialized array of results for the inline query""" - cache_time: Optional[int] = None + cache_time: int | None = None """The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.""" - is_personal: Optional[bool] = None + is_personal: bool | None = None """Pass :code:`True` if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query.""" - next_offset: Optional[str] = None + next_offset: str | None = None """Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.""" - button: Optional[InlineQueryResultsButton] = None + button: InlineQueryResultsButton | None = None """A JSON-serialized object describing a button to be shown above inline query results""" - switch_pm_parameter: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + switch_pm_parameter: str | None = Field(None, json_schema_extra={"deprecated": True}) """`Deep-linking `_ parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. .. deprecated:: API:6.7 https://core.telegram.org/bots/api-changelog#april-21-2023""" - switch_pm_text: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + switch_pm_text: str | None = Field(None, json_schema_extra={"deprecated": True}) """If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch_pm_parameter* .. deprecated:: API:6.7 @@ -96,36 +51,13 @@ class AnswerInlineQuery(TelegramMethod[bool]): __pydantic__self__, *, inline_query_id: str, - results: List[ - Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ] - ], - cache_time: Optional[int] = None, - is_personal: Optional[bool] = None, - next_offset: Optional[str] = None, - button: Optional[InlineQueryResultsButton] = None, - switch_pm_parameter: Optional[str] = None, - switch_pm_text: Optional[str] = None, + results: list[InlineQueryResultUnion], + cache_time: int | None = None, + is_personal: bool | None = None, + next_offset: str | None = None, + button: InlineQueryResultsButton | None = None, + switch_pm_parameter: str | None = None, + switch_pm_text: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/answer_pre_checkout_query.py b/aiogram/methods/answer_pre_checkout_query.py index 479d76c9..f014be3e 100644 --- a/aiogram/methods/answer_pre_checkout_query.py +++ b/aiogram/methods/answer_pre_checkout_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramMethod @@ -19,7 +19,7 @@ class AnswerPreCheckoutQuery(TelegramMethod[bool]): """Unique identifier for the query to be answered""" ok: bool """Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems.""" - error_message: Optional[str] = None + error_message: str | None = None """Required if *ok* is :code:`False`. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.""" if TYPE_CHECKING: @@ -31,7 +31,7 @@ class AnswerPreCheckoutQuery(TelegramMethod[bool]): *, pre_checkout_query_id: str, ok: bool, - error_message: Optional[str] = None, + error_message: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/answer_shipping_query.py b/aiogram/methods/answer_shipping_query.py index ad0e9dc0..2f5601dc 100644 --- a/aiogram/methods/answer_shipping_query.py +++ b/aiogram/methods/answer_shipping_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from ..types import ShippingOption from .base import TelegramMethod @@ -20,10 +20,10 @@ class AnswerShippingQuery(TelegramMethod[bool]): """Unique identifier for the query to be answered""" ok: bool """Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible)""" - shipping_options: Optional[List[ShippingOption]] = None + shipping_options: list[ShippingOption] | None = None """Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.""" - error_message: Optional[str] = None - """Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.""" + error_message: str | None = None + """Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -34,8 +34,8 @@ class AnswerShippingQuery(TelegramMethod[bool]): *, shipping_query_id: str, ok: bool, - shipping_options: Optional[List[ShippingOption]] = None, - error_message: Optional[str] = None, + shipping_options: list[ShippingOption] | None = None, + error_message: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/answer_web_app_query.py b/aiogram/methods/answer_web_app_query.py index 4dc87ebd..edcbf7de 100644 --- a/aiogram/methods/answer_web_app_query.py +++ b/aiogram/methods/answer_web_app_query.py @@ -1,30 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any -from ..types import ( - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultContact, - InlineQueryResultDocument, - InlineQueryResultGame, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - SentWebAppMessage, -) +from ..types import InlineQueryResultUnion, SentWebAppMessage from .base import TelegramMethod @@ -40,28 +18,7 @@ class AnswerWebAppQuery(TelegramMethod[SentWebAppMessage]): web_app_query_id: str """Unique identifier for the query to be answered""" - result: Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ] + result: InlineQueryResultUnion """A JSON-serialized object describing the message to be sent""" if TYPE_CHECKING: @@ -72,28 +29,7 @@ class AnswerWebAppQuery(TelegramMethod[SentWebAppMessage]): __pydantic__self__, *, web_app_query_id: str, - result: Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ], + result: InlineQueryResultUnion, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/approve_chat_join_request.py b/aiogram/methods/approve_chat_join_request.py index 2f4995b4..1142cd82 100644 --- a/aiogram/methods/approve_chat_join_request.py +++ b/aiogram/methods/approve_chat_join_request.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class ApproveChatJoinRequest(TelegramMethod[bool]): __returning__ = bool __api_method__ = "approveChatJoinRequest" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" @@ -25,7 +26,7 @@ class ApproveChatJoinRequest(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, user_id: int, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/approve_suggested_post.py b/aiogram/methods/approve_suggested_post.py new file mode 100644 index 00000000..dddaa0af --- /dev/null +++ b/aiogram/methods/approve_suggested_post.py @@ -0,0 +1,44 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +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: DateTimeUnion | None = 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: DateTimeUnion | None = 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/ban_chat_member.py b/aiogram/methods/ban_chat_member.py index 947fccae..ee728ad6 100644 --- a/aiogram/methods/ban_chat_member.py +++ b/aiogram/methods/ban_chat_member.py @@ -1,8 +1,8 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion, DateTimeUnion from .base import TelegramMethod @@ -16,13 +16,13 @@ class BanChatMember(TelegramMethod[bool]): __returning__ = bool __api_method__ = "banChatMember" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None + until_date: DateTimeUnion | None = None """Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.""" - revoke_messages: Optional[bool] = None + revoke_messages: bool | None = None """Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels.""" if TYPE_CHECKING: @@ -32,10 +32,10 @@ class BanChatMember(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - revoke_messages: Optional[bool] = None, + until_date: DateTimeUnion | None = None, + revoke_messages: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/ban_chat_sender_chat.py b/aiogram/methods/ban_chat_sender_chat.py index cbe61943..72173cc5 100644 --- a/aiogram/methods/ban_chat_sender_chat.py +++ b/aiogram/methods/ban_chat_sender_chat.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class BanChatSenderChat(TelegramMethod[bool]): __returning__ = bool __api_method__ = "banChatSenderChat" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" sender_chat_id: int """Unique identifier of the target sender chat""" @@ -27,7 +28,7 @@ class BanChatSenderChat(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, sender_chat_id: int, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/methods/base.py b/aiogram/methods/base.py index b2d35bec..fdc1e3f0 100644 --- a/aiogram/methods/base.py +++ b/aiogram/methods/base.py @@ -1,14 +1,12 @@ from __future__ import annotations from abc import ABC, abstractmethod +from collections.abc import Generator from typing import ( TYPE_CHECKING, Any, ClassVar, - Dict, - Generator, Generic, - Optional, TypeVar, ) @@ -31,16 +29,16 @@ class Request(BaseModel): method: str - data: Dict[str, Optional[Any]] - files: Optional[Dict[str, InputFile]] + data: dict[str, Any | None] + files: dict[str, InputFile] | None class Response(BaseModel, Generic[TelegramType]): ok: bool - result: Optional[TelegramType] = None - description: Optional[str] = None - error_code: Optional[int] = None - parameters: Optional[ResponseParameters] = None + result: TelegramType | None = None + description: str | None = None + error_code: int | None = None + parameters: ResponseParameters | None = None class TelegramMethod(BotContextController, BaseModel, Generic[TelegramType], ABC): @@ -52,7 +50,7 @@ class TelegramMethod(BotContextController, BaseModel, Generic[TelegramType], ABC @model_validator(mode="before") @classmethod - def remove_unset(cls, values: Dict[str, Any]) -> Dict[str, Any]: + def remove_unset(cls, values: dict[str, Any]) -> dict[str, Any]: """ Remove UNSET before fields validation. @@ -66,7 +64,7 @@ class TelegramMethod(BotContextController, BaseModel, Generic[TelegramType], ABC return {k: v for k, v in values.items() if not isinstance(v, UNSET_TYPE)} if TYPE_CHECKING: - __returning__: ClassVar[type] + __returning__: ClassVar[Any] __api_method__: ClassVar[str] else: @@ -90,6 +88,6 @@ class TelegramMethod(BotContextController, BaseModel, Generic[TelegramType], ABC "This method is not mounted to a any bot instance, please call it explicilty " "with bot instance `await bot(method)`\n" "or mount method to a bot instance `method.as_(bot)` " - "and then call it `await method()`" + "and then call it `await method`" ) return self.emit(bot).__await__() diff --git a/aiogram/methods/close_forum_topic.py b/aiogram/methods/close_forum_topic.py index 110fbce7..ec990399 100644 --- a/aiogram/methods/close_forum_topic.py +++ b/aiogram/methods/close_forum_topic.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class CloseForumTopic(TelegramMethod[bool]): __returning__ = bool __api_method__ = "closeForumTopic" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" @@ -27,7 +28,7 @@ class CloseForumTopic(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_thread_id: int, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/methods/close_general_forum_topic.py b/aiogram/methods/close_general_forum_topic.py index 3f1a6336..bf7a914c 100644 --- a/aiogram/methods/close_general_forum_topic.py +++ b/aiogram/methods/close_general_forum_topic.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class CloseGeneralForumTopic(TelegramMethod[bool]): __returning__ = bool __api_method__ = "closeGeneralForumTopic" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" if TYPE_CHECKING: @@ -23,7 +24,7 @@ class CloseGeneralForumTopic(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/convert_gift_to_stars.py b/aiogram/methods/convert_gift_to_stars.py new file mode 100644 index 00000000..181bc129 --- /dev/null +++ b/aiogram/methods/convert_gift_to_stars.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class ConvertGiftToStars(TelegramMethod[bool]): + """ + Converts a given regular gift to Telegram Stars. Requires the *can_convert_gifts_to_stars* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#convertgifttostars + """ + + __returning__ = bool + __api_method__ = "convertGiftToStars" + + business_connection_id: str + """Unique identifier of the business connection""" + owned_gift_id: str + """Unique identifier of the regular gift that should be converted to Telegram Stars""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + owned_gift_id: str, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + owned_gift_id=owned_gift_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/copy_message.py b/aiogram/methods/copy_message.py index ca44f93e..6d840851 100644 --- a/aiogram/methods/copy_message.py +++ b/aiogram/methods/copy_message.py @@ -1,18 +1,18 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, + DateTimeUnion, MessageEntity, MessageId, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -27,40 +27,46 @@ class CopyMessage(TelegramMethod[MessageId]): __returning__ = MessageId __api_method__ = "copyMessage" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - from_chat_id: Union[int, str] + from_chat_id: ChatIdUnion """Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)""" message_id: int """Message identifier in the chat specified in *from_chat_id*""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - caption: Optional[str] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: DateTimeUnion | None = None + """New start timestamp for the copied video in the message""" + caption: str | None = None """New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """Mode for parsing entities in the new caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """Pass :code:`True`, if the caption must be shown above the message media. Ignored if a new caption isn't specified.""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - reply_parameters: Optional[ReplyParameters] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None + """Unique identifier of the message effect to be added to the message; only available when copying to private chats""" + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -73,24 +79,25 @@ class CopyMessage(TelegramMethod[MessageId]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - from_chat_id: Union[int, str], + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, message_id: int, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + video_start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -102,12 +109,17 @@ 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, caption_entities=caption_entities, show_caption_above_media=show_caption_above_media, 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/copy_messages.py b/aiogram/methods/copy_messages.py index c734d0a7..02afd270 100644 --- a/aiogram/methods/copy_messages.py +++ b/aiogram/methods/copy_messages.py @@ -1,32 +1,34 @@ -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import MessageId +from ..types import ChatIdUnion, MessageId from .base import TelegramMethod -class CopyMessages(TelegramMethod[List[MessageId]]): +class CopyMessages(TelegramMethod[list[MessageId]]): """ Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_messages.ForwardMessages`, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. Source: https://core.telegram.org/bots/api#copymessages """ - __returning__ = List[MessageId] + __returning__ = list[MessageId] __api_method__ = "copyMessages" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - from_chat_id: Union[int, str] + from_chat_id: ChatIdUnion """Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)""" - message_ids: List[int] + message_ids: list[int] """A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order.""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - disable_notification: Optional[bool] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: bool | None = None """Sends the messages `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: bool | None = None """Protects the contents of the sent messages from forwarding and saving""" - remove_caption: Optional[bool] = None + remove_caption: bool | None = None """Pass :code:`True` to copy the messages without their captions""" if TYPE_CHECKING: @@ -36,13 +38,14 @@ class CopyMessages(TelegramMethod[List[MessageId]]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_ids: List[int], - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - remove_caption: Optional[bool] = None, + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, + message_ids: list[int], + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | None = None, + remove_caption: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -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/create_chat_invite_link.py b/aiogram/methods/create_chat_invite_link.py index ff0b3864..e42572ae 100644 --- a/aiogram/methods/create_chat_invite_link.py +++ b/aiogram/methods/create_chat_invite_link.py @@ -1,9 +1,8 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ChatInviteLink +from ..types import ChatIdUnion, ChatInviteLink, DateTimeUnion from .base import TelegramMethod @@ -17,15 +16,15 @@ class CreateChatInviteLink(TelegramMethod[ChatInviteLink]): __returning__ = ChatInviteLink __api_method__ = "createChatInviteLink" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - name: Optional[str] = None + name: str | None = None """Invite link name; 0-32 characters""" - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None + expire_date: DateTimeUnion | None = None """Point in time (Unix timestamp) when the link will expire""" - member_limit: Optional[int] = None + member_limit: int | None = None """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" - creates_join_request: Optional[bool] = None + creates_join_request: bool | None = None """:code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified""" if TYPE_CHECKING: @@ -35,11 +34,11 @@ class CreateChatInviteLink(TelegramMethod[ChatInviteLink]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, + chat_id: ChatIdUnion, + name: str | None = None, + expire_date: DateTimeUnion | None = None, + member_limit: int | None = None, + creates_join_request: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/create_chat_subscription_invite_link.py b/aiogram/methods/create_chat_subscription_invite_link.py new file mode 100644 index 00000000..55ee9435 --- /dev/null +++ b/aiogram/methods/create_chat_subscription_invite_link.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion, ChatInviteLink, DateTimeUnion +from .base import TelegramMethod + + +class CreateChatSubscriptionInviteLink(TelegramMethod[ChatInviteLink]): + """ + Use this method to create a `subscription invite link `_ for a channel chat. The bot must have the *can_invite_users* administrator rights. The link can be edited using the method :class:`aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink` or revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + Source: https://core.telegram.org/bots/api#createchatsubscriptioninvitelink + """ + + __returning__ = ChatInviteLink + __api_method__ = "createChatSubscriptionInviteLink" + + chat_id: ChatIdUnion + """Unique identifier for the target channel chat or username of the target channel (in the format :code:`@channelusername`)""" + subscription_period: DateTimeUnion + """The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).""" + subscription_price: int + """The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000""" + name: str | None = None + """Invite link name; 0-32 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + subscription_period: DateTimeUnion, + subscription_price: int, + name: str | None = 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, + subscription_period=subscription_period, + subscription_price=subscription_price, + name=name, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/create_forum_topic.py b/aiogram/methods/create_forum_topic.py index 8b0f6925..242b67cb 100644 --- a/aiogram/methods/create_forum_topic.py +++ b/aiogram/methods/create_forum_topic.py @@ -1,14 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ForumTopic +from ..types import ChatIdUnion, ForumTopic from .base import TelegramMethod class CreateForumTopic(TelegramMethod[ForumTopic]): """ - Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object. + Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator right. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object. Source: https://core.telegram.org/bots/api#createforumtopic """ @@ -16,13 +16,13 @@ class CreateForumTopic(TelegramMethod[ForumTopic]): __returning__ = ForumTopic __api_method__ = "createForumTopic" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" name: str """Topic name, 1-128 characters""" - icon_color: Optional[int] = None + icon_color: int | None = None """Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)""" - icon_custom_emoji_id: Optional[str] = None + icon_custom_emoji_id: str | None = None """Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.""" if TYPE_CHECKING: @@ -32,10 +32,10 @@ class CreateForumTopic(TelegramMethod[ForumTopic]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, name: str, - icon_color: Optional[int] = None, - icon_custom_emoji_id: Optional[str] = None, + icon_color: int | None = None, + icon_custom_emoji_id: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/create_invoice_link.py b/aiogram/methods/create_invoice_link.py index 2068f759..d4eb3115 100644 --- a/aiogram/methods/create_invoice_link.py +++ b/aiogram/methods/create_invoice_link.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from ..types import LabeledPrice from .base import TelegramMethod @@ -21,40 +21,44 @@ class CreateInvoiceLink(TelegramMethod[str]): description: str """Product description, 1-255 characters""" payload: str - """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.""" + """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.""" currency: str """Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.""" - prices: List[LabeledPrice] + prices: list[LabeledPrice] """Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.""" - provider_token: Optional[str] = None + business_connection_id: str | None = None + """Unique identifier of the business connection on behalf of which the link will be created. For payments in `Telegram Stars `_ only.""" + provider_token: str | None = None """Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.""" - max_tip_amount: Optional[int] = None + subscription_period: int | None = None + """The number of seconds the subscription will be active for before the next payment. The currency must be set to 'XTR' (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.""" + max_tip_amount: int | None = None """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 `_.""" - suggested_tip_amounts: Optional[List[int]] = None + suggested_tip_amounts: list[int] | None = None """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*.""" - provider_data: Optional[str] = None + provider_data: str | None = None """JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.""" - photo_url: Optional[str] = None + photo_url: str | None = None """URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.""" - photo_size: Optional[int] = None + photo_size: int | None = None """Photo size in bytes""" - photo_width: Optional[int] = None + photo_width: int | None = None """Photo width""" - photo_height: Optional[int] = None + photo_height: int | None = None """Photo height""" - need_name: Optional[bool] = None + need_name: bool | None = None """Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_phone_number: Optional[bool] = None + need_phone_number: bool | None = None """Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_email: Optional[bool] = None + need_email: bool | None = None """Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_shipping_address: Optional[bool] = None + need_shipping_address: bool | None = None """Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.""" - send_phone_number_to_provider: Optional[bool] = None + send_phone_number_to_provider: bool | None = None """Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - send_email_to_provider: Optional[bool] = None + send_email_to_provider: bool | None = None """Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - is_flexible: Optional[bool] = None + is_flexible: bool | None = None """Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.""" if TYPE_CHECKING: @@ -68,22 +72,24 @@ class CreateInvoiceLink(TelegramMethod[str]): description: str, payload: str, currency: str, - prices: List[LabeledPrice], - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, + prices: list[LabeledPrice], + business_connection_id: str | None = None, + provider_token: str | None = None, + subscription_period: int | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -96,7 +102,9 @@ class CreateInvoiceLink(TelegramMethod[str]): payload=payload, currency=currency, prices=prices, + business_connection_id=business_connection_id, provider_token=provider_token, + subscription_period=subscription_period, max_tip_amount=max_tip_amount, suggested_tip_amounts=suggested_tip_amounts, provider_data=provider_data, diff --git a/aiogram/methods/create_new_sticker_set.py b/aiogram/methods/create_new_sticker_set.py index c304d854..258c7ce8 100644 --- a/aiogram/methods/create_new_sticker_set.py +++ b/aiogram/methods/create_new_sticker_set.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -24,13 +24,13 @@ class CreateNewStickerSet(TelegramMethod[bool]): """Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_"`. :code:`` is case insensitive. 1-64 characters.""" title: str """Sticker set title, 1-64 characters""" - stickers: List[InputSticker] + stickers: list[InputSticker] """A JSON-serialized list of 1-50 initial stickers to be added to the sticker set""" - sticker_type: Optional[str] = None + sticker_type: str | None = None """Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.""" - needs_repainting: Optional[bool] = None + needs_repainting: bool | None = None """Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only""" - sticker_format: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + sticker_format: str | None = Field(None, json_schema_extra={"deprecated": True}) """Format of stickers in the set, must be one of 'static', 'animated', 'video' .. deprecated:: API:7.2 @@ -46,10 +46,10 @@ class CreateNewStickerSet(TelegramMethod[bool]): user_id: int, name: str, title: str, - stickers: List[InputSticker], - sticker_type: Optional[str] = None, - needs_repainting: Optional[bool] = None, - sticker_format: Optional[str] = None, + stickers: list[InputSticker], + sticker_type: str | None = None, + needs_repainting: bool | None = None, + sticker_format: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/decline_chat_join_request.py b/aiogram/methods/decline_chat_join_request.py index b0fa2c3c..6259c550 100644 --- a/aiogram/methods/decline_chat_join_request.py +++ b/aiogram/methods/decline_chat_join_request.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class DeclineChatJoinRequest(TelegramMethod[bool]): __returning__ = bool __api_method__ = "declineChatJoinRequest" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" @@ -25,7 +26,7 @@ class DeclineChatJoinRequest(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, user_id: int, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/decline_suggested_post.py b/aiogram/methods/decline_suggested_post.py new file mode 100644 index 00000000..70331257 --- /dev/null +++ b/aiogram/methods/decline_suggested_post.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +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: str | None = 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: str | None = 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_business_messages.py b/aiogram/methods/delete_business_messages.py new file mode 100644 index 00000000..8edd74e5 --- /dev/null +++ b/aiogram/methods/delete_business_messages.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class DeleteBusinessMessages(TelegramMethod[bool]): + """ + Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#deletebusinessmessages + """ + + __returning__ = bool + __api_method__ = "deleteBusinessMessages" + + business_connection_id: str + """Unique identifier of the business connection on behalf of which to delete the messages""" + message_ids: list[int] + """A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + message_ids: list[int], + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + message_ids=message_ids, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/delete_chat_photo.py b/aiogram/methods/delete_chat_photo.py index 503ace2c..0cdf2eca 100644 --- a/aiogram/methods/delete_chat_photo.py +++ b/aiogram/methods/delete_chat_photo.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class DeleteChatPhoto(TelegramMethod[bool]): __returning__ = bool __api_method__ = "deleteChatPhoto" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" if TYPE_CHECKING: @@ -23,7 +24,7 @@ class DeleteChatPhoto(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/delete_chat_sticker_set.py b/aiogram/methods/delete_chat_sticker_set.py index 50d705f0..c1a2feab 100644 --- a/aiogram/methods/delete_chat_sticker_set.py +++ b/aiogram/methods/delete_chat_sticker_set.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class DeleteChatStickerSet(TelegramMethod[bool]): __returning__ = bool __api_method__ = "deleteChatStickerSet" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" if TYPE_CHECKING: @@ -23,7 +24,7 @@ class DeleteChatStickerSet(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/delete_forum_topic.py b/aiogram/methods/delete_forum_topic.py index 7d238562..f168c74e 100644 --- a/aiogram/methods/delete_forum_topic.py +++ b/aiogram/methods/delete_forum_topic.py @@ -1,13 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod class DeleteForumTopic(TelegramMethod[bool]): """ - Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success. + Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#deleteforumtopic """ @@ -15,7 +16,7 @@ class DeleteForumTopic(TelegramMethod[bool]): __returning__ = bool __api_method__ = "deleteForumTopic" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" @@ -27,7 +28,7 @@ class DeleteForumTopic(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_thread_id: int, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/methods/delete_message.py b/aiogram/methods/delete_message.py index 59aee049..b564f34d 100644 --- a/aiogram/methods/delete_message.py +++ b/aiogram/methods/delete_message.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -23,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. @@ -33,7 +36,7 @@ class DeleteMessage(TelegramMethod[bool]): __returning__ = bool __api_method__ = "deleteMessage" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" message_id: int """Identifier of the message to delete""" @@ -43,11 +46,7 @@ class DeleteMessage(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - message_id: int, - **__pydantic_kwargs: Any, + __pydantic__self__, *, chat_id: ChatIdUnion, message_id: int, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/delete_messages.py b/aiogram/methods/delete_messages.py index 061d12b9..63d90a6f 100644 --- a/aiogram/methods/delete_messages.py +++ b/aiogram/methods/delete_messages.py @@ -1,5 +1,6 @@ -from typing import TYPE_CHECKING, Any, List, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -13,9 +14,9 @@ class DeleteMessages(TelegramMethod[bool]): __returning__ = bool __api_method__ = "deleteMessages" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_ids: List[int] + message_ids: list[int] """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""" if TYPE_CHECKING: @@ -25,8 +26,8 @@ class DeleteMessages(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - message_ids: List[int], + chat_id: ChatIdUnion, + message_ids: list[int], **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/delete_my_commands.py b/aiogram/methods/delete_my_commands.py index e35ef67c..067cca85 100644 --- a/aiogram/methods/delete_my_commands.py +++ b/aiogram/methods/delete_my_commands.py @@ -1,16 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ( - BotCommandScopeAllChatAdministrators, - BotCommandScopeAllGroupChats, - BotCommandScopeAllPrivateChats, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - BotCommandScopeDefault, -) +from ..types import BotCommandScopeUnion from .base import TelegramMethod @@ -24,19 +16,9 @@ class DeleteMyCommands(TelegramMethod[bool]): __returning__ = bool __api_method__ = "deleteMyCommands" - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None + scope: BotCommandScopeUnion | None = None """A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" - language_code: Optional[str] = None + language_code: str | None = None """A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands""" if TYPE_CHECKING: @@ -46,18 +28,8 @@ class DeleteMyCommands(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, + scope: BotCommandScopeUnion | None = None, + language_code: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/delete_story.py b/aiogram/methods/delete_story.py new file mode 100644 index 00000000..42a25ff4 --- /dev/null +++ b/aiogram/methods/delete_story.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class DeleteStory(TelegramMethod[bool]): + """ + Deletes a story previously posted by the bot on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#deletestory + """ + + __returning__ = bool + __api_method__ = "deleteStory" + + business_connection_id: str + """Unique identifier of the business connection""" + story_id: int + """Unique identifier of the story to delete""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + story_id: 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__( + business_connection_id=business_connection_id, + story_id=story_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/delete_webhook.py b/aiogram/methods/delete_webhook.py index 05c39f4e..a42100f1 100644 --- a/aiogram/methods/delete_webhook.py +++ b/aiogram/methods/delete_webhook.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramMethod @@ -15,7 +15,7 @@ class DeleteWebhook(TelegramMethod[bool]): __returning__ = bool __api_method__ = "deleteWebhook" - drop_pending_updates: Optional[bool] = None + drop_pending_updates: bool | None = None """Pass :code:`True` to drop all pending updates""" if TYPE_CHECKING: @@ -25,7 +25,7 @@ class DeleteWebhook(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - drop_pending_updates: Optional[bool] = None, + drop_pending_updates: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/edit_chat_invite_link.py b/aiogram/methods/edit_chat_invite_link.py index 8ec86cab..cc71252f 100644 --- a/aiogram/methods/edit_chat_invite_link.py +++ b/aiogram/methods/edit_chat_invite_link.py @@ -1,9 +1,8 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ChatInviteLink +from ..types import ChatIdUnion, ChatInviteLink, DateTimeUnion from .base import TelegramMethod @@ -17,17 +16,17 @@ class EditChatInviteLink(TelegramMethod[ChatInviteLink]): __returning__ = ChatInviteLink __api_method__ = "editChatInviteLink" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" invite_link: str """The invite link to edit""" - name: Optional[str] = None + name: str | None = None """Invite link name; 0-32 characters""" - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None + expire_date: DateTimeUnion | None = None """Point in time (Unix timestamp) when the link will expire""" - member_limit: Optional[int] = None + member_limit: int | None = None """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" - creates_join_request: Optional[bool] = None + creates_join_request: bool | None = None """:code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified""" if TYPE_CHECKING: @@ -37,12 +36,12 @@ class EditChatInviteLink(TelegramMethod[ChatInviteLink]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, invite_link: str, - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, + name: str | None = None, + expire_date: DateTimeUnion | None = None, + member_limit: int | None = None, + creates_join_request: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/edit_chat_subscription_invite_link.py b/aiogram/methods/edit_chat_subscription_invite_link.py new file mode 100644 index 00000000..8b8a7d36 --- /dev/null +++ b/aiogram/methods/edit_chat_subscription_invite_link.py @@ -0,0 +1,44 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion, ChatInviteLink +from .base import TelegramMethod + + +class EditChatSubscriptionInviteLink(TelegramMethod[ChatInviteLink]): + """ + Use this method to edit a subscription invite link created by the bot. The bot must have the *can_invite_users* administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + Source: https://core.telegram.org/bots/api#editchatsubscriptioninvitelink + """ + + __returning__ = ChatInviteLink + __api_method__ = "editChatSubscriptionInviteLink" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + invite_link: str + """The invite link to edit""" + name: str | None = None + """Invite link name; 0-32 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + invite_link: str, + name: str | None = 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, invite_link=invite_link, name=name, **__pydantic_kwargs + ) diff --git a/aiogram/methods/edit_forum_topic.py b/aiogram/methods/edit_forum_topic.py index f0afb354..169e9829 100644 --- a/aiogram/methods/edit_forum_topic.py +++ b/aiogram/methods/edit_forum_topic.py @@ -1,13 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod class EditForumTopic(TelegramMethod[bool]): """ - Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. + Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#editforumtopic """ @@ -15,13 +16,13 @@ class EditForumTopic(TelegramMethod[bool]): __returning__ = bool __api_method__ = "editForumTopic" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" - name: Optional[str] = None + name: str | None = None """New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept""" - icon_custom_emoji_id: Optional[str] = None + icon_custom_emoji_id: str | None = None """New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept""" if TYPE_CHECKING: @@ -31,10 +32,10 @@ class EditForumTopic(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_thread_id: int, - name: Optional[str] = None, - icon_custom_emoji_id: Optional[str] = None, + name: str | None = None, + icon_custom_emoji_id: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/edit_general_forum_topic.py b/aiogram/methods/edit_general_forum_topic.py index fe5acadf..5e29766c 100644 --- a/aiogram/methods/edit_general_forum_topic.py +++ b/aiogram/methods/edit_general_forum_topic.py @@ -1,13 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod class EditGeneralForumTopic(TelegramMethod[bool]): """ - Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights. Returns :code:`True` on success. + Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#editgeneralforumtopic """ @@ -15,7 +16,7 @@ class EditGeneralForumTopic(TelegramMethod[bool]): __returning__ = bool __api_method__ = "editGeneralForumTopic" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" name: str """New topic name, 1-128 characters""" @@ -25,7 +26,7 @@ class EditGeneralForumTopic(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], name: str, **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, name: str, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/edit_message_caption.py b/aiogram/methods/edit_message_caption.py index 8a759d40..f790f9e2 100644 --- a/aiogram/methods/edit_message_caption.py +++ b/aiogram/methods/edit_message_caption.py @@ -1,39 +1,39 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from ..client.default import Default -from ..types import UNSET_PARSE_MODE, InlineKeyboardMarkup, Message, MessageEntity +from ..types import ChatIdUnion, InlineKeyboardMarkup, Message, MessageEntity from .base import TelegramMethod -class EditMessageCaption(TelegramMethod[Union[Message, bool]]): +class EditMessageCaption(TelegramMethod[Message | bool]): """ 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. Source: https://core.telegram.org/bots/api#editmessagecaption """ - __returning__ = Union[Message, bool] + __returning__ = Message | bool __api_method__ = "editMessageCaption" - business_connection_id: Optional[str] = None + business_connection_id: str | None = None """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None + chat_id: ChatIdUnion | None = None """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`)""" - message_id: Optional[int] = None + message_id: int | None = None """Required if *inline_message_id* is not specified. Identifier of the message to edit""" - inline_message_id: Optional[str] = None + inline_message_id: str | None = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - caption: Optional[str] = None + caption: str | None = None """New caption of the message, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """Mode for parsing entities in the message caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """Pass :code:`True`, if the caption must be shown above the message media. Supported only for animation, photo and video messages.""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """A JSON-serialized object for an `inline keyboard `_.""" if TYPE_CHECKING: @@ -43,17 +43,15 @@ class EditMessageCaption(TelegramMethod[Union[Message, bool]]): def __init__( __pydantic__self__, *, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + reply_markup: InlineKeyboardMarkup | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/edit_message_checklist.py b/aiogram/methods/edit_message_checklist.py new file mode 100644 index 00000000..83d3815f --- /dev/null +++ b/aiogram/methods/edit_message_checklist.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import InlineKeyboardMarkup, InputChecklist, Message +from .base import TelegramMethod + + +class EditMessageChecklist(TelegramMethod[Message]): + """ + 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. + + Source: https://core.telegram.org/bots/api#editmessagechecklist + """ + + __returning__ = Message + __api_method__ = "editMessageChecklist" + + business_connection_id: str + """Unique identifier of the business connection on behalf of which the message will be sent""" + chat_id: int + """Unique identifier for the target chat""" + message_id: int + """Unique identifier for the target message""" + checklist: InputChecklist + """A JSON-serialized object for the new checklist""" + reply_markup: InlineKeyboardMarkup | None = None + """A JSON-serialized object for the new `inline keyboard `_ for the message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + chat_id: int, + message_id: int, + checklist: InputChecklist, + reply_markup: InlineKeyboardMarkup | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + checklist=checklist, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_message_live_location.py b/aiogram/methods/edit_message_live_location.py index 6bc5569f..82471ad3 100644 --- a/aiogram/methods/edit_message_live_location.py +++ b/aiogram/methods/edit_message_live_location.py @@ -1,42 +1,42 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InlineKeyboardMarkup, Message +from ..types import ChatIdUnion, InlineKeyboardMarkup, Message from .base import TelegramMethod -class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]): +class EditMessageLiveLocation(TelegramMethod[Message | bool]): """ 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. Source: https://core.telegram.org/bots/api#editmessagelivelocation """ - __returning__ = Union[Message, bool] + __returning__ = Message | bool __api_method__ = "editMessageLiveLocation" latitude: float """Latitude of new location""" longitude: float """Longitude of new location""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = None """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None + chat_id: ChatIdUnion | None = None """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`)""" - message_id: Optional[int] = None + message_id: int | None = None """Required if *inline_message_id* is not specified. Identifier of the message to edit""" - inline_message_id: Optional[str] = None + inline_message_id: str | None = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - live_period: Optional[int] = None + live_period: int | None = None """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""" - horizontal_accuracy: Optional[float] = None + horizontal_accuracy: float | None = None """The radius of uncertainty for the location, measured in meters; 0-1500""" - heading: Optional[int] = None + heading: int | None = None """Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.""" - proximity_alert_radius: Optional[int] = None + proximity_alert_radius: int | None = None """The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """A JSON-serialized object for a new `inline keyboard `_.""" if TYPE_CHECKING: @@ -48,15 +48,15 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]): *, latitude: float, longitude: float, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - live_period: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + live_period: int | None = None, + horizontal_accuracy: float | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + reply_markup: InlineKeyboardMarkup | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/edit_message_media.py b/aiogram/methods/edit_message_media.py index b898be79..d0bdb776 100644 --- a/aiogram/methods/edit_message_media.py +++ b/aiogram/methods/edit_message_media.py @@ -1,42 +1,32 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ( - InlineKeyboardMarkup, - InputMediaAnimation, - InputMediaAudio, - InputMediaDocument, - InputMediaPhoto, - InputMediaVideo, - Message, -) +from ..types import ChatIdUnion, InlineKeyboardMarkup, InputMediaUnion, Message from .base import TelegramMethod -class EditMessageMedia(TelegramMethod[Union[Message, bool]]): +class EditMessageMedia(TelegramMethod[Message | bool]): """ - Use this method to edit animation, audio, document, photo, or video 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. + 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. Source: https://core.telegram.org/bots/api#editmessagemedia """ - __returning__ = Union[Message, bool] + __returning__ = Message | bool __api_method__ = "editMessageMedia" - media: Union[ - InputMediaAnimation, InputMediaDocument, InputMediaAudio, InputMediaPhoto, InputMediaVideo - ] + media: InputMediaUnion """A JSON-serialized object for a new media content of the message""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = None """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None + chat_id: ChatIdUnion | None = None """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`)""" - message_id: Optional[int] = None + message_id: int | None = None """Required if *inline_message_id* is not specified. Identifier of the message to edit""" - inline_message_id: Optional[str] = None + inline_message_id: str | None = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """A JSON-serialized object for a new `inline keyboard `_.""" if TYPE_CHECKING: @@ -46,18 +36,12 @@ class EditMessageMedia(TelegramMethod[Union[Message, bool]]): def __init__( __pydantic__self__, *, - media: Union[ - InputMediaAnimation, - InputMediaDocument, - InputMediaAudio, - InputMediaPhoto, - InputMediaVideo, - ], - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, + media: InputMediaUnion, + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/edit_message_reply_markup.py b/aiogram/methods/edit_message_reply_markup.py index 49052f35..e5bd47b6 100644 --- a/aiogram/methods/edit_message_reply_markup.py +++ b/aiogram/methods/edit_message_reply_markup.py @@ -1,30 +1,30 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InlineKeyboardMarkup, Message +from ..types import ChatIdUnion, InlineKeyboardMarkup, Message from .base import TelegramMethod -class EditMessageReplyMarkup(TelegramMethod[Union[Message, bool]]): +class EditMessageReplyMarkup(TelegramMethod[Message | bool]): """ 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. Source: https://core.telegram.org/bots/api#editmessagereplymarkup """ - __returning__ = Union[Message, bool] + __returning__ = Message | bool __api_method__ = "editMessageReplyMarkup" - business_connection_id: Optional[str] = None + business_connection_id: str | None = None """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None + chat_id: ChatIdUnion | None = None """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`)""" - message_id: Optional[int] = None + message_id: int | None = None """Required if *inline_message_id* is not specified. Identifier of the message to edit""" - inline_message_id: Optional[str] = None + inline_message_id: str | None = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """A JSON-serialized object for an `inline keyboard `_.""" if TYPE_CHECKING: @@ -34,11 +34,11 @@ class EditMessageReplyMarkup(TelegramMethod[Union[Message, bool]]): def __init__( __pydantic__self__, *, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/edit_message_text.py b/aiogram/methods/edit_message_text.py index cfaaa943..3622d293 100644 --- a/aiogram/methods/edit_message_text.py +++ b/aiogram/methods/edit_message_text.py @@ -1,12 +1,12 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - UNSET_PARSE_MODE, + ChatIdUnion, InlineKeyboardMarkup, LinkPreviewOptions, Message, @@ -15,35 +15,35 @@ from ..types import ( from .base import TelegramMethod -class EditMessageText(TelegramMethod[Union[Message, bool]]): +class EditMessageText(TelegramMethod[Message | bool]): """ 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. Source: https://core.telegram.org/bots/api#editmessagetext """ - __returning__ = Union[Message, bool] + __returning__ = Message | bool __api_method__ = "editMessageText" text: str """New text of the message, 1-4096 characters after entities parsing""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = None """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None + chat_id: ChatIdUnion | None = None """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`)""" - message_id: Optional[int] = None + message_id: int | None = None """Required if *inline_message_id* is not specified. Identifier of the message to edit""" - inline_message_id: Optional[str] = None + inline_message_id: str | None = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """Mode for parsing entities in the message text. See `formatting options `_ for more details.""" - entities: Optional[List[MessageEntity]] = None + entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*""" - link_preview_options: Optional[LinkPreviewOptions] = None + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview") """Link preview generation options for the message""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """A JSON-serialized object for an `inline keyboard `_.""" - disable_web_page_preview: Optional[Union[bool, Default]] = Field( + disable_web_page_preview: bool | Default | None = Field( Default("link_preview_is_disabled"), json_schema_extra={"deprecated": True} ) """Disables link previews for links in this message @@ -59,17 +59,15 @@ class EditMessageText(TelegramMethod[Union[Message, bool]]): __pydantic__self__, *, text: str, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + reply_markup: InlineKeyboardMarkup | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/edit_story.py b/aiogram/methods/edit_story.py new file mode 100644 index 00000000..888707ec --- /dev/null +++ b/aiogram/methods/edit_story.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import InputStoryContentUnion, MessageEntity, Story, StoryArea +from .base import TelegramMethod + + +class EditStory(TelegramMethod[Story]): + """ + Edits a story previously posted by the bot on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :class:`aiogram.types.story.Story` on success. + + Source: https://core.telegram.org/bots/api#editstory + """ + + __returning__ = Story + __api_method__ = "editStory" + + business_connection_id: str + """Unique identifier of the business connection""" + story_id: int + """Unique identifier of the story to edit""" + content: InputStoryContentUnion + """Content of the story""" + caption: str | None = None + """Caption of the story, 0-2048 characters after entities parsing""" + parse_mode: str | None = None + """Mode for parsing entities in the story caption. See `formatting options `_ for more details.""" + caption_entities: list[MessageEntity] | None = None + """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" + areas: list[StoryArea] | None = None + """A JSON-serialized list of clickable areas to be shown on the story""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + story_id: int, + content: InputStoryContentUnion, + caption: str | None = None, + parse_mode: str | None = None, + caption_entities: list[MessageEntity] | None = None, + areas: list[StoryArea] | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + story_id=story_id, + content=content, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + areas=areas, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/edit_user_star_subscription.py b/aiogram/methods/edit_user_star_subscription.py new file mode 100644 index 00000000..fc97f730 --- /dev/null +++ b/aiogram/methods/edit_user_star_subscription.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class EditUserStarSubscription(TelegramMethod[bool]): + """ + Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#edituserstarsubscription + """ + + __returning__ = bool + __api_method__ = "editUserStarSubscription" + + user_id: int + """Identifier of the user whose subscription will be edited""" + telegram_payment_charge_id: str + """Telegram payment identifier for the subscription""" + is_canceled: bool + """Pass :code:`True` to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass :code:`False` to allow the user to re-enable a subscription that was previously canceled by the bot.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + telegram_payment_charge_id: str, + is_canceled: bool, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + user_id=user_id, + telegram_payment_charge_id=telegram_payment_charge_id, + is_canceled=is_canceled, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/export_chat_invite_link.py b/aiogram/methods/export_chat_invite_link.py index 271e35d1..70da95a0 100644 --- a/aiogram/methods/export_chat_invite_link.py +++ b/aiogram/methods/export_chat_invite_link.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -17,7 +18,7 @@ class ExportChatInviteLink(TelegramMethod[str]): __returning__ = str __api_method__ = "exportChatInviteLink" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" if TYPE_CHECKING: @@ -25,7 +26,7 @@ class ExportChatInviteLink(TelegramMethod[str]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/forward_message.py b/aiogram/methods/forward_message.py index 01d764a3..c52d4de0 100644 --- a/aiogram/methods/forward_message.py +++ b/aiogram/methods/forward_message.py @@ -1,10 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from ..client.default import Default -from ..types import Message -from ..types.base import UNSET_PROTECT_CONTENT +from ..types import ChatIdUnion, DateTimeUnion, Message, SuggestedPostParameters from .base import TelegramMethod @@ -18,18 +17,26 @@ class ForwardMessage(TelegramMethod[Message]): __returning__ = Message __api_method__ = "forwardMessage" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - from_chat_id: Union[int, str] + from_chat_id: ChatIdUnion """Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)""" message_id: int """Message identifier in the chat specified in *from_chat_id*""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - disable_notification: Optional[bool] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: DateTimeUnion | None = None + """New start timestamp for the forwarded video in the message""" + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the forwarded message from forwarding and saving""" + message_effect_id: str | None = None + """Unique identifier of the message effect to be added to the message; only available when forwarding to private chats""" + suggested_post_parameters: SuggestedPostParameters | None = 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!!! @@ -38,12 +45,16 @@ class ForwardMessage(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - from_chat_id: Union[int, str], + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, message_id: int, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + video_start_timestamp: DateTimeUnion | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -55,7 +66,11 @@ 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, + message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, **__pydantic_kwargs, ) diff --git a/aiogram/methods/forward_messages.py b/aiogram/methods/forward_messages.py index 829545f2..0a70b3c9 100644 --- a/aiogram/methods/forward_messages.py +++ b/aiogram/methods/forward_messages.py @@ -1,30 +1,32 @@ -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import MessageId +from ..types import ChatIdUnion, MessageId from .base import TelegramMethod -class ForwardMessages(TelegramMethod[List[MessageId]]): +class ForwardMessages(TelegramMethod[list[MessageId]]): """ Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. Source: https://core.telegram.org/bots/api#forwardmessages """ - __returning__ = List[MessageId] + __returning__ = list[MessageId] __api_method__ = "forwardMessages" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - from_chat_id: Union[int, str] + from_chat_id: ChatIdUnion """Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)""" - message_ids: List[int] + message_ids: list[int] """A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order.""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - disable_notification: Optional[bool] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: bool | None = None """Sends the messages `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: bool | None = None """Protects the contents of the forwarded messages from forwarding and saving""" if TYPE_CHECKING: @@ -34,12 +36,13 @@ class ForwardMessages(TelegramMethod[List[MessageId]]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_ids: List[int], - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + chat_id: ChatIdUnion, + from_chat_id: ChatIdUnion, + message_ids: list[int], + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -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/get_available_gifts.py b/aiogram/methods/get_available_gifts.py new file mode 100644 index 00000000..464eefc9 --- /dev/null +++ b/aiogram/methods/get_available_gifts.py @@ -0,0 +1,15 @@ +from __future__ import annotations + +from ..types.gifts import Gifts +from .base import TelegramMethod + + +class GetAvailableGifts(TelegramMethod[Gifts]): + """ + Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object. + + Source: https://core.telegram.org/bots/api#getavailablegifts + """ + + __returning__ = Gifts + __api_method__ = "getAvailableGifts" diff --git a/aiogram/methods/get_business_account_gifts.py b/aiogram/methods/get_business_account_gifts.py new file mode 100644 index 00000000..27fcaa7d --- /dev/null +++ b/aiogram/methods/get_business_account_gifts.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from pydantic import Field + +from ..types import OwnedGifts +from .base import TelegramMethod + + +class GetBusinessAccountGifts(TelegramMethod[OwnedGifts]): + """ + Returns the gifts received and owned by a managed business account. Requires the *can_view_gifts_and_stars* business bot right. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success. + + Source: https://core.telegram.org/bots/api#getbusinessaccountgifts + """ + + __returning__ = OwnedGifts + __api_method__ = "getBusinessAccountGifts" + + business_connection_id: str + """Unique identifier of the business connection""" + exclude_unsaved: bool | None = None + """Pass :code:`True` to exclude gifts that aren't saved to the account's profile page""" + exclude_saved: bool | None = None + """Pass :code:`True` to exclude gifts that are saved to the account's profile page""" + exclude_unlimited: bool | None = None + """Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times""" + exclude_limited_upgradable: bool | None = None + """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique""" + exclude_limited_non_upgradable: bool | None = None + """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique""" + exclude_unique: bool | None = None + """Pass :code:`True` to exclude unique gifts""" + exclude_from_blockchain: bool | None = None + """Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram""" + sort_by_price: bool | None = None + """Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.""" + offset: str | None = None + """Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results""" + limit: int | None = None + """The maximum number of gifts to be returned; 1-100. Defaults to 100""" + exclude_limited: bool | None = Field(None, json_schema_extra={"deprecated": True}) + """Pass :code:`True` to exclude gifts that can be purchased a limited number of times + +.. deprecated:: API:9.3 + https://core.telegram.org/bots/api-changelog#december-31-2025""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + exclude_unsaved: bool | None = None, + exclude_saved: bool | None = None, + exclude_unlimited: bool | None = None, + exclude_limited_upgradable: bool | None = None, + exclude_limited_non_upgradable: bool | None = None, + exclude_unique: bool | None = None, + exclude_from_blockchain: bool | None = None, + sort_by_price: bool | None = None, + offset: str | None = None, + limit: int | None = None, + exclude_limited: bool | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + exclude_unsaved=exclude_unsaved, + exclude_saved=exclude_saved, + exclude_unlimited=exclude_unlimited, + exclude_limited_upgradable=exclude_limited_upgradable, + exclude_limited_non_upgradable=exclude_limited_non_upgradable, + exclude_unique=exclude_unique, + exclude_from_blockchain=exclude_from_blockchain, + sort_by_price=sort_by_price, + offset=offset, + limit=limit, + exclude_limited=exclude_limited, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/get_business_account_star_balance.py b/aiogram/methods/get_business_account_star_balance.py new file mode 100644 index 00000000..3ced0ec7 --- /dev/null +++ b/aiogram/methods/get_business_account_star_balance.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import StarAmount +from .base import TelegramMethod + + +class GetBusinessAccountStarBalance(TelegramMethod[StarAmount]): + """ + Returns the amount of Telegram Stars owned by a managed business account. Requires the *can_view_gifts_and_stars* business bot right. Returns :class:`aiogram.types.star_amount.StarAmount` on success. + + Source: https://core.telegram.org/bots/api#getbusinessaccountstarbalance + """ + + __returning__ = StarAmount + __api_method__ = "getBusinessAccountStarBalance" + + business_connection_id: str + """Unique identifier of the business connection""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, business_connection_id: str, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(business_connection_id=business_connection_id, **__pydantic_kwargs) diff --git a/aiogram/methods/get_chat.py b/aiogram/methods/get_chat.py index 6b6b9773..41609377 100644 --- a/aiogram/methods/get_chat.py +++ b/aiogram/methods/get_chat.py @@ -1,8 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any -from ..types import ChatFullInfo +from ..types import ChatFullInfo, ChatIdUnion from .base import TelegramMethod @@ -16,7 +16,7 @@ class GetChat(TelegramMethod[ChatFullInfo]): __returning__ = ChatFullInfo __api_method__ = "getChat" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" if TYPE_CHECKING: @@ -24,7 +24,7 @@ class GetChat(TelegramMethod[ChatFullInfo]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/get_chat_administrators.py b/aiogram/methods/get_chat_administrators.py index 99e403e2..6185116e 100644 --- a/aiogram/methods/get_chat_administrators.py +++ b/aiogram/methods/get_chat_administrators.py @@ -1,51 +1,22 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Union +from typing import TYPE_CHECKING, Any -from ..types import ( - ChatMemberAdministrator, - ChatMemberBanned, - ChatMemberLeft, - ChatMemberMember, - ChatMemberOwner, - ChatMemberRestricted, -) +from ..types import ChatIdUnion, ResultChatMemberUnion from .base import TelegramMethod -class GetChatAdministrators( - TelegramMethod[ - List[ - Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - ] - ] -): +class GetChatAdministrators(TelegramMethod[list[ResultChatMemberUnion]]): """ Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects. Source: https://core.telegram.org/bots/api#getchatadministrators """ - __returning__ = List[ - Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - ] + __returning__ = list[ResultChatMemberUnion] __api_method__ = "getChatAdministrators" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" if TYPE_CHECKING: @@ -53,7 +24,7 @@ class GetChatAdministrators( # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/get_chat_gifts.py b/aiogram/methods/get_chat_gifts.py new file mode 100644 index 00000000..4b7d3c7c --- /dev/null +++ b/aiogram/methods/get_chat_gifts.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion, OwnedGifts +from .base import TelegramMethod + + +class GetChatGifts(TelegramMethod[OwnedGifts]): + """ + Returns the gifts owned by a chat. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success. + + Source: https://core.telegram.org/bots/api#getchatgifts + """ + + __returning__ = OwnedGifts + __api_method__ = "getChatGifts" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + exclude_unsaved: bool | None = None + """Pass :code:`True` to exclude gifts that aren't saved to the chat's profile page. Always :code:`True`, unless the bot has the *can_post_messages* administrator right in the channel.""" + exclude_saved: bool | None = None + """Pass :code:`True` to exclude gifts that are saved to the chat's profile page. Always :code:`False`, unless the bot has the *can_post_messages* administrator right in the channel.""" + exclude_unlimited: bool | None = None + """Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times""" + exclude_limited_upgradable: bool | None = None + """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique""" + exclude_limited_non_upgradable: bool | None = None + """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique""" + exclude_from_blockchain: bool | None = None + """Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram""" + exclude_unique: bool | None = None + """Pass :code:`True` to exclude unique gifts""" + sort_by_price: bool | None = None + """Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.""" + offset: str | None = None + """Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results""" + limit: int | None = None + """The maximum number of gifts to be returned; 1-100. Defaults to 100""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + exclude_unsaved: bool | None = None, + exclude_saved: bool | None = None, + exclude_unlimited: bool | None = None, + exclude_limited_upgradable: bool | None = None, + exclude_limited_non_upgradable: bool | None = None, + exclude_from_blockchain: bool | None = None, + exclude_unique: bool | None = None, + sort_by_price: bool | None = None, + offset: str | None = None, + limit: int | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + exclude_unsaved=exclude_unsaved, + exclude_saved=exclude_saved, + exclude_unlimited=exclude_unlimited, + exclude_limited_upgradable=exclude_limited_upgradable, + exclude_limited_non_upgradable=exclude_limited_non_upgradable, + exclude_from_blockchain=exclude_from_blockchain, + exclude_unique=exclude_unique, + sort_by_price=sort_by_price, + offset=offset, + limit=limit, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/get_chat_member.py b/aiogram/methods/get_chat_member.py index 495f6287..a2550af8 100644 --- a/aiogram/methods/get_chat_member.py +++ b/aiogram/methods/get_chat_member.py @@ -1,47 +1,22 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any -from ..types import ( - ChatMemberAdministrator, - ChatMemberBanned, - ChatMemberLeft, - ChatMemberMember, - ChatMemberOwner, - ChatMemberRestricted, -) +from ..types import ChatIdUnion, ResultChatMemberUnion from .base import TelegramMethod -class GetChatMember( - TelegramMethod[ - Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - ] -): +class GetChatMember(TelegramMethod[ResultChatMemberUnion]): """ Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. Source: https://core.telegram.org/bots/api#getchatmember """ - __returning__ = Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] + __returning__ = ResultChatMemberUnion __api_method__ = "getChatMember" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" @@ -51,7 +26,7 @@ class GetChatMember( # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, user_id: int, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/get_chat_member_count.py b/aiogram/methods/get_chat_member_count.py index fc33c23f..0b3476fb 100644 --- a/aiogram/methods/get_chat_member_count.py +++ b/aiogram/methods/get_chat_member_count.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class GetChatMemberCount(TelegramMethod[int]): __returning__ = int __api_method__ = "getChatMemberCount" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" if TYPE_CHECKING: @@ -23,7 +24,7 @@ class GetChatMemberCount(TelegramMethod[int]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/get_chat_menu_button.py b/aiogram/methods/get_chat_menu_button.py index ee1248d0..dbb84124 100644 --- a/aiogram/methods/get_chat_menu_button.py +++ b/aiogram/methods/get_chat_menu_button.py @@ -1,24 +1,22 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp +from ..types import ResultMenuButtonUnion from .base import TelegramMethod -class GetChatMenuButton( - TelegramMethod[Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands]] -): +class GetChatMenuButton(TelegramMethod[ResultMenuButtonUnion]): """ Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns :class:`aiogram.types.menu_button.MenuButton` on success. Source: https://core.telegram.org/bots/api#getchatmenubutton """ - __returning__ = Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands] + __returning__ = ResultMenuButtonUnion __api_method__ = "getChatMenuButton" - chat_id: Optional[int] = None + chat_id: int | None = None """Unique identifier for the target private chat. If not specified, default bot's menu button will be returned""" if TYPE_CHECKING: @@ -26,7 +24,7 @@ class GetChatMenuButton( # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Optional[int] = None, **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: int | None = None, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/get_custom_emoji_stickers.py b/aiogram/methods/get_custom_emoji_stickers.py index 3235d97d..06c684eb 100644 --- a/aiogram/methods/get_custom_emoji_stickers.py +++ b/aiogram/methods/get_custom_emoji_stickers.py @@ -1,22 +1,22 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from ..types import Sticker from .base import TelegramMethod -class GetCustomEmojiStickers(TelegramMethod[List[Sticker]]): +class GetCustomEmojiStickers(TelegramMethod[list[Sticker]]): """ Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. Source: https://core.telegram.org/bots/api#getcustomemojistickers """ - __returning__ = List[Sticker] + __returning__ = list[Sticker] __api_method__ = "getCustomEmojiStickers" - custom_emoji_ids: List[str] + custom_emoji_ids: list[str] """A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.""" if TYPE_CHECKING: @@ -24,7 +24,7 @@ class GetCustomEmojiStickers(TelegramMethod[List[Sticker]]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, custom_emoji_ids: List[str], **__pydantic_kwargs: Any + __pydantic__self__, *, custom_emoji_ids: list[str], **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/get_forum_topic_icon_stickers.py b/aiogram/methods/get_forum_topic_icon_stickers.py index 5c233215..6b49dd8a 100644 --- a/aiogram/methods/get_forum_topic_icon_stickers.py +++ b/aiogram/methods/get_forum_topic_icon_stickers.py @@ -1,17 +1,15 @@ from __future__ import annotations -from typing import List - from ..types import Sticker from .base import TelegramMethod -class GetForumTopicIconStickers(TelegramMethod[List[Sticker]]): +class GetForumTopicIconStickers(TelegramMethod[list[Sticker]]): """ Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. Source: https://core.telegram.org/bots/api#getforumtopiciconstickers """ - __returning__ = List[Sticker] + __returning__ = list[Sticker] __api_method__ = "getForumTopicIconStickers" diff --git a/aiogram/methods/get_game_high_scores.py b/aiogram/methods/get_game_high_scores.py index cac9d61a..de2a26e9 100644 --- a/aiogram/methods/get_game_high_scores.py +++ b/aiogram/methods/get_game_high_scores.py @@ -1,12 +1,12 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from ..types import GameHighScore from .base import TelegramMethod -class GetGameHighScores(TelegramMethod[List[GameHighScore]]): +class GetGameHighScores(TelegramMethod[list[GameHighScore]]): """ Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of :class:`aiogram.types.game_high_score.GameHighScore` objects. @@ -15,16 +15,16 @@ class GetGameHighScores(TelegramMethod[List[GameHighScore]]): Source: https://core.telegram.org/bots/api#getgamehighscores """ - __returning__ = List[GameHighScore] + __returning__ = list[GameHighScore] __api_method__ = "getGameHighScores" user_id: int """Target user id""" - chat_id: Optional[int] = None + chat_id: int | None = None """Required if *inline_message_id* is not specified. Unique identifier for the target chat""" - message_id: Optional[int] = None + message_id: int | None = None """Required if *inline_message_id* is not specified. Identifier of the sent message""" - inline_message_id: Optional[str] = None + inline_message_id: str | None = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" if TYPE_CHECKING: @@ -35,9 +35,9 @@ class GetGameHighScores(TelegramMethod[List[GameHighScore]]): __pydantic__self__, *, user_id: int, - chat_id: Optional[int] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, + chat_id: int | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/get_managed_bot_token.py b/aiogram/methods/get_managed_bot_token.py new file mode 100644 index 00000000..d4d28453 --- /dev/null +++ b/aiogram/methods/get_managed_bot_token.py @@ -0,0 +1,28 @@ +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class GetManagedBotToken(TelegramMethod[str]): + """ + Use this method to get the token of a managed bot. Returns the token as *String* on success. + + Source: https://core.telegram.org/bots/api#getmanagedbottoken + """ + + __returning__ = str + __api_method__ = "getManagedBotToken" + + user_id: int + """User identifier of the managed bot whose token will be returned""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, user_id: 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__(user_id=user_id, **__pydantic_kwargs) diff --git a/aiogram/methods/get_my_commands.py b/aiogram/methods/get_my_commands.py index b3386b66..dc519186 100644 --- a/aiogram/methods/get_my_commands.py +++ b/aiogram/methods/get_my_commands.py @@ -1,43 +1,24 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ( - BotCommand, - BotCommandScopeAllChatAdministrators, - BotCommandScopeAllGroupChats, - BotCommandScopeAllPrivateChats, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - BotCommandScopeDefault, -) +from ..types import BotCommand, BotCommandScopeUnion from .base import TelegramMethod -class GetMyCommands(TelegramMethod[List[BotCommand]]): +class GetMyCommands(TelegramMethod[list[BotCommand]]): """ Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of :class:`aiogram.types.bot_command.BotCommand` objects. If commands aren't set, an empty list is returned. Source: https://core.telegram.org/bots/api#getmycommands """ - __returning__ = List[BotCommand] + __returning__ = list[BotCommand] __api_method__ = "getMyCommands" - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None + scope: BotCommandScopeUnion | None = None """A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" - language_code: Optional[str] = None + language_code: str | None = None """A two-letter ISO 639-1 language code or an empty string""" if TYPE_CHECKING: @@ -47,18 +28,8 @@ class GetMyCommands(TelegramMethod[List[BotCommand]]): def __init__( __pydantic__self__, *, - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, + scope: BotCommandScopeUnion | None = None, + language_code: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/get_my_default_administrator_rights.py b/aiogram/methods/get_my_default_administrator_rights.py index 4f9ad9a6..c439f0ca 100644 --- a/aiogram/methods/get_my_default_administrator_rights.py +++ b/aiogram/methods/get_my_default_administrator_rights.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from ..types import ChatAdministratorRights from .base import TelegramMethod @@ -16,7 +16,7 @@ class GetMyDefaultAdministratorRights(TelegramMethod[ChatAdministratorRights]): __returning__ = ChatAdministratorRights __api_method__ = "getMyDefaultAdministratorRights" - for_channels: Optional[bool] = None + for_channels: bool | None = None """Pass :code:`True` to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.""" if TYPE_CHECKING: @@ -24,7 +24,7 @@ class GetMyDefaultAdministratorRights(TelegramMethod[ChatAdministratorRights]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, for_channels: Optional[bool] = None, **__pydantic_kwargs: Any + __pydantic__self__, *, for_channels: bool | None = None, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/get_my_description.py b/aiogram/methods/get_my_description.py index f967faf6..773241e2 100644 --- a/aiogram/methods/get_my_description.py +++ b/aiogram/methods/get_my_description.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from ..types import BotDescription from .base import TelegramMethod @@ -16,7 +16,7 @@ class GetMyDescription(TelegramMethod[BotDescription]): __returning__ = BotDescription __api_method__ = "getMyDescription" - language_code: Optional[str] = None + language_code: str | None = None """A two-letter ISO 639-1 language code or an empty string""" if TYPE_CHECKING: @@ -24,7 +24,7 @@ class GetMyDescription(TelegramMethod[BotDescription]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any + __pydantic__self__, *, language_code: str | None = None, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/get_my_name.py b/aiogram/methods/get_my_name.py index 909ac3f6..68f0d8e8 100644 --- a/aiogram/methods/get_my_name.py +++ b/aiogram/methods/get_my_name.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from ..types import BotName from .base import TelegramMethod @@ -14,7 +14,7 @@ class GetMyName(TelegramMethod[BotName]): __returning__ = BotName __api_method__ = "getMyName" - language_code: Optional[str] = None + language_code: str | None = None """A two-letter ISO 639-1 language code or an empty string""" if TYPE_CHECKING: @@ -22,7 +22,7 @@ class GetMyName(TelegramMethod[BotName]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any + __pydantic__self__, *, language_code: str | None = None, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/get_my_short_description.py b/aiogram/methods/get_my_short_description.py index a9a56669..f94c2bb7 100644 --- a/aiogram/methods/get_my_short_description.py +++ b/aiogram/methods/get_my_short_description.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from ..types import BotShortDescription from .base import TelegramMethod @@ -16,7 +16,7 @@ class GetMyShortDescription(TelegramMethod[BotShortDescription]): __returning__ = BotShortDescription __api_method__ = "getMyShortDescription" - language_code: Optional[str] = None + language_code: str | None = None """A two-letter ISO 639-1 language code or an empty string""" if TYPE_CHECKING: @@ -24,7 +24,7 @@ class GetMyShortDescription(TelegramMethod[BotShortDescription]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any + __pydantic__self__, *, language_code: str | None = None, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/get_my_star_balance.py b/aiogram/methods/get_my_star_balance.py new file mode 100644 index 00000000..e0c6e1ee --- /dev/null +++ b/aiogram/methods/get_my_star_balance.py @@ -0,0 +1,15 @@ +from __future__ import annotations + +from ..types import StarAmount +from .base import TelegramMethod + + +class GetMyStarBalance(TelegramMethod[StarAmount]): + """ + A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a :class:`aiogram.types.star_amount.StarAmount` object. + + Source: https://core.telegram.org/bots/api#getmystarbalance + """ + + __returning__ = StarAmount + __api_method__ = "getMyStarBalance" diff --git a/aiogram/methods/get_star_transactions.py b/aiogram/methods/get_star_transactions.py index ee0ea2e1..ac8dfdeb 100644 --- a/aiogram/methods/get_star_transactions.py +++ b/aiogram/methods/get_star_transactions.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from ..types import StarTransactions from .base import TelegramMethod @@ -16,9 +16,9 @@ class GetStarTransactions(TelegramMethod[StarTransactions]): __returning__ = StarTransactions __api_method__ = "getStarTransactions" - offset: Optional[int] = None + offset: int | None = None """Number of transactions to skip in the response""" - limit: Optional[int] = None + limit: int | None = None """The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.""" if TYPE_CHECKING: @@ -28,8 +28,8 @@ class GetStarTransactions(TelegramMethod[StarTransactions]): def __init__( __pydantic__self__, *, - offset: Optional[int] = None, - limit: Optional[int] = None, + offset: int | None = None, + limit: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/get_updates.py b/aiogram/methods/get_updates.py index d1f6371e..30cab2af 100644 --- a/aiogram/methods/get_updates.py +++ b/aiogram/methods/get_updates.py @@ -1,12 +1,12 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from ..types import Update from .base import TelegramMethod -class GetUpdates(TelegramMethod[List[Update]]): +class GetUpdates(TelegramMethod[list[Update]]): """ Use this method to receive incoming updates using long polling (`wiki `_). Returns an Array of :class:`aiogram.types.update.Update` objects. @@ -19,16 +19,16 @@ class GetUpdates(TelegramMethod[List[Update]]): Source: https://core.telegram.org/bots/api#getupdates """ - __returning__ = List[Update] + __returning__ = list[Update] __api_method__ = "getUpdates" - offset: Optional[int] = None + offset: int | None = None """Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as :class:`aiogram.methods.get_updates.GetUpdates` is called with an *offset* higher than its *update_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will be forgotten.""" - limit: Optional[int] = None + limit: int | None = None """Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.""" - timeout: Optional[int] = None + timeout: int | None = None """Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.""" - allowed_updates: Optional[List[str]] = None + allowed_updates: list[str] | None = None """A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used.""" if TYPE_CHECKING: @@ -38,10 +38,10 @@ class GetUpdates(TelegramMethod[List[Update]]): def __init__( __pydantic__self__, *, - offset: Optional[int] = None, - limit: Optional[int] = None, - timeout: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, + offset: int | None = None, + limit: int | None = None, + timeout: int | None = None, + allowed_updates: list[str] | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/get_user_chat_boosts.py b/aiogram/methods/get_user_chat_boosts.py index f3eae261..04313643 100644 --- a/aiogram/methods/get_user_chat_boosts.py +++ b/aiogram/methods/get_user_chat_boosts.py @@ -1,6 +1,6 @@ -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any -from ..types import UserChatBoosts +from ..types import ChatIdUnion, UserChatBoosts from .base import TelegramMethod @@ -14,7 +14,7 @@ class GetUserChatBoosts(TelegramMethod[UserChatBoosts]): __returning__ = UserChatBoosts __api_method__ = "getUserChatBoosts" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" @@ -24,7 +24,7 @@ class GetUserChatBoosts(TelegramMethod[UserChatBoosts]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, user_id: int, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/get_user_gifts.py b/aiogram/methods/get_user_gifts.py new file mode 100644 index 00000000..69982166 --- /dev/null +++ b/aiogram/methods/get_user_gifts.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import OwnedGifts +from .base import TelegramMethod + + +class GetUserGifts(TelegramMethod[OwnedGifts]): + """ + Returns the gifts owned and hosted by a user. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success. + + Source: https://core.telegram.org/bots/api#getusergifts + """ + + __returning__ = OwnedGifts + __api_method__ = "getUserGifts" + + user_id: int + """Unique identifier of the user""" + exclude_unlimited: bool | None = None + """Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times""" + exclude_limited_upgradable: bool | None = None + """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique""" + exclude_limited_non_upgradable: bool | None = None + """Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique""" + exclude_from_blockchain: bool | None = None + """Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram""" + exclude_unique: bool | None = None + """Pass :code:`True` to exclude unique gifts""" + sort_by_price: bool | None = None + """Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.""" + offset: str | None = None + """Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results""" + limit: int | None = None + """The maximum number of gifts to be returned; 1-100. Defaults to 100""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + exclude_unlimited: bool | None = None, + exclude_limited_upgradable: bool | None = None, + exclude_limited_non_upgradable: bool | None = None, + exclude_from_blockchain: bool | None = None, + exclude_unique: bool | None = None, + sort_by_price: bool | None = None, + offset: str | None = None, + limit: int | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + user_id=user_id, + exclude_unlimited=exclude_unlimited, + exclude_limited_upgradable=exclude_limited_upgradable, + exclude_limited_non_upgradable=exclude_limited_non_upgradable, + exclude_from_blockchain=exclude_from_blockchain, + exclude_unique=exclude_unique, + sort_by_price=sort_by_price, + offset=offset, + limit=limit, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/get_user_profile_audios.py b/aiogram/methods/get_user_profile_audios.py new file mode 100644 index 00000000..ce77de40 --- /dev/null +++ b/aiogram/methods/get_user_profile_audios.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import UserProfileAudios +from .base import TelegramMethod + + +class GetUserProfileAudios(TelegramMethod[UserProfileAudios]): + """ + Use this method to get a list of profile audios for a user. Returns a :class:`aiogram.types.user_profile_audios.UserProfileAudios` object. + + Source: https://core.telegram.org/bots/api#getuserprofileaudios + """ + + __returning__ = UserProfileAudios + __api_method__ = "getUserProfileAudios" + + user_id: int + """Unique identifier of the target user""" + offset: int | None = None + """Sequential number of the first audio to be returned. By default, all audios are returned.""" + limit: int | None = None + """Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + offset: int | None = None, + limit: int | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(user_id=user_id, offset=offset, limit=limit, **__pydantic_kwargs) diff --git a/aiogram/methods/get_user_profile_photos.py b/aiogram/methods/get_user_profile_photos.py index 488885e1..0b314366 100644 --- a/aiogram/methods/get_user_profile_photos.py +++ b/aiogram/methods/get_user_profile_photos.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from ..types import UserProfilePhotos from .base import TelegramMethod @@ -18,9 +18,9 @@ class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]): user_id: int """Unique identifier of the target user""" - offset: Optional[int] = None + offset: int | None = None """Sequential number of the first photo to be returned. By default, all photos are returned.""" - limit: Optional[int] = None + limit: int | None = None """Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.""" if TYPE_CHECKING: @@ -31,8 +31,8 @@ class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]): __pydantic__self__, *, user_id: int, - offset: Optional[int] = None, - limit: Optional[int] = None, + offset: int | None = None, + limit: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/gift_premium_subscription.py b/aiogram/methods/gift_premium_subscription.py new file mode 100644 index 00000000..58332c6b --- /dev/null +++ b/aiogram/methods/gift_premium_subscription.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import MessageEntity +from .base import TelegramMethod + + +class GiftPremiumSubscription(TelegramMethod[bool]): + """ + Gifts a Telegram Premium subscription to the given user. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#giftpremiumsubscription + """ + + __returning__ = bool + __api_method__ = "giftPremiumSubscription" + + user_id: int + """Unique identifier of the target user who will receive a Telegram Premium subscription""" + month_count: int + """Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12""" + star_count: int + """Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months""" + text: str | None = None + """Text that will be shown along with the service message about the subscription; 0-128 characters""" + text_parse_mode: str | None = None + """Mode for parsing entities in the text. See `formatting options `_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.""" + text_entities: list[MessageEntity] | None = None + """A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + month_count: int, + star_count: int, + text: str | None = None, + text_parse_mode: str | None = None, + text_entities: list[MessageEntity] | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + user_id=user_id, + month_count=month_count, + star_count=star_count, + text=text, + text_parse_mode=text_parse_mode, + text_entities=text_entities, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/hide_general_forum_topic.py b/aiogram/methods/hide_general_forum_topic.py index a3b6ee3f..e2a1cd26 100644 --- a/aiogram/methods/hide_general_forum_topic.py +++ b/aiogram/methods/hide_general_forum_topic.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class HideGeneralForumTopic(TelegramMethod[bool]): __returning__ = bool __api_method__ = "hideGeneralForumTopic" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" if TYPE_CHECKING: @@ -23,7 +24,7 @@ class HideGeneralForumTopic(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/leave_chat.py b/aiogram/methods/leave_chat.py index f9d43128..7ee0a3c2 100644 --- a/aiogram/methods/leave_chat.py +++ b/aiogram/methods/leave_chat.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,15 +16,15 @@ class LeaveChat(TelegramMethod[bool]): __returning__ = bool __api_method__ = "leaveChat" - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" + chat_id: ChatIdUnion + """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!!! # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/pin_chat_message.py b/aiogram/methods/pin_chat_message.py index fe99cc25..ad113322 100644 --- a/aiogram/methods/pin_chat_message.py +++ b/aiogram/methods/pin_chat_message.py @@ -1,13 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion 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 """ @@ -15,11 +16,13 @@ class PinChatMessage(TelegramMethod[bool]): __returning__ = bool __api_method__ = "pinChatMessage" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" message_id: int """Identifier of a message to pin""" - disable_notification: Optional[bool] = None + business_connection_id: str | None = None + """Unique identifier of the business connection on behalf of which the message will be pinned""" + disable_notification: bool | None = None """Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.""" if TYPE_CHECKING: @@ -29,9 +32,10 @@ class PinChatMessage(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_id: int, - disable_notification: Optional[bool] = None, + business_connection_id: str | None = None, + disable_notification: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -41,6 +45,7 @@ class PinChatMessage(TelegramMethod[bool]): super().__init__( chat_id=chat_id, message_id=message_id, + business_connection_id=business_connection_id, disable_notification=disable_notification, **__pydantic_kwargs, ) diff --git a/aiogram/methods/post_story.py b/aiogram/methods/post_story.py new file mode 100644 index 00000000..b768eacc --- /dev/null +++ b/aiogram/methods/post_story.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import InputStoryContentUnion, MessageEntity, Story, StoryArea +from .base import TelegramMethod + + +class PostStory(TelegramMethod[Story]): + """ + Posts a story on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :class:`aiogram.types.story.Story` on success. + + Source: https://core.telegram.org/bots/api#poststory + """ + + __returning__ = Story + __api_method__ = "postStory" + + business_connection_id: str + """Unique identifier of the business connection""" + content: InputStoryContentUnion + """Content of the story""" + active_period: int + """Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400`""" + caption: str | None = None + """Caption of the story, 0-2048 characters after entities parsing""" + parse_mode: str | None = None + """Mode for parsing entities in the story caption. See `formatting options `_ for more details.""" + caption_entities: list[MessageEntity] | None = None + """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" + areas: list[StoryArea] | None = None + """A JSON-serialized list of clickable areas to be shown on the story""" + post_to_chat_page: bool | None = None + """Pass :code:`True` to keep the story accessible after it expires""" + protect_content: bool | None = None + """Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + content: InputStoryContentUnion, + active_period: int, + caption: str | None = None, + parse_mode: str | None = None, + caption_entities: list[MessageEntity] | None = None, + areas: list[StoryArea] | None = None, + post_to_chat_page: bool | None = None, + protect_content: bool | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + content=content, + active_period=active_period, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + areas=areas, + post_to_chat_page=post_to_chat_page, + protect_content=protect_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/promote_chat_member.py b/aiogram/methods/promote_chat_member.py index 2ca410f0..6f8d4dbf 100644 --- a/aiogram/methods/promote_chat_member.py +++ b/aiogram/methods/promote_chat_member.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,40 +16,44 @@ class PromoteChatMember(TelegramMethod[bool]): __returning__ = bool __api_method__ = "promoteChatMember" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" - is_anonymous: Optional[bool] = None + is_anonymous: bool | None = None """Pass :code:`True` if the administrator's presence in the chat is hidden""" - can_manage_chat: Optional[bool] = None - """Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.""" - can_delete_messages: Optional[bool] = None + can_manage_chat: bool | None = None + """Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.""" + can_delete_messages: bool | None = None """Pass :code:`True` if the administrator can delete messages of other users""" - can_manage_video_chats: Optional[bool] = None + can_manage_video_chats: bool | None = None """Pass :code:`True` if the administrator can manage video chats""" - can_restrict_members: Optional[bool] = None - """Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics""" - can_promote_members: Optional[bool] = None + can_restrict_members: bool | None = None + """Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to :code:`True` for promotions of channel administrators""" + can_promote_members: bool | None = None """Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)""" - can_change_info: Optional[bool] = None + can_change_info: bool | None = None """Pass :code:`True` if the administrator can change chat title, photo and other settings""" - can_invite_users: Optional[bool] = None + can_invite_users: bool | None = None """Pass :code:`True` if the administrator can invite new users to the chat""" - can_post_stories: Optional[bool] = None + can_post_stories: bool | None = None """Pass :code:`True` if the administrator can post stories to the chat""" - can_edit_stories: Optional[bool] = None + can_edit_stories: bool | None = None """Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive""" - can_delete_stories: Optional[bool] = None + can_delete_stories: bool | None = None """Pass :code:`True` if the administrator can delete stories posted by other users""" - can_post_messages: Optional[bool] = None - """Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only""" - can_edit_messages: Optional[bool] = None + can_post_messages: bool | None = None + """Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only""" + can_edit_messages: bool | None = None """Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only""" - can_pin_messages: Optional[bool] = None + can_pin_messages: bool | None = None """Pass :code:`True` if the administrator can pin messages; for supergroups only""" - can_manage_topics: Optional[bool] = None + can_manage_topics: bool | None = None """Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only""" + can_manage_direct_messages: bool | None = None + """Pass :code:`True` if the administrator can manage direct messages within the channel and decline suggested posts; for channels only""" + can_manage_tags: bool | None = None + """Pass :code:`True` if the administrator can edit the tags of regular members; for groups and supergroups only""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -57,23 +62,25 @@ class PromoteChatMember(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, - is_anonymous: Optional[bool] = None, - can_manage_chat: Optional[bool] = None, - can_delete_messages: Optional[bool] = None, - can_manage_video_chats: Optional[bool] = None, - can_restrict_members: Optional[bool] = None, - can_promote_members: Optional[bool] = None, - can_change_info: Optional[bool] = None, - can_invite_users: Optional[bool] = None, - can_post_stories: Optional[bool] = None, - can_edit_stories: Optional[bool] = None, - can_delete_stories: Optional[bool] = None, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, + is_anonymous: bool | None = None, + can_manage_chat: bool | None = None, + can_delete_messages: bool | None = None, + can_manage_video_chats: bool | None = None, + can_restrict_members: bool | None = None, + can_promote_members: bool | None = None, + can_change_info: bool | None = None, + can_invite_users: bool | None = None, + can_post_stories: bool | None = None, + can_edit_stories: bool | None = None, + can_delete_stories: bool | None = None, + can_post_messages: bool | None = None, + can_edit_messages: bool | None = None, + can_pin_messages: bool | None = None, + can_manage_topics: bool | None = None, + can_manage_direct_messages: bool | None = None, + can_manage_tags: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -98,5 +105,7 @@ 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, + can_manage_tags=can_manage_tags, **__pydantic_kwargs, ) diff --git a/aiogram/methods/read_business_message.py b/aiogram/methods/read_business_message.py new file mode 100644 index 00000000..c1c7a426 --- /dev/null +++ b/aiogram/methods/read_business_message.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class ReadBusinessMessage(TelegramMethod[bool]): + """ + Marks incoming message as read on behalf of a business account. Requires the *can_read_messages* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#readbusinessmessage + """ + + __returning__ = bool + __api_method__ = "readBusinessMessage" + + business_connection_id: str + """Unique identifier of the business connection on behalf of which to read the message""" + chat_id: int + """Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.""" + message_id: int + """Unique identifier of the message to mark as read""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + chat_id: int, + message_id: 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__( + business_connection_id=business_connection_id, + chat_id=chat_id, + message_id=message_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/remove_business_account_profile_photo.py b/aiogram/methods/remove_business_account_profile_photo.py new file mode 100644 index 00000000..e0648c2a --- /dev/null +++ b/aiogram/methods/remove_business_account_profile_photo.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class RemoveBusinessAccountProfilePhoto(TelegramMethod[bool]): + """ + Removes the current profile photo of a managed business account. Requires the *can_edit_profile_photo* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#removebusinessaccountprofilephoto + """ + + __returning__ = bool + __api_method__ = "removeBusinessAccountProfilePhoto" + + business_connection_id: str + """Unique identifier of the business connection""" + is_public: bool | None = None + """Pass :code:`True` to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + is_public: bool | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + is_public=is_public, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/remove_chat_verification.py b/aiogram/methods/remove_chat_verification.py new file mode 100644 index 00000000..3c864a7a --- /dev/null +++ b/aiogram/methods/remove_chat_verification.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion +from .base import TelegramMethod + + +class RemoveChatVerification(TelegramMethod[bool]): + """ + Removes verification from a chat that is currently verified `on behalf of the organization `_ represented by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#removechatverification + """ + + __returning__ = bool + __api_method__ = "removeChatVerification" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, chat_id: ChatIdUnion, **__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, **__pydantic_kwargs) diff --git a/aiogram/methods/remove_my_profile_photo.py b/aiogram/methods/remove_my_profile_photo.py new file mode 100644 index 00000000..c59dca32 --- /dev/null +++ b/aiogram/methods/remove_my_profile_photo.py @@ -0,0 +1,14 @@ +from __future__ import annotations + +from .base import TelegramMethod + + +class RemoveMyProfilePhoto(TelegramMethod[bool]): + """ + Removes the profile photo of the bot. Requires no parameters. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#removemyprofilephoto + """ + + __returning__ = bool + __api_method__ = "removeMyProfilePhoto" diff --git a/aiogram/methods/remove_user_verification.py b/aiogram/methods/remove_user_verification.py new file mode 100644 index 00000000..91b3b536 --- /dev/null +++ b/aiogram/methods/remove_user_verification.py @@ -0,0 +1,30 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class RemoveUserVerification(TelegramMethod[bool]): + """ + Removes verification from a user who is currently verified `on behalf of the organization `_ represented by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#removeuserverification + """ + + __returning__ = bool + __api_method__ = "removeUserVerification" + + user_id: int + """Unique identifier of the target user""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, user_id: 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__(user_id=user_id, **__pydantic_kwargs) diff --git a/aiogram/methods/reopen_forum_topic.py b/aiogram/methods/reopen_forum_topic.py index 45eb18d0..b67adfaa 100644 --- a/aiogram/methods/reopen_forum_topic.py +++ b/aiogram/methods/reopen_forum_topic.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class ReopenForumTopic(TelegramMethod[bool]): __returning__ = bool __api_method__ = "reopenForumTopic" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" @@ -27,7 +28,7 @@ class ReopenForumTopic(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_thread_id: int, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/methods/reopen_general_forum_topic.py b/aiogram/methods/reopen_general_forum_topic.py index a6dc04e0..670ab3bc 100644 --- a/aiogram/methods/reopen_general_forum_topic.py +++ b/aiogram/methods/reopen_general_forum_topic.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class ReopenGeneralForumTopic(TelegramMethod[bool]): __returning__ = bool __api_method__ = "reopenGeneralForumTopic" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" if TYPE_CHECKING: @@ -23,7 +24,7 @@ class ReopenGeneralForumTopic(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/replace_managed_bot_token.py b/aiogram/methods/replace_managed_bot_token.py new file mode 100644 index 00000000..aa224736 --- /dev/null +++ b/aiogram/methods/replace_managed_bot_token.py @@ -0,0 +1,28 @@ +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class ReplaceManagedBotToken(TelegramMethod[str]): + """ + Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as *String* on success. + + Source: https://core.telegram.org/bots/api#replacemanagedbottoken + """ + + __returning__ = str + __api_method__ = "replaceManagedBotToken" + + user_id: int + """User identifier of the managed bot whose token will be replaced""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, user_id: 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__(user_id=user_id, **__pydantic_kwargs) diff --git a/aiogram/methods/repost_story.py b/aiogram/methods/repost_story.py new file mode 100644 index 00000000..4aef335b --- /dev/null +++ b/aiogram/methods/repost_story.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import Story +from .base import TelegramMethod + + +class RepostStory(TelegramMethod[Story]): + """ + Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the *can_manage_stories* business bot right for both business accounts. Returns :class:`aiogram.types.story.Story` on success. + + Source: https://core.telegram.org/bots/api#repoststory + """ + + __returning__ = Story + __api_method__ = "repostStory" + + business_connection_id: str + """Unique identifier of the business connection""" + from_chat_id: int + """Unique identifier of the chat which posted the story that should be reposted""" + from_story_id: int + """Unique identifier of the story that should be reposted""" + active_period: int + """Period after which the story is moved to the archive, in seconds; must be one of :code:`6 * 3600`, :code:`12 * 3600`, :code:`86400`, or :code:`2 * 86400`""" + post_to_chat_page: bool | None = None + """Pass :code:`True` to keep the story accessible after it expires""" + protect_content: bool | None = None + """Pass :code:`True` if the content of the story must be protected from forwarding and screenshotting""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + from_chat_id: int, + from_story_id: int, + active_period: int, + post_to_chat_page: bool | None = None, + protect_content: bool | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + from_chat_id=from_chat_id, + from_story_id=from_story_id, + active_period=active_period, + post_to_chat_page=post_to_chat_page, + protect_content=protect_content, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/restrict_chat_member.py b/aiogram/methods/restrict_chat_member.py index 5dfbd01d..88e9b957 100644 --- a/aiogram/methods/restrict_chat_member.py +++ b/aiogram/methods/restrict_chat_member.py @@ -1,9 +1,8 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ChatPermissions +from ..types import ChatIdUnion, ChatPermissions, DateTimeUnion from .base import TelegramMethod @@ -17,15 +16,15 @@ class RestrictChatMember(TelegramMethod[bool]): __returning__ = bool __api_method__ = "restrictChatMember" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" user_id: int """Unique identifier of the target user""" permissions: ChatPermissions """A JSON-serialized object for new user permissions""" - use_independent_chat_permissions: Optional[bool] = None + use_independent_chat_permissions: bool | None = None """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None + until_date: DateTimeUnion | None = None """Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever""" if TYPE_CHECKING: @@ -35,11 +34,11 @@ class RestrictChatMember(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + use_independent_chat_permissions: bool | None = None, + until_date: DateTimeUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/revoke_chat_invite_link.py b/aiogram/methods/revoke_chat_invite_link.py index 414feb30..402750f1 100644 --- a/aiogram/methods/revoke_chat_invite_link.py +++ b/aiogram/methods/revoke_chat_invite_link.py @@ -1,8 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any -from ..types import ChatInviteLink +from ..types import ChatIdUnion, ChatInviteLink from .base import TelegramMethod @@ -16,7 +16,7 @@ class RevokeChatInviteLink(TelegramMethod[ChatInviteLink]): __returning__ = ChatInviteLink __api_method__ = "revokeChatInviteLink" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`)""" invite_link: str """The invite link to revoke""" @@ -26,11 +26,7 @@ class RevokeChatInviteLink(TelegramMethod[ChatInviteLink]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - invite_link: str, - **__pydantic_kwargs: Any, + __pydantic__self__, *, chat_id: ChatIdUnion, invite_link: str, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/save_prepared_inline_message.py b/aiogram/methods/save_prepared_inline_message.py new file mode 100644 index 00000000..30198249 --- /dev/null +++ b/aiogram/methods/save_prepared_inline_message.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import InlineQueryResultUnion, PreparedInlineMessage +from .base import TelegramMethod + + +class SavePreparedInlineMessage(TelegramMethod[PreparedInlineMessage]): + """ + Stores a message that can be sent by a user of a Mini App. Returns a :class:`aiogram.types.prepared_inline_message.PreparedInlineMessage` object. + + Source: https://core.telegram.org/bots/api#savepreparedinlinemessage + """ + + __returning__ = PreparedInlineMessage + __api_method__ = "savePreparedInlineMessage" + + user_id: int + """Unique identifier of the target user that can use the prepared message""" + result: InlineQueryResultUnion + """A JSON-serialized object describing the message to be sent""" + allow_user_chats: bool | None = None + """Pass :code:`True` if the message can be sent to private chats with users""" + allow_bot_chats: bool | None = None + """Pass :code:`True` if the message can be sent to private chats with bots""" + allow_group_chats: bool | None = None + """Pass :code:`True` if the message can be sent to group and supergroup chats""" + allow_channel_chats: bool | None = None + """Pass :code:`True` if the message can be sent to channel chats""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + result: InlineQueryResultUnion, + allow_user_chats: bool | None = None, + allow_bot_chats: bool | None = None, + allow_group_chats: bool | None = None, + allow_channel_chats: bool | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + user_id=user_id, + result=result, + allow_user_chats=allow_user_chats, + allow_bot_chats=allow_bot_chats, + allow_group_chats=allow_group_chats, + allow_channel_chats=allow_channel_chats, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/save_prepared_keyboard_button.py b/aiogram/methods/save_prepared_keyboard_button.py new file mode 100644 index 00000000..03546fbb --- /dev/null +++ b/aiogram/methods/save_prepared_keyboard_button.py @@ -0,0 +1,33 @@ +from typing import TYPE_CHECKING, Any + +from ..types import KeyboardButton, PreparedKeyboardButton +from .base import TelegramMethod + + +class SavePreparedKeyboardButton(TelegramMethod[PreparedKeyboardButton]): + """ + Stores a keyboard button that can be used by a user within a Mini App. Returns a :class:`aiogram.types.prepared_keyboard_button.PreparedKeyboardButton` object. + + Source: https://core.telegram.org/bots/api#savepreparedkeyboardbutton + """ + + __returning__ = PreparedKeyboardButton + __api_method__ = "savePreparedKeyboardButton" + + user_id: int + """Unique identifier of the target user that can use the button""" + button: KeyboardButton + """A JSON-serialized object describing the button to be saved. The button must be of the type *request_users*, *request_chat*, or *request_managed_bot*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, user_id: int, button: KeyboardButton, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(user_id=user_id, button=button, **__pydantic_kwargs) diff --git a/aiogram/methods/send_animation.py b/aiogram/methods/send_animation.py index 0baab73a..931e88c7 100644 --- a/aiogram/methods/send_animation.py +++ b/aiogram/methods/send_animation.py @@ -1,19 +1,19 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, InputFile, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -28,52 +28,54 @@ class SendAnimation(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendAnimation" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - animation: Union[InputFile, str] + animation: InputFileUnion """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 » `""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - duration: Optional[int] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: int | None = None """Duration of sent animation in seconds""" - width: Optional[int] = None + width: int | None = None """Animation width""" - height: Optional[int] = None + height: int | None = None """Animation height""" - thumbnail: Optional[InputFile] = None + thumbnail: InputFile | None = 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 + caption: str | None = None """Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """Mode for parsing entities in the animation caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """Pass :code:`True`, if the caption must be shown above the message media""" - has_spoiler: Optional[bool] = None + has_spoiler: bool | None = None """Pass :code:`True` if the animation needs to be covered with a spoiler animation""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -86,30 +88,29 @@ class SendAnimation(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - animation: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + chat_id: ChatIdUnion, + animation: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -121,6 +122,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,7 +134,9 @@ class SendAnimation(TelegramMethod[Message]): has_spoiler=has_spoiler, 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_audio.py b/aiogram/methods/send_audio.py index b15824a1..687d8389 100644 --- a/aiogram/methods/send_audio.py +++ b/aiogram/methods/send_audio.py @@ -1,19 +1,19 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, InputFile, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -29,48 +29,50 @@ class SendAudio(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendAudio" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - audio: Union[InputFile, str] + audio: InputFileUnion """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 » `""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - caption: Optional[str] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: str | None = None """Audio caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - duration: Optional[int] = None + duration: int | None = None """Duration of the audio in seconds""" - performer: Optional[str] = None + performer: str | None = None """Performer""" - title: Optional[str] = None + title: str | None = None """Track name""" - thumbnail: Optional[InputFile] = None + thumbnail: InputFile | None = 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 » `""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -83,26 +85,27 @@ class SendAudio(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - audio: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + chat_id: ChatIdUnion, + audio: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -114,6 +117,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,7 +127,9 @@ class SendAudio(TelegramMethod[Message]): thumbnail=thumbnail, 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_chat_action.py b/aiogram/methods/send_chat_action.py index a9f452af..4cc22ad3 100644 --- a/aiogram/methods/send_chat_action.py +++ b/aiogram/methods/send_chat_action.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -19,14 +20,14 @@ class SendChatAction(TelegramMethod[bool]): __returning__ = bool __api_method__ = "sendChatAction" - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + chat_id: ChatIdUnion + """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 + business_connection_id: str | None = None """Unique identifier of the business connection on behalf of which the action will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread; for supergroups only""" + message_thread_id: int | None = None + """Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -35,10 +36,10 @@ class SendChatAction(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, action: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/send_checklist.py b/aiogram/methods/send_checklist.py new file mode 100644 index 00000000..7a00317b --- /dev/null +++ b/aiogram/methods/send_checklist.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import InlineKeyboardMarkup, InputChecklist, Message, ReplyParameters +from .base import TelegramMethod + + +class SendChecklist(TelegramMethod[Message]): + """ + Use this method to send a checklist on behalf of a connected business account. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendchecklist + """ + + __returning__ = Message + __api_method__ = "sendChecklist" + + business_connection_id: str + """Unique identifier of the business connection on behalf of which the message will be sent""" + chat_id: int + """Unique identifier for the target chat""" + checklist: InputChecklist + """A JSON-serialized object for the checklist to send""" + disable_notification: bool | None = None + """Sends the message silently. Users will receive a notification with no sound.""" + protect_content: bool | None = None + """Protects the contents of the sent message from forwarding and saving""" + message_effect_id: str | None = None + """Unique identifier of the message effect to be added to the message""" + reply_parameters: ReplyParameters | None = None + """A JSON-serialized object for description of the message to reply to""" + reply_markup: InlineKeyboardMarkup | None = None + """A JSON-serialized object for an `inline keyboard `_""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + chat_id: int, + checklist: InputChecklist, + disable_notification: bool | None = None, + protect_content: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + chat_id=chat_id, + checklist=checklist, + disable_notification=disable_notification, + protect_content=protect_content, + message_effect_id=message_effect_id, + reply_parameters=reply_parameters, + reply_markup=reply_markup, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_contact.py b/aiogram/methods/send_contact.py index 6c14d56f..1d61b52e 100644 --- a/aiogram/methods/send_contact.py +++ b/aiogram/methods/send_contact.py @@ -1,17 +1,16 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -26,40 +25,42 @@ class SendContact(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendContact" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" phone_number: str """Contact's phone number""" first_name: str """Contact's first name""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - last_name: Optional[str] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: str | None = None """Contact's last name""" - vcard: Optional[str] = None + vcard: str | None = None """Additional data about the contact in the form of a `vCard `_, 0-2048 bytes""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -72,22 +73,23 @@ class SendContact(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, phone_number: str, first_name: str, - business_connection_id: Optional[str] = None, - message_thread_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"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + last_name: str | None = None, + vcard: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -100,11 +102,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 42d2bf57..7abecceb 100644 --- a/aiogram/methods/send_dice.py +++ b/aiogram/methods/send_dice.py @@ -1,17 +1,16 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -26,34 +25,36 @@ class SendDice(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendDice" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - emoji: Optional[str] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: str | None = 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 + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -66,19 +67,20 @@ class SendDice(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + chat_id: ChatIdUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -89,10 +91,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 411165d3..bd03df8b 100644 --- a/aiogram/methods/send_document.py +++ b/aiogram/methods/send_document.py @@ -1,19 +1,19 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, InputFile, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -28,44 +28,46 @@ class SendDocument(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendDocument" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - document: Union[InputFile, str] + document: InputFileUnion """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 » `""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - thumbnail: Optional[InputFile] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: InputFile | None = 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 + caption: str | None = None """Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - disable_content_type_detection: Optional[bool] = None + disable_content_type_detection: bool | None = None """Disables automatic server-side content type detection for files uploaded using multipart/form-data""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -78,24 +80,25 @@ class SendDocument(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - document: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + chat_id: ChatIdUnion, + document: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -107,6 +110,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,7 +118,9 @@ class SendDocument(TelegramMethod[Message]): disable_content_type_detection=disable_content_type_detection, 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_game.py b/aiogram/methods/send_game.py index eb963303..dfea029c 100644 --- a/aiogram/methods/send_game.py +++ b/aiogram/methods/send_game.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -20,31 +20,31 @@ 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 + business_connection_id: str | None = 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""" - disable_notification: Optional[bool] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + reply_parameters: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -59,15 +59,16 @@ class SendGame(TelegramMethod[Message]): *, chat_id: int, game_short_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -81,6 +82,7 @@ class SendGame(TelegramMethod[Message]): message_thread_id=message_thread_id, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, diff --git a/aiogram/methods/send_gift.py b/aiogram/methods/send_gift.py new file mode 100644 index 00000000..df272fa9 --- /dev/null +++ b/aiogram/methods/send_gift.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion +from ..types.message_entity import MessageEntity +from .base import TelegramMethod + + +class SendGift(TelegramMethod[bool]): + """ + Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#sendgift + """ + + __returning__ = bool + __api_method__ = "sendGift" + + gift_id: str + """Identifier of the gift; limited gifts can't be sent to channel chats""" + user_id: int | None = None + """Required if *chat_id* is not specified. Unique identifier of the target user who will receive the gift.""" + chat_id: ChatIdUnion | None = None + """Required if *user_id* is not specified. Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`) that will receive the gift.""" + pay_for_upgrade: bool | None = None + """Pass :code:`True` to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver""" + text: str | None = None + """Text that will be shown along with the gift; 0-128 characters""" + text_parse_mode: str | None = None + """Mode for parsing entities in the text. See `formatting options `_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.""" + text_entities: list[MessageEntity] | None = None + """A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'custom_emoji', and 'date_time' are ignored.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + gift_id: str, + user_id: int | None = None, + chat_id: ChatIdUnion | None = None, + pay_for_upgrade: bool | None = None, + text: str | None = None, + text_parse_mode: str | None = None, + text_entities: list[MessageEntity] | None = 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__( + gift_id=gift_id, + user_id=user_id, + chat_id=chat_id, + pay_for_upgrade=pay_for_upgrade, + text=text, + text_parse_mode=text_parse_mode, + text_entities=text_entities, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_invoice.py b/aiogram/methods/send_invoice.py index 108219ef..0c1d6bea 100644 --- a/aiogram/methods/send_invoice.py +++ b/aiogram/methods/send_invoice.py @@ -1,11 +1,18 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default -from ..types import InlineKeyboardMarkup, LabeledPrice, Message, ReplyParameters +from ..types import ( + ChatIdUnion, + InlineKeyboardMarkup, + LabeledPrice, + Message, + ReplyParameters, + SuggestedPostParameters, +) from .base import TelegramMethod @@ -19,70 +26,74 @@ class SendInvoice(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendInvoice" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" title: str """Product name, 1-32 characters""" description: str """Product description, 1-255 characters""" payload: str - """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.""" + """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.""" currency: str """Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.""" - prices: List[LabeledPrice] + prices: list[LabeledPrice] """Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - provider_token: Optional[str] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: str | None = None """Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.""" - max_tip_amount: Optional[int] = None + max_tip_amount: int | None = None """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 `_.""" - suggested_tip_amounts: Optional[List[int]] = None + suggested_tip_amounts: list[int] | None = None """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*.""" - start_parameter: Optional[str] = None + start_parameter: str | None = None """Unique deep-linking parameter. If left empty, **forwarded copies** of the sent message will have a *Pay* button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a *URL* button with a deep link to the bot (instead of a *Pay* button), with the value used as the start parameter""" - provider_data: Optional[str] = None + provider_data: str | None = None """JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.""" - photo_url: Optional[str] = None + photo_url: str | None = None """URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.""" - photo_size: Optional[int] = None + photo_size: int | None = None """Photo size in bytes""" - photo_width: Optional[int] = None + photo_width: int | None = None """Photo width""" - photo_height: Optional[int] = None + photo_height: int | None = None """Photo height""" - need_name: Optional[bool] = None + need_name: bool | None = None """Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_phone_number: Optional[bool] = None + need_phone_number: bool | None = None """Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_email: Optional[bool] = None + need_email: bool | None = None """Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_shipping_address: Optional[bool] = None + need_shipping_address: bool | None = None """Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.""" - send_phone_number_to_provider: Optional[bool] = None + send_phone_number_to_provider: bool | None = None """Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - send_email_to_provider: Optional[bool] = None + send_email_to_provider: bool | None = None """Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - is_flexible: Optional[bool] = None + is_flexible: bool | None = None """Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """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.""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -95,36 +106,39 @@ class SendInvoice(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, title: str, description: str, payload: str, currency: str, - prices: List[LabeledPrice], - message_thread_id: Optional[int] = None, - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + prices: list[LabeledPrice], + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + provider_token: str | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + start_parameter: str | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -139,6 +153,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, @@ -157,7 +172,9 @@ class SendInvoice(TelegramMethod[Message]): is_flexible=is_flexible, 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_location.py b/aiogram/methods/send_location.py index d33f6769..4a8ee223 100644 --- a/aiogram/methods/send_location.py +++ b/aiogram/methods/send_location.py @@ -1,17 +1,16 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -26,44 +25,46 @@ class SendLocation(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendLocation" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" latitude: float """Latitude of the location""" longitude: float """Longitude of the location""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - horizontal_accuracy: Optional[float] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: float | None = None """The radius of uncertainty for the location, measured in meters; 0-1500""" - live_period: Optional[int] = None + live_period: int | None = None """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.""" - heading: Optional[int] = None + heading: int | None = None """For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.""" - proximity_alert_radius: Optional[int] = None + proximity_alert_radius: int | None = None """For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -76,24 +77,25 @@ class SendLocation(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, latitude: float, longitude: float, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -106,13 +108,16 @@ 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, proximity_alert_radius=proximity_alert_radius, 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_media_group.py b/aiogram/methods/send_media_group.py index f8c081a3..d5d57749 100644 --- a/aiogram/methods/send_media_group.py +++ b/aiogram/methods/send_media_group.py @@ -1,59 +1,50 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputMediaAudio, - InputMediaDocument, - InputMediaPhoto, - InputMediaVideo, - Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) +from ..types import ChatIdUnion, MediaUnion, Message, ReplyParameters from .base import TelegramMethod -class SendMediaGroup(TelegramMethod[List[Message]]): +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 """ - __returning__ = List[Message] + __returning__ = list[Message] __api_method__ = "sendMediaGroup" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]] + media: list[MediaUnion] """A JSON-serialized array describing messages to be sent, must include 2-10 items""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - disable_notification: Optional[bool] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: bool | None = None """Sends messages `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent messages from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + reply_parameters: ReplyParameters | None = None """Description of the message to reply to""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the messages are a reply, ID of the original message .. deprecated:: API:7.0 @@ -66,18 +57,18 @@ class SendMediaGroup(TelegramMethod[List[Message]]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - media: List[ - Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo] - ], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + chat_id: ChatIdUnion, + media: list[MediaUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -89,8 +80,10 @@ 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, message_effect_id=message_effect_id, reply_parameters=reply_parameters, allow_sending_without_reply=allow_sending_without_reply, diff --git a/aiogram/methods/send_message.py b/aiogram/methods/send_message.py index caf28525..0997803e 100644 --- a/aiogram/methods/send_message.py +++ b/aiogram/methods/send_message.py @@ -1,19 +1,18 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, LinkPreviewOptions, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -28,47 +27,49 @@ class SendMessage(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendMessage" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" text: str """Text of the message to be sent, 1-4096 characters after entities parsing""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: str | Default | None = Default("parse_mode") """Mode for parsing entities in the message text. See `formatting options `_ for more details.""" - entities: Optional[List[MessageEntity]] = None + entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*""" - link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default("link_preview") + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview") """Link preview generation options for the message""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - disable_web_page_preview: Optional[Union[bool, Default]] = Field( + disable_web_page_preview: bool | Default | None = Field( Default("link_preview_is_disabled"), json_schema_extra={"deprecated": True} ) """Disables link previews for links in this message .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -81,27 +82,24 @@ class SendMessage(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, text: str, - business_connection_id: Optional[str] = None, - message_thread_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( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -113,12 +111,15 @@ 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, 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_message_draft.py b/aiogram/methods/send_message_draft.py new file mode 100644 index 00000000..b93c286c --- /dev/null +++ b/aiogram/methods/send_message_draft.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import MessageEntity +from .base import TelegramMethod + + +class SendMessageDraft(TelegramMethod[bool]): + """ + Use this method to stream a partial message to a user while the message is being generated. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#sendmessagedraft + """ + + __returning__ = bool + __api_method__ = "sendMessageDraft" + + chat_id: int + """Unique identifier for the target private chat""" + draft_id: int + """Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated""" + text: str + """Text of the message to be sent, 1-4096 characters after entities parsing""" + message_thread_id: int | None = None + """Unique identifier for the target message thread""" + parse_mode: str | None = None + """Mode for parsing entities in the message text. See `formatting options `_ for more details.""" + entities: list[MessageEntity] | None = None + """A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: int, + draft_id: int, + text: str, + message_thread_id: int | None = None, + parse_mode: str | None = None, + entities: list[MessageEntity] | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + chat_id=chat_id, + draft_id=draft_id, + text=text, + message_thread_id=message_thread_id, + parse_mode=parse_mode, + entities=entities, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/send_paid_media.py b/aiogram/methods/send_paid_media.py index 03b37a6e..3d9cfec6 100644 --- a/aiogram/methods/send_paid_media.py +++ b/aiogram/methods/send_paid_media.py @@ -1,24 +1,22 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputPaidMediaPhoto, - InputPaidMediaVideo, + ChatIdUnion, + InputPaidMediaUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod class SendPaidMedia(TelegramMethod[Message]): """ - Use this method to send paid media to channel chats. On success, the sent :class:`aiogram.types.message.Message` is returned. + Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned. Source: https://core.telegram.org/bots/api#sendpaidmedia """ @@ -26,29 +24,39 @@ class SendPaidMedia(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendPaidMedia" - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.""" star_count: int - """The number of Telegram Stars that must be paid to buy access to the media""" - media: List[Union[InputPaidMediaPhoto, InputPaidMediaVideo]] + """The number of Telegram Stars that must be paid to buy access to the media; 1-25000""" + media: list[InputPaidMediaUnion] """A JSON-serialized array describing the media to be sent; up to 10 items""" - caption: Optional[str] = None + business_connection_id: str | None = None + """Unique identifier of the business connection on behalf of which the message will be sent""" + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: str | None = None + """Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.""" + caption: str | None = None """Media caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = None + parse_mode: str | None = None """Mode for parsing entities in the media caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[bool] = None + show_caption_above_media: bool | None = None """Pass :code:`True`, if the caption must be shown above the message media""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: bool | None = None """Protects the contents of the sent message from forwarding and saving""" - reply_parameters: Optional[ReplyParameters] = None + allow_paid_broadcast: bool | None = 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: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" if TYPE_CHECKING: @@ -58,19 +66,23 @@ class SendPaidMedia(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, star_count: int, - media: List[Union[InputPaidMediaPhoto, InputPaidMediaVideo]], - caption: Optional[str] = None, - parse_mode: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, + media: list[InputPaidMediaUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + payload: str | None = None, + caption: str | None = None, + parse_mode: str | None = None, + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | None = None, + allow_paid_broadcast: bool | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -81,12 +93,18 @@ class SendPaidMedia(TelegramMethod[Message]): chat_id=chat_id, 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, caption_entities=caption_entities, show_caption_above_media=show_caption_above_media, 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 3ba7da12..83480f6a 100644 --- a/aiogram/methods/send_photo.py +++ b/aiogram/methods/send_photo.py @@ -1,19 +1,18 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputFile, + ChatIdUnion, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -28,44 +27,46 @@ class SendPhoto(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendPhoto" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - photo: Union[InputFile, str] + photo: InputFileUnion """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 » `""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - caption: Optional[str] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: str | None = 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") + parse_mode: str | Default | None = Default("parse_mode") """Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """Pass :code:`True`, if the caption must be shown above the message media""" - has_spoiler: Optional[bool] = None + has_spoiler: bool | None = None """Pass :code:`True` if the photo needs to be covered with a spoiler animation""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -78,26 +79,25 @@ class SendPhoto(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - photo: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + chat_id: ChatIdUnion, + photo: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -109,6 +109,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, @@ -116,7 +117,9 @@ class SendPhoto(TelegramMethod[Message]): has_spoiler=has_spoiler, 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_poll.py b/aiogram/methods/send_poll.py index e791b70f..b089b181 100644 --- a/aiogram/methods/send_poll.py +++ b/aiogram/methods/send_poll.py @@ -1,19 +1,17 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputPollOption, + ChatIdUnion, + DateTimeUnion, + InputPollOptionUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, ) from .base import TelegramMethod @@ -29,60 +27,77 @@ class SendPoll(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendPoll" - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + chat_id: ChatIdUnion + """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[Union[InputPollOption, str]] - """A JSON-serialized list of 2-10 answer options""" - business_connection_id: Optional[str] = None + options: list[InputPollOptionUnion] + """A JSON-serialized list of 2-12 answer options""" + business_connection_id: str | None = 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""" - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + question_parse_mode: str | Default | None = Default("parse_mode") """Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed""" - question_entities: Optional[List[MessageEntity]] = None + question_entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*""" - is_anonymous: Optional[bool] = None + is_anonymous: bool | None = None """:code:`True`, if the poll needs to be anonymous, defaults to :code:`True`""" - type: Optional[str] = None + type: str | None = None """Poll type, 'quiz' or 'regular', defaults to 'regular'""" - allows_multiple_answers: Optional[bool] = None - """:code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False`""" - correct_option_id: Optional[int] = None - """0-based identifier of the correct answer option, required for polls in quiz mode""" - explanation: Optional[str] = None + allows_multiple_answers: bool | None = None + """Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False`""" + allows_revoting: bool | None = None + """Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls""" + shuffle_options: bool | None = None + """Pass :code:`True`, if the poll options must be shown in random order""" + allow_adding_options: bool | None = None + """Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes""" + hide_results_until_closes: bool | None = None + """Pass :code:`True`, if poll results must be shown only after the poll closes""" + correct_option_ids: list[int] | None = None + """A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode""" + explanation: str | None = None """Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing""" - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + explanation_parse_mode: str | Default | None = Default("parse_mode") """Mode for parsing entities in the explanation. See `formatting options `_ for more details.""" - explanation_entities: Optional[List[MessageEntity]] = None + explanation_entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode*""" - open_period: Optional[int] = None - """Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*.""" - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None - """Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*.""" - is_closed: Optional[bool] = None + open_period: int | None = None + """Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*.""" + close_date: DateTimeUnion | None = None + """Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*.""" + is_closed: bool | None = None """Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview.""" - disable_notification: Optional[bool] = None + description: str | None = None + """Description of the poll to be sent, 0-1024 characters after entities parsing""" + description_parse_mode: str | Default | None = Default("parse_mode") + """Mode for parsing entities in the poll description. See `formatting options `_ for more details.""" + description_entities: list[MessageEntity] | None = None + """A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode*""" + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + reply_parameters: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + correct_option_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """0-based identifier of the correct answer option, required for polls in quiz mode + +.. deprecated:: API:9.6 + https://core.telegram.org/bots/api-changelog#april-3-2026""" + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -95,32 +110,39 @@ class SendPoll(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, question: str, - options: List[Union[InputPollOption, str]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + options: list[InputPollOptionUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + question_parse_mode: str | Default | None = Default("parse_mode"), + question_entities: list[MessageEntity] | None = None, + is_anonymous: bool | None = None, + type: str | None = None, + allows_multiple_answers: bool | None = None, + allows_revoting: bool | None = None, + shuffle_options: bool | None = None, + allow_adding_options: bool | None = None, + hide_results_until_closes: bool | None = None, + correct_option_ids: list[int] | None = None, + explanation: str | None = None, + explanation_parse_mode: str | Default | None = Default("parse_mode"), + explanation_entities: list[MessageEntity] | None = None, + open_period: int | None = None, + close_date: DateTimeUnion | None = None, + is_closed: bool | None = None, + description: str | None = None, + description_parse_mode: str | Default | None = Default("parse_mode"), + description_entities: list[MessageEntity] | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + correct_option_id: int | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -138,19 +160,28 @@ class SendPoll(TelegramMethod[Message]): is_anonymous=is_anonymous, type=type, allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, + allows_revoting=allows_revoting, + shuffle_options=shuffle_options, + allow_adding_options=allow_adding_options, + hide_results_until_closes=hide_results_until_closes, + correct_option_ids=correct_option_ids, explanation=explanation, explanation_parse_mode=explanation_parse_mode, explanation_entities=explanation_entities, open_period=open_period, close_date=close_date, is_closed=is_closed, + description=description, + description_parse_mode=description_parse_mode, + description_entities=description_entities, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, + correct_option_id=correct_option_id, reply_to_message_id=reply_to_message_id, **__pydantic_kwargs, ) diff --git a/aiogram/methods/send_sticker.py b/aiogram/methods/send_sticker.py index 236792bf..683b3970 100644 --- a/aiogram/methods/send_sticker.py +++ b/aiogram/methods/send_sticker.py @@ -1,18 +1,17 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputFile, + ChatIdUnion, + InputFileUnion, Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -27,36 +26,38 @@ class SendSticker(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendSticker" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - sticker: Union[InputFile, str] + sticker: InputFileUnion """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.""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - emoji: Optional[str] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: str | None = None """Emoji associated with the sticker; only for just uploaded stickers""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -69,20 +70,21 @@ class SendSticker(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - sticker: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + chat_id: ChatIdUnion, + sticker: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -94,10 +96,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 04ebcee7..677516f9 100644 --- a/aiogram/methods/send_venue.py +++ b/aiogram/methods/send_venue.py @@ -1,17 +1,16 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -26,7 +25,7 @@ class SendVenue(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendVenue" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" latitude: float """Latitude of the venue""" @@ -36,38 +35,40 @@ class SendVenue(TelegramMethod[Message]): """Name of the venue""" address: str """Address of the venue""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - foursquare_id: Optional[str] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: str | None = None """Foursquare identifier of the venue""" - foursquare_type: Optional[str] = None + foursquare_type: str | None = None """Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)""" - google_place_id: Optional[str] = None + google_place_id: str | None = None """Google Places identifier of the venue""" - google_place_type: Optional[str] = None + google_place_type: str | None = None """Google Places type of the venue. (See `supported types `_.)""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -80,26 +81,27 @@ class SendVenue(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, latitude: float, longitude: float, title: str, address: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -114,13 +116,16 @@ 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, google_place_type=google_place_type, 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_video.py b/aiogram/methods/send_video.py index 33fb7aa3..c8112e21 100644 --- a/aiogram/methods/send_video.py +++ b/aiogram/methods/send_video.py @@ -1,19 +1,20 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, + DateTimeUnion, InputFile, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -28,54 +29,60 @@ class SendVideo(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendVideo" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - video: Union[InputFile, str] + video: InputFileUnion """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 » `""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - duration: Optional[int] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: int | None = None """Duration of sent video in seconds""" - width: Optional[int] = None + width: int | None = None """Video width""" - height: Optional[int] = None + height: int | None = None """Video height""" - thumbnail: Optional[InputFile] = None + thumbnail: InputFile | None = 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 + cover: InputFileUnion | None = None + """Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" + start_timestamp: DateTimeUnion | None = None + """Start timestamp for the video in the message""" + caption: str | None = None """Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """Pass :code:`True`, if the caption must be shown above the message media""" - has_spoiler: Optional[bool] = None + has_spoiler: bool | None = None """Pass :code:`True` if the video needs to be covered with a spoiler animation""" - supports_streaming: Optional[bool] = None + supports_streaming: bool | None = None """Pass :code:`True` if the uploaded video is suitable for streaming""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -88,31 +95,32 @@ class SendVideo(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - video: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + chat_id: ChatIdUnion, + video: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + cover: InputFileUnion | None = None, + start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + supports_streaming: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -124,10 +132,13 @@ 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, thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -136,7 +147,9 @@ class SendVideo(TelegramMethod[Message]): supports_streaming=supports_streaming, 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_video_note.py b/aiogram/methods/send_video_note.py index 43d685b4..2f5195e7 100644 --- a/aiogram/methods/send_video_note.py +++ b/aiogram/methods/send_video_note.py @@ -1,18 +1,18 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, + ChatIdUnion, InputFile, + InputFileUnion, Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -27,40 +27,42 @@ class SendVideoNote(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendVideoNote" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - video_note: Union[InputFile, str] + video_note: InputFileUnion """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""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - duration: Optional[int] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: int | None = None """Duration of sent video in seconds""" - length: Optional[int] = None + length: int | None = None """Video width and height, i.e. diameter of the video message""" - thumbnail: Optional[InputFile] = None + thumbnail: InputFile | None = 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 » `""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -73,22 +75,23 @@ class SendVideoNote(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - video_note: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + chat_id: ChatIdUnion, + video_note: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + length: int | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -100,12 +103,15 @@ 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, 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_voice.py b/aiogram/methods/send_voice.py index ccb27d3b..c1ddd298 100644 --- a/aiogram/methods/send_voice.py +++ b/aiogram/methods/send_voice.py @@ -1,19 +1,18 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field from ..client.default import Default from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputFile, + ChatIdUnion, + InputFileUnion, Message, MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, + ReplyMarkupUnion, ReplyParameters, + SuggestedPostParameters, ) from .base import TelegramMethod @@ -28,42 +27,44 @@ class SendVoice(TelegramMethod[Message]): __returning__ = Message __api_method__ = "sendVoice" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - voice: Union[InputFile, str] + voice: InputFileUnion """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 » `""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = 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""" - caption: Optional[str] = None + message_thread_id: int | None = None + """Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only""" + direct_messages_topic_id: int | None = 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: str | None = None """Voice message caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - duration: Optional[int] = None + duration: int | None = None """Duration of the voice message in seconds""" - disable_notification: Optional[bool] = None + disable_notification: bool | None = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") + protect_content: bool | Default | None = Default("protect_content") """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None + allow_paid_broadcast: bool | None = None + """Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance""" + message_effect_id: str | None = None """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None + suggested_post_parameters: SuggestedPostParameters | None = 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: ReplyParameters | None = None """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None + reply_markup: ReplyMarkupUnion | None = None """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""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) + allow_sending_without_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + reply_to_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """If the message is a reply, ID of the original message .. deprecated:: API:7.0 @@ -76,23 +77,24 @@ class SendVoice(TelegramMethod[Message]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - voice: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + chat_id: ChatIdUnion, + voice: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -104,13 +106,16 @@ 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, duration=duration, 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/set_business_account_bio.py b/aiogram/methods/set_business_account_bio.py new file mode 100644 index 00000000..51de976a --- /dev/null +++ b/aiogram/methods/set_business_account_bio.py @@ -0,0 +1,40 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class SetBusinessAccountBio(TelegramMethod[bool]): + """ + Changes the bio of a managed business account. Requires the *can_change_bio* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setbusinessaccountbio + """ + + __returning__ = bool + __api_method__ = "setBusinessAccountBio" + + business_connection_id: str + """Unique identifier of the business connection""" + bio: str | None = None + """The new value of the bio for the business account; 0-140 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + bio: str | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, bio=bio, **__pydantic_kwargs + ) diff --git a/aiogram/methods/set_business_account_gift_settings.py b/aiogram/methods/set_business_account_gift_settings.py new file mode 100644 index 00000000..89f51361 --- /dev/null +++ b/aiogram/methods/set_business_account_gift_settings.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import AcceptedGiftTypes +from .base import TelegramMethod + + +class SetBusinessAccountGiftSettings(TelegramMethod[bool]): + """ + Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the *can_change_gift_settings* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setbusinessaccountgiftsettings + """ + + __returning__ = bool + __api_method__ = "setBusinessAccountGiftSettings" + + business_connection_id: str + """Unique identifier of the business connection""" + show_gift_button: bool + """Pass :code:`True`, if a button for sending a gift to the user or by the business account must always be shown in the input field""" + accepted_gift_types: AcceptedGiftTypes + """Types of gifts accepted by the business account""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + show_gift_button: bool, + accepted_gift_types: AcceptedGiftTypes, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + show_gift_button=show_gift_button, + accepted_gift_types=accepted_gift_types, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_business_account_name.py b/aiogram/methods/set_business_account_name.py new file mode 100644 index 00000000..50132db3 --- /dev/null +++ b/aiogram/methods/set_business_account_name.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class SetBusinessAccountName(TelegramMethod[bool]): + """ + Changes the first and last name of a managed business account. Requires the *can_change_name* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setbusinessaccountname + """ + + __returning__ = bool + __api_method__ = "setBusinessAccountName" + + business_connection_id: str + """Unique identifier of the business connection""" + first_name: str + """The new value of the first name for the business account; 1-64 characters""" + last_name: str | None = None + """The new value of the last name for the business account; 0-64 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + first_name: str, + last_name: str | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + first_name=first_name, + last_name=last_name, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_business_account_profile_photo.py b/aiogram/methods/set_business_account_profile_photo.py new file mode 100644 index 00000000..529d80a8 --- /dev/null +++ b/aiogram/methods/set_business_account_profile_photo.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import InputProfilePhotoUnion +from .base import TelegramMethod + + +class SetBusinessAccountProfilePhoto(TelegramMethod[bool]): + """ + Changes the profile photo of a managed business account. Requires the *can_edit_profile_photo* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setbusinessaccountprofilephoto + """ + + __returning__ = bool + __api_method__ = "setBusinessAccountProfilePhoto" + + business_connection_id: str + """Unique identifier of the business connection""" + photo: InputProfilePhotoUnion + """The new profile photo to set""" + is_public: bool | None = None + """Pass :code:`True` to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + photo: InputProfilePhotoUnion, + is_public: bool | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + photo=photo, + is_public=is_public, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_business_account_username.py b/aiogram/methods/set_business_account_username.py new file mode 100644 index 00000000..a67c9d91 --- /dev/null +++ b/aiogram/methods/set_business_account_username.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class SetBusinessAccountUsername(TelegramMethod[bool]): + """ + Changes the username of a managed business account. Requires the *can_change_username* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setbusinessaccountusername + """ + + __returning__ = bool + __api_method__ = "setBusinessAccountUsername" + + business_connection_id: str + """Unique identifier of the business connection""" + username: str | None = None + """The new value of the username for the business account; 0-32 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + username: str | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + username=username, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_chat_administrator_custom_title.py b/aiogram/methods/set_chat_administrator_custom_title.py index a7953c12..d18a41d9 100644 --- a/aiogram/methods/set_chat_administrator_custom_title.py +++ b/aiogram/methods/set_chat_administrator_custom_title.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class SetChatAdministratorCustomTitle(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setChatAdministratorCustomTitle" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" user_id: int """Unique identifier of the target user""" @@ -29,7 +30,7 @@ class SetChatAdministratorCustomTitle(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, custom_title: str, **__pydantic_kwargs: Any, diff --git a/aiogram/methods/set_chat_description.py b/aiogram/methods/set_chat_description.py index 0f8a4a4b..f877e653 100644 --- a/aiogram/methods/set_chat_description.py +++ b/aiogram/methods/set_chat_description.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,9 +16,9 @@ class SetChatDescription(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setChatDescription" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - description: Optional[str] = None + description: str | None = None """New chat description, 0-255 characters""" if TYPE_CHECKING: @@ -27,8 +28,8 @@ class SetChatDescription(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - description: Optional[str] = None, + chat_id: ChatIdUnion, + description: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_chat_member_tag.py b/aiogram/methods/set_chat_member_tag.py new file mode 100644 index 00000000..de8a2d09 --- /dev/null +++ b/aiogram/methods/set_chat_member_tag.py @@ -0,0 +1,40 @@ +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion +from .base import TelegramMethod + + +class SetChatMemberTag(TelegramMethod[bool]): + """ + Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the *can_manage_tags* administrator right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setchatmembertag + """ + + __returning__ = bool + __api_method__ = "setChatMemberTag" + + chat_id: ChatIdUnion + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + user_id: int + """Unique identifier of the target user""" + tag: str | None = None + """New tag for the member; 0-16 characters, emoji are not allowed""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + user_id: int, + tag: str | None = 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, user_id=user_id, tag=tag, **__pydantic_kwargs) diff --git a/aiogram/methods/set_chat_menu_button.py b/aiogram/methods/set_chat_menu_button.py index 97515d5a..ced4e56f 100644 --- a/aiogram/methods/set_chat_menu_button.py +++ b/aiogram/methods/set_chat_menu_button.py @@ -1,8 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp +from ..types import MenuButtonUnion from .base import TelegramMethod @@ -16,9 +16,9 @@ class SetChatMenuButton(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setChatMenuButton" - chat_id: Optional[int] = None + chat_id: int | None = None """Unique identifier for the target private chat. If not specified, default bot's menu button will be changed""" - menu_button: Optional[Union[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault]] = None + menu_button: MenuButtonUnion | None = None """A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`""" if TYPE_CHECKING: @@ -28,10 +28,8 @@ class SetChatMenuButton(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Optional[int] = None, - menu_button: Optional[ - Union[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault] - ] = None, + chat_id: int | None = None, + menu_button: MenuButtonUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_chat_permissions.py b/aiogram/methods/set_chat_permissions.py index 232af08c..fdc58352 100644 --- a/aiogram/methods/set_chat_permissions.py +++ b/aiogram/methods/set_chat_permissions.py @@ -1,8 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ChatPermissions +from ..types import ChatIdUnion, ChatPermissions from .base import TelegramMethod @@ -16,11 +16,11 @@ class SetChatPermissions(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setChatPermissions" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" permissions: ChatPermissions """A JSON-serialized object for new default chat permissions""" - use_independent_chat_permissions: Optional[bool] = None + use_independent_chat_permissions: bool | None = None """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" if TYPE_CHECKING: @@ -30,9 +30,9 @@ class SetChatPermissions(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, + use_independent_chat_permissions: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_chat_photo.py b/aiogram/methods/set_chat_photo.py index 105f8f87..7d6a4b79 100644 --- a/aiogram/methods/set_chat_photo.py +++ b/aiogram/methods/set_chat_photo.py @@ -1,8 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any -from ..types import InputFile +from ..types import ChatIdUnion, InputFile from .base import TelegramMethod @@ -16,7 +16,7 @@ class SetChatPhoto(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setChatPhoto" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" photo: InputFile """New chat photo, uploaded using multipart/form-data""" @@ -26,11 +26,7 @@ class SetChatPhoto(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - photo: InputFile, - **__pydantic_kwargs: Any, + __pydantic__self__, *, chat_id: ChatIdUnion, photo: InputFile, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/set_chat_sticker_set.py b/aiogram/methods/set_chat_sticker_set.py index 62ed5d18..d453ddc5 100644 --- a/aiogram/methods/set_chat_sticker_set.py +++ b/aiogram/methods/set_chat_sticker_set.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class SetChatStickerSet(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setChatStickerSet" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" sticker_set_name: str """Name of the sticker set to be set as the group sticker set""" @@ -27,7 +28,7 @@ class SetChatStickerSet(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, sticker_set_name: str, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/methods/set_chat_title.py b/aiogram/methods/set_chat_title.py index 04b52e09..5cf29ea9 100644 --- a/aiogram/methods/set_chat_title.py +++ b/aiogram/methods/set_chat_title.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class SetChatTitle(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setChatTitle" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" title: str """New chat title, 1-128 characters""" @@ -25,7 +26,7 @@ class SetChatTitle(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], title: str, **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, title: str, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py b/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py index 47e9c033..0259052d 100644 --- a/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py +++ b/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramMethod @@ -17,7 +17,7 @@ class SetCustomEmojiStickerSetThumbnail(TelegramMethod[bool]): name: str """Sticker set name""" - custom_emoji_id: Optional[str] = None + custom_emoji_id: str | None = None """Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.""" if TYPE_CHECKING: @@ -28,7 +28,7 @@ class SetCustomEmojiStickerSetThumbnail(TelegramMethod[bool]): __pydantic__self__, *, name: str, - custom_emoji_id: Optional[str] = None, + custom_emoji_id: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_game_score.py b/aiogram/methods/set_game_score.py index 38e5374f..86ba9d52 100644 --- a/aiogram/methods/set_game_score.py +++ b/aiogram/methods/set_game_score.py @@ -1,34 +1,34 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from ..types import Message from .base import TelegramMethod -class SetGameScore(TelegramMethod[Union[Message, bool]]): +class SetGameScore(TelegramMethod[Message | bool]): """ Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Returns an error, if the new score is not greater than the user's current score in the chat and *force* is :code:`False`. Source: https://core.telegram.org/bots/api#setgamescore """ - __returning__ = Union[Message, bool] + __returning__ = Message | bool __api_method__ = "setGameScore" user_id: int """User identifier""" score: int """New score, must be non-negative""" - force: Optional[bool] = None + force: bool | None = None """Pass :code:`True` if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters""" - disable_edit_message: Optional[bool] = None + disable_edit_message: bool | None = None """Pass :code:`True` if the game message should not be automatically edited to include the current scoreboard""" - chat_id: Optional[int] = None + chat_id: int | None = None """Required if *inline_message_id* is not specified. Unique identifier for the target chat""" - message_id: Optional[int] = None + message_id: int | None = None """Required if *inline_message_id* is not specified. Identifier of the sent message""" - inline_message_id: Optional[str] = None + inline_message_id: str | None = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" if TYPE_CHECKING: @@ -40,11 +40,11 @@ class SetGameScore(TelegramMethod[Union[Message, bool]]): *, user_id: int, score: int, - force: Optional[bool] = None, - disable_edit_message: Optional[bool] = None, - chat_id: Optional[int] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, + force: bool | None = None, + disable_edit_message: bool | None = None, + chat_id: int | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_message_reaction.py b/aiogram/methods/set_message_reaction.py index 3ac7cbb0..f8a3c47e 100644 --- a/aiogram/methods/set_message_reaction.py +++ b/aiogram/methods/set_message_reaction.py @@ -1,12 +1,12 @@ -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ReactionTypeCustomEmoji, ReactionTypeEmoji +from ..types import ChatIdUnion, ReactionTypeUnion from .base import TelegramMethod class SetMessageReaction(TelegramMethod[bool]): """ - Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns :code:`True` on success. + Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#setmessagereaction """ @@ -14,13 +14,13 @@ class SetMessageReaction(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setMessageReaction" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" message_id: int """Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.""" - reaction: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = None - """A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.""" - is_big: Optional[bool] = None + reaction: list[ReactionTypeUnion] | None = None + """A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.""" + is_big: bool | None = None """Pass :code:`True` to set the reaction with a big animation""" if TYPE_CHECKING: @@ -30,10 +30,10 @@ class SetMessageReaction(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_id: int, - reaction: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = None, - is_big: Optional[bool] = None, + reaction: list[ReactionTypeUnion] | None = None, + is_big: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_my_commands.py b/aiogram/methods/set_my_commands.py index 2e52771f..8f687e3f 100644 --- a/aiogram/methods/set_my_commands.py +++ b/aiogram/methods/set_my_commands.py @@ -1,17 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import ( - BotCommand, - BotCommandScopeAllChatAdministrators, - BotCommandScopeAllGroupChats, - BotCommandScopeAllPrivateChats, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - BotCommandScopeDefault, -) +from ..types import BotCommand, BotCommandScopeUnion from .base import TelegramMethod @@ -25,21 +16,11 @@ class SetMyCommands(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setMyCommands" - commands: List[BotCommand] + commands: list[BotCommand] """A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.""" - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None + scope: BotCommandScopeUnion | None = None """A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" - language_code: Optional[str] = None + language_code: str | None = None """A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands""" if TYPE_CHECKING: @@ -49,19 +30,9 @@ class SetMyCommands(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - commands: List[BotCommand], - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, + commands: list[BotCommand], + scope: BotCommandScopeUnion | None = None, + language_code: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_my_default_administrator_rights.py b/aiogram/methods/set_my_default_administrator_rights.py index 02aa7ada..e2f46633 100644 --- a/aiogram/methods/set_my_default_administrator_rights.py +++ b/aiogram/methods/set_my_default_administrator_rights.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from ..types import ChatAdministratorRights from .base import TelegramMethod @@ -16,9 +16,9 @@ class SetMyDefaultAdministratorRights(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setMyDefaultAdministratorRights" - rights: Optional[ChatAdministratorRights] = None + rights: ChatAdministratorRights | None = None """A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.""" - for_channels: Optional[bool] = None + for_channels: bool | None = None """Pass :code:`True` to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.""" if TYPE_CHECKING: @@ -28,8 +28,8 @@ class SetMyDefaultAdministratorRights(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - rights: Optional[ChatAdministratorRights] = None, - for_channels: Optional[bool] = None, + rights: ChatAdministratorRights | None = None, + for_channels: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_my_description.py b/aiogram/methods/set_my_description.py index ee192c88..457f8711 100644 --- a/aiogram/methods/set_my_description.py +++ b/aiogram/methods/set_my_description.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramMethod @@ -15,9 +15,9 @@ class SetMyDescription(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setMyDescription" - description: Optional[str] = None + description: str | None = None """New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.""" - language_code: Optional[str] = None + language_code: str | None = None """A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.""" if TYPE_CHECKING: @@ -27,8 +27,8 @@ class SetMyDescription(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - description: Optional[str] = None, - language_code: Optional[str] = None, + description: str | None = None, + language_code: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_my_name.py b/aiogram/methods/set_my_name.py index 3633fdc8..86bcdbab 100644 --- a/aiogram/methods/set_my_name.py +++ b/aiogram/methods/set_my_name.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramMethod @@ -13,9 +13,9 @@ class SetMyName(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setMyName" - name: Optional[str] = None + name: str | None = None """New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.""" - language_code: Optional[str] = None + language_code: str | None = None """A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose language there is no dedicated name.""" if TYPE_CHECKING: @@ -25,8 +25,8 @@ class SetMyName(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - name: Optional[str] = None, - language_code: Optional[str] = None, + name: str | None = None, + language_code: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_my_profile_photo.py b/aiogram/methods/set_my_profile_photo.py new file mode 100644 index 00000000..4f72ec61 --- /dev/null +++ b/aiogram/methods/set_my_profile_photo.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import InputProfilePhotoUnion +from .base import TelegramMethod + + +class SetMyProfilePhoto(TelegramMethod[bool]): + """ + Changes the profile photo of the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setmyprofilephoto + """ + + __returning__ = bool + __api_method__ = "setMyProfilePhoto" + + photo: InputProfilePhotoUnion + """The new profile photo to set""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, photo: InputProfilePhotoUnion, **__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__(photo=photo, **__pydantic_kwargs) diff --git a/aiogram/methods/set_my_short_description.py b/aiogram/methods/set_my_short_description.py index 22fa5817..0b0006cc 100644 --- a/aiogram/methods/set_my_short_description.py +++ b/aiogram/methods/set_my_short_description.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramMethod @@ -15,9 +15,9 @@ class SetMyShortDescription(TelegramMethod[bool]): __returning__ = bool __api_method__ = "setMyShortDescription" - short_description: Optional[str] = None + short_description: str | None = None """New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.""" - language_code: Optional[str] = None + language_code: str | None = None """A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.""" if TYPE_CHECKING: @@ -27,8 +27,8 @@ class SetMyShortDescription(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - short_description: Optional[str] = None, - language_code: Optional[str] = None, + short_description: str | None = None, + language_code: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_passport_data_errors.py b/aiogram/methods/set_passport_data_errors.py index 0ad7e8bb..73f2b92d 100644 --- a/aiogram/methods/set_passport_data_errors.py +++ b/aiogram/methods/set_passport_data_errors.py @@ -1,18 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Union +from typing import TYPE_CHECKING, Any -from ..types import ( - PassportElementErrorDataField, - PassportElementErrorFile, - PassportElementErrorFiles, - PassportElementErrorFrontSide, - PassportElementErrorReverseSide, - PassportElementErrorSelfie, - PassportElementErrorTranslationFile, - PassportElementErrorTranslationFiles, - PassportElementErrorUnspecified, -) +from ..types import PassportElementErrorUnion from .base import TelegramMethod @@ -29,19 +19,7 @@ class SetPassportDataErrors(TelegramMethod[bool]): user_id: int """User identifier""" - errors: List[ - Union[ - PassportElementErrorDataField, - PassportElementErrorFrontSide, - PassportElementErrorReverseSide, - PassportElementErrorSelfie, - PassportElementErrorFile, - PassportElementErrorFiles, - PassportElementErrorTranslationFile, - PassportElementErrorTranslationFiles, - PassportElementErrorUnspecified, - ] - ] + errors: list[PassportElementErrorUnion] """A JSON-serialized array describing the errors""" if TYPE_CHECKING: @@ -52,19 +30,7 @@ class SetPassportDataErrors(TelegramMethod[bool]): __pydantic__self__, *, user_id: int, - errors: List[ - Union[ - PassportElementErrorDataField, - PassportElementErrorFrontSide, - PassportElementErrorReverseSide, - PassportElementErrorSelfie, - PassportElementErrorFile, - PassportElementErrorFiles, - PassportElementErrorTranslationFile, - PassportElementErrorTranslationFiles, - PassportElementErrorUnspecified, - ] - ], + errors: list[PassportElementErrorUnion], **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_sticker_emoji_list.py b/aiogram/methods/set_sticker_emoji_list.py index ac268c1e..64313cd3 100644 --- a/aiogram/methods/set_sticker_emoji_list.py +++ b/aiogram/methods/set_sticker_emoji_list.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from .base import TelegramMethod @@ -17,7 +17,7 @@ class SetStickerEmojiList(TelegramMethod[bool]): sticker: str """File identifier of the sticker""" - emoji_list: List[str] + emoji_list: list[str] """A JSON-serialized list of 1-20 emoji associated with the sticker""" if TYPE_CHECKING: @@ -25,7 +25,7 @@ class SetStickerEmojiList(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, sticker: str, emoji_list: List[str], **__pydantic_kwargs: Any + __pydantic__self__, *, sticker: str, emoji_list: list[str], **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/set_sticker_keywords.py b/aiogram/methods/set_sticker_keywords.py index 49e68f85..38516cd1 100644 --- a/aiogram/methods/set_sticker_keywords.py +++ b/aiogram/methods/set_sticker_keywords.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramMethod @@ -17,7 +17,7 @@ class SetStickerKeywords(TelegramMethod[bool]): sticker: str """File identifier of the sticker""" - keywords: Optional[List[str]] = None + keywords: list[str] | None = None """A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters""" if TYPE_CHECKING: @@ -28,7 +28,7 @@ class SetStickerKeywords(TelegramMethod[bool]): __pydantic__self__, *, sticker: str, - keywords: Optional[List[str]] = None, + keywords: list[str] | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_sticker_mask_position.py b/aiogram/methods/set_sticker_mask_position.py index 617e48b5..5ad0b4a7 100644 --- a/aiogram/methods/set_sticker_mask_position.py +++ b/aiogram/methods/set_sticker_mask_position.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from ..types import MaskPosition from .base import TelegramMethod @@ -18,7 +18,7 @@ class SetStickerMaskPosition(TelegramMethod[bool]): sticker: str """File identifier of the sticker""" - mask_position: Optional[MaskPosition] = None + mask_position: MaskPosition | None = None """A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.""" if TYPE_CHECKING: @@ -29,7 +29,7 @@ class SetStickerMaskPosition(TelegramMethod[bool]): __pydantic__self__, *, sticker: str, - mask_position: Optional[MaskPosition] = None, + mask_position: MaskPosition | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_sticker_set_thumbnail.py b/aiogram/methods/set_sticker_set_thumbnail.py index 38492f37..40160baa 100644 --- a/aiogram/methods/set_sticker_set_thumbnail.py +++ b/aiogram/methods/set_sticker_set_thumbnail.py @@ -1,8 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InputFile +from ..types import InputFileUnion from .base import TelegramMethod @@ -21,9 +21,9 @@ class SetStickerSetThumbnail(TelegramMethod[bool]): user_id: int """User identifier of the sticker set owner""" format: str - """Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **WEBM** video""" - thumbnail: Optional[Union[InputFile, str]] = None - """A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, 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 » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.""" + """Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **.WEBM** video""" + thumbnail: InputFileUnion | None = None + """A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animation-requirements `_`https://core.telegram.org/stickers#animation-requirements `_ for animated sticker technical requirements), or a **.WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-requirements `_`https://core.telegram.org/stickers#video-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, 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 » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -35,7 +35,7 @@ class SetStickerSetThumbnail(TelegramMethod[bool]): name: str, user_id: int, format: str, - thumbnail: Optional[Union[InputFile, str]] = None, + thumbnail: InputFileUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/set_user_emoji_status.py b/aiogram/methods/set_user_emoji_status.py new file mode 100644 index 00000000..025b707b --- /dev/null +++ b/aiogram/methods/set_user_emoji_status.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import DateTimeUnion +from .base import TelegramMethod + + +class SetUserEmojiStatus(TelegramMethod[bool]): + """ + Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method `requestEmojiStatusAccess `_. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setuseremojistatus + """ + + __returning__ = bool + __api_method__ = "setUserEmojiStatus" + + user_id: int + """Unique identifier of the target user""" + emoji_status_custom_emoji_id: str | None = None + """Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.""" + emoji_status_expiration_date: DateTimeUnion | None = None + """Expiration date of the emoji status, if any""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + emoji_status_custom_emoji_id: str | None = None, + emoji_status_expiration_date: DateTimeUnion | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + user_id=user_id, + emoji_status_custom_emoji_id=emoji_status_custom_emoji_id, + emoji_status_expiration_date=emoji_status_expiration_date, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/set_webhook.py b/aiogram/methods/set_webhook.py index 998e51b0..566103a3 100644 --- a/aiogram/methods/set_webhook.py +++ b/aiogram/methods/set_webhook.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from ..types import InputFile from .base import TelegramMethod @@ -8,7 +8,7 @@ from .base import TelegramMethod class SetWebhook(TelegramMethod[bool]): """ - Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success. + Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request (a request with response `HTTP status code `_ different from :code:`2XY`), we will repeat the request and give up after a reasonable amount of attempts. Returns :code:`True` on success. If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content. **Notes** @@ -28,17 +28,17 @@ class SetWebhook(TelegramMethod[bool]): url: str """HTTPS URL to send updates to. Use an empty string to remove webhook integration""" - certificate: Optional[InputFile] = None + certificate: InputFile | None = None """Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details.""" - ip_address: Optional[str] = None + ip_address: str | None = None """The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS""" - max_connections: Optional[int] = None + max_connections: int | None = None """The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.""" - allowed_updates: Optional[List[str]] = None + allowed_updates: list[str] | None = None """A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used.""" - drop_pending_updates: Optional[bool] = None + drop_pending_updates: bool | None = None """Pass :code:`True` to drop all pending updates""" - secret_token: Optional[str] = None + secret_token: str | None = None """A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. The header is useful to ensure that the request comes from a webhook set by you.""" if TYPE_CHECKING: @@ -49,12 +49,12 @@ class SetWebhook(TelegramMethod[bool]): __pydantic__self__, *, url: str, - certificate: Optional[InputFile] = None, - ip_address: Optional[str] = None, - max_connections: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, - drop_pending_updates: Optional[bool] = None, - secret_token: Optional[str] = None, + certificate: InputFile | None = None, + ip_address: str | None = None, + max_connections: int | None = None, + allowed_updates: list[str] | None = None, + drop_pending_updates: bool | None = None, + secret_token: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/stop_message_live_location.py b/aiogram/methods/stop_message_live_location.py index f5fe3359..2d6bd2cd 100644 --- a/aiogram/methods/stop_message_live_location.py +++ b/aiogram/methods/stop_message_live_location.py @@ -1,30 +1,30 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InlineKeyboardMarkup, Message +from ..types import ChatIdUnion, InlineKeyboardMarkup, Message from .base import TelegramMethod -class StopMessageLiveLocation(TelegramMethod[Union[Message, bool]]): +class StopMessageLiveLocation(TelegramMethod[Message | bool]): """ 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. Source: https://core.telegram.org/bots/api#stopmessagelivelocation """ - __returning__ = Union[Message, bool] + __returning__ = Message | bool __api_method__ = "stopMessageLiveLocation" - business_connection_id: Optional[str] = None + business_connection_id: str | None = None """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None + chat_id: ChatIdUnion | None = None """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`)""" - message_id: Optional[int] = None + message_id: int | None = None """Required if *inline_message_id* is not specified. Identifier of the message with live location to stop""" - inline_message_id: Optional[str] = None + inline_message_id: str | None = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """A JSON-serialized object for a new `inline keyboard `_.""" if TYPE_CHECKING: @@ -34,11 +34,11 @@ class StopMessageLiveLocation(TelegramMethod[Union[Message, bool]]): def __init__( __pydantic__self__, *, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, + business_connection_id: str | None = None, + chat_id: ChatIdUnion | None = None, + message_id: int | None = None, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/stop_poll.py b/aiogram/methods/stop_poll.py index 8393a522..925dd0e9 100644 --- a/aiogram/methods/stop_poll.py +++ b/aiogram/methods/stop_poll.py @@ -1,8 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any -from ..types import InlineKeyboardMarkup, Poll +from ..types import ChatIdUnion, InlineKeyboardMarkup, Poll from .base import TelegramMethod @@ -16,13 +16,13 @@ class StopPoll(TelegramMethod[Poll]): __returning__ = Poll __api_method__ = "stopPoll" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" message_id: int """Identifier of the original message with the poll""" - business_connection_id: Optional[str] = None + business_connection_id: str | None = None """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """A JSON-serialized object for a new message `inline keyboard `_.""" if TYPE_CHECKING: @@ -32,10 +32,10 @@ class StopPoll(TelegramMethod[Poll]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_id: int, - business_connection_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, + business_connection_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/transfer_business_account_stars.py b/aiogram/methods/transfer_business_account_stars.py new file mode 100644 index 00000000..946f2218 --- /dev/null +++ b/aiogram/methods/transfer_business_account_stars.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class TransferBusinessAccountStars(TelegramMethod[bool]): + """ + Transfers Telegram Stars from the business account balance to the bot's balance. Requires the *can_transfer_stars* business bot right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#transferbusinessaccountstars + """ + + __returning__ = bool + __api_method__ = "transferBusinessAccountStars" + + business_connection_id: str + """Unique identifier of the business connection""" + star_count: int + """Number of Telegram Stars to transfer; 1-10000""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + star_count: 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__( + business_connection_id=business_connection_id, + star_count=star_count, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/transfer_gift.py b/aiogram/methods/transfer_gift.py new file mode 100644 index 00000000..ee05c055 --- /dev/null +++ b/aiogram/methods/transfer_gift.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class TransferGift(TelegramMethod[bool]): + """ + Transfers an owned unique gift to another user. Requires the *can_transfer_and_upgrade_gifts* business bot right. Requires *can_transfer_stars* business bot right if the transfer is paid. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#transfergift + """ + + __returning__ = bool + __api_method__ = "transferGift" + + business_connection_id: str + """Unique identifier of the business connection""" + owned_gift_id: str + """Unique identifier of the regular gift that should be transferred""" + new_owner_chat_id: int + """Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours.""" + star_count: int | None = None + """The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the *can_transfer_stars* business bot right is required.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + owned_gift_id: str, + new_owner_chat_id: int, + star_count: int | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + owned_gift_id=owned_gift_id, + new_owner_chat_id=new_owner_chat_id, + star_count=star_count, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/unban_chat_member.py b/aiogram/methods/unban_chat_member.py index 1094db52..e7719845 100644 --- a/aiogram/methods/unban_chat_member.py +++ b/aiogram/methods/unban_chat_member.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,11 +16,11 @@ class UnbanChatMember(TelegramMethod[bool]): __returning__ = bool __api_method__ = "unbanChatMember" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" - only_if_banned: Optional[bool] = None + only_if_banned: bool | None = None """Do nothing if the user is not banned""" if TYPE_CHECKING: @@ -29,9 +30,9 @@ class UnbanChatMember(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, - only_if_banned: Optional[bool] = None, + only_if_banned: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/methods/unban_chat_sender_chat.py b/aiogram/methods/unban_chat_sender_chat.py index b9816984..b4f8343d 100644 --- a/aiogram/methods/unban_chat_sender_chat.py +++ b/aiogram/methods/unban_chat_sender_chat.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class UnbanChatSenderChat(TelegramMethod[bool]): __returning__ = bool __api_method__ = "unbanChatSenderChat" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" sender_chat_id: int """Unique identifier of the target sender chat""" @@ -27,7 +28,7 @@ class UnbanChatSenderChat(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, sender_chat_id: int, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/methods/unhide_general_forum_topic.py b/aiogram/methods/unhide_general_forum_topic.py index a9149bc8..b0e1b58d 100644 --- a/aiogram/methods/unhide_general_forum_topic.py +++ b/aiogram/methods/unhide_general_forum_topic.py @@ -1,7 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod @@ -15,7 +16,7 @@ class UnhideGeneralForumTopic(TelegramMethod[bool]): __returning__ = bool __api_method__ = "unhideGeneralForumTopic" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" if TYPE_CHECKING: @@ -23,7 +24,7 @@ class UnhideGeneralForumTopic(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/unpin_all_chat_messages.py b/aiogram/methods/unpin_all_chat_messages.py index aca090f3..558ff2b5 100644 --- a/aiogram/methods/unpin_all_chat_messages.py +++ b/aiogram/methods/unpin_all_chat_messages.py @@ -1,13 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion 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 """ @@ -15,7 +16,7 @@ class UnpinAllChatMessages(TelegramMethod[bool]): __returning__ = bool __api_method__ = "unpinAllChatMessages" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" if TYPE_CHECKING: @@ -23,7 +24,7 @@ class UnpinAllChatMessages(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/unpin_all_forum_topic_messages.py b/aiogram/methods/unpin_all_forum_topic_messages.py index f1350ecc..e3fba5aa 100644 --- a/aiogram/methods/unpin_all_forum_topic_messages.py +++ b/aiogram/methods/unpin_all_forum_topic_messages.py @@ -1,13 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion from .base import TelegramMethod class UnpinAllForumTopicMessages(TelegramMethod[bool]): """ - Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. + Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#unpinallforumtopicmessages """ @@ -15,7 +16,7 @@ class UnpinAllForumTopicMessages(TelegramMethod[bool]): __returning__ = bool __api_method__ = "unpinAllForumTopicMessages" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" @@ -27,7 +28,7 @@ class UnpinAllForumTopicMessages(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], + chat_id: ChatIdUnion, message_thread_id: int, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/methods/unpin_all_general_forum_topic_messages.py b/aiogram/methods/unpin_all_general_forum_topic_messages.py index be76c198..1341832d 100644 --- a/aiogram/methods/unpin_all_general_forum_topic_messages.py +++ b/aiogram/methods/unpin_all_general_forum_topic_messages.py @@ -1,7 +1,9 @@ -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any from aiogram.methods import TelegramMethod +from ..types import ChatIdUnion + class UnpinAllGeneralForumTopicMessages(TelegramMethod[bool]): """ @@ -13,7 +15,7 @@ class UnpinAllGeneralForumTopicMessages(TelegramMethod[bool]): __returning__ = bool __api_method__ = "unpinAllGeneralForumTopicMessages" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" if TYPE_CHECKING: @@ -21,7 +23,7 @@ class UnpinAllGeneralForumTopicMessages(TelegramMethod[bool]): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any + __pydantic__self__, *, chat_id: ChatIdUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/methods/unpin_chat_message.py b/aiogram/methods/unpin_chat_message.py index 90547140..b7056367 100644 --- a/aiogram/methods/unpin_chat_message.py +++ b/aiogram/methods/unpin_chat_message.py @@ -1,13 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any +from ..types import ChatIdUnion 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 """ @@ -15,10 +16,12 @@ class UnpinChatMessage(TelegramMethod[bool]): __returning__ = bool __api_method__ = "unpinChatMessage" - chat_id: Union[int, str] + chat_id: ChatIdUnion """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_id: Optional[int] = None - """Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.""" + business_connection_id: str | None = None + """Unique identifier of the business connection on behalf of which the message will be unpinned""" + message_id: int | None = None + """Identifier of the message to unpin. Required if *business_connection_id* is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -27,12 +30,18 @@ class UnpinChatMessage(TelegramMethod[bool]): def __init__( __pydantic__self__, *, - chat_id: Union[int, str], - message_id: Optional[int] = None, + chat_id: ChatIdUnion, + business_connection_id: str | None = None, + message_id: int | None = 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, **__pydantic_kwargs) + super().__init__( + chat_id=chat_id, + business_connection_id=business_connection_id, + message_id=message_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/upgrade_gift.py b/aiogram/methods/upgrade_gift.py new file mode 100644 index 00000000..707ba042 --- /dev/null +++ b/aiogram/methods/upgrade_gift.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class UpgradeGift(TelegramMethod[bool]): + """ + Upgrades a given regular gift to a unique gift. Requires the *can_transfer_and_upgrade_gifts* business bot right. Additionally requires the *can_transfer_stars* business bot right if the upgrade is paid. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#upgradegift + """ + + __returning__ = bool + __api_method__ = "upgradeGift" + + business_connection_id: str + """Unique identifier of the business connection""" + owned_gift_id: str + """Unique identifier of the regular gift that should be upgraded to a unique one""" + keep_original_details: bool | None = None + """Pass :code:`True` to keep the original gift text, sender and receiver in the upgraded gift""" + star_count: int | None = None + """The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If :code:`gift.prepaid_upgrade_star_count > 0`, then pass 0, otherwise, the *can_transfer_stars* business bot right is required and :code:`gift.upgrade_star_count` must be passed.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + business_connection_id: str, + owned_gift_id: str, + keep_original_details: bool | None = None, + star_count: int | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + business_connection_id=business_connection_id, + owned_gift_id=owned_gift_id, + keep_original_details=keep_original_details, + star_count=star_count, + **__pydantic_kwargs, + ) diff --git a/aiogram/methods/verify_chat.py b/aiogram/methods/verify_chat.py new file mode 100644 index 00000000..62791eb5 --- /dev/null +++ b/aiogram/methods/verify_chat.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from ..types import ChatIdUnion +from .base import TelegramMethod + + +class VerifyChat(TelegramMethod[bool]): + """ + Verifies a chat `on behalf of the organization `_ which is represented by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#verifychat + """ + + __returning__ = bool + __api_method__ = "verifyChat" + + chat_id: ChatIdUnion + """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: str | None = None + """Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + chat_id: ChatIdUnion, + custom_description: str | None = 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, custom_description=custom_description, **__pydantic_kwargs + ) diff --git a/aiogram/methods/verify_user.py b/aiogram/methods/verify_user.py new file mode 100644 index 00000000..3ae9875c --- /dev/null +++ b/aiogram/methods/verify_user.py @@ -0,0 +1,40 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramMethod + + +class VerifyUser(TelegramMethod[bool]): + """ + Verifies a user `on behalf of the organization `_ which is represented by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#verifyuser + """ + + __returning__ = bool + __api_method__ = "verifyUser" + + user_id: int + """Unique identifier of the target user""" + custom_description: str | None = None + """Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + user_id: int, + custom_description: str | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + user_id=user_id, custom_description=custom_description, **__pydantic_kwargs + ) diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py index 740bf5dd..bfe0365a 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -1,15 +1,19 @@ -from typing import List, Literal, Optional, Union +from typing import Literal, Optional, Union +from .accepted_gift_types import AcceptedGiftTypes +from .affiliate_info import AffiliateInfo from .animation import Animation from .audio import Audio from .background_fill import BackgroundFill from .background_fill_freeform_gradient import BackgroundFillFreeformGradient from .background_fill_gradient import BackgroundFillGradient from .background_fill_solid import BackgroundFillSolid +from .background_fill_union import BackgroundFillUnion from .background_type import BackgroundType from .background_type_chat_theme import BackgroundTypeChatTheme from .background_type_fill import BackgroundTypeFill from .background_type_pattern import BackgroundTypePattern +from .background_type_union import BackgroundTypeUnion from .background_type_wallpaper import BackgroundTypeWallpaper from .base import UNSET_PARSE_MODE, TelegramObject from .birthdate import Birthdate @@ -24,9 +28,11 @@ from .bot_command_scope_chat import BotCommandScopeChat from .bot_command_scope_chat_administrators import BotCommandScopeChatAdministrators from .bot_command_scope_chat_member import BotCommandScopeChatMember from .bot_command_scope_default import BotCommandScopeDefault +from .bot_command_scope_union import BotCommandScopeUnion from .bot_description import BotDescription from .bot_name import BotName from .bot_short_description import BotShortDescription +from .business_bot_rights import BusinessBotRights from .business_connection import BusinessConnection from .business_intro import BusinessIntro from .business_location import BusinessLocation @@ -45,8 +51,10 @@ from .chat_boost_source import ChatBoostSource from .chat_boost_source_gift_code import ChatBoostSourceGiftCode from .chat_boost_source_giveaway import ChatBoostSourceGiveaway from .chat_boost_source_premium import ChatBoostSourcePremium +from .chat_boost_source_union import ChatBoostSourceUnion from .chat_boost_updated import ChatBoostUpdated from .chat_full_info import ChatFullInfo +from .chat_id_union import ChatIdUnion from .chat_invite_link import ChatInviteLink from .chat_join_request import ChatJoinRequest from .chat_location import ChatLocation @@ -57,14 +65,23 @@ from .chat_member_left import ChatMemberLeft from .chat_member_member import ChatMemberMember from .chat_member_owner import ChatMemberOwner from .chat_member_restricted import ChatMemberRestricted +from .chat_member_union import ChatMemberUnion from .chat_member_updated import ChatMemberUpdated from .chat_permissions import ChatPermissions from .chat_photo import ChatPhoto from .chat_shared import ChatShared +from .checklist import Checklist +from .checklist_task import ChecklistTask +from .checklist_tasks_added import ChecklistTasksAdded +from .checklist_tasks_done import ChecklistTasksDone from .chosen_inline_result import ChosenInlineResult from .contact import Contact +from .copy_text_button import CopyTextButton 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 @@ -82,6 +99,10 @@ from .game import Game from .game_high_score import GameHighScore from .general_forum_topic_hidden import GeneralForumTopicHidden from .general_forum_topic_unhidden import GeneralForumTopicUnhidden +from .gift import Gift +from .gift_background import GiftBackground +from .gift_info import GiftInfo +from .gifts import Gifts from .giveaway import Giveaway from .giveaway_completed import GiveawayCompleted from .giveaway_created import GiveawayCreated @@ -108,12 +129,16 @@ from .inline_query_result_gif import InlineQueryResultGif from .inline_query_result_location import InlineQueryResultLocation from .inline_query_result_mpeg4_gif import InlineQueryResultMpeg4Gif from .inline_query_result_photo import InlineQueryResultPhoto +from .inline_query_result_union import InlineQueryResultUnion from .inline_query_result_venue import InlineQueryResultVenue from .inline_query_result_video import InlineQueryResultVideo from .inline_query_result_voice import InlineQueryResultVoice from .inline_query_results_button import InlineQueryResultsButton +from .input_checklist import InputChecklist +from .input_checklist_task import InputChecklistTask from .input_contact_message_content import InputContactMessageContent from .input_file import BufferedInputFile, FSInputFile, InputFile, URLInputFile +from .input_file_union import InputFileUnion from .input_invoice_message_content import InputInvoiceMessageContent from .input_location_message_content import InputLocationMessageContent from .input_media import InputMedia @@ -121,13 +146,25 @@ from .input_media_animation import InputMediaAnimation from .input_media_audio import InputMediaAudio from .input_media_document import InputMediaDocument from .input_media_photo import InputMediaPhoto +from .input_media_union import InputMediaUnion from .input_media_video import InputMediaVideo from .input_message_content import InputMessageContent +from .input_message_content_union import InputMessageContentUnion from .input_paid_media import InputPaidMedia from .input_paid_media_photo import InputPaidMediaPhoto +from .input_paid_media_union import InputPaidMediaUnion from .input_paid_media_video import InputPaidMediaVideo from .input_poll_option import InputPollOption +from .input_poll_option_union import InputPollOptionUnion +from .input_profile_photo import InputProfilePhoto +from .input_profile_photo_animated import InputProfilePhotoAnimated +from .input_profile_photo_static import InputProfilePhotoStatic +from .input_profile_photo_union import InputProfilePhotoUnion from .input_sticker import InputSticker +from .input_story_content import InputStoryContent +from .input_story_content_photo import InputStoryContentPhoto +from .input_story_content_union import InputStoryContentUnion +from .input_story_content_video import InputStoryContentVideo from .input_text_message_content import InputTextMessageContent from .input_venue_message_content import InputVenueMessageContent from .invoice import Invoice @@ -139,12 +176,16 @@ from .keyboard_button_request_users import KeyboardButtonRequestUsers from .labeled_price import LabeledPrice from .link_preview_options import LinkPreviewOptions from .location import Location +from .location_address import LocationAddress from .login_url import LoginUrl from .mask_position import MaskPosition from .maybe_inaccessible_message import MaybeInaccessibleMessage +from .maybe_inaccessible_message_union import MaybeInaccessibleMessageUnion +from .media_union import MediaUnion from .menu_button import MenuButton from .menu_button_commands import MenuButtonCommands from .menu_button_default import MenuButtonDefault +from .menu_button_union import MenuButtonUnion from .menu_button_web_app import MenuButtonWebApp from .message import ContentType, Message from .message_auto_delete_timer_changed import MessageAutoDeleteTimerChanged @@ -154,15 +195,24 @@ from .message_origin import MessageOrigin from .message_origin_channel import MessageOriginChannel from .message_origin_chat import MessageOriginChat from .message_origin_hidden_user import MessageOriginHiddenUser +from .message_origin_union import MessageOriginUnion from .message_origin_user import MessageOriginUser from .message_reaction_count_updated import MessageReactionCountUpdated from .message_reaction_updated import MessageReactionUpdated from .order_info import OrderInfo +from .owned_gift import OwnedGift +from .owned_gift_regular import OwnedGiftRegular +from .owned_gift_union import OwnedGiftUnion +from .owned_gift_unique import OwnedGiftUnique +from .owned_gifts import OwnedGifts from .paid_media import PaidMedia from .paid_media_info import PaidMediaInfo from .paid_media_photo import PaidMediaPhoto from .paid_media_preview import PaidMediaPreview +from .paid_media_purchased import PaidMediaPurchased +from .paid_media_union import PaidMediaUnion from .paid_media_video import PaidMediaVideo +from .paid_message_price_changed import PaidMessagePriceChanged from .passport_data import PassportData from .passport_element_error import PassportElementError from .passport_element_error_data_field import PassportElementErrorDataField @@ -175,6 +225,7 @@ from .passport_element_error_translation_file import PassportElementErrorTransla from .passport_element_error_translation_files import ( PassportElementErrorTranslationFiles, ) +from .passport_element_error_union import PassportElementErrorUnion from .passport_element_error_unspecified import PassportElementErrorUnspecified from .passport_file import PassportFile from .photo_size import PhotoSize @@ -182,41 +233,79 @@ from .poll import Poll from .poll_answer import PollAnswer from .poll_option import PollOption from .pre_checkout_query import PreCheckoutQuery +from .prepared_inline_message import PreparedInlineMessage from .proximity_alert_triggered import ProximityAlertTriggered from .reaction_count import ReactionCount from .reaction_type import ReactionType from .reaction_type_custom_emoji import ReactionTypeCustomEmoji from .reaction_type_emoji import ReactionTypeEmoji +from .reaction_type_paid import ReactionTypePaid +from .reaction_type_union import ReactionTypeUnion +from .refunded_payment import RefundedPayment from .reply_keyboard_markup import ReplyKeyboardMarkup from .reply_keyboard_remove import ReplyKeyboardRemove +from .reply_markup_union import ReplyMarkupUnion from .reply_parameters import ReplyParameters from .response_parameters import ResponseParameters +from .result_chat_member_union import ResultChatMemberUnion +from .result_menu_button_union import ResultMenuButtonUnion from .revenue_withdrawal_state import RevenueWithdrawalState from .revenue_withdrawal_state_failed import RevenueWithdrawalStateFailed from .revenue_withdrawal_state_pending import RevenueWithdrawalStatePending from .revenue_withdrawal_state_succeeded import RevenueWithdrawalStateSucceeded +from .revenue_withdrawal_state_union import RevenueWithdrawalStateUnion from .sent_web_app_message import SentWebAppMessage from .shared_user import SharedUser from .shipping_address import ShippingAddress from .shipping_option import ShippingOption from .shipping_query import ShippingQuery +from .star_amount import StarAmount from .star_transaction import StarTransaction from .star_transactions import StarTransactions from .sticker import Sticker from .sticker_set import StickerSet from .story import Story +from .story_area import StoryArea +from .story_area_position import StoryAreaPosition +from .story_area_type import StoryAreaType +from .story_area_type_link import StoryAreaTypeLink +from .story_area_type_location import StoryAreaTypeLocation +from .story_area_type_suggested_reaction import StoryAreaTypeSuggestedReaction +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 +from .transaction_partner_affiliate_program import TransactionPartnerAffiliateProgram +from .transaction_partner_chat import TransactionPartnerChat from .transaction_partner_fragment import TransactionPartnerFragment from .transaction_partner_other import TransactionPartnerOther from .transaction_partner_telegram_ads import TransactionPartnerTelegramAds +from .transaction_partner_telegram_api import TransactionPartnerTelegramApi +from .transaction_partner_union import TransactionPartnerUnion from .transaction_partner_user import TransactionPartnerUser +from .unique_gift import UniqueGift +from .unique_gift_backdrop import UniqueGiftBackdrop +from .unique_gift_backdrop_colors import UniqueGiftBackdropColors +from .unique_gift_colors import UniqueGiftColors +from .unique_gift_info import UniqueGiftInfo +from .unique_gift_model import UniqueGiftModel +from .unique_gift_symbol import UniqueGiftSymbol from .update import Update from .user import User from .user_chat_boosts import UserChatBoosts from .user_profile_photos import UserProfilePhotos +from .user_rating import UserRating from .user_shared import UserShared from .users_shared import UsersShared from .venue import Venue @@ -233,16 +322,20 @@ from .webhook_info import WebhookInfo from .write_access_allowed import WriteAccessAllowed __all__ = ( + "AcceptedGiftTypes", + "AffiliateInfo", "Animation", "Audio", "BackgroundFill", "BackgroundFillFreeformGradient", "BackgroundFillGradient", "BackgroundFillSolid", + "BackgroundFillUnion", "BackgroundType", "BackgroundTypeChatTheme", "BackgroundTypeFill", "BackgroundTypePattern", + "BackgroundTypeUnion", "BackgroundTypeWallpaper", "Birthdate", "BotCommand", @@ -254,10 +347,12 @@ __all__ = ( "BotCommandScopeChatAdministrators", "BotCommandScopeChatMember", "BotCommandScopeDefault", + "BotCommandScopeUnion", "BotDescription", "BotName", "BotShortDescription", "BufferedInputFile", + "BusinessBotRights", "BusinessConnection", "BusinessIntro", "BusinessLocation", @@ -276,8 +371,10 @@ __all__ = ( "ChatBoostSourceGiftCode", "ChatBoostSourceGiveaway", "ChatBoostSourcePremium", + "ChatBoostSourceUnion", "ChatBoostUpdated", "ChatFullInfo", + "ChatIdUnion", "ChatInviteLink", "ChatJoinRequest", "ChatLocation", @@ -288,15 +385,26 @@ __all__ = ( "ChatMemberMember", "ChatMemberOwner", "ChatMemberRestricted", + "ChatMemberUnion", "ChatMemberUpdated", + "ChatOwnerChanged", + "ChatOwnerLeft", "ChatPermissions", "ChatPhoto", "ChatShared", + "Checklist", + "ChecklistTask", + "ChecklistTasksAdded", + "ChecklistTasksDone", "ChosenInlineResult", "Contact", "ContentType", + "CopyTextButton", "DateTime", + "DateTimeUnion", "Dice", + "DirectMessagePriceChanged", + "DirectMessagesTopic", "Document", "Downloadable", "EncryptedCredentials", @@ -315,6 +423,10 @@ __all__ = ( "GameHighScore", "GeneralForumTopicHidden", "GeneralForumTopicUnhidden", + "Gift", + "GiftBackground", + "GiftInfo", + "Gifts", "Giveaway", "GiveawayCompleted", "GiveawayCreated", @@ -341,12 +453,16 @@ __all__ = ( "InlineQueryResultLocation", "InlineQueryResultMpeg4Gif", "InlineQueryResultPhoto", + "InlineQueryResultUnion", "InlineQueryResultVenue", "InlineQueryResultVideo", "InlineQueryResultVoice", "InlineQueryResultsButton", + "InputChecklist", + "InputChecklistTask", "InputContactMessageContent", "InputFile", + "InputFileUnion", "InputInvoiceMessageContent", "InputLocationMessageContent", "InputMedia", @@ -354,30 +470,49 @@ __all__ = ( "InputMediaAudio", "InputMediaDocument", "InputMediaPhoto", + "InputMediaUnion", "InputMediaVideo", "InputMessageContent", + "InputMessageContentUnion", "InputPaidMedia", "InputPaidMediaPhoto", + "InputPaidMediaUnion", "InputPaidMediaVideo", "InputPollOption", + "InputPollOptionUnion", + "InputProfilePhoto", + "InputProfilePhotoAnimated", + "InputProfilePhotoStatic", + "InputProfilePhotoUnion", "InputSticker", + "InputStoryContent", + "InputStoryContentPhoto", + "InputStoryContentUnion", + "InputStoryContentVideo", "InputTextMessageContent", "InputVenueMessageContent", "Invoice", "KeyboardButton", "KeyboardButtonPollType", "KeyboardButtonRequestChat", + "KeyboardButtonRequestManagedBot", "KeyboardButtonRequestUser", "KeyboardButtonRequestUsers", "LabeledPrice", "LinkPreviewOptions", "Location", + "LocationAddress", "LoginUrl", + "ManagedBotCreated", + "ManagedBotUpdated", "MaskPosition", "MaybeInaccessibleMessage", + "MaybeInaccessibleMessageUnion", + "MediaUnion", "MenuButton", "MenuButtonCommands", "MenuButtonDefault", + "MenuButtonUnion", "MenuButtonWebApp", "Message", "MessageAutoDeleteTimerChanged", @@ -387,15 +522,24 @@ __all__ = ( "MessageOriginChannel", "MessageOriginChat", "MessageOriginHiddenUser", + "MessageOriginUnion", "MessageOriginUser", "MessageReactionCountUpdated", "MessageReactionUpdated", "OrderInfo", + "OwnedGift", + "OwnedGiftRegular", + "OwnedGiftUnion", + "OwnedGiftUnique", + "OwnedGifts", "PaidMedia", "PaidMediaInfo", "PaidMediaPhoto", "PaidMediaPreview", + "PaidMediaPurchased", + "PaidMediaUnion", "PaidMediaVideo", + "PaidMessagePriceChanged", "PassportData", "PassportElementError", "PassportElementErrorDataField", @@ -406,51 +550,94 @@ __all__ = ( "PassportElementErrorSelfie", "PassportElementErrorTranslationFile", "PassportElementErrorTranslationFiles", + "PassportElementErrorUnion", "PassportElementErrorUnspecified", "PassportFile", "PhotoSize", "Poll", "PollAnswer", "PollOption", + "PollOptionAdded", + "PollOptionDeleted", "PreCheckoutQuery", + "PreparedInlineMessage", + "PreparedKeyboardButton", "ProximityAlertTriggered", "ReactionCount", "ReactionType", "ReactionTypeCustomEmoji", "ReactionTypeEmoji", + "ReactionTypePaid", + "ReactionTypeUnion", + "RefundedPayment", "ReplyKeyboardMarkup", "ReplyKeyboardRemove", + "ReplyMarkupUnion", "ReplyParameters", "ResponseParameters", + "ResultChatMemberUnion", + "ResultMenuButtonUnion", "RevenueWithdrawalState", "RevenueWithdrawalStateFailed", "RevenueWithdrawalStatePending", "RevenueWithdrawalStateSucceeded", + "RevenueWithdrawalStateUnion", "SentWebAppMessage", "SharedUser", "ShippingAddress", "ShippingOption", "ShippingQuery", + "StarAmount", "StarTransaction", "StarTransactions", "Sticker", "StickerSet", "Story", + "StoryArea", + "StoryAreaPosition", + "StoryAreaType", + "StoryAreaTypeLink", + "StoryAreaTypeLocation", + "StoryAreaTypeSuggestedReaction", + "StoryAreaTypeUnion", + "StoryAreaTypeUniqueGift", + "StoryAreaTypeWeather", "SuccessfulPayment", + "SuggestedPostApprovalFailed", + "SuggestedPostApproved", + "SuggestedPostDeclined", + "SuggestedPostInfo", + "SuggestedPostPaid", + "SuggestedPostParameters", + "SuggestedPostPrice", + "SuggestedPostRefunded", "SwitchInlineQueryChosenChat", "TelegramObject", "TextQuote", "TransactionPartner", + "TransactionPartnerAffiliateProgram", + "TransactionPartnerChat", "TransactionPartnerFragment", "TransactionPartnerOther", "TransactionPartnerTelegramAds", + "TransactionPartnerTelegramApi", + "TransactionPartnerUnion", "TransactionPartnerUser", "UNSET_PARSE_MODE", "URLInputFile", + "UniqueGift", + "UniqueGiftBackdrop", + "UniqueGiftBackdropColors", + "UniqueGiftColors", + "UniqueGiftInfo", + "UniqueGiftModel", + "UniqueGiftSymbol", "Update", "User", "UserChatBoosts", + "UserProfileAudios", "UserProfilePhotos", + "UserRating", "UserShared", "UsersShared", "Venue", @@ -460,6 +647,7 @@ __all__ = ( "VideoChatScheduled", "VideoChatStarted", "VideoNote", + "VideoQuality", "Voice", "WebAppData", "WebAppInfo", @@ -467,6 +655,18 @@ __all__ = ( "WriteAccessAllowed", ) +from ..client.default import Default as _Default +from .chat_owner_changed import ChatOwnerChanged +from .chat_owner_left import ChatOwnerLeft +from .keyboard_button_request_managed_bot import KeyboardButtonRequestManagedBot +from .managed_bot_created import ManagedBotCreated +from .managed_bot_updated import ManagedBotUpdated +from .poll_option_added import PollOptionAdded +from .poll_option_deleted import PollOptionDeleted +from .prepared_keyboard_button import PreparedKeyboardButton +from .user_profile_audios import UserProfileAudios +from .video_quality import VideoQuality + # Load typing forward refs for every TelegramObject for _entity_name in __all__: _entity = globals()[_entity_name] @@ -474,10 +674,11 @@ for _entity_name in __all__: continue _entity.model_rebuild( _types_namespace={ - "List": List, + "List": list, "Optional": Optional, "Union": Union, "Literal": Literal, + "Default": _Default, **{k: v for k, v in globals().items() if k in __all__}, } ) diff --git a/aiogram/types/accepted_gift_types.py b/aiogram/types/accepted_gift_types.py new file mode 100644 index 00000000..6527bdb1 --- /dev/null +++ b/aiogram/types/accepted_gift_types.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class AcceptedGiftTypes(TelegramObject): + """ + This object describes the types of gifts that can be gifted to a user or a chat. + + Source: https://core.telegram.org/bots/api#acceptedgifttypes + """ + + unlimited_gifts: bool + """:code:`True`, if unlimited regular gifts are accepted""" + limited_gifts: bool + """:code:`True`, if limited regular gifts are accepted""" + unique_gifts: bool + """:code:`True`, if unique gifts or gifts that can be upgraded to unique for free are accepted""" + premium_subscription: bool + """:code:`True`, if a Telegram Premium subscription is accepted""" + gifts_from_channels: bool + """:code:`True`, if transfers of unique gifts from channels are accepted""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + unlimited_gifts: bool, + limited_gifts: bool, + unique_gifts: bool, + premium_subscription: bool, + gifts_from_channels: bool, + **__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__( + unlimited_gifts=unlimited_gifts, + limited_gifts=limited_gifts, + unique_gifts=unique_gifts, + premium_subscription=premium_subscription, + gifts_from_channels=gifts_from_channels, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/affiliate_info.py b/aiogram/types/affiliate_info.py new file mode 100644 index 00000000..786a0b8b --- /dev/null +++ b/aiogram/types/affiliate_info.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat import Chat + from .user import User + + +class AffiliateInfo(TelegramObject): + """ + Contains information about the affiliate that received a commission via this transaction. + + Source: https://core.telegram.org/bots/api#affiliateinfo + """ + + commission_per_mille: int + """The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users""" + amount: int + """Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds""" + affiliate_user: User | None = None + """*Optional*. The bot or the user that received an affiliate commission if it was received by a bot or a user""" + affiliate_chat: Chat | None = None + """*Optional*. The chat that received an affiliate commission if it was received by a chat""" + nanostar_amount: int | None = None + """*Optional*. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + commission_per_mille: int, + amount: int, + affiliate_user: User | None = None, + affiliate_chat: Chat | None = None, + nanostar_amount: int | None = 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__( + commission_per_mille=commission_per_mille, + amount=amount, + affiliate_user=affiliate_user, + affiliate_chat=affiliate_chat, + nanostar_amount=nanostar_amount, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/animation.py b/aiogram/types/animation.py index 1fb45b71..30533d54 100644 --- a/aiogram/types/animation.py +++ b/aiogram/types/animation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -25,13 +25,13 @@ class Animation(TelegramObject): """Video height as defined by the sender""" duration: int """Duration of the video in seconds as defined by the sender""" - thumbnail: Optional[PhotoSize] = None + thumbnail: PhotoSize | None = None """*Optional*. Animation thumbnail as defined by the sender""" - file_name: Optional[str] = None + file_name: str | None = None """*Optional*. Original animation filename as defined by the sender""" - mime_type: Optional[str] = None + mime_type: str | None = None """*Optional*. MIME type of the file as defined by the sender""" - file_size: Optional[int] = None + file_size: int | None = None """*Optional*. File size in bytes. It can be bigger than 2^31 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 value.""" if TYPE_CHECKING: @@ -46,10 +46,10 @@ class Animation(TelegramObject): width: int, height: int, duration: int, - thumbnail: Optional[PhotoSize] = None, - file_name: Optional[str] = None, - mime_type: Optional[str] = None, - file_size: Optional[int] = None, + thumbnail: PhotoSize | None = None, + file_name: str | None = None, + mime_type: str | None = None, + file_size: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/audio.py b/aiogram/types/audio.py index 8c114126..cc9d2f03 100644 --- a/aiogram/types/audio.py +++ b/aiogram/types/audio.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -21,17 +21,17 @@ class Audio(TelegramObject): """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" duration: int """Duration of the audio in seconds as defined by the sender""" - performer: Optional[str] = None + performer: str | None = None """*Optional*. Performer of the audio as defined by the sender or by audio tags""" - title: Optional[str] = None + title: str | None = None """*Optional*. Title of the audio as defined by the sender or by audio tags""" - file_name: Optional[str] = None + file_name: str | None = None """*Optional*. Original filename as defined by the sender""" - mime_type: Optional[str] = None + mime_type: str | None = None """*Optional*. MIME type of the file as defined by the sender""" - file_size: Optional[int] = None + file_size: int | None = None """*Optional*. File size in bytes. It can be bigger than 2^31 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 value.""" - thumbnail: Optional[PhotoSize] = None + thumbnail: PhotoSize | None = None """*Optional*. Thumbnail of the album cover to which the music file belongs""" if TYPE_CHECKING: @@ -44,12 +44,12 @@ class Audio(TelegramObject): file_id: str, file_unique_id: str, duration: int, - performer: Optional[str] = None, - title: Optional[str] = None, - file_name: Optional[str] = None, - mime_type: Optional[str] = None, - file_size: Optional[int] = None, - thumbnail: Optional[PhotoSize] = None, + performer: str | None = None, + title: str | None = None, + file_name: str | None = None, + mime_type: str | None = None, + file_size: int | None = None, + thumbnail: PhotoSize | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/background_fill_freeform_gradient.py b/aiogram/types/background_fill_freeform_gradient.py index 916f6a73..5e281a5c 100644 --- a/aiogram/types/background_fill_freeform_gradient.py +++ b/aiogram/types/background_fill_freeform_gradient.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, List, Literal +from typing import TYPE_CHECKING, Any, Literal from .background_fill import BackgroundFill @@ -12,7 +12,7 @@ class BackgroundFillFreeformGradient(BackgroundFill): type: Literal["freeform_gradient"] = "freeform_gradient" """Type of the background fill, always 'freeform_gradient'""" - colors: List[int] + colors: list[int] """A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format""" if TYPE_CHECKING: @@ -23,7 +23,7 @@ class BackgroundFillFreeformGradient(BackgroundFill): __pydantic__self__, *, type: Literal["freeform_gradient"] = "freeform_gradient", - colors: List[int], + colors: list[int], **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/background_fill_union.py b/aiogram/types/background_fill_union.py new file mode 100644 index 00000000..e5a0a71e --- /dev/null +++ b/aiogram/types/background_fill_union.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .background_fill_freeform_gradient import BackgroundFillFreeformGradient +from .background_fill_gradient import BackgroundFillGradient +from .background_fill_solid import BackgroundFillSolid + +BackgroundFillUnion: TypeAlias = ( + BackgroundFillSolid | BackgroundFillGradient | BackgroundFillFreeformGradient +) diff --git a/aiogram/types/background_type_fill.py b/aiogram/types/background_type_fill.py index c506e4ea..49f2767d 100644 --- a/aiogram/types/background_type_fill.py +++ b/aiogram/types/background_type_fill.py @@ -1,13 +1,11 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Union +from typing import TYPE_CHECKING, Any, Literal from .background_type import BackgroundType if TYPE_CHECKING: - from .background_fill_freeform_gradient import BackgroundFillFreeformGradient - from .background_fill_gradient import BackgroundFillGradient - from .background_fill_solid import BackgroundFillSolid + from .background_fill_union import BackgroundFillUnion class BackgroundTypeFill(BackgroundType): @@ -19,7 +17,7 @@ class BackgroundTypeFill(BackgroundType): type: Literal["fill"] = "fill" """Type of the background, always 'fill'""" - fill: Union[BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient] + fill: BackgroundFillUnion """The background fill""" dark_theme_dimming: int """Dimming of the background in dark themes, as a percentage; 0-100""" @@ -32,9 +30,7 @@ class BackgroundTypeFill(BackgroundType): __pydantic__self__, *, type: Literal["fill"] = "fill", - fill: Union[ - BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient - ], + fill: BackgroundFillUnion, dark_theme_dimming: int, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/types/background_type_pattern.py b/aiogram/types/background_type_pattern.py index 29c383c2..1988fb98 100644 --- a/aiogram/types/background_type_pattern.py +++ b/aiogram/types/background_type_pattern.py @@ -1,19 +1,17 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from .background_type import BackgroundType if TYPE_CHECKING: - from .background_fill_freeform_gradient import BackgroundFillFreeformGradient - from .background_fill_gradient import BackgroundFillGradient - from .background_fill_solid import BackgroundFillSolid + from .background_fill_union import BackgroundFillUnion from .document import Document class BackgroundTypePattern(BackgroundType): """ - The background is a PNG or TGV (gzipped subset of SVG with MIME type 'application/x-tgwallpattern') pattern to be combined with the background fill chosen by the user. + The background is a .PNG or .TGV (gzipped subset of SVG with MIME type 'application/x-tgwallpattern') pattern to be combined with the background fill chosen by the user. Source: https://core.telegram.org/bots/api#backgroundtypepattern """ @@ -22,13 +20,13 @@ class BackgroundTypePattern(BackgroundType): """Type of the background, always 'pattern'""" document: Document """Document with the pattern""" - fill: Union[BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient] + fill: BackgroundFillUnion """The background fill that is combined with the pattern""" intensity: int """Intensity of the pattern when it is shown above the filled background; 0-100""" - is_inverted: Optional[bool] = None + is_inverted: bool | None = None """*Optional*. :code:`True`, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only""" - is_moving: Optional[bool] = None + is_moving: bool | None = None """*Optional*. :code:`True`, if the background moves slightly when the device is tilted""" if TYPE_CHECKING: @@ -40,12 +38,10 @@ class BackgroundTypePattern(BackgroundType): *, type: Literal["pattern"] = "pattern", document: Document, - fill: Union[ - BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient - ], + fill: BackgroundFillUnion, intensity: int, - is_inverted: Optional[bool] = None, - is_moving: Optional[bool] = None, + is_inverted: bool | None = None, + is_moving: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/background_type_union.py b/aiogram/types/background_type_union.py new file mode 100644 index 00000000..1e685784 --- /dev/null +++ b/aiogram/types/background_type_union.py @@ -0,0 +1,12 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .background_type_chat_theme import BackgroundTypeChatTheme +from .background_type_fill import BackgroundTypeFill +from .background_type_pattern import BackgroundTypePattern +from .background_type_wallpaper import BackgroundTypeWallpaper + +BackgroundTypeUnion: TypeAlias = ( + BackgroundTypeFill | BackgroundTypeWallpaper | BackgroundTypePattern | BackgroundTypeChatTheme +) diff --git a/aiogram/types/background_type_wallpaper.py b/aiogram/types/background_type_wallpaper.py index 4ad29050..a4a2ac70 100644 --- a/aiogram/types/background_type_wallpaper.py +++ b/aiogram/types/background_type_wallpaper.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal from .background_type import BackgroundType @@ -21,9 +21,9 @@ class BackgroundTypeWallpaper(BackgroundType): """Document with the wallpaper""" dark_theme_dimming: int """Dimming of the background in dark themes, as a percentage; 0-100""" - is_blurred: Optional[bool] = None + is_blurred: bool | None = None """*Optional*. :code:`True`, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12""" - is_moving: Optional[bool] = None + is_moving: bool | None = None """*Optional*. :code:`True`, if the background moves slightly when the device is tilted""" if TYPE_CHECKING: @@ -36,8 +36,8 @@ class BackgroundTypeWallpaper(BackgroundType): type: Literal["wallpaper"] = "wallpaper", document: Document, dark_theme_dimming: int, - is_blurred: Optional[bool] = None, - is_moving: Optional[bool] = None, + is_blurred: bool | None = None, + is_moving: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/base.py b/aiogram/types/base.py index 7ae00524..4ba749d8 100644 --- a/aiogram/types/base.py +++ b/aiogram/types/base.py @@ -1,4 +1,4 @@ -from typing import Any, Dict +from typing import Any from unittest.mock import sentinel from pydantic import BaseModel, ConfigDict, model_validator @@ -16,11 +16,12 @@ class TelegramObject(BotContextController, BaseModel): populate_by_name=True, arbitrary_types_allowed=True, defer_build=True, + protected_namespaces=(), ) @model_validator(mode="before") @classmethod - def remove_unset(cls, values: Dict[str, Any]) -> Dict[str, Any]: + def remove_unset(cls, values: dict[str, Any]) -> dict[str, Any]: """ Remove UNSET before fields validation. diff --git a/aiogram/types/birthdate.py b/aiogram/types/birthdate.py index 69555540..6bada73d 100644 --- a/aiogram/types/birthdate.py +++ b/aiogram/types/birthdate.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -16,7 +16,7 @@ class Birthdate(TelegramObject): """Day of the user's birth; 1-31""" month: int """Month of the user's birth; 1-12""" - year: Optional[int] = None + year: int | None = None """*Optional*. Year of the user's birth""" if TYPE_CHECKING: @@ -28,7 +28,7 @@ class Birthdate(TelegramObject): *, day: int, month: int, - year: Optional[int] = None, + year: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/bot_command_scope_chat.py b/aiogram/types/bot_command_scope_chat.py index f36c4a1d..9ea26e67 100644 --- a/aiogram/types/bot_command_scope_chat.py +++ b/aiogram/types/bot_command_scope_chat.py @@ -1,10 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Union +from typing import TYPE_CHECKING, Any, Literal from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope +if TYPE_CHECKING: + from .chat_id_union import ChatIdUnion + class BotCommandScopeChat(BotCommandScope): """ @@ -15,8 +18,8 @@ class BotCommandScopeChat(BotCommandScope): type: Literal[BotCommandScopeType.CHAT] = BotCommandScopeType.CHAT """Scope type, must be *chat*""" - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + chat_id: ChatIdUnion + """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!!! @@ -26,7 +29,7 @@ class BotCommandScopeChat(BotCommandScope): __pydantic__self__, *, type: Literal[BotCommandScopeType.CHAT] = BotCommandScopeType.CHAT, - chat_id: Union[int, str], + chat_id: ChatIdUnion, **__pydantic_kwargs: Any, ) -> None: # 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 f90623ef..8a7ff631 100644 --- a/aiogram/types/bot_command_scope_chat_administrators.py +++ b/aiogram/types/bot_command_scope_chat_administrators.py @@ -1,10 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Union +from typing import TYPE_CHECKING, Any, Literal from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope +if TYPE_CHECKING: + from .chat_id_union import ChatIdUnion + class BotCommandScopeChatAdministrators(BotCommandScope): """ @@ -17,8 +20,8 @@ class BotCommandScopeChatAdministrators(BotCommandScope): BotCommandScopeType.CHAT_ADMINISTRATORS ) """Scope type, must be *chat_administrators*""" - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + chat_id: ChatIdUnion + """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!!! @@ -30,7 +33,7 @@ class BotCommandScopeChatAdministrators(BotCommandScope): type: Literal[ BotCommandScopeType.CHAT_ADMINISTRATORS ] = BotCommandScopeType.CHAT_ADMINISTRATORS, - chat_id: Union[int, str], + chat_id: ChatIdUnion, **__pydantic_kwargs: Any, ) -> None: # 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 4d20b1f3..4dd096cf 100644 --- a/aiogram/types/bot_command_scope_chat_member.py +++ b/aiogram/types/bot_command_scope_chat_member.py @@ -1,10 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Union +from typing import TYPE_CHECKING, Any, Literal from ..enums import BotCommandScopeType from .bot_command_scope import BotCommandScope +if TYPE_CHECKING: + from .chat_id_union import ChatIdUnion + class BotCommandScopeChatMember(BotCommandScope): """ @@ -15,8 +18,8 @@ class BotCommandScopeChatMember(BotCommandScope): type: Literal[BotCommandScopeType.CHAT_MEMBER] = BotCommandScopeType.CHAT_MEMBER """Scope type, must be *chat_member*""" - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + chat_id: ChatIdUnion + """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""" @@ -28,7 +31,7 @@ class BotCommandScopeChatMember(BotCommandScope): __pydantic__self__, *, type: Literal[BotCommandScopeType.CHAT_MEMBER] = BotCommandScopeType.CHAT_MEMBER, - chat_id: Union[int, str], + chat_id: ChatIdUnion, user_id: int, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/types/bot_command_scope_union.py b/aiogram/types/bot_command_scope_union.py new file mode 100644 index 00000000..9e305e11 --- /dev/null +++ b/aiogram/types/bot_command_scope_union.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .bot_command_scope_all_chat_administrators import ( + BotCommandScopeAllChatAdministrators, +) +from .bot_command_scope_all_group_chats import BotCommandScopeAllGroupChats +from .bot_command_scope_all_private_chats import BotCommandScopeAllPrivateChats +from .bot_command_scope_chat import BotCommandScopeChat +from .bot_command_scope_chat_administrators import BotCommandScopeChatAdministrators +from .bot_command_scope_chat_member import BotCommandScopeChatMember +from .bot_command_scope_default import BotCommandScopeDefault + +BotCommandScopeUnion: TypeAlias = ( + BotCommandScopeDefault + | BotCommandScopeAllPrivateChats + | BotCommandScopeAllGroupChats + | BotCommandScopeAllChatAdministrators + | BotCommandScopeChat + | BotCommandScopeChatAdministrators + | BotCommandScopeChatMember +) diff --git a/aiogram/types/business_bot_rights.py b/aiogram/types/business_bot_rights.py new file mode 100644 index 00000000..6efad628 --- /dev/null +++ b/aiogram/types/business_bot_rights.py @@ -0,0 +1,96 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from pydantic import Field + +from .base import TelegramObject + + +class BusinessBotRights(TelegramObject): + """ + Represents the rights of a business bot. + + Source: https://core.telegram.org/bots/api#businessbotrights + """ + + can_reply: bool | None = None + """*Optional*. :code:`True`, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours""" + can_read_messages: bool | None = None + """*Optional*. :code:`True`, if the bot can mark incoming private messages as read""" + can_delete_sent_messages: bool | None = None + """*Optional*. :code:`True`, if the bot can delete messages sent by the bot""" + can_delete_all_messages: bool | None = None + """*Optional*. :code:`True`, if the bot can delete all private messages in managed chats""" + can_edit_name: bool | None = None + """*Optional*. :code:`True`, if the bot can edit the first and last name of the business account""" + can_edit_bio: bool | None = None + """*Optional*. :code:`True`, if the bot can edit the bio of the business account""" + can_edit_profile_photo: bool | None = None + """*Optional*. :code:`True`, if the bot can edit the profile photo of the business account""" + can_edit_username: bool | None = None + """*Optional*. :code:`True`, if the bot can edit the username of the business account""" + can_change_gift_settings: bool | None = None + """*Optional*. :code:`True`, if the bot can change the privacy settings pertaining to gifts for the business account""" + can_view_gifts_and_stars: bool | None = None + """*Optional*. :code:`True`, if the bot can view gifts and the amount of Telegram Stars owned by the business account""" + can_convert_gifts_to_stars: bool | None = None + """*Optional*. :code:`True`, if the bot can convert regular gifts owned by the business account to Telegram Stars""" + can_transfer_and_upgrade_gifts: bool | None = None + """*Optional*. :code:`True`, if the bot can transfer and upgrade gifts owned by the business account""" + can_transfer_stars: bool | None = None + """*Optional*. :code:`True`, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts""" + can_manage_stories: bool | None = None + """*Optional*. :code:`True`, if the bot can post, edit and delete stories on behalf of the business account""" + can_delete_outgoing_messages: bool | None = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. True, if the bot can delete messages sent by the bot + +.. deprecated:: API:9.1 + https://core.telegram.org/bots/api-changelog#july-3-2025""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + can_reply: bool | None = None, + can_read_messages: bool | None = None, + can_delete_sent_messages: bool | None = None, + can_delete_all_messages: bool | None = None, + can_edit_name: bool | None = None, + can_edit_bio: bool | None = None, + can_edit_profile_photo: bool | None = None, + can_edit_username: bool | None = None, + can_change_gift_settings: bool | None = None, + can_view_gifts_and_stars: bool | None = None, + can_convert_gifts_to_stars: bool | None = None, + can_transfer_and_upgrade_gifts: bool | None = None, + can_transfer_stars: bool | None = None, + can_manage_stories: bool | None = None, + can_delete_outgoing_messages: bool | None = 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__( + can_reply=can_reply, + can_read_messages=can_read_messages, + can_delete_sent_messages=can_delete_sent_messages, + can_delete_all_messages=can_delete_all_messages, + can_edit_name=can_edit_name, + can_edit_bio=can_edit_bio, + can_edit_profile_photo=can_edit_profile_photo, + can_edit_username=can_edit_username, + can_change_gift_settings=can_change_gift_settings, + can_view_gifts_and_stars=can_view_gifts_and_stars, + can_convert_gifts_to_stars=can_convert_gifts_to_stars, + can_transfer_and_upgrade_gifts=can_transfer_and_upgrade_gifts, + can_transfer_stars=can_transfer_stars, + can_manage_stories=can_manage_stories, + can_delete_outgoing_messages=can_delete_outgoing_messages, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/business_connection.py b/aiogram/types/business_connection.py index 80c472a2..65597f4b 100644 --- a/aiogram/types/business_connection.py +++ b/aiogram/types/business_connection.py @@ -2,10 +2,13 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any +from pydantic import Field + from .base import TelegramObject from .custom import DateTime if TYPE_CHECKING: + from .business_bot_rights import BusinessBotRights from .user import User @@ -24,10 +27,15 @@ class BusinessConnection(TelegramObject): """Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.""" date: DateTime """Date the connection was established in Unix time""" - can_reply: bool - """True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours""" is_enabled: bool - """True, if the connection is active""" + """:code:`True`, if the connection is active""" + rights: BusinessBotRights | None = None + """*Optional*. Rights of the business bot""" + can_reply: bool | None = Field(None, json_schema_extra={"deprecated": True}) + """True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours + +.. deprecated:: API:9.0 + https://core.telegram.org/bots/api-changelog#april-11-2025""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -40,8 +48,9 @@ class BusinessConnection(TelegramObject): user: User, user_chat_id: int, date: DateTime, - can_reply: bool, is_enabled: bool, + rights: BusinessBotRights | None = None, + can_reply: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -53,7 +62,8 @@ class BusinessConnection(TelegramObject): user=user, user_chat_id=user_chat_id, date=date, - can_reply=can_reply, is_enabled=is_enabled, + rights=rights, + can_reply=can_reply, **__pydantic_kwargs, ) diff --git a/aiogram/types/business_intro.py b/aiogram/types/business_intro.py index c360fbe9..80b40204 100644 --- a/aiogram/types/business_intro.py +++ b/aiogram/types/business_intro.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -15,11 +15,11 @@ class BusinessIntro(TelegramObject): Source: https://core.telegram.org/bots/api#businessintro """ - title: Optional[str] = None + title: str | None = None """*Optional*. Title text of the business intro""" - message: Optional[str] = None + message: str | None = None """*Optional*. Message text of the business intro""" - sticker: Optional[Sticker] = None + sticker: Sticker | None = None """*Optional*. Sticker of the business intro""" if TYPE_CHECKING: @@ -29,9 +29,9 @@ class BusinessIntro(TelegramObject): def __init__( __pydantic__self__, *, - title: Optional[str] = None, - message: Optional[str] = None, - sticker: Optional[Sticker] = None, + title: str | None = None, + message: str | None = None, + sticker: Sticker | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/business_location.py b/aiogram/types/business_location.py index af7989a0..421259db 100644 --- a/aiogram/types/business_location.py +++ b/aiogram/types/business_location.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -17,7 +17,7 @@ class BusinessLocation(TelegramObject): address: str """Address of the business""" - location: Optional[Location] = None + location: Location | None = None """*Optional*. Location of the business""" if TYPE_CHECKING: @@ -28,7 +28,7 @@ class BusinessLocation(TelegramObject): __pydantic__self__, *, address: str, - location: Optional[Location] = None, + location: Location | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/business_messages_deleted.py b/aiogram/types/business_messages_deleted.py index 44bc45fa..3263f667 100644 --- a/aiogram/types/business_messages_deleted.py +++ b/aiogram/types/business_messages_deleted.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -19,7 +19,7 @@ class BusinessMessagesDeleted(TelegramObject): """Unique identifier of the business connection""" chat: Chat """Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.""" - message_ids: List[int] + message_ids: list[int] """The list of identifiers of deleted messages in the chat of the business account""" if TYPE_CHECKING: @@ -31,7 +31,7 @@ class BusinessMessagesDeleted(TelegramObject): *, business_connection_id: str, chat: Chat, - message_ids: List[int], + message_ids: list[int], **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/business_opening_hours.py b/aiogram/types/business_opening_hours.py index 7fd5c754..8c12409d 100644 --- a/aiogram/types/business_opening_hours.py +++ b/aiogram/types/business_opening_hours.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -17,7 +17,7 @@ class BusinessOpeningHours(TelegramObject): time_zone_name: str """Unique name of the time zone for which the opening hours are defined""" - opening_hours: List[BusinessOpeningHoursInterval] + opening_hours: list[BusinessOpeningHoursInterval] """List of time intervals describing business opening hours""" if TYPE_CHECKING: @@ -28,7 +28,7 @@ class BusinessOpeningHours(TelegramObject): __pydantic__self__, *, time_zone_name: str, - opening_hours: List[BusinessOpeningHoursInterval], + opening_hours: list[BusinessOpeningHoursInterval], **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/callback_query.py b/aiogram/types/callback_query.py index c3b33b5f..1ccbb753 100644 --- a/aiogram/types/callback_query.py +++ b/aiogram/types/callback_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -8,8 +8,7 @@ from .base import TelegramObject if TYPE_CHECKING: from ..methods import AnswerCallbackQuery - from .inaccessible_message import InaccessibleMessage - from .message import Message + from .maybe_inaccessible_message_union import MaybeInaccessibleMessageUnion from .user import User @@ -28,13 +27,13 @@ class CallbackQuery(TelegramObject): """Sender""" chat_instance: str """Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in :class:`aiogram.methods.games.Games`.""" - message: Optional[Union[Message, InaccessibleMessage]] = None + message: MaybeInaccessibleMessageUnion | None = None """*Optional*. Message sent by the bot with the callback button that originated the query""" - inline_message_id: Optional[str] = None + inline_message_id: str | None = None """*Optional*. Identifier of the message sent via the bot in inline mode, that originated the query.""" - data: Optional[str] = None + data: str | None = None """*Optional*. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.""" - game_short_name: Optional[str] = None + game_short_name: str | None = None """*Optional*. Short name of a `Game `_ to be returned, serves as the unique identifier for the game""" if TYPE_CHECKING: @@ -47,10 +46,10 @@ class CallbackQuery(TelegramObject): id: str, from_user: User, chat_instance: str, - message: Optional[Union[Message, InaccessibleMessage]] = None, - inline_message_id: Optional[str] = None, - data: Optional[str] = None, - game_short_name: Optional[str] = None, + message: MaybeInaccessibleMessageUnion | None = None, + inline_message_id: str | None = None, + data: str | None = None, + game_short_name: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -70,10 +69,10 @@ class CallbackQuery(TelegramObject): def answer( self, - text: Optional[str] = None, - show_alert: Optional[bool] = None, - url: Optional[str] = None, - cache_time: Optional[int] = None, + text: str | None = None, + show_alert: bool | None = None, + url: str | None = None, + cache_time: int | None = None, **kwargs: Any, ) -> AnswerCallbackQuery: """ diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index f44b01bf..cde24548 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -1,7 +1,6 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -29,6 +28,7 @@ if TYPE_CHECKING: SendChatAction, SetChatAdministratorCustomTitle, SetChatDescription, + SetChatMemberTag, SetChatPermissions, SetChatPhoto, SetChatStickerSet, @@ -46,10 +46,10 @@ if TYPE_CHECKING: from .chat_location import ChatLocation from .chat_permissions import ChatPermissions from .chat_photo import ChatPhoto + from .date_time_union import DateTimeUnion from .input_file import InputFile from .message import Message - from .reaction_type_custom_emoji import ReactionTypeCustomEmoji - from .reaction_type_emoji import ReactionTypeEmoji + from .reaction_type_union import ReactionTypeUnion class Chat(TelegramObject): @@ -63,205 +63,203 @@ class Chat(TelegramObject): """Unique identifier for this chat. 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.""" type: str """Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'""" - title: Optional[str] = None + title: str | None = None """*Optional*. Title, for supergroups, channels and group chats""" - username: Optional[str] = None + username: str | None = None """*Optional*. Username, for private chats, supergroups and channels if available""" - first_name: Optional[str] = None + first_name: str | None = None """*Optional*. First name of the other party in a private chat""" - last_name: Optional[str] = None + last_name: str | None = None """*Optional*. Last name of the other party in a private chat""" - is_forum: Optional[bool] = None + is_forum: bool | None = None """*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)""" - accent_color_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + is_direct_messages: bool | None = None + """*Optional*. :code:`True`, if the chat is the direct messages chat of a channel""" + accent_color_id: int | None = 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`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - active_usernames: Optional[List[str]] = Field(None, json_schema_extra={"deprecated": True}) + active_usernames: list[str] | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. If non-empty, the list of all `active chat usernames `_; for private chats, supergroups and channels. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - available_reactions: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = Field( + available_reactions: list[ReactionTypeUnion] | None = Field( None, json_schema_extra={"deprecated": True} ) """*Optional*. List of available reactions allowed in the chat. If omitted, then all `emoji reactions `_ are allowed. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - background_custom_emoji_id: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + background_custom_emoji_id: str | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - bio: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + bio: str | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Bio of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - birthdate: Optional[Birthdate] = Field(None, json_schema_extra={"deprecated": True}) + birthdate: Birthdate | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For private chats, the date of birth of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - business_intro: Optional[BusinessIntro] = Field(None, json_schema_extra={"deprecated": True}) + business_intro: BusinessIntro | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For private chats with business accounts, the intro of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - business_location: Optional[BusinessLocation] = Field( + business_location: BusinessLocation | None = Field( None, json_schema_extra={"deprecated": True} ) """*Optional*. For private chats with business accounts, the location of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - business_opening_hours: Optional[BusinessOpeningHours] = Field( + business_opening_hours: BusinessOpeningHours | None = Field( None, json_schema_extra={"deprecated": True} ) """*Optional*. For private chats with business accounts, the opening hours of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - can_set_sticker_set: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + can_set_sticker_set: bool | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. :code:`True`, if the bot can change the group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - custom_emoji_sticker_set_name: Optional[str] = Field( - None, json_schema_extra={"deprecated": True} - ) + custom_emoji_sticker_set_name: str | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - description: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + description: str | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Description, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - emoji_status_custom_emoji_id: Optional[str] = Field( - None, json_schema_extra={"deprecated": True} - ) + emoji_status_custom_emoji_id: str | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - emoji_status_expiration_date: Optional[DateTime] = Field( + emoji_status_expiration_date: DateTime | None = Field( None, json_schema_extra={"deprecated": True} ) """*Optional*. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_aggressive_anti_spam_enabled: Optional[bool] = Field( + has_aggressive_anti_spam_enabled: bool | None = Field( None, json_schema_extra={"deprecated": True} ) """*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_hidden_members: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + has_hidden_members: bool | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_private_forwards: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + has_private_forwards: bool | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. :code:`True`, if privacy settings of the other party in the private chat allows to use :code:`tg://user?id=` links only in chats with the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_protected_content: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + has_protected_content: bool | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_restricted_voice_and_video_messages: Optional[bool] = Field( + has_restricted_voice_and_video_messages: bool | None = Field( None, json_schema_extra={"deprecated": True} ) """*Optional*. :code:`True`, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_visible_history: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + has_visible_history: bool | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. :code:`True`, if new chat members will have access to old messages; available only to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - invite_link: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + invite_link: str | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Primary invite link, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - join_by_request: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + join_by_request: bool | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. :code:`True`, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - join_to_send_messages: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + join_to_send_messages: bool | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. :code:`True`, if users need to join the supergroup before they can send messages. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - linked_chat_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + linked_chat_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - location: Optional[ChatLocation] = Field(None, json_schema_extra={"deprecated": True}) + location: ChatLocation | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For supergroups, the location to which the supergroup is connected. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - message_auto_delete_time: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + message_auto_delete_time: int | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - permissions: Optional[ChatPermissions] = Field(None, json_schema_extra={"deprecated": True}) + permissions: ChatPermissions | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Default chat member permissions, for groups and supergroups. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - personal_chat: Optional[Chat] = Field(None, json_schema_extra={"deprecated": True}) + personal_chat: Chat | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For private chats, the personal channel of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - photo: Optional[ChatPhoto] = Field(None, json_schema_extra={"deprecated": True}) + photo: ChatPhoto | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Chat photo. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - pinned_message: Optional[Message] = Field(None, json_schema_extra={"deprecated": True}) + pinned_message: Message | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. The most recent pinned message (by sending date). Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - profile_accent_color_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + profile_accent_color_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Identifier of the accent color for the chat's profile background. See `profile accent colors `_ for more details. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - profile_background_custom_emoji_id: Optional[str] = Field( + profile_background_custom_emoji_id: str | None = Field( None, json_schema_extra={"deprecated": True} ) """*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - slow_mode_delay: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + slow_mode_delay: int | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - sticker_set_name: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + sticker_set_name: str | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For supergroups, name of group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 https://core.telegram.org/bots/api-changelog#may-6-2024""" - unrestrict_boost_count: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + unrestrict_boost_count: int | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions. Returned only in :class:`aiogram.methods.get_chat.GetChat`. .. deprecated:: API:7.3 @@ -276,48 +274,47 @@ class Chat(TelegramObject): *, id: int, type: str, - title: Optional[str] = None, - username: Optional[str] = None, - first_name: Optional[str] = None, - last_name: Optional[str] = None, - is_forum: Optional[bool] = None, - accent_color_id: Optional[int] = None, - active_usernames: Optional[List[str]] = None, - available_reactions: Optional[ - List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]] - ] = None, - background_custom_emoji_id: Optional[str] = None, - bio: Optional[str] = None, - birthdate: Optional[Birthdate] = None, - business_intro: Optional[BusinessIntro] = None, - business_location: Optional[BusinessLocation] = None, - business_opening_hours: Optional[BusinessOpeningHours] = None, - can_set_sticker_set: Optional[bool] = None, - custom_emoji_sticker_set_name: Optional[str] = None, - description: Optional[str] = None, - emoji_status_custom_emoji_id: Optional[str] = None, - emoji_status_expiration_date: Optional[DateTime] = None, - has_aggressive_anti_spam_enabled: Optional[bool] = None, - has_hidden_members: Optional[bool] = None, - has_private_forwards: Optional[bool] = None, - has_protected_content: Optional[bool] = None, - has_restricted_voice_and_video_messages: Optional[bool] = None, - has_visible_history: Optional[bool] = None, - invite_link: Optional[str] = None, - join_by_request: Optional[bool] = None, - join_to_send_messages: Optional[bool] = None, - linked_chat_id: Optional[int] = None, - location: Optional[ChatLocation] = None, - message_auto_delete_time: Optional[int] = None, - permissions: Optional[ChatPermissions] = None, - personal_chat: Optional[Chat] = None, - photo: Optional[ChatPhoto] = None, - pinned_message: Optional[Message] = None, - profile_accent_color_id: Optional[int] = None, - profile_background_custom_emoji_id: Optional[str] = None, - slow_mode_delay: Optional[int] = None, - sticker_set_name: Optional[str] = None, - unrestrict_boost_count: Optional[int] = None, + title: str | None = None, + username: str | None = None, + first_name: str | None = None, + last_name: str | None = None, + is_forum: bool | None = None, + is_direct_messages: bool | None = None, + accent_color_id: int | None = None, + active_usernames: list[str] | None = None, + available_reactions: list[ReactionTypeUnion] | None = None, + background_custom_emoji_id: str | None = None, + bio: str | None = None, + birthdate: Birthdate | None = None, + business_intro: BusinessIntro | None = None, + business_location: BusinessLocation | None = None, + business_opening_hours: BusinessOpeningHours | None = None, + can_set_sticker_set: bool | None = None, + custom_emoji_sticker_set_name: str | None = None, + description: str | None = None, + emoji_status_custom_emoji_id: str | None = None, + emoji_status_expiration_date: DateTime | None = None, + has_aggressive_anti_spam_enabled: bool | None = None, + has_hidden_members: bool | None = None, + has_private_forwards: bool | None = None, + has_protected_content: bool | None = None, + has_restricted_voice_and_video_messages: bool | None = None, + has_visible_history: bool | None = None, + invite_link: str | None = None, + join_by_request: bool | None = None, + join_to_send_messages: bool | None = None, + linked_chat_id: int | None = None, + location: ChatLocation | None = None, + message_auto_delete_time: int | None = None, + permissions: ChatPermissions | None = None, + personal_chat: Chat | None = None, + photo: ChatPhoto | None = None, + pinned_message: Message | None = None, + profile_accent_color_id: int | None = None, + profile_background_custom_emoji_id: str | None = None, + slow_mode_delay: int | None = None, + sticker_set_name: str | None = None, + unrestrict_boost_count: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -332,6 +329,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, @@ -512,7 +510,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. @@ -564,10 +564,10 @@ class Chat(TelegramObject): def edit_invite_link( self, invite_link: str, - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, + name: str | None = None, + expire_date: DateTimeUnion | None = None, + member_limit: int | None = None, + creates_join_request: bool | None = None, **kwargs: Any, ) -> EditChatInviteLink: """ @@ -604,10 +604,10 @@ class Chat(TelegramObject): def create_invite_link( self, - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, + name: str | None = None, + expire_date: DateTimeUnion | None = None, + member_limit: int | None = None, + creates_join_request: bool | None = None, **kwargs: Any, ) -> CreateChatInviteLink: """ @@ -671,8 +671,8 @@ class Chat(TelegramObject): def do( self, action: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, **kwargs: Any, ) -> SendChatAction: """ @@ -691,7 +691,7 @@ class Chat(TelegramObject): :param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_. :param business_connection_id: Unique identifier of the business connection on behalf of which the action will be sent - :param message_thread_id: Unique identifier for the target message thread; for supergroups only + :param message_thread_id: Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only :return: instance of method :class:`aiogram.methods.send_chat_action.SendChatAction` """ # DO NOT EDIT MANUALLY!!! @@ -853,7 +853,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 @@ -871,7 +871,8 @@ class Chat(TelegramObject): def unpin_message( self, - message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_id: int | None = None, **kwargs: Any, ) -> UnpinChatMessage: """ @@ -880,11 +881,12 @@ 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 - :param message_id: Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned. + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be unpinned + :param message_id: Identifier of the message to unpin. Required if *business_connection_id* is specified. If not specified, the most recent pinned message (by sending date) will be unpinned. :return: instance of method :class:`aiogram.methods.unpin_chat_message.UnpinChatMessage` """ # DO NOT EDIT MANUALLY!!! @@ -894,6 +896,7 @@ class Chat(TelegramObject): return UnpinChatMessage( chat_id=self.id, + business_connection_id=business_connection_id, message_id=message_id, **kwargs, ).as_(self._bot) @@ -901,7 +904,8 @@ class Chat(TelegramObject): def pin_message( self, message_id: int, - disable_notification: Optional[bool] = None, + business_connection_id: str | None = None, + disable_notification: bool | None = None, **kwargs: Any, ) -> PinChatMessage: """ @@ -910,11 +914,12 @@ 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 :param message_id: Identifier of a message to pin + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be pinned :param disable_notification: Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. :return: instance of method :class:`aiogram.methods.pin_chat_message.PinChatMessage` """ @@ -926,6 +931,7 @@ class Chat(TelegramObject): return PinChatMessage( chat_id=self.id, message_id=message_id, + business_connection_id=business_connection_id, disable_notification=disable_notification, **kwargs, ).as_(self._bot) @@ -962,10 +968,42 @@ class Chat(TelegramObject): **kwargs, ).as_(self._bot) + def set_member_tag( + self, + user_id: int, + tag: str | None = None, + **kwargs: Any, + ) -> SetChatMemberTag: + """ + Shortcut for method :class:`aiogram.methods.set_chat_member_tag.SetChatMemberTag` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the *can_manage_tags* administrator right. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setchatmembertag + + :param user_id: Unique identifier of the target user + :param tag: New tag for the member; 0-16 characters, emoji are not allowed + :return: instance of method :class:`aiogram.methods.set_chat_member_tag.SetChatMemberTag` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SetChatMemberTag + + return SetChatMemberTag( + chat_id=self.id, + user_id=user_id, + tag=tag, + **kwargs, + ).as_(self._bot) + def set_permissions( self, permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, + use_independent_chat_permissions: bool | None = None, **kwargs: Any, ) -> SetChatPermissions: """ @@ -997,21 +1035,23 @@ class Chat(TelegramObject): def promote( self, user_id: int, - is_anonymous: Optional[bool] = None, - can_manage_chat: Optional[bool] = None, - can_delete_messages: Optional[bool] = None, - can_manage_video_chats: Optional[bool] = None, - can_restrict_members: Optional[bool] = None, - can_promote_members: Optional[bool] = None, - can_change_info: Optional[bool] = None, - can_invite_users: Optional[bool] = None, - can_post_stories: Optional[bool] = None, - can_edit_stories: Optional[bool] = None, - can_delete_stories: Optional[bool] = None, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, + is_anonymous: bool | None = None, + can_manage_chat: bool | None = None, + can_delete_messages: bool | None = None, + can_manage_video_chats: bool | None = None, + can_restrict_members: bool | None = None, + can_promote_members: bool | None = None, + can_change_info: bool | None = None, + can_invite_users: bool | None = None, + can_post_stories: bool | None = None, + can_edit_stories: bool | None = None, + can_delete_stories: bool | None = None, + can_post_messages: bool | None = None, + can_edit_messages: bool | None = None, + can_pin_messages: bool | None = None, + can_manage_topics: bool | None = None, + can_manage_direct_messages: bool | None = None, + can_manage_tags: bool | None = None, **kwargs: Any, ) -> PromoteChatMember: """ @@ -1026,20 +1066,22 @@ class Chat(TelegramObject): :param user_id: Unique identifier of the target user :param is_anonymous: Pass :code:`True` if the administrator's presence in the chat is hidden - :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. + :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. :param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users :param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats - :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics + :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to :code:`True` for promotions of channel administrators :param can_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him) :param can_change_info: Pass :code:`True` if the administrator can change chat title, photo and other settings :param can_invite_users: Pass :code:`True` if the administrator can invite new users to the chat :param can_post_stories: Pass :code:`True` if the administrator can post stories to the chat :param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive :param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users - :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only + :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only :param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only :param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only :param can_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 can_manage_tags: Pass :code:`True` if the administrator can edit the tags of regular members; for groups and supergroups only :return: instance of method :class:`aiogram.methods.promote_chat_member.PromoteChatMember` """ # DO NOT EDIT MANUALLY!!! @@ -1065,6 +1107,8 @@ 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, + can_manage_tags=can_manage_tags, **kwargs, ).as_(self._bot) @@ -1072,8 +1116,8 @@ class Chat(TelegramObject): self, user_id: int, permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + use_independent_chat_permissions: bool | None = None, + until_date: DateTimeUnion | None = None, **kwargs: Any, ) -> RestrictChatMember: """ @@ -1109,7 +1153,7 @@ class Chat(TelegramObject): def unban( self, user_id: int, - only_if_banned: Optional[bool] = None, + only_if_banned: bool | None = None, **kwargs: Any, ) -> UnbanChatMember: """ @@ -1141,8 +1185,8 @@ class Chat(TelegramObject): def ban( self, user_id: int, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - revoke_messages: Optional[bool] = None, + until_date: DateTimeUnion | None = None, + revoke_messages: bool | None = None, **kwargs: Any, ) -> BanChatMember: """ @@ -1175,7 +1219,7 @@ class Chat(TelegramObject): def set_description( self, - description: Optional[str] = None, + description: str | None = None, **kwargs: Any, ) -> SetChatDescription: """ diff --git a/aiogram/types/chat_administrator_rights.py b/aiogram/types/chat_administrator_rights.py index 0b205780..4c0811b9 100644 --- a/aiogram/types/chat_administrator_rights.py +++ b/aiogram/types/chat_administrator_rights.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -18,7 +18,7 @@ class ChatAdministratorRights(TelegramObject): is_anonymous: bool """:code:`True`, if the user's presence in the chat is hidden""" can_manage_chat: bool - """:code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.""" + """:code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.""" can_delete_messages: bool """:code:`True`, if the administrator can delete messages of other users""" can_manage_video_chats: bool @@ -37,14 +37,18 @@ class ChatAdministratorRights(TelegramObject): """:code:`True`, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive""" can_delete_stories: bool """:code:`True`, if the administrator can delete stories posted by other users""" - can_post_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only""" - can_edit_messages: Optional[bool] = None + can_post_messages: bool | None = None + """*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only""" + can_edit_messages: bool | None = None """*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only""" - can_pin_messages: Optional[bool] = None + can_pin_messages: bool | None = None """*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only""" - can_manage_topics: Optional[bool] = None + can_manage_topics: bool | None = None """*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only""" + can_manage_direct_messages: bool | None = None + """*Optional*. :code:`True`, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only""" + can_manage_tags: bool | None = None + """*Optional*. :code:`True`, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -64,10 +68,12 @@ class ChatAdministratorRights(TelegramObject): can_post_stories: bool, can_edit_stories: bool, can_delete_stories: bool, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, + can_post_messages: bool | None = None, + can_edit_messages: bool | None = None, + can_pin_messages: bool | None = None, + can_manage_topics: bool | None = None, + can_manage_direct_messages: bool | None = None, + can_manage_tags: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -90,5 +96,7 @@ 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, + can_manage_tags=can_manage_tags, **__pydantic_kwargs, ) diff --git a/aiogram/types/chat_background.py b/aiogram/types/chat_background.py index 937b4366..c234c8e6 100644 --- a/aiogram/types/chat_background.py +++ b/aiogram/types/chat_background.py @@ -1,13 +1,11 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject if TYPE_CHECKING: - from .background_type_chat_theme import BackgroundTypeChatTheme - from .background_type_fill import BackgroundTypeFill - from .background_type_pattern import BackgroundTypePattern - from .background_type_wallpaper import BackgroundTypeWallpaper -from .base import TelegramObject + from .background_type_union import BackgroundTypeUnion class ChatBackground(TelegramObject): @@ -17,9 +15,7 @@ class ChatBackground(TelegramObject): Source: https://core.telegram.org/bots/api#chatbackground """ - type: Union[ - BackgroundTypeFill, BackgroundTypeWallpaper, BackgroundTypePattern, BackgroundTypeChatTheme - ] + type: BackgroundTypeUnion """Type of the background""" if TYPE_CHECKING: @@ -27,15 +23,7 @@ class ChatBackground(TelegramObject): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, - *, - type: Union[ - BackgroundTypeFill, - BackgroundTypeWallpaper, - BackgroundTypePattern, - BackgroundTypeChatTheme, - ], - **__pydantic_kwargs: Any, + __pydantic__self__, *, type: BackgroundTypeUnion, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/types/chat_boost.py b/aiogram/types/chat_boost.py index 96e444f9..a4d2dc28 100644 --- a/aiogram/types/chat_boost.py +++ b/aiogram/types/chat_boost.py @@ -1,14 +1,12 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any from .base import TelegramObject from .custom import DateTime if TYPE_CHECKING: - from .chat_boost_source_gift_code import ChatBoostSourceGiftCode - from .chat_boost_source_giveaway import ChatBoostSourceGiveaway - from .chat_boost_source_premium import ChatBoostSourcePremium + from .chat_boost_source_union import ChatBoostSourceUnion class ChatBoost(TelegramObject): @@ -24,7 +22,7 @@ class ChatBoost(TelegramObject): """Point in time (Unix timestamp) when the chat was boosted""" expiration_date: DateTime """Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged""" - source: Union[ChatBoostSourcePremium, ChatBoostSourceGiftCode, ChatBoostSourceGiveaway] + source: ChatBoostSourceUnion """Source of the added boost""" if TYPE_CHECKING: @@ -37,9 +35,7 @@ class ChatBoost(TelegramObject): boost_id: str, add_date: DateTime, expiration_date: DateTime, - source: Union[ - ChatBoostSourcePremium, ChatBoostSourceGiftCode, ChatBoostSourceGiveaway - ], + source: ChatBoostSourceUnion, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/chat_boost_removed.py b/aiogram/types/chat_boost_removed.py index 094b0572..8ce7dee1 100644 --- a/aiogram/types/chat_boost_removed.py +++ b/aiogram/types/chat_boost_removed.py @@ -1,15 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any from .base import TelegramObject from .custom import DateTime if TYPE_CHECKING: from .chat import Chat - from .chat_boost_source_gift_code import ChatBoostSourceGiftCode - from .chat_boost_source_giveaway import ChatBoostSourceGiveaway - from .chat_boost_source_premium import ChatBoostSourcePremium + from .chat_boost_source_union import ChatBoostSourceUnion class ChatBoostRemoved(TelegramObject): @@ -25,7 +23,7 @@ class ChatBoostRemoved(TelegramObject): """Unique identifier of the boost""" remove_date: DateTime """Point in time (Unix timestamp) when the boost was removed""" - source: Union[ChatBoostSourcePremium, ChatBoostSourceGiftCode, ChatBoostSourceGiveaway] + source: ChatBoostSourceUnion """Source of the removed boost""" if TYPE_CHECKING: @@ -38,9 +36,7 @@ class ChatBoostRemoved(TelegramObject): chat: Chat, boost_id: str, remove_date: DateTime, - source: Union[ - ChatBoostSourcePremium, ChatBoostSourceGiftCode, ChatBoostSourceGiveaway - ], + source: ChatBoostSourceUnion, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/chat_boost_source_giveaway.py b/aiogram/types/chat_boost_source_giveaway.py index dbb81507..89b1d675 100644 --- a/aiogram/types/chat_boost_source_giveaway.py +++ b/aiogram/types/chat_boost_source_giveaway.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal from ..enums import ChatBoostSourceType from .chat_boost_source import ChatBoostSource @@ -11,7 +11,7 @@ if TYPE_CHECKING: class ChatBoostSourceGiveaway(ChatBoostSource): """ - The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. + The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and *prize_star_count* / 500 times for one year for Telegram Star giveaways. Source: https://core.telegram.org/bots/api#chatboostsourcegiveaway """ @@ -20,10 +20,12 @@ class ChatBoostSourceGiveaway(ChatBoostSource): """Source of the boost, always 'giveaway'""" giveaway_message_id: int """Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet.""" - user: Optional[User] = None - """*Optional*. User that won the prize in the giveaway if any""" - is_unclaimed: Optional[bool] = None - """*Optional*. True, if the giveaway was completed, but there was no user to win the prize""" + user: User | None = None + """*Optional*. User that won the prize in the giveaway if any; for Telegram Premium giveaways only""" + prize_star_count: int | None = None + """*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only""" + is_unclaimed: bool | None = None + """*Optional*. :code:`True`, if the giveaway was completed, but there was no user to win the prize""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -34,8 +36,9 @@ class ChatBoostSourceGiveaway(ChatBoostSource): *, source: Literal[ChatBoostSourceType.GIVEAWAY] = ChatBoostSourceType.GIVEAWAY, giveaway_message_id: int, - user: Optional[User] = None, - is_unclaimed: Optional[bool] = None, + user: User | None = None, + prize_star_count: int | None = None, + is_unclaimed: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -46,6 +49,7 @@ class ChatBoostSourceGiveaway(ChatBoostSource): source=source, giveaway_message_id=giveaway_message_id, user=user, + prize_star_count=prize_star_count, is_unclaimed=is_unclaimed, **__pydantic_kwargs, ) diff --git a/aiogram/types/chat_boost_source_union.py b/aiogram/types/chat_boost_source_union.py new file mode 100644 index 00000000..0fb9e73c --- /dev/null +++ b/aiogram/types/chat_boost_source_union.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .chat_boost_source_gift_code import ChatBoostSourceGiftCode +from .chat_boost_source_giveaway import ChatBoostSourceGiveaway +from .chat_boost_source_premium import ChatBoostSourcePremium + +ChatBoostSourceUnion: TypeAlias = ( + ChatBoostSourcePremium | ChatBoostSourceGiftCode | ChatBoostSourceGiveaway +) diff --git a/aiogram/types/chat_full_info.py b/aiogram/types/chat_full_info.py index 78126929..93fb0a00 100644 --- a/aiogram/types/chat_full_info.py +++ b/aiogram/types/chat_full_info.py @@ -1,11 +1,15 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any + +from pydantic import Field from .chat import Chat from .custom import DateTime if TYPE_CHECKING: + from .accepted_gift_types import AcceptedGiftTypes + from .audio import Audio from .birthdate import Birthdate from .business_intro import BusinessIntro from .business_location import BusinessLocation @@ -14,8 +18,9 @@ if TYPE_CHECKING: from .chat_permissions import ChatPermissions from .chat_photo import ChatPhoto from .message import Message - from .reaction_type_custom_emoji import ReactionTypeCustomEmoji - from .reaction_type_emoji import ReactionTypeEmoji + from .reaction_type_union import ReactionTypeUnion + from .unique_gift_colors import UniqueGiftColors + from .user_rating import UserRating class ChatFullInfo(Chat): @@ -33,86 +38,105 @@ class ChatFullInfo(Chat): """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.""" max_reaction_count: int """The maximum number of reactions that can be set on a message in the chat""" - title: Optional[str] = None + accepted_gift_types: AcceptedGiftTypes + """Information about types of gifts that are accepted by the chat or by the corresponding user for private chats""" + title: str | None = None """*Optional*. Title, for supergroups, channels and group chats""" - username: Optional[str] = None + username: str | None = None """*Optional*. Username, for private chats, supergroups and channels if available""" - first_name: Optional[str] = None + first_name: str | None = None """*Optional*. First name of the other party in a private chat""" - last_name: Optional[str] = None + last_name: str | None = None """*Optional*. Last name of the other party in a private chat""" - is_forum: Optional[bool] = None + is_forum: bool | None = None """*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)""" - photo: Optional[ChatPhoto] = None + is_direct_messages: bool | None = None + """*Optional*. :code:`True`, if the chat is the direct messages chat of a channel""" + photo: ChatPhoto | None = None """*Optional*. Chat photo""" - active_usernames: Optional[List[str]] = None + active_usernames: list[str] | None = None """*Optional*. If non-empty, the list of all `active chat usernames `_; for private chats, supergroups and channels""" - birthdate: Optional[Birthdate] = None + birthdate: Birthdate | None = None """*Optional*. For private chats, the date of birth of the user""" - business_intro: Optional[BusinessIntro] = None + business_intro: BusinessIntro | None = None """*Optional*. For private chats with business accounts, the intro of the business""" - business_location: Optional[BusinessLocation] = None + business_location: BusinessLocation | None = None """*Optional*. For private chats with business accounts, the location of the business""" - business_opening_hours: Optional[BusinessOpeningHours] = None + business_opening_hours: BusinessOpeningHours | None = None """*Optional*. For private chats with business accounts, the opening hours of the business""" - personal_chat: Optional[Chat] = None + personal_chat: Chat | None = None """*Optional*. For private chats, the personal channel of the user""" - available_reactions: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = None + parent_chat: Chat | None = None + """*Optional*. Information about the corresponding channel chat; for direct messages chats only""" + available_reactions: list[ReactionTypeUnion] | None = 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 + background_custom_emoji_id: str | None = None """*Optional*. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background""" - profile_accent_color_id: Optional[int] = None + profile_accent_color_id: int | None = None """*Optional*. Identifier of the accent color for the chat's profile background. See `profile accent colors `_ for more details.""" - profile_background_custom_emoji_id: Optional[str] = None + profile_background_custom_emoji_id: str | None = None """*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background""" - emoji_status_custom_emoji_id: Optional[str] = None + emoji_status_custom_emoji_id: str | None = None """*Optional*. Custom emoji identifier of the emoji status of the chat or the other party in a private chat""" - emoji_status_expiration_date: Optional[DateTime] = None + emoji_status_expiration_date: DateTime | None = None """*Optional*. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any""" - bio: Optional[str] = None + bio: str | None = None """*Optional*. Bio of the other party in a private chat""" - has_private_forwards: Optional[bool] = None + has_private_forwards: bool | None = None """*Optional*. :code:`True`, if privacy settings of the other party in the private chat allows to use :code:`tg://user?id=` links only in chats with the user""" - has_restricted_voice_and_video_messages: Optional[bool] = None + has_restricted_voice_and_video_messages: bool | None = None """*Optional*. :code:`True`, if the privacy settings of the other party restrict sending voice and video note messages in the private chat""" - join_to_send_messages: Optional[bool] = None + join_to_send_messages: bool | None = None """*Optional*. :code:`True`, if users need to join the supergroup before they can send messages""" - join_by_request: Optional[bool] = None + join_by_request: bool | None = None """*Optional*. :code:`True`, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators""" - description: Optional[str] = None + description: str | None = None """*Optional*. Description, for groups, supergroups and channel chats""" - invite_link: Optional[str] = None + invite_link: str | None = None """*Optional*. Primary invite link, for groups, supergroups and channel chats""" - pinned_message: Optional[Message] = None + pinned_message: Message | None = None """*Optional*. The most recent pinned message (by sending date)""" - permissions: Optional[ChatPermissions] = None + permissions: ChatPermissions | None = None """*Optional*. Default chat member permissions, for groups and supergroups""" - can_send_paid_media: Optional[bool] = None + can_send_paid_media: bool | None = None """*Optional*. :code:`True`, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.""" - slow_mode_delay: Optional[int] = None + slow_mode_delay: int | None = None """*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds""" - unrestrict_boost_count: Optional[int] = None + unrestrict_boost_count: int | None = None """*Optional*. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions""" - message_auto_delete_time: Optional[int] = None + message_auto_delete_time: int | None = None """*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds""" - has_aggressive_anti_spam_enabled: Optional[bool] = None + has_aggressive_anti_spam_enabled: bool | None = None """*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.""" - has_hidden_members: Optional[bool] = None + has_hidden_members: bool | None = None """*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat""" - has_protected_content: Optional[bool] = None + has_protected_content: bool | None = None """*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats""" - has_visible_history: Optional[bool] = None + has_visible_history: bool | None = None """*Optional*. :code:`True`, if new chat members will have access to old messages; available only to chat administrators""" - sticker_set_name: Optional[str] = None + sticker_set_name: str | None = None """*Optional*. For supergroups, name of the group sticker set""" - can_set_sticker_set: Optional[bool] = None + can_set_sticker_set: bool | None = None """*Optional*. :code:`True`, if the bot can change the group sticker set""" - custom_emoji_sticker_set_name: Optional[str] = None + custom_emoji_sticker_set_name: str | None = None """*Optional*. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.""" - linked_chat_id: Optional[int] = None + linked_chat_id: int | None = None """*Optional*. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.""" - location: Optional[ChatLocation] = None + location: ChatLocation | None = None """*Optional*. For supergroups, the location to which the supergroup is connected""" + rating: UserRating | None = None + """*Optional*. For private chats, the rating of the user if any""" + first_profile_audio: Audio | None = None + """*Optional*. For private chats, the first audio added to the profile of the user""" + unique_gift_colors: UniqueGiftColors | None = None + """*Optional*. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews""" + paid_message_star_count: int | None = None + """*Optional*. The number of Telegram Stars a general user have to pay to send a message to the chat""" + can_send_gift: bool | None = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. :code:`True`, if gifts can be sent to the chat + +.. deprecated:: API:9.0 + https://core.telegram.org/bots/api-changelog#april-11-2025""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -125,48 +149,54 @@ class ChatFullInfo(Chat): type: str, accent_color_id: int, max_reaction_count: int, - title: Optional[str] = None, - username: Optional[str] = None, - first_name: Optional[str] = None, - last_name: Optional[str] = None, - is_forum: Optional[bool] = None, - photo: Optional[ChatPhoto] = None, - active_usernames: Optional[List[str]] = None, - birthdate: Optional[Birthdate] = None, - business_intro: Optional[BusinessIntro] = None, - business_location: Optional[BusinessLocation] = None, - business_opening_hours: Optional[BusinessOpeningHours] = None, - personal_chat: Optional[Chat] = None, - available_reactions: Optional[ - List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]] - ] = None, - background_custom_emoji_id: Optional[str] = None, - profile_accent_color_id: Optional[int] = None, - profile_background_custom_emoji_id: Optional[str] = None, - emoji_status_custom_emoji_id: Optional[str] = None, - emoji_status_expiration_date: Optional[DateTime] = None, - bio: Optional[str] = None, - has_private_forwards: Optional[bool] = None, - has_restricted_voice_and_video_messages: Optional[bool] = None, - join_to_send_messages: Optional[bool] = None, - join_by_request: Optional[bool] = None, - description: Optional[str] = None, - invite_link: Optional[str] = None, - pinned_message: Optional[Message] = None, - permissions: Optional[ChatPermissions] = None, - can_send_paid_media: Optional[bool] = None, - slow_mode_delay: Optional[int] = None, - unrestrict_boost_count: Optional[int] = None, - message_auto_delete_time: Optional[int] = None, - has_aggressive_anti_spam_enabled: Optional[bool] = None, - has_hidden_members: Optional[bool] = None, - has_protected_content: Optional[bool] = None, - has_visible_history: Optional[bool] = None, - sticker_set_name: Optional[str] = None, - can_set_sticker_set: Optional[bool] = None, - custom_emoji_sticker_set_name: Optional[str] = None, - linked_chat_id: Optional[int] = None, - location: Optional[ChatLocation] = None, + accepted_gift_types: AcceptedGiftTypes, + title: str | None = None, + username: str | None = None, + first_name: str | None = None, + last_name: str | None = None, + is_forum: bool | None = None, + is_direct_messages: bool | None = None, + photo: ChatPhoto | None = None, + active_usernames: list[str] | None = None, + birthdate: Birthdate | None = None, + business_intro: BusinessIntro | None = None, + business_location: BusinessLocation | None = None, + business_opening_hours: BusinessOpeningHours | None = None, + personal_chat: Chat | None = None, + parent_chat: Chat | None = None, + available_reactions: list[ReactionTypeUnion] | None = None, + background_custom_emoji_id: str | None = None, + profile_accent_color_id: int | None = None, + profile_background_custom_emoji_id: str | None = None, + emoji_status_custom_emoji_id: str | None = None, + emoji_status_expiration_date: DateTime | None = None, + bio: str | None = None, + has_private_forwards: bool | None = None, + has_restricted_voice_and_video_messages: bool | None = None, + join_to_send_messages: bool | None = None, + join_by_request: bool | None = None, + description: str | None = None, + invite_link: str | None = None, + pinned_message: Message | None = None, + permissions: ChatPermissions | None = None, + can_send_paid_media: bool | None = None, + slow_mode_delay: int | None = None, + unrestrict_boost_count: int | None = None, + message_auto_delete_time: int | None = None, + has_aggressive_anti_spam_enabled: bool | None = None, + has_hidden_members: bool | None = None, + has_protected_content: bool | None = None, + has_visible_history: bool | None = None, + sticker_set_name: str | None = None, + can_set_sticker_set: bool | None = None, + custom_emoji_sticker_set_name: str | None = None, + linked_chat_id: int | None = None, + location: ChatLocation | None = None, + rating: UserRating | None = None, + first_profile_audio: Audio | None = None, + unique_gift_colors: UniqueGiftColors | None = None, + paid_message_star_count: int | None = None, + can_send_gift: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -178,11 +208,13 @@ class ChatFullInfo(Chat): type=type, accent_color_id=accent_color_id, max_reaction_count=max_reaction_count, + accepted_gift_types=accepted_gift_types, title=title, username=username, 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, @@ -190,6 +222,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, @@ -218,5 +251,10 @@ class ChatFullInfo(Chat): custom_emoji_sticker_set_name=custom_emoji_sticker_set_name, linked_chat_id=linked_chat_id, location=location, + rating=rating, + first_profile_audio=first_profile_audio, + unique_gift_colors=unique_gift_colors, + paid_message_star_count=paid_message_star_count, + can_send_gift=can_send_gift, **__pydantic_kwargs, ) diff --git a/aiogram/types/chat_id_union.py b/aiogram/types/chat_id_union.py new file mode 100644 index 00000000..c5ec3c33 --- /dev/null +++ b/aiogram/types/chat_id_union.py @@ -0,0 +1,5 @@ +from __future__ import annotations + +from typing import TypeAlias + +ChatIdUnion: TypeAlias = int | str diff --git a/aiogram/types/chat_invite_link.py b/aiogram/types/chat_invite_link.py index 7817c23d..3761e464 100644 --- a/aiogram/types/chat_invite_link.py +++ b/aiogram/types/chat_invite_link.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject from .custom import DateTime @@ -26,14 +26,18 @@ class ChatInviteLink(TelegramObject): """:code:`True`, if the link is primary""" is_revoked: bool """:code:`True`, if the link is revoked""" - name: Optional[str] = None + name: str | None = None """*Optional*. Invite link name""" - expire_date: Optional[DateTime] = None + expire_date: DateTime | None = None """*Optional*. Point in time (Unix timestamp) when the link will expire or has been expired""" - member_limit: Optional[int] = None + member_limit: int | None = None """*Optional*. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" - pending_join_request_count: Optional[int] = None + pending_join_request_count: int | None = None """*Optional*. Number of pending join requests created using this link""" + subscription_period: int | None = None + """*Optional*. The number of seconds the subscription will be active for before the next payment""" + subscription_price: int | None = None + """*Optional*. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -47,10 +51,12 @@ class ChatInviteLink(TelegramObject): creates_join_request: bool, is_primary: bool, is_revoked: bool, - name: Optional[str] = None, - expire_date: Optional[DateTime] = None, - member_limit: Optional[int] = None, - pending_join_request_count: Optional[int] = None, + name: str | None = None, + expire_date: DateTime | None = None, + member_limit: int | None = None, + pending_join_request_count: int | None = None, + subscription_period: int | None = None, + subscription_price: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -67,5 +73,7 @@ class ChatInviteLink(TelegramObject): expire_date=expire_date, member_limit=member_limit, pending_join_request_count=pending_join_request_count, + subscription_period=subscription_period, + subscription_price=subscription_price, **__pydantic_kwargs, ) diff --git a/aiogram/types/chat_join_request.py b/aiogram/types/chat_join_request.py index 4a128f17..46f14d32 100644 --- a/aiogram/types/chat_join_request.py +++ b/aiogram/types/chat_join_request.py @@ -1,7 +1,6 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -33,20 +32,18 @@ if TYPE_CHECKING: ) from .chat import Chat from .chat_invite_link import ChatInviteLink - from .force_reply import ForceReply + from .date_time_union import DateTimeUnion from .inline_keyboard_markup import InlineKeyboardMarkup from .input_file import InputFile - from .input_media_audio import InputMediaAudio - from .input_media_document import InputMediaDocument - from .input_media_photo import InputMediaPhoto - from .input_media_video import InputMediaVideo - from .input_poll_option import InputPollOption + from .input_file_union import InputFileUnion + from .input_poll_option_union import InputPollOptionUnion from .labeled_price import LabeledPrice from .link_preview_options import LinkPreviewOptions + from .media_union import MediaUnion from .message_entity import MessageEntity - from .reply_keyboard_markup import ReplyKeyboardMarkup - from .reply_keyboard_remove import ReplyKeyboardRemove + from .reply_markup_union import ReplyMarkupUnion from .reply_parameters import ReplyParameters + from .suggested_post_parameters import SuggestedPostParameters from .user import User @@ -65,9 +62,9 @@ class ChatJoinRequest(TelegramObject): """Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user.""" date: DateTime """Date the request was sent in Unix time""" - bio: Optional[str] = None + bio: str | None = None """*Optional*. Bio of the user.""" - invite_link: Optional[ChatInviteLink] = None + invite_link: ChatInviteLink | None = None """*Optional*. Chat invite link that was used by the user to send the join request""" if TYPE_CHECKING: @@ -81,8 +78,8 @@ class ChatJoinRequest(TelegramObject): from_user: User, user_chat_id: int, date: DateTime, - bio: Optional[str] = None, - invite_link: Optional[ChatInviteLink] = None, + bio: str | None = None, + invite_link: ChatInviteLink | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -158,25 +155,22 @@ class ChatJoinRequest(TelegramObject): def answer( self, text: str, - business_connection_id: Optional[str] = None, - message_thread_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( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendMessage: """ @@ -191,13 +185,16 @@ class ChatJoinRequest(TelegramObject): :param text: Text of the message to be sent, 1-4096 characters after entities parsing :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* :param link_preview_options: Link preview generation options for 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 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 @@ -215,12 +212,15 @@ 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, 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, @@ -232,25 +232,22 @@ class ChatJoinRequest(TelegramObject): def answer_pm( self, text: str, - business_connection_id: Optional[str] = None, - message_thread_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( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendMessage: """ @@ -265,13 +262,16 @@ class ChatJoinRequest(TelegramObject): :param text: Text of the message to be sent, 1-4096 characters after entities parsing :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* :param link_preview_options: Link preview generation options for 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 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 @@ -289,12 +289,15 @@ 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, 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, @@ -305,29 +308,28 @@ class ChatJoinRequest(TelegramObject): def answer_animation( self, - animation: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + animation: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendAnimation: """ @@ -342,7 +344,8 @@ class ChatJoinRequest(TelegramObject): :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent animation in seconds :param width: Animation width :param height: Animation height @@ -354,7 +357,9 @@ class ChatJoinRequest(TelegramObject): :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :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 @@ -371,6 +376,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,7 +388,9 @@ class ChatJoinRequest(TelegramObject): has_spoiler=has_spoiler, 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, @@ -392,29 +400,28 @@ class ChatJoinRequest(TelegramObject): def answer_animation_pm( self, - animation: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + animation: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendAnimation: """ @@ -429,7 +436,8 @@ class ChatJoinRequest(TelegramObject): :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent animation in seconds :param width: Animation width :param height: Animation height @@ -441,7 +449,9 @@ class ChatJoinRequest(TelegramObject): :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :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 @@ -458,6 +468,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, @@ -469,7 +480,9 @@ class ChatJoinRequest(TelegramObject): has_spoiler=has_spoiler, 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, @@ -479,25 +492,26 @@ class ChatJoinRequest(TelegramObject): def answer_audio( self, - audio: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + audio: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendAudio: """ @@ -513,7 +527,8 @@ class ChatJoinRequest(TelegramObject): :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Audio caption, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -523,7 +538,9 @@ class ChatJoinRequest(TelegramObject): :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 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 @@ -540,6 +557,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, @@ -549,7 +567,9 @@ class ChatJoinRequest(TelegramObject): thumbnail=thumbnail, 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, @@ -559,25 +579,26 @@ class ChatJoinRequest(TelegramObject): def answer_audio_pm( self, - audio: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + audio: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendAudio: """ @@ -593,7 +614,8 @@ class ChatJoinRequest(TelegramObject): :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Audio caption, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -603,7 +625,9 @@ class ChatJoinRequest(TelegramObject): :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 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 @@ -620,6 +644,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, @@ -629,7 +654,9 @@ class ChatJoinRequest(TelegramObject): thumbnail=thumbnail, 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, @@ -641,19 +668,20 @@ class ChatJoinRequest(TelegramObject): self, phone_number: str, first_name: str, - business_connection_id: Optional[str] = None, - message_thread_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"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + last_name: str | None = None, + vcard: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendContact: """ @@ -669,12 +697,15 @@ class ChatJoinRequest(TelegramObject): :param phone_number: Contact's phone number :param first_name: Contact's first name :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param last_name: Contact's last name :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes :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 @@ -692,11 +723,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, @@ -708,19 +742,20 @@ class ChatJoinRequest(TelegramObject): self, phone_number: str, first_name: str, - business_connection_id: Optional[str] = None, - message_thread_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"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + last_name: str | None = None, + vcard: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendContact: """ @@ -736,12 +771,15 @@ class ChatJoinRequest(TelegramObject): :param phone_number: Contact's phone number :param first_name: Contact's first name :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param last_name: Contact's last name :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes :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 @@ -759,11 +797,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, @@ -773,23 +814,24 @@ class ChatJoinRequest(TelegramObject): def answer_document( self, - document: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + document: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendDocument: """ @@ -804,7 +846,8 @@ class ChatJoinRequest(TelegramObject): :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details. @@ -812,7 +855,9 @@ class ChatJoinRequest(TelegramObject): :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data :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 @@ -829,6 +874,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, @@ -836,7 +882,9 @@ class ChatJoinRequest(TelegramObject): disable_content_type_detection=disable_content_type_detection, 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, @@ -846,23 +894,24 @@ class ChatJoinRequest(TelegramObject): def answer_document_pm( self, - document: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + document: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendDocument: """ @@ -877,7 +926,8 @@ class ChatJoinRequest(TelegramObject): :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details. @@ -885,7 +935,9 @@ class ChatJoinRequest(TelegramObject): :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data :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 @@ -902,6 +954,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, @@ -909,7 +962,9 @@ class ChatJoinRequest(TelegramObject): disable_content_type_detection=disable_content_type_detection, 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, @@ -920,15 +975,16 @@ class ChatJoinRequest(TelegramObject): def answer_game( self, game_short_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendGame: """ @@ -943,9 +999,10 @@ class ChatJoinRequest(TelegramObject): :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving + :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only :param reply_parameters: Description of the message to reply to :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. @@ -965,6 +1022,7 @@ class ChatJoinRequest(TelegramObject): message_thread_id=message_thread_id, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, @@ -976,15 +1034,16 @@ class ChatJoinRequest(TelegramObject): def answer_game_pm( self, game_short_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendGame: """ @@ -999,9 +1058,10 @@ class ChatJoinRequest(TelegramObject): :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving + :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only :param reply_parameters: Description of the message to reply to :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. @@ -1021,6 +1081,7 @@ class ChatJoinRequest(TelegramObject): message_thread_id=message_thread_id, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, @@ -1035,31 +1096,34 @@ class ChatJoinRequest(TelegramObject): description: str, payload: str, currency: str, - prices: List[LabeledPrice], - message_thread_id: Optional[int] = None, - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + prices: list[LabeledPrice], + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + provider_token: str | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + start_parameter: str | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendInvoice: """ @@ -1074,10 +1138,11 @@ class ChatJoinRequest(TelegramObject): :param title: Product name, 1-32 characters :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_. :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*. @@ -1096,7 +1161,9 @@ class ChatJoinRequest(TelegramObject): :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. :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: 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 @@ -1116,6 +1183,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, @@ -1134,7 +1202,9 @@ class ChatJoinRequest(TelegramObject): is_flexible=is_flexible, 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, @@ -1148,31 +1218,34 @@ class ChatJoinRequest(TelegramObject): description: str, payload: str, currency: str, - prices: List[LabeledPrice], - message_thread_id: Optional[int] = None, - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + prices: list[LabeledPrice], + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + provider_token: str | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + start_parameter: str | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendInvoice: """ @@ -1187,10 +1260,11 @@ class ChatJoinRequest(TelegramObject): :param title: Product name, 1-32 characters :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_. :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*. @@ -1209,7 +1283,9 @@ class ChatJoinRequest(TelegramObject): :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. :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: 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 @@ -1229,6 +1305,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, @@ -1247,7 +1324,9 @@ class ChatJoinRequest(TelegramObject): is_flexible=is_flexible, 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, @@ -1259,21 +1338,22 @@ class ChatJoinRequest(TelegramObject): self, latitude: float, longitude: float, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendLocation: """ @@ -1289,14 +1369,17 @@ class ChatJoinRequest(TelegramObject): :param latitude: Latitude of the location :param longitude: Longitude of the location :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. :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 @@ -1314,13 +1397,16 @@ 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, proximity_alert_radius=proximity_alert_radius, 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, @@ -1332,21 +1418,22 @@ class ChatJoinRequest(TelegramObject): self, latitude: float, longitude: float, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendLocation: """ @@ -1362,14 +1449,17 @@ class ChatJoinRequest(TelegramObject): :param latitude: Latitude of the location :param longitude: Longitude of the location :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. :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 @@ -1387,13 +1477,16 @@ 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, proximity_alert_radius=proximity_alert_radius, 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, @@ -1403,15 +1496,17 @@ class ChatJoinRequest(TelegramObject): def answer_media_group( self, - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + media: list[MediaUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendMediaGroup: """ @@ -1420,15 +1515,17 @@ 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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent messages from forwarding and saving + :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 reply_parameters: Description of the message to reply to :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -1445,8 +1542,10 @@ 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, message_effect_id=message_effect_id, reply_parameters=reply_parameters, allow_sending_without_reply=allow_sending_without_reply, @@ -1456,15 +1555,17 @@ class ChatJoinRequest(TelegramObject): def answer_media_group_pm( self, - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + media: list[MediaUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendMediaGroup: """ @@ -1473,15 +1574,17 @@ 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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent messages from forwarding and saving + :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 reply_parameters: Description of the message to reply to :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -1498,8 +1601,10 @@ 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, message_effect_id=message_effect_id, reply_parameters=reply_parameters, allow_sending_without_reply=allow_sending_without_reply, @@ -1509,25 +1614,24 @@ class ChatJoinRequest(TelegramObject): def answer_photo( self, - photo: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + photo: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendPhoto: """ @@ -1542,7 +1646,8 @@ class ChatJoinRequest(TelegramObject): :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -1550,7 +1655,9 @@ class ChatJoinRequest(TelegramObject): :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :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 @@ -1567,6 +1674,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, @@ -1574,7 +1682,9 @@ class ChatJoinRequest(TelegramObject): has_spoiler=has_spoiler, 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, @@ -1584,25 +1694,24 @@ class ChatJoinRequest(TelegramObject): def answer_photo_pm( self, - photo: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + photo: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendPhoto: """ @@ -1617,7 +1726,8 @@ class ChatJoinRequest(TelegramObject): :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -1625,7 +1735,9 @@ class ChatJoinRequest(TelegramObject): :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :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 @@ -1642,6 +1754,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, @@ -1649,7 +1762,9 @@ class ChatJoinRequest(TelegramObject): has_spoiler=has_spoiler, 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, @@ -1660,30 +1775,37 @@ class ChatJoinRequest(TelegramObject): def answer_poll( self, question: str, - options: List[Union[InputPollOption, str]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + options: list[InputPollOptionUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + question_parse_mode: str | Default | None = Default("parse_mode"), + question_entities: list[MessageEntity] | None = None, + is_anonymous: bool | None = None, + type: str | None = None, + allows_multiple_answers: bool | None = None, + allows_revoting: bool | None = None, + shuffle_options: bool | None = None, + allow_adding_options: bool | None = None, + hide_results_until_closes: bool | None = None, + correct_option_ids: list[int] | None = None, + explanation: str | None = None, + explanation_parse_mode: str | Default | None = Default("parse_mode"), + explanation_entities: list[MessageEntity] | None = None, + open_period: int | None = None, + close_date: DateTimeUnion | None = None, + is_closed: bool | None = None, + description: str | None = None, + description_parse_mode: str | Default | None = Default("parse_mode"), + description_entities: list[MessageEntity] | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + correct_option_id: int | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendPoll: """ @@ -1697,27 +1819,36 @@ class ChatJoinRequest(TelegramObject): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode + :param allows_multiple_answers: Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False` + :param allows_revoting: Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls + :param shuffle_options: Pass :code:`True`, if the poll options must be shown in random order + :param allow_adding_options: Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes + :param hide_results_until_closes: Pass :code:`True`, if poll results must be shown only after the poll closes + :param correct_option_ids: A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. + :param open_period: Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*. + :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*. :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. + :param description: Description of the poll to be sent, 0-1024 characters after entities parsing + :param description_parse_mode: Mode for parsing entities in the poll description. See `formatting options `_ for more details. + :param description_entities: A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode* :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 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 + :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param reply_to_message_id: If the message is a reply, ID of the original message :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` """ @@ -1737,19 +1868,28 @@ class ChatJoinRequest(TelegramObject): is_anonymous=is_anonymous, type=type, allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, + allows_revoting=allows_revoting, + shuffle_options=shuffle_options, + allow_adding_options=allow_adding_options, + hide_results_until_closes=hide_results_until_closes, + correct_option_ids=correct_option_ids, explanation=explanation, explanation_parse_mode=explanation_parse_mode, explanation_entities=explanation_entities, open_period=open_period, close_date=close_date, is_closed=is_closed, + description=description, + description_parse_mode=description_parse_mode, + description_entities=description_entities, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, + correct_option_id=correct_option_id, reply_to_message_id=reply_to_message_id, **kwargs, ).as_(self._bot) @@ -1757,30 +1897,37 @@ class ChatJoinRequest(TelegramObject): def answer_poll_pm( self, question: str, - options: List[Union[InputPollOption, str]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + options: list[InputPollOptionUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + question_parse_mode: str | Default | None = Default("parse_mode"), + question_entities: list[MessageEntity] | None = None, + is_anonymous: bool | None = None, + type: str | None = None, + allows_multiple_answers: bool | None = None, + allows_revoting: bool | None = None, + shuffle_options: bool | None = None, + allow_adding_options: bool | None = None, + hide_results_until_closes: bool | None = None, + correct_option_ids: list[int] | None = None, + explanation: str | None = None, + explanation_parse_mode: str | Default | None = Default("parse_mode"), + explanation_entities: list[MessageEntity] | None = None, + open_period: int | None = None, + close_date: DateTimeUnion | None = None, + is_closed: bool | None = None, + description: str | None = None, + description_parse_mode: str | Default | None = Default("parse_mode"), + description_entities: list[MessageEntity] | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + correct_option_id: int | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendPoll: """ @@ -1794,27 +1941,36 @@ class ChatJoinRequest(TelegramObject): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode + :param allows_multiple_answers: Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False` + :param allows_revoting: Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls + :param shuffle_options: Pass :code:`True`, if the poll options must be shown in random order + :param allow_adding_options: Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes + :param hide_results_until_closes: Pass :code:`True`, if poll results must be shown only after the poll closes + :param correct_option_ids: A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. + :param open_period: Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*. + :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*. :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. + :param description: Description of the poll to be sent, 0-1024 characters after entities parsing + :param description_parse_mode: Mode for parsing entities in the poll description. See `formatting options `_ for more details. + :param description_entities: A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode* :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 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 + :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param reply_to_message_id: If the message is a reply, ID of the original message :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` """ @@ -1834,37 +1990,47 @@ class ChatJoinRequest(TelegramObject): is_anonymous=is_anonymous, type=type, allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, + allows_revoting=allows_revoting, + shuffle_options=shuffle_options, + allow_adding_options=allow_adding_options, + hide_results_until_closes=hide_results_until_closes, + correct_option_ids=correct_option_ids, explanation=explanation, explanation_parse_mode=explanation_parse_mode, explanation_entities=explanation_entities, open_period=open_period, close_date=close_date, is_closed=is_closed, + description=description, + description_parse_mode=description_parse_mode, + description_entities=description_entities, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, + correct_option_id=correct_option_id, reply_to_message_id=reply_to_message_id, **kwargs, ).as_(self._bot) def answer_dice( self, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendDice: """ @@ -1878,11 +2044,14 @@ class ChatJoinRequest(TelegramObject): Source: https://core.telegram.org/bots/api#senddice :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :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 @@ -1898,10 +2067,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, @@ -1911,18 +2083,19 @@ class ChatJoinRequest(TelegramObject): def answer_dice_pm( self, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendDice: """ @@ -1936,11 +2109,14 @@ class ChatJoinRequest(TelegramObject): Source: https://core.telegram.org/bots/api#senddice :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :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 @@ -1956,10 +2132,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, @@ -1969,19 +2148,20 @@ class ChatJoinRequest(TelegramObject): def answer_sticker( self, - sticker: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + sticker: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendSticker: """ @@ -1996,11 +2176,14 @@ class ChatJoinRequest(TelegramObject): :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param emoji: Emoji associated with the sticker; only for just uploaded stickers :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :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 @@ -2017,10 +2200,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, @@ -2030,19 +2216,20 @@ class ChatJoinRequest(TelegramObject): def answer_sticker_pm( self, - sticker: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + sticker: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendSticker: """ @@ -2057,11 +2244,14 @@ class ChatJoinRequest(TelegramObject): :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param emoji: Emoji associated with the sticker; only for just uploaded stickers :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :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 @@ -2078,10 +2268,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, @@ -2095,21 +2288,22 @@ class ChatJoinRequest(TelegramObject): longitude: float, title: str, address: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVenue: """ @@ -2127,14 +2321,17 @@ class ChatJoinRequest(TelegramObject): :param title: Name of the venue :param address: Address of the venue :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param foursquare_id: Foursquare identifier of the venue :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) :param google_place_id: Google Places identifier of the venue :param google_place_type: Google Places type of the venue. (See `supported types `_.) :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 @@ -2154,13 +2351,16 @@ 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, google_place_type=google_place_type, 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, @@ -2174,21 +2374,22 @@ class ChatJoinRequest(TelegramObject): longitude: float, title: str, address: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVenue: """ @@ -2206,14 +2407,17 @@ class ChatJoinRequest(TelegramObject): :param title: Name of the venue :param address: Address of the venue :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param foursquare_id: Foursquare identifier of the venue :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) :param google_place_id: Google Places identifier of the venue :param google_place_type: Google Places type of the venue. (See `supported types `_.) :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 @@ -2233,13 +2437,16 @@ 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, google_place_type=google_place_type, 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, @@ -2249,30 +2456,31 @@ class ChatJoinRequest(TelegramObject): def answer_video( self, - video: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + video: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + cover: InputFileUnion | None = None, + start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + supports_streaming: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVideo: """ @@ -2287,11 +2495,14 @@ class ChatJoinRequest(TelegramObject): :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent video in seconds :param width: Video width :param height: Video height :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 cover: Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » ` + :param start_timestamp: Start timestamp for the video in the message :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the video 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* @@ -2300,7 +2511,9 @@ class ChatJoinRequest(TelegramObject): :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming :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 @@ -2317,10 +2530,13 @@ 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, thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2329,7 +2545,9 @@ class ChatJoinRequest(TelegramObject): supports_streaming=supports_streaming, 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, @@ -2339,30 +2557,31 @@ class ChatJoinRequest(TelegramObject): def answer_video_pm( self, - video: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + video: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + cover: InputFileUnion | None = None, + start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + supports_streaming: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVideo: """ @@ -2377,11 +2596,14 @@ class ChatJoinRequest(TelegramObject): :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent video in seconds :param width: Video width :param height: Video height :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 cover: Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » ` + :param start_timestamp: Start timestamp for the video in the message :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the video 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* @@ -2390,7 +2612,9 @@ class ChatJoinRequest(TelegramObject): :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming :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 @@ -2407,10 +2631,13 @@ 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, thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2419,7 +2646,9 @@ class ChatJoinRequest(TelegramObject): supports_streaming=supports_streaming, 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, @@ -2429,21 +2658,22 @@ class ChatJoinRequest(TelegramObject): def answer_video_note( self, - video_note: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + video_note: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + length: int | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVideoNote: """ @@ -2458,13 +2688,16 @@ class ChatJoinRequest(TelegramObject): :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent video in seconds :param length: Video width and height, i.e. diameter of the video message :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 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 @@ -2481,12 +2714,15 @@ 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, 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, @@ -2496,21 +2732,22 @@ class ChatJoinRequest(TelegramObject): def answer_video_note_pm( self, - video_note: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + video_note: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + length: int | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVideoNote: """ @@ -2525,13 +2762,16 @@ class ChatJoinRequest(TelegramObject): :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent video in seconds :param length: Video width and height, i.e. diameter of the video message :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 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 @@ -2548,12 +2788,15 @@ 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, 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, @@ -2563,22 +2806,23 @@ class ChatJoinRequest(TelegramObject): def answer_voice( self, - voice: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + voice: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVoice: """ @@ -2593,14 +2837,17 @@ class ChatJoinRequest(TelegramObject): :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Voice message caption, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param duration: Duration of the voice message in seconds :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 @@ -2617,13 +2864,16 @@ 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, duration=duration, 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, @@ -2633,22 +2883,23 @@ class ChatJoinRequest(TelegramObject): def answer_voice_pm( self, - voice: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + voice: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVoice: """ @@ -2663,14 +2914,17 @@ class ChatJoinRequest(TelegramObject): :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Voice message caption, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param duration: Duration of the voice message in seconds :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 @@ -2687,13 +2941,16 @@ 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, duration=duration, 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/types/chat_member_administrator.py b/aiogram/types/chat_member_administrator.py index 10552f74..1d8915bc 100644 --- a/aiogram/types/chat_member_administrator.py +++ b/aiogram/types/chat_member_administrator.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal from ..enums import ChatMemberStatus from .chat_member import ChatMember @@ -25,7 +25,7 @@ class ChatMemberAdministrator(ChatMember): is_anonymous: bool """:code:`True`, if the user's presence in the chat is hidden""" can_manage_chat: bool - """:code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.""" + """:code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.""" can_delete_messages: bool """:code:`True`, if the administrator can delete messages of other users""" can_manage_video_chats: bool @@ -44,15 +44,19 @@ class ChatMemberAdministrator(ChatMember): """:code:`True`, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive""" can_delete_stories: bool """:code:`True`, if the administrator can delete stories posted by other users""" - can_post_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only""" - can_edit_messages: Optional[bool] = None + can_post_messages: bool | None = None + """*Optional*. :code:`True`, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only""" + can_edit_messages: bool | None = None """*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only""" - can_pin_messages: Optional[bool] = None + can_pin_messages: bool | None = None """*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only""" - can_manage_topics: Optional[bool] = None + can_manage_topics: bool | None = None """*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only""" - custom_title: Optional[str] = None + can_manage_direct_messages: bool | None = None + """*Optional*. :code:`True`, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only""" + can_manage_tags: bool | None = None + """*Optional*. :code:`True`, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.""" + custom_title: str | None = None """*Optional*. Custom title for this user""" if TYPE_CHECKING: @@ -76,11 +80,13 @@ class ChatMemberAdministrator(ChatMember): can_post_stories: bool, can_edit_stories: bool, can_delete_stories: bool, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, - custom_title: Optional[str] = None, + can_post_messages: bool | None = None, + can_edit_messages: bool | None = None, + can_pin_messages: bool | None = None, + can_manage_topics: bool | None = None, + can_manage_direct_messages: bool | None = None, + can_manage_tags: bool | None = None, + custom_title: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -106,6 +112,8 @@ 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, + can_manage_tags=can_manage_tags, custom_title=custom_title, **__pydantic_kwargs, ) diff --git a/aiogram/types/chat_member_member.py b/aiogram/types/chat_member_member.py index 663b190b..0cd89e76 100644 --- a/aiogram/types/chat_member_member.py +++ b/aiogram/types/chat_member_member.py @@ -4,6 +4,7 @@ from typing import TYPE_CHECKING, Any, Literal from ..enums import ChatMemberStatus from .chat_member import ChatMember +from .custom import DateTime if TYPE_CHECKING: from .user import User @@ -20,6 +21,10 @@ class ChatMemberMember(ChatMember): """The member's status in the chat, always 'member'""" user: User """Information about the user""" + tag: str | None = None + """*Optional*. Tag of the member""" + until_date: DateTime | None = None + """*Optional*. Date when the user's subscription will expire; Unix time""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -30,10 +35,14 @@ class ChatMemberMember(ChatMember): *, status: Literal[ChatMemberStatus.MEMBER] = ChatMemberStatus.MEMBER, user: User, + tag: str | None = None, + until_date: DateTime | None = 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__(status=status, user=user, **__pydantic_kwargs) + super().__init__( + status=status, user=user, tag=tag, until_date=until_date, **__pydantic_kwargs + ) diff --git a/aiogram/types/chat_member_owner.py b/aiogram/types/chat_member_owner.py index 1429435e..c3f9ddf3 100644 --- a/aiogram/types/chat_member_owner.py +++ b/aiogram/types/chat_member_owner.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal from ..enums import ChatMemberStatus from .chat_member import ChatMember @@ -22,7 +22,7 @@ class ChatMemberOwner(ChatMember): """Information about the user""" is_anonymous: bool """:code:`True`, if the user's presence in the chat is hidden""" - custom_title: Optional[str] = None + custom_title: str | None = None """*Optional*. Custom title for this user""" if TYPE_CHECKING: @@ -35,7 +35,7 @@ class ChatMemberOwner(ChatMember): status: Literal[ChatMemberStatus.CREATOR] = ChatMemberStatus.CREATOR, user: User, is_anonymous: bool, - custom_title: Optional[str] = None, + custom_title: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/chat_member_restricted.py b/aiogram/types/chat_member_restricted.py index edda75e4..0fc162ff 100644 --- a/aiogram/types/chat_member_restricted.py +++ b/aiogram/types/chat_member_restricted.py @@ -38,11 +38,13 @@ class ChatMemberRestricted(ChatMember): can_send_voice_notes: bool """:code:`True`, if the user is allowed to send voice notes""" can_send_polls: bool - """:code:`True`, if the user is allowed to send polls""" + """:code:`True`, if the user is allowed to send polls and checklists""" can_send_other_messages: bool """:code:`True`, if the user is allowed to send animations, games, stickers and use inline bots""" can_add_web_page_previews: bool """:code:`True`, if the user is allowed to add web page previews to their messages""" + can_edit_tag: bool + """:code:`True`, if the user is allowed to edit their own tag""" can_change_info: bool """:code:`True`, if the user is allowed to change the chat title, photo and other settings""" can_invite_users: bool @@ -53,6 +55,8 @@ class ChatMemberRestricted(ChatMember): """:code:`True`, if the user is allowed to create forum topics""" until_date: DateTime """Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever""" + tag: str | None = None + """*Optional*. Tag of the member""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -74,11 +78,13 @@ class ChatMemberRestricted(ChatMember): can_send_polls: bool, can_send_other_messages: bool, can_add_web_page_previews: bool, + can_edit_tag: bool, can_change_info: bool, can_invite_users: bool, can_pin_messages: bool, can_manage_topics: bool, until_date: DateTime, + tag: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -99,10 +105,12 @@ class ChatMemberRestricted(ChatMember): can_send_polls=can_send_polls, can_send_other_messages=can_send_other_messages, can_add_web_page_previews=can_add_web_page_previews, + can_edit_tag=can_edit_tag, can_change_info=can_change_info, can_invite_users=can_invite_users, can_pin_messages=can_pin_messages, can_manage_topics=can_manage_topics, until_date=until_date, + tag=tag, **__pydantic_kwargs, ) diff --git a/aiogram/types/chat_member_union.py b/aiogram/types/chat_member_union.py new file mode 100644 index 00000000..f8e4b769 --- /dev/null +++ b/aiogram/types/chat_member_union.py @@ -0,0 +1,19 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .chat_member_administrator import ChatMemberAdministrator +from .chat_member_banned import ChatMemberBanned +from .chat_member_left import ChatMemberLeft +from .chat_member_member import ChatMemberMember +from .chat_member_owner import ChatMemberOwner +from .chat_member_restricted import ChatMemberRestricted + +ChatMemberUnion: TypeAlias = ( + ChatMemberOwner + | ChatMemberAdministrator + | ChatMemberMember + | ChatMemberRestricted + | ChatMemberLeft + | ChatMemberBanned +) diff --git a/aiogram/types/chat_member_updated.py b/aiogram/types/chat_member_updated.py index 48c3e9db..34cd5c09 100644 --- a/aiogram/types/chat_member_updated.py +++ b/aiogram/types/chat_member_updated.py @@ -1,7 +1,6 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -31,26 +30,19 @@ if TYPE_CHECKING: ) from .chat import Chat from .chat_invite_link import ChatInviteLink - from .chat_member_administrator import ChatMemberAdministrator - from .chat_member_banned import ChatMemberBanned - from .chat_member_left import ChatMemberLeft - from .chat_member_member import ChatMemberMember - from .chat_member_owner import ChatMemberOwner - from .chat_member_restricted import ChatMemberRestricted - from .force_reply import ForceReply + from .chat_member_union import ChatMemberUnion + from .date_time_union import DateTimeUnion from .inline_keyboard_markup import InlineKeyboardMarkup from .input_file import InputFile - from .input_media_audio import InputMediaAudio - from .input_media_document import InputMediaDocument - from .input_media_photo import InputMediaPhoto - from .input_media_video import InputMediaVideo - from .input_poll_option import InputPollOption + from .input_file_union import InputFileUnion + from .input_poll_option_union import InputPollOptionUnion from .labeled_price import LabeledPrice from .link_preview_options import LinkPreviewOptions + from .media_union import MediaUnion from .message_entity import MessageEntity - from .reply_keyboard_markup import ReplyKeyboardMarkup - from .reply_keyboard_remove import ReplyKeyboardRemove + from .reply_markup_union import ReplyMarkupUnion from .reply_parameters import ReplyParameters + from .suggested_post_parameters import SuggestedPostParameters from .user import User @@ -67,30 +59,16 @@ class ChatMemberUpdated(TelegramObject): """Performer of the action, which resulted in the change""" date: DateTime """Date the change was done in Unix time""" - old_chat_member: Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] + old_chat_member: ChatMemberUnion """Previous information about the chat member""" - new_chat_member: Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] + new_chat_member: ChatMemberUnion """New information about the chat member""" - invite_link: Optional[ChatInviteLink] = None + invite_link: ChatInviteLink | None = None """*Optional*. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.""" - via_join_request: Optional[bool] = None - """*Optional*. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator""" - via_chat_folder_invite_link: Optional[bool] = None - """*Optional*. True, if the user joined the chat via a chat folder invite link""" + via_join_request: bool | None = None + """*Optional*. :code:`True`, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator""" + via_chat_folder_invite_link: bool | None = None + """*Optional*. :code:`True`, if the user joined the chat via a chat folder invite link""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -102,25 +80,11 @@ class ChatMemberUpdated(TelegramObject): chat: Chat, from_user: User, date: DateTime, - old_chat_member: Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ], - new_chat_member: Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ], - invite_link: Optional[ChatInviteLink] = None, - via_join_request: Optional[bool] = None, - via_chat_folder_invite_link: Optional[bool] = None, + old_chat_member: ChatMemberUnion, + new_chat_member: ChatMemberUnion, + invite_link: ChatInviteLink | None = None, + via_join_request: bool | None = None, + via_chat_folder_invite_link: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -142,25 +106,22 @@ class ChatMemberUpdated(TelegramObject): def answer( self, text: str, - business_connection_id: Optional[str] = None, - message_thread_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( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendMessage: """ @@ -175,13 +136,16 @@ class ChatMemberUpdated(TelegramObject): :param text: Text of the message to be sent, 1-4096 characters after entities parsing :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* :param link_preview_options: Link preview generation options for 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 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 @@ -199,12 +163,15 @@ 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, 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, @@ -215,29 +182,28 @@ class ChatMemberUpdated(TelegramObject): def answer_animation( self, - animation: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + animation: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendAnimation: """ @@ -252,7 +218,8 @@ class ChatMemberUpdated(TelegramObject): :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent animation in seconds :param width: Animation width :param height: Animation height @@ -264,7 +231,9 @@ class ChatMemberUpdated(TelegramObject): :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :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 @@ -281,6 +250,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, @@ -292,7 +262,9 @@ class ChatMemberUpdated(TelegramObject): has_spoiler=has_spoiler, 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, @@ -302,25 +274,26 @@ class ChatMemberUpdated(TelegramObject): def answer_audio( self, - audio: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + audio: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendAudio: """ @@ -336,7 +309,8 @@ class ChatMemberUpdated(TelegramObject): :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Audio caption, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -346,7 +320,9 @@ class ChatMemberUpdated(TelegramObject): :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 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 @@ -363,6 +339,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, @@ -372,7 +349,9 @@ class ChatMemberUpdated(TelegramObject): thumbnail=thumbnail, 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, @@ -384,19 +363,20 @@ class ChatMemberUpdated(TelegramObject): self, phone_number: str, first_name: str, - business_connection_id: Optional[str] = None, - message_thread_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"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + last_name: str | None = None, + vcard: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendContact: """ @@ -412,12 +392,15 @@ class ChatMemberUpdated(TelegramObject): :param phone_number: Contact's phone number :param first_name: Contact's first name :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param last_name: Contact's last name :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes :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 @@ -435,11 +418,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, @@ -449,23 +435,24 @@ class ChatMemberUpdated(TelegramObject): def answer_document( self, - document: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + document: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendDocument: """ @@ -480,7 +467,8 @@ class ChatMemberUpdated(TelegramObject): :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details. @@ -488,7 +476,9 @@ class ChatMemberUpdated(TelegramObject): :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data :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 @@ -505,6 +495,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, @@ -512,7 +503,9 @@ class ChatMemberUpdated(TelegramObject): disable_content_type_detection=disable_content_type_detection, 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, @@ -523,15 +516,16 @@ class ChatMemberUpdated(TelegramObject): def answer_game( self, game_short_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendGame: """ @@ -546,9 +540,10 @@ class ChatMemberUpdated(TelegramObject): :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving + :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only :param reply_parameters: Description of the message to reply to :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. @@ -568,6 +563,7 @@ class ChatMemberUpdated(TelegramObject): message_thread_id=message_thread_id, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, @@ -582,31 +578,34 @@ class ChatMemberUpdated(TelegramObject): description: str, payload: str, currency: str, - prices: List[LabeledPrice], - message_thread_id: Optional[int] = None, - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + prices: list[LabeledPrice], + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + provider_token: str | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + start_parameter: str | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendInvoice: """ @@ -621,10 +620,11 @@ class ChatMemberUpdated(TelegramObject): :param title: Product name, 1-32 characters :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_. :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*. @@ -643,7 +643,9 @@ class ChatMemberUpdated(TelegramObject): :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. :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: 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 @@ -663,6 +665,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, @@ -681,7 +684,9 @@ class ChatMemberUpdated(TelegramObject): is_flexible=is_flexible, 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, @@ -693,21 +698,22 @@ class ChatMemberUpdated(TelegramObject): self, latitude: float, longitude: float, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendLocation: """ @@ -723,14 +729,17 @@ class ChatMemberUpdated(TelegramObject): :param latitude: Latitude of the location :param longitude: Longitude of the location :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. :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 @@ -748,13 +757,16 @@ 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, proximity_alert_radius=proximity_alert_radius, 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, @@ -764,15 +776,17 @@ class ChatMemberUpdated(TelegramObject): def answer_media_group( self, - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + media: list[MediaUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendMediaGroup: """ @@ -781,15 +795,17 @@ 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 message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent messages from forwarding and saving + :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 reply_parameters: Description of the message to reply to :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -806,8 +822,10 @@ 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, message_effect_id=message_effect_id, reply_parameters=reply_parameters, allow_sending_without_reply=allow_sending_without_reply, @@ -817,25 +835,24 @@ class ChatMemberUpdated(TelegramObject): def answer_photo( self, - photo: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + photo: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendPhoto: """ @@ -850,7 +867,8 @@ class ChatMemberUpdated(TelegramObject): :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -858,7 +876,9 @@ class ChatMemberUpdated(TelegramObject): :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :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 @@ -875,6 +895,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, @@ -882,7 +903,9 @@ class ChatMemberUpdated(TelegramObject): has_spoiler=has_spoiler, 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, @@ -893,30 +916,37 @@ class ChatMemberUpdated(TelegramObject): def answer_poll( self, question: str, - options: List[Union[InputPollOption, str]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + options: list[InputPollOptionUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + question_parse_mode: str | Default | None = Default("parse_mode"), + question_entities: list[MessageEntity] | None = None, + is_anonymous: bool | None = None, + type: str | None = None, + allows_multiple_answers: bool | None = None, + allows_revoting: bool | None = None, + shuffle_options: bool | None = None, + allow_adding_options: bool | None = None, + hide_results_until_closes: bool | None = None, + correct_option_ids: list[int] | None = None, + explanation: str | None = None, + explanation_parse_mode: str | Default | None = Default("parse_mode"), + explanation_entities: list[MessageEntity] | None = None, + open_period: int | None = None, + close_date: DateTimeUnion | None = None, + is_closed: bool | None = None, + description: str | None = None, + description_parse_mode: str | Default | None = Default("parse_mode"), + description_entities: list[MessageEntity] | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + correct_option_id: int | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendPoll: """ @@ -930,27 +960,36 @@ class ChatMemberUpdated(TelegramObject): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode + :param allows_multiple_answers: Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False` + :param allows_revoting: Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls + :param shuffle_options: Pass :code:`True`, if the poll options must be shown in random order + :param allow_adding_options: Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes + :param hide_results_until_closes: Pass :code:`True`, if poll results must be shown only after the poll closes + :param correct_option_ids: A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. + :param open_period: Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*. + :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*. :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. + :param description: Description of the poll to be sent, 0-1024 characters after entities parsing + :param description_parse_mode: Mode for parsing entities in the poll description. See `formatting options `_ for more details. + :param description_entities: A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode* :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 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 + :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param reply_to_message_id: If the message is a reply, ID of the original message :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` """ @@ -970,37 +1009,47 @@ class ChatMemberUpdated(TelegramObject): is_anonymous=is_anonymous, type=type, allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, + allows_revoting=allows_revoting, + shuffle_options=shuffle_options, + allow_adding_options=allow_adding_options, + hide_results_until_closes=hide_results_until_closes, + correct_option_ids=correct_option_ids, explanation=explanation, explanation_parse_mode=explanation_parse_mode, explanation_entities=explanation_entities, open_period=open_period, close_date=close_date, is_closed=is_closed, + description=description, + description_parse_mode=description_parse_mode, + description_entities=description_entities, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, + correct_option_id=correct_option_id, reply_to_message_id=reply_to_message_id, **kwargs, ).as_(self._bot) def answer_dice( self, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendDice: """ @@ -1014,11 +1063,14 @@ class ChatMemberUpdated(TelegramObject): Source: https://core.telegram.org/bots/api#senddice :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :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 @@ -1034,10 +1086,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, @@ -1047,19 +1102,20 @@ class ChatMemberUpdated(TelegramObject): def answer_sticker( self, - sticker: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + sticker: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendSticker: """ @@ -1074,11 +1130,14 @@ class ChatMemberUpdated(TelegramObject): :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param emoji: Emoji associated with the sticker; only for just uploaded stickers :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :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 @@ -1095,10 +1154,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, @@ -1112,21 +1174,22 @@ class ChatMemberUpdated(TelegramObject): longitude: float, title: str, address: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVenue: """ @@ -1144,14 +1207,17 @@ class ChatMemberUpdated(TelegramObject): :param title: Name of the venue :param address: Address of the venue :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param foursquare_id: Foursquare identifier of the venue :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) :param google_place_id: Google Places identifier of the venue :param google_place_type: Google Places type of the venue. (See `supported types `_.) :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 @@ -1171,13 +1237,16 @@ 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, google_place_type=google_place_type, 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, @@ -1187,30 +1256,31 @@ class ChatMemberUpdated(TelegramObject): def answer_video( self, - video: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + video: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + cover: InputFileUnion | None = None, + start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + supports_streaming: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVideo: """ @@ -1225,11 +1295,14 @@ class ChatMemberUpdated(TelegramObject): :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent video in seconds :param width: Video width :param height: Video height :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 cover: Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » ` + :param start_timestamp: Start timestamp for the video in the message :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the video 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* @@ -1238,7 +1311,9 @@ class ChatMemberUpdated(TelegramObject): :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming :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 @@ -1255,10 +1330,13 @@ 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, thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -1267,7 +1345,9 @@ class ChatMemberUpdated(TelegramObject): supports_streaming=supports_streaming, 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, @@ -1277,21 +1357,22 @@ class ChatMemberUpdated(TelegramObject): def answer_video_note( self, - video_note: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + video_note: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + length: int | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVideoNote: """ @@ -1306,13 +1387,16 @@ class ChatMemberUpdated(TelegramObject): :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param duration: Duration of sent video in seconds :param length: Video width and height, i.e. diameter of the video message :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 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 @@ -1329,12 +1413,15 @@ 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, 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, @@ -1344,22 +1431,23 @@ class ChatMemberUpdated(TelegramObject): def answer_voice( self, - voice: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + voice: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVoice: """ @@ -1374,14 +1462,17 @@ class ChatMemberUpdated(TelegramObject): :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat :param caption: Voice message caption, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param duration: Duration of the voice message in seconds :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 @@ -1398,13 +1489,16 @@ 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, duration=duration, 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/types/chat_owner_changed.py b/aiogram/types/chat_owner_changed.py new file mode 100644 index 00000000..1b9bc00f --- /dev/null +++ b/aiogram/types/chat_owner_changed.py @@ -0,0 +1,30 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .user import User + + +class ChatOwnerChanged(TelegramObject): + """ + Describes a service message about an ownership change in the chat. + + Source: https://core.telegram.org/bots/api#chatownerchanged + """ + + new_owner: User + """The new owner of the chat""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, new_owner: User, **__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__(new_owner=new_owner, **__pydantic_kwargs) diff --git a/aiogram/types/chat_owner_left.py b/aiogram/types/chat_owner_left.py new file mode 100644 index 00000000..8c9af97d --- /dev/null +++ b/aiogram/types/chat_owner_left.py @@ -0,0 +1,32 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .user import User + + +class ChatOwnerLeft(TelegramObject): + """ + Describes a service message about the chat owner leaving the chat. + + Source: https://core.telegram.org/bots/api#chatownerleft + """ + + new_owner: User | None = None + """*Optional*. The user which will be the new owner of the chat if the previous owner does not return to the chat""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, new_owner: User | None = 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__(new_owner=new_owner, **__pydantic_kwargs) diff --git a/aiogram/types/chat_permissions.py b/aiogram/types/chat_permissions.py index 6270cc3f..473a38bb 100644 --- a/aiogram/types/chat_permissions.py +++ b/aiogram/types/chat_permissions.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import MutableTelegramObject @@ -12,33 +12,35 @@ class ChatPermissions(MutableTelegramObject): Source: https://core.telegram.org/bots/api#chatpermissions """ - can_send_messages: Optional[bool] = None + can_send_messages: bool | None = None """*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues""" - can_send_audios: Optional[bool] = None + can_send_audios: bool | None = None """*Optional*. :code:`True`, if the user is allowed to send audios""" - can_send_documents: Optional[bool] = None + can_send_documents: bool | None = None """*Optional*. :code:`True`, if the user is allowed to send documents""" - can_send_photos: Optional[bool] = None + can_send_photos: bool | None = None """*Optional*. :code:`True`, if the user is allowed to send photos""" - can_send_videos: Optional[bool] = None + can_send_videos: bool | None = None """*Optional*. :code:`True`, if the user is allowed to send videos""" - can_send_video_notes: Optional[bool] = None + can_send_video_notes: bool | None = None """*Optional*. :code:`True`, if the user is allowed to send video notes""" - can_send_voice_notes: Optional[bool] = None + can_send_voice_notes: bool | None = None """*Optional*. :code:`True`, if the user is allowed to send voice notes""" - can_send_polls: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send polls""" - can_send_other_messages: Optional[bool] = None + can_send_polls: bool | None = None + """*Optional*. :code:`True`, if the user is allowed to send polls and checklists""" + can_send_other_messages: bool | None = None """*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots""" - can_add_web_page_previews: Optional[bool] = None + can_add_web_page_previews: bool | None = None """*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages""" - can_change_info: Optional[bool] = None + can_edit_tag: bool | None = None + """*Optional*. :code:`True`, if the user is allowed to edit their own tag""" + can_change_info: bool | None = None """*Optional*. :code:`True`, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups""" - can_invite_users: Optional[bool] = None + can_invite_users: bool | None = None """*Optional*. :code:`True`, if the user is allowed to invite new users to the chat""" - can_pin_messages: Optional[bool] = None + can_pin_messages: bool | None = None """*Optional*. :code:`True`, if the user is allowed to pin messages. Ignored in public supergroups""" - can_manage_topics: Optional[bool] = None + can_manage_topics: bool | None = None """*Optional*. :code:`True`, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages""" if TYPE_CHECKING: @@ -48,20 +50,21 @@ class ChatPermissions(MutableTelegramObject): def __init__( __pydantic__self__, *, - can_send_messages: Optional[bool] = None, - can_send_audios: Optional[bool] = None, - can_send_documents: Optional[bool] = None, - can_send_photos: Optional[bool] = None, - can_send_videos: Optional[bool] = None, - can_send_video_notes: Optional[bool] = None, - can_send_voice_notes: Optional[bool] = None, - can_send_polls: Optional[bool] = None, - can_send_other_messages: Optional[bool] = None, - can_add_web_page_previews: Optional[bool] = None, - can_change_info: Optional[bool] = None, - can_invite_users: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, + can_send_messages: bool | None = None, + can_send_audios: bool | None = None, + can_send_documents: bool | None = None, + can_send_photos: bool | None = None, + can_send_videos: bool | None = None, + can_send_video_notes: bool | None = None, + can_send_voice_notes: bool | None = None, + can_send_polls: bool | None = None, + can_send_other_messages: bool | None = None, + can_add_web_page_previews: bool | None = None, + can_edit_tag: bool | None = None, + can_change_info: bool | None = None, + can_invite_users: bool | None = None, + can_pin_messages: bool | None = None, + can_manage_topics: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -79,6 +82,7 @@ class ChatPermissions(MutableTelegramObject): can_send_polls=can_send_polls, can_send_other_messages=can_send_other_messages, can_add_web_page_previews=can_add_web_page_previews, + can_edit_tag=can_edit_tag, can_change_info=can_change_info, can_invite_users=can_invite_users, can_pin_messages=can_pin_messages, diff --git a/aiogram/types/chat_shared.py b/aiogram/types/chat_shared.py index 92d62316..80c38e1a 100644 --- a/aiogram/types/chat_shared.py +++ b/aiogram/types/chat_shared.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from aiogram.types import TelegramObject @@ -19,11 +19,11 @@ class ChatShared(TelegramObject): """Identifier of the request""" chat_id: int """Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.""" - title: Optional[str] = None + title: str | None = None """*Optional*. Title of the chat, if the title was requested by the bot.""" - username: Optional[str] = None + username: str | None = None """*Optional*. Username of the chat, if the username was requested by the bot and available.""" - photo: Optional[List[PhotoSize]] = None + photo: list[PhotoSize] | None = None """*Optional*. Available sizes of the chat photo, if the photo was requested by the bot""" if TYPE_CHECKING: @@ -35,9 +35,9 @@ class ChatShared(TelegramObject): *, request_id: int, chat_id: int, - title: Optional[str] = None, - username: Optional[str] = None, - photo: Optional[List[PhotoSize]] = None, + title: str | None = None, + username: str | None = None, + photo: list[PhotoSize] | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/checklist.py b/aiogram/types/checklist.py new file mode 100644 index 00000000..fd2cb209 --- /dev/null +++ b/aiogram/types/checklist.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .checklist_task import ChecklistTask + from .message_entity import MessageEntity + + +class Checklist(TelegramObject): + """ + Describes a checklist. + + Source: https://core.telegram.org/bots/api#checklist + """ + + title: str + """Title of the checklist""" + tasks: list[ChecklistTask] + """List of tasks in the checklist""" + title_entities: list[MessageEntity] | None = None + """*Optional*. Special entities that appear in the checklist title""" + others_can_add_tasks: bool | None = None + """*Optional*. :code:`True`, if users other than the creator of the list can add tasks to the list""" + others_can_mark_tasks_as_done: bool | None = None + """*Optional*. :code:`True`, if users other than the creator of the list can mark tasks as done or not done""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + tasks: list[ChecklistTask], + title_entities: list[MessageEntity] | None = None, + others_can_add_tasks: bool | None = None, + others_can_mark_tasks_as_done: bool | None = 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__( + title=title, + tasks=tasks, + title_entities=title_entities, + others_can_add_tasks=others_can_add_tasks, + others_can_mark_tasks_as_done=others_can_mark_tasks_as_done, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/checklist_task.py b/aiogram/types/checklist_task.py new file mode 100644 index 00000000..3926320b --- /dev/null +++ b/aiogram/types/checklist_task.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat import Chat + from .message_entity import MessageEntity + from .user import User + + +class ChecklistTask(TelegramObject): + """ + Describes a task in a checklist. + + Source: https://core.telegram.org/bots/api#checklisttask + """ + + id: int + """Unique identifier of the task""" + text: str + """Text of the task""" + text_entities: list[MessageEntity] | None = None + """*Optional*. Special entities that appear in the task text""" + completed_by_user: User | None = None + """*Optional*. User that completed the task; omitted if the task wasn't completed by a user""" + completed_by_chat: Chat | None = None + """*Optional*. Chat that completed the task; omitted if the task wasn't completed by a chat""" + completion_date: int | None = None + """*Optional*. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: int, + text: str, + text_entities: list[MessageEntity] | None = None, + completed_by_user: User | None = None, + completed_by_chat: Chat | None = None, + completion_date: int | None = 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__( + id=id, + text=text, + text_entities=text_entities, + completed_by_user=completed_by_user, + completed_by_chat=completed_by_chat, + completion_date=completion_date, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/checklist_tasks_added.py b/aiogram/types/checklist_tasks_added.py new file mode 100644 index 00000000..ede97075 --- /dev/null +++ b/aiogram/types/checklist_tasks_added.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .checklist_task import ChecklistTask + from .message import Message + + +class ChecklistTasksAdded(TelegramObject): + """ + Describes a service message about tasks added to a checklist. + + Source: https://core.telegram.org/bots/api#checklisttasksadded + """ + + tasks: list[ChecklistTask] + """List of tasks added to the checklist""" + checklist_message: Message | None = None + """*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!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + tasks: list[ChecklistTask], + checklist_message: Message | None = 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__(tasks=tasks, checklist_message=checklist_message, **__pydantic_kwargs) diff --git a/aiogram/types/checklist_tasks_done.py b/aiogram/types/checklist_tasks_done.py new file mode 100644 index 00000000..1bb841f8 --- /dev/null +++ b/aiogram/types/checklist_tasks_done.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .message import Message + + +class ChecklistTasksDone(TelegramObject): + """ + Describes a service message about checklist tasks marked as done or not done. + + Source: https://core.telegram.org/bots/api#checklisttasksdone + """ + + checklist_message: Message | None = None + """*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: list[int] | None = None + """*Optional*. Identifiers of the tasks that were marked as done""" + marked_as_not_done_task_ids: list[int] | None = None + """*Optional*. Identifiers of the tasks that were marked as not done""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + checklist_message: Message | None = None, + marked_as_done_task_ids: list[int] | None = None, + marked_as_not_done_task_ids: list[int] | None = 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__( + checklist_message=checklist_message, + marked_as_done_task_ids=marked_as_done_task_ids, + marked_as_not_done_task_ids=marked_as_not_done_task_ids, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/chosen_inline_result.py b/aiogram/types/chosen_inline_result.py index 510a0e12..1364ab39 100644 --- a/aiogram/types/chosen_inline_result.py +++ b/aiogram/types/chosen_inline_result.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -25,9 +25,9 @@ class ChosenInlineResult(TelegramObject): """The user that chose the result""" query: str """The query that was used to obtain the result""" - location: Optional[Location] = None + location: Location | None = None """*Optional*. Sender location, only for bots that require user location""" - inline_message_id: Optional[str] = None + inline_message_id: str | None = None """*Optional*. Identifier of the sent inline message. Available only if there is an `inline keyboard `_ attached to the message. Will be also received in `callback queries `_ and can be used to `edit `_ the message.""" if TYPE_CHECKING: @@ -40,8 +40,8 @@ class ChosenInlineResult(TelegramObject): result_id: str, from_user: User, query: str, - location: Optional[Location] = None, - inline_message_id: Optional[str] = None, + location: Location | None = None, + inline_message_id: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/contact.py b/aiogram/types/contact.py index 1fb7f834..9e7677a4 100644 --- a/aiogram/types/contact.py +++ b/aiogram/types/contact.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -16,11 +16,11 @@ class Contact(TelegramObject): """Contact's phone number""" first_name: str """Contact's first name""" - last_name: Optional[str] = None + last_name: str | None = None """*Optional*. Contact's last name""" - user_id: Optional[int] = None + user_id: int | None = None """*Optional*. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.""" - vcard: Optional[str] = None + vcard: str | None = None """*Optional*. Additional data about the contact in the form of a `vCard `_""" if TYPE_CHECKING: @@ -32,9 +32,9 @@ class Contact(TelegramObject): *, phone_number: str, first_name: str, - last_name: Optional[str] = None, - user_id: Optional[int] = None, - vcard: Optional[str] = None, + last_name: str | None = None, + user_id: int | None = None, + vcard: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -49,3 +49,9 @@ class Contact(TelegramObject): vcard=vcard, **__pydantic_kwargs, ) + + @property + def full_name(self) -> str: + if self.last_name: + return f"{self.first_name} {self.last_name}" + return self.first_name diff --git a/aiogram/types/copy_text_button.py b/aiogram/types/copy_text_button.py new file mode 100644 index 00000000..98790b55 --- /dev/null +++ b/aiogram/types/copy_text_button.py @@ -0,0 +1,27 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class CopyTextButton(TelegramObject): + """ + This object represents an inline keyboard button that copies specified text to the clipboard. + + Source: https://core.telegram.org/bots/api#copytextbutton + """ + + text: str + """The text to be copied to the clipboard; 1-256 characters""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, text: str, **__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__(text=text, **__pydantic_kwargs) diff --git a/aiogram/types/custom.py b/aiogram/types/custom.py index 8617fa64..660c0be7 100644 --- a/aiogram/types/custom.py +++ b/aiogram/types/custom.py @@ -1,8 +1,8 @@ import sys from datetime import datetime, timezone +from typing import Annotated from pydantic import PlainSerializer -from typing_extensions import Annotated if sys.platform == "win32": # pragma: no cover diff --git a/aiogram/types/date_time_union.py b/aiogram/types/date_time_union.py new file mode 100644 index 00000000..8245313a --- /dev/null +++ b/aiogram/types/date_time_union.py @@ -0,0 +1,6 @@ +from __future__ import annotations + +import datetime +from typing import TypeAlias + +DateTimeUnion: TypeAlias = datetime.datetime | datetime.timedelta | int diff --git a/aiogram/types/direct_message_price_changed.py b/aiogram/types/direct_message_price_changed.py new file mode 100644 index 00000000..cc35e56d --- /dev/null +++ b/aiogram/types/direct_message_price_changed.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class DirectMessagePriceChanged(TelegramObject): + """ + Describes a service message about a change in the price of direct messages sent to a channel chat. + + Source: https://core.telegram.org/bots/api#directmessagepricechanged + """ + + are_direct_messages_enabled: bool + """:code:`True`, if direct messages are enabled for the channel chat; false otherwise""" + direct_message_star_count: int | None = None + """*Optional*. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + are_direct_messages_enabled: bool, + direct_message_star_count: int | None = 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__( + are_direct_messages_enabled=are_direct_messages_enabled, + direct_message_star_count=direct_message_star_count, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/direct_messages_topic.py b/aiogram/types/direct_messages_topic.py new file mode 100644 index 00000000..f0f7b2e7 --- /dev/null +++ b/aiogram/types/direct_messages_topic.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +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. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.""" + user: User | None = 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: User | None = 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/document.py b/aiogram/types/document.py index 18acff7a..4d549ad5 100644 --- a/aiogram/types/document.py +++ b/aiogram/types/document.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -19,13 +19,13 @@ class Document(TelegramObject): """Identifier for this file, which can be used to download or reuse the file""" file_unique_id: str """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - thumbnail: Optional[PhotoSize] = None + thumbnail: PhotoSize | None = None """*Optional*. Document thumbnail as defined by the sender""" - file_name: Optional[str] = None + file_name: str | None = None """*Optional*. Original filename as defined by the sender""" - mime_type: Optional[str] = None + mime_type: str | None = None """*Optional*. MIME type of the file as defined by the sender""" - file_size: Optional[int] = None + file_size: int | None = None """*Optional*. File size in bytes. It can be bigger than 2^31 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 value.""" if TYPE_CHECKING: @@ -37,10 +37,10 @@ class Document(TelegramObject): *, file_id: str, file_unique_id: str, - thumbnail: Optional[PhotoSize] = None, - file_name: Optional[str] = None, - mime_type: Optional[str] = None, - file_size: Optional[int] = None, + thumbnail: PhotoSize | None = None, + file_name: str | None = None, + mime_type: str | None = None, + file_size: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/downloadable.py b/aiogram/types/downloadable.py index be808293..080caf64 100644 --- a/aiogram/types/downloadable.py +++ b/aiogram/types/downloadable.py @@ -2,4 +2,5 @@ from typing import Protocol class Downloadable(Protocol): - file_id: str + @property + def file_id(self) -> str: ... diff --git a/aiogram/types/encrypted_passport_element.py b/aiogram/types/encrypted_passport_element.py index c1e8be11..89612a51 100644 --- a/aiogram/types/encrypted_passport_element.py +++ b/aiogram/types/encrypted_passport_element.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -19,21 +19,21 @@ class EncryptedPassportElement(TelegramObject): """Element type. One of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration', 'phone_number', 'email'.""" hash: str """Base64-encoded element hash for using in :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`""" - data: Optional[str] = None + data: str | None = None """*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" - phone_number: Optional[str] = None + phone_number: str | None = None """*Optional*. User's verified phone number; available only for 'phone_number' type""" - email: Optional[str] = None + email: str | None = None """*Optional*. User's verified email address; available only for 'email' type""" - files: Optional[List[PassportFile]] = None + files: list[PassportFile] | None = None """*Optional*. Array of encrypted files with documents provided by the user; available only for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" - front_side: Optional[PassportFile] = None + front_side: PassportFile | None = None """*Optional*. Encrypted file with the front side of the document, provided by the user; available only for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" - reverse_side: Optional[PassportFile] = None + reverse_side: PassportFile | None = None """*Optional*. Encrypted file with the reverse side of the document, provided by the user; available only for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" - selfie: Optional[PassportFile] = None + selfie: PassportFile | None = None """*Optional*. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" - translation: Optional[List[PassportFile]] = None + translation: list[PassportFile] | None = None """*Optional*. Array of encrypted files with translated versions of documents provided by the user; available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" if TYPE_CHECKING: @@ -45,14 +45,14 @@ class EncryptedPassportElement(TelegramObject): *, type: str, hash: str, - data: Optional[str] = None, - phone_number: Optional[str] = None, - email: Optional[str] = None, - files: Optional[List[PassportFile]] = None, - front_side: Optional[PassportFile] = None, - reverse_side: Optional[PassportFile] = None, - selfie: Optional[PassportFile] = None, - translation: Optional[List[PassportFile]] = None, + data: str | None = None, + phone_number: str | None = None, + email: str | None = None, + files: list[PassportFile] | None = None, + front_side: PassportFile | None = None, + reverse_side: PassportFile | None = None, + selfie: PassportFile | None = None, + translation: list[PassportFile] | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/external_reply_info.py b/aiogram/types/external_reply_info.py index 0f13a850..1b8797b0 100644 --- a/aiogram/types/external_reply_info.py +++ b/aiogram/types/external_reply_info.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -8,6 +8,7 @@ if TYPE_CHECKING: from .animation import Animation from .audio import Audio from .chat import Chat + from .checklist import Checklist from .contact import Contact from .dice import Dice from .document import Document @@ -17,10 +18,7 @@ if TYPE_CHECKING: from .invoice import Invoice from .link_preview_options import LinkPreviewOptions from .location import Location - from .message_origin_channel import MessageOriginChannel - from .message_origin_chat import MessageOriginChat - from .message_origin_hidden_user import MessageOriginHiddenUser - from .message_origin_user import MessageOriginUser + from .message_origin_union import MessageOriginUnion from .paid_media_info import PaidMediaInfo from .photo_size import PhotoSize from .poll import Poll @@ -39,55 +37,55 @@ class ExternalReplyInfo(TelegramObject): Source: https://core.telegram.org/bots/api#externalreplyinfo """ - origin: Union[ - MessageOriginUser, MessageOriginHiddenUser, MessageOriginChat, MessageOriginChannel - ] + origin: MessageOriginUnion """Origin of the message replied to by the given message""" - chat: Optional[Chat] = None + chat: Chat | None = None """*Optional*. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.""" - message_id: Optional[int] = None + message_id: int | None = None """*Optional*. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.""" - link_preview_options: Optional[LinkPreviewOptions] = None + link_preview_options: LinkPreviewOptions | None = None """*Optional*. Options used for link preview generation for the original message, if it is a text message""" - animation: Optional[Animation] = None + animation: Animation | None = None """*Optional*. Message is an animation, information about the animation""" - audio: Optional[Audio] = None + audio: Audio | None = None """*Optional*. Message is an audio file, information about the file""" - document: Optional[Document] = None + document: Document | None = None """*Optional*. Message is a general file, information about the file""" - paid_media: Optional[PaidMediaInfo] = None + paid_media: PaidMediaInfo | None = None """*Optional*. Message contains paid media; information about the paid media""" - photo: Optional[List[PhotoSize]] = None + photo: list[PhotoSize] | None = None """*Optional*. Message is a photo, available sizes of the photo""" - sticker: Optional[Sticker] = None + sticker: Sticker | None = None """*Optional*. Message is a sticker, information about the sticker""" - story: Optional[Story] = None + story: Story | None = None """*Optional*. Message is a forwarded story""" - video: Optional[Video] = None + video: Video | None = None """*Optional*. Message is a video, information about the video""" - video_note: Optional[VideoNote] = None + video_note: VideoNote | None = None """*Optional*. Message is a `video note `_, information about the video message""" - voice: Optional[Voice] = None + voice: Voice | None = None """*Optional*. Message is a voice message, information about the file""" - has_media_spoiler: Optional[bool] = None + has_media_spoiler: bool | None = None """*Optional*. :code:`True`, if the message media is covered by a spoiler animation""" - contact: Optional[Contact] = None + checklist: Checklist | None = None + """*Optional*. Message is a checklist""" + contact: Contact | None = None """*Optional*. Message is a shared contact, information about the contact""" - dice: Optional[Dice] = None + dice: Dice | None = None """*Optional*. Message is a dice with random value""" - game: Optional[Game] = None + game: Game | None = None """*Optional*. Message is a game, information about the game. `More about games » `_""" - giveaway: Optional[Giveaway] = None + giveaway: Giveaway | None = None """*Optional*. Message is a scheduled giveaway, information about the giveaway""" - giveaway_winners: Optional[GiveawayWinners] = None + giveaway_winners: GiveawayWinners | None = None """*Optional*. A giveaway with public winners was completed""" - invoice: Optional[Invoice] = None + invoice: Invoice | None = None """*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments » `_""" - location: Optional[Location] = None + location: Location | None = None """*Optional*. Message is a shared location, information about the location""" - poll: Optional[Poll] = None + poll: Poll | None = None """*Optional*. Message is a native poll, information about the poll""" - venue: Optional[Venue] = None + venue: Venue | None = None """*Optional*. Message is a venue, information about the venue""" if TYPE_CHECKING: @@ -97,32 +95,31 @@ class ExternalReplyInfo(TelegramObject): def __init__( __pydantic__self__, *, - origin: Union[ - MessageOriginUser, MessageOriginHiddenUser, MessageOriginChat, MessageOriginChannel - ], - chat: Optional[Chat] = None, - message_id: Optional[int] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - animation: Optional[Animation] = None, - audio: Optional[Audio] = None, - document: Optional[Document] = None, - paid_media: Optional[PaidMediaInfo] = None, - photo: Optional[List[PhotoSize]] = None, - sticker: Optional[Sticker] = None, - story: Optional[Story] = None, - video: Optional[Video] = None, - video_note: Optional[VideoNote] = None, - voice: Optional[Voice] = None, - has_media_spoiler: Optional[bool] = None, - contact: Optional[Contact] = None, - dice: Optional[Dice] = None, - game: Optional[Game] = None, - giveaway: Optional[Giveaway] = None, - giveaway_winners: Optional[GiveawayWinners] = None, - invoice: Optional[Invoice] = None, - location: Optional[Location] = None, - poll: Optional[Poll] = None, - venue: Optional[Venue] = None, + origin: MessageOriginUnion, + chat: Chat | None = None, + message_id: int | None = None, + link_preview_options: LinkPreviewOptions | None = None, + animation: Animation | None = None, + audio: Audio | None = None, + document: Document | None = None, + paid_media: PaidMediaInfo | None = None, + photo: list[PhotoSize] | None = None, + sticker: Sticker | None = None, + story: Story | None = None, + video: Video | None = None, + video_note: VideoNote | None = None, + voice: Voice | None = None, + has_media_spoiler: bool | None = None, + checklist: Checklist | None = None, + contact: Contact | None = None, + dice: Dice | None = None, + game: Game | None = None, + giveaway: Giveaway | None = None, + giveaway_winners: GiveawayWinners | None = None, + invoice: Invoice | None = None, + location: Location | None = None, + poll: Poll | None = None, + venue: Venue | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -145,6 +142,7 @@ class ExternalReplyInfo(TelegramObject): video_note=video_note, voice=voice, has_media_spoiler=has_media_spoiler, + checklist=checklist, contact=contact, dice=dice, game=game, diff --git a/aiogram/types/file.py b/aiogram/types/file.py index 252c230b..2569d540 100644 --- a/aiogram/types/file.py +++ b/aiogram/types/file.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -18,9 +18,9 @@ class File(TelegramObject): """Identifier for this file, which can be used to download or reuse the file""" file_unique_id: str """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - file_size: Optional[int] = None + file_size: int | None = None """*Optional*. File size in bytes. It can be bigger than 2^31 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 value.""" - file_path: Optional[str] = None + file_path: str | None = None """*Optional*. File path. Use :code:`https://api.telegram.org/file/bot/` to get the file.""" if TYPE_CHECKING: @@ -32,8 +32,8 @@ class File(TelegramObject): *, file_id: str, file_unique_id: str, - file_size: Optional[int] = None, - file_path: Optional[str] = None, + file_size: int | None = None, + file_path: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/force_reply.py b/aiogram/types/force_reply.py index 14b9c1c5..053c8d02 100644 --- a/aiogram/types/force_reply.py +++ b/aiogram/types/force_reply.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal from .base import MutableTelegramObject @@ -21,9 +21,9 @@ class ForceReply(MutableTelegramObject): force_reply: Literal[True] = True """Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'""" - input_field_placeholder: Optional[str] = None + input_field_placeholder: str | None = None """*Optional*. The placeholder to be shown in the input field when the reply is active; 1-64 characters""" - selective: Optional[bool] = None + selective: bool | None = None """*Optional*. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.""" if TYPE_CHECKING: @@ -34,8 +34,8 @@ class ForceReply(MutableTelegramObject): __pydantic__self__, *, force_reply: Literal[True] = True, - input_field_placeholder: Optional[str] = None, - selective: Optional[bool] = None, + input_field_placeholder: str | None = None, + selective: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/forum_topic.py b/aiogram/types/forum_topic.py index a6464bc1..db3da10f 100644 --- a/aiogram/types/forum_topic.py +++ b/aiogram/types/forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -18,8 +18,10 @@ class ForumTopic(TelegramObject): """Name of the topic""" icon_color: int """Color of the topic icon in RGB format""" - icon_custom_emoji_id: Optional[str] = None + icon_custom_emoji_id: str | None = None """*Optional*. Unique identifier of the custom emoji shown as the topic icon""" + is_name_implicit: bool | None = None + """*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -31,7 +33,8 @@ class ForumTopic(TelegramObject): message_thread_id: int, name: str, icon_color: int, - icon_custom_emoji_id: Optional[str] = None, + icon_custom_emoji_id: str | None = None, + is_name_implicit: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -43,5 +46,6 @@ class ForumTopic(TelegramObject): name=name, icon_color=icon_color, icon_custom_emoji_id=icon_custom_emoji_id, + is_name_implicit=is_name_implicit, **__pydantic_kwargs, ) diff --git a/aiogram/types/forum_topic_created.py b/aiogram/types/forum_topic_created.py index 513df956..1625014a 100644 --- a/aiogram/types/forum_topic_created.py +++ b/aiogram/types/forum_topic_created.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -16,8 +16,10 @@ class ForumTopicCreated(TelegramObject): """Name of the topic""" icon_color: int """Color of the topic icon in RGB format""" - icon_custom_emoji_id: Optional[str] = None + icon_custom_emoji_id: str | None = None """*Optional*. Unique identifier of the custom emoji shown as the topic icon""" + is_name_implicit: bool | None = None + """*Optional*. :code:`True`, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -28,7 +30,8 @@ class ForumTopicCreated(TelegramObject): *, name: str, icon_color: int, - icon_custom_emoji_id: Optional[str] = None, + icon_custom_emoji_id: str | None = None, + is_name_implicit: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -39,5 +42,6 @@ class ForumTopicCreated(TelegramObject): name=name, icon_color=icon_color, icon_custom_emoji_id=icon_custom_emoji_id, + is_name_implicit=is_name_implicit, **__pydantic_kwargs, ) diff --git a/aiogram/types/forum_topic_edited.py b/aiogram/types/forum_topic_edited.py index b7b61965..6b011ca4 100644 --- a/aiogram/types/forum_topic_edited.py +++ b/aiogram/types/forum_topic_edited.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from aiogram.types import TelegramObject @@ -10,9 +10,9 @@ class ForumTopicEdited(TelegramObject): Source: https://core.telegram.org/bots/api#forumtopicedited """ - name: Optional[str] = None + name: str | None = None """*Optional*. New name of the topic, if it was edited""" - icon_custom_emoji_id: Optional[str] = None + icon_custom_emoji_id: str | None = None """*Optional*. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed""" if TYPE_CHECKING: @@ -22,8 +22,8 @@ class ForumTopicEdited(TelegramObject): def __init__( __pydantic__self__, *, - name: Optional[str] = None, - icon_custom_emoji_id: Optional[str] = None, + name: str | None = None, + icon_custom_emoji_id: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/game.py b/aiogram/types/game.py index 294f26b9..e8034969 100644 --- a/aiogram/types/game.py +++ b/aiogram/types/game.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -21,13 +21,13 @@ class Game(TelegramObject): """Title of the game""" description: str """Description of the game""" - photo: List[PhotoSize] + photo: list[PhotoSize] """Photo that will be displayed in the game message in chats.""" - text: Optional[str] = None + text: str | None = None """*Optional*. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls :class:`aiogram.methods.set_game_score.SetGameScore`, or manually edited using :class:`aiogram.methods.edit_message_text.EditMessageText`. 0-4096 characters.""" - text_entities: Optional[List[MessageEntity]] = None + text_entities: list[MessageEntity] | None = None """*Optional*. Special entities that appear in *text*, such as usernames, URLs, bot commands, etc.""" - animation: Optional[Animation] = None + animation: Animation | None = None """*Optional*. Animation that will be displayed in the game message in chats. Upload via `BotFather `_""" if TYPE_CHECKING: @@ -39,10 +39,10 @@ class Game(TelegramObject): *, title: str, description: str, - photo: List[PhotoSize], - text: Optional[str] = None, - text_entities: Optional[List[MessageEntity]] = None, - animation: Optional[Animation] = None, + photo: list[PhotoSize], + text: str | None = None, + text_entities: list[MessageEntity] | None = None, + animation: Animation | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/gift.py b/aiogram/types/gift.py new file mode 100644 index 00000000..78e6e5d1 --- /dev/null +++ b/aiogram/types/gift.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat import Chat + from .gift_background import GiftBackground + from .sticker import Sticker + + +class Gift(TelegramObject): + """ + This object represents a gift that can be sent by the bot. + + Source: https://core.telegram.org/bots/api#gift + """ + + id: str + """Unique identifier of the gift""" + sticker: Sticker + """The sticker that represents the gift""" + star_count: int + """The number of Telegram Stars that must be paid to send the sticker""" + upgrade_star_count: int | None = None + """*Optional*. The number of Telegram Stars that must be paid to upgrade the gift to a unique one""" + is_premium: bool | None = None + """*Optional*. :code:`True`, if the gift can only be purchased by Telegram Premium subscribers""" + has_colors: bool | None = None + """*Optional*. :code:`True`, if the gift can be used (after being upgraded) to customize a user's appearance""" + total_count: int | None = None + """*Optional*. The total number of gifts of this type that can be sent by all users; for limited gifts only""" + remaining_count: int | None = None + """*Optional*. The number of remaining gifts of this type that can be sent by all users; for limited gifts only""" + personal_total_count: int | None = None + """*Optional*. The total number of gifts of this type that can be sent by the bot; for limited gifts only""" + personal_remaining_count: int | None = None + """*Optional*. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only""" + background: GiftBackground | None = None + """*Optional*. Background of the gift""" + unique_gift_variant_count: int | None = None + """*Optional*. The total number of different unique gifts that can be obtained by upgrading the gift""" + publisher_chat: Chat | None = None + """*Optional*. Information about the chat that published the gift""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + sticker: Sticker, + star_count: int, + upgrade_star_count: int | None = None, + is_premium: bool | None = None, + has_colors: bool | None = None, + total_count: int | None = None, + remaining_count: int | None = None, + personal_total_count: int | None = None, + personal_remaining_count: int | None = None, + background: GiftBackground | None = None, + unique_gift_variant_count: int | None = None, + publisher_chat: Chat | None = 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__( + id=id, + sticker=sticker, + star_count=star_count, + upgrade_star_count=upgrade_star_count, + is_premium=is_premium, + has_colors=has_colors, + total_count=total_count, + remaining_count=remaining_count, + personal_total_count=personal_total_count, + personal_remaining_count=personal_remaining_count, + background=background, + unique_gift_variant_count=unique_gift_variant_count, + publisher_chat=publisher_chat, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/gift_background.py b/aiogram/types/gift_background.py new file mode 100644 index 00000000..39c101d6 --- /dev/null +++ b/aiogram/types/gift_background.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class GiftBackground(TelegramObject): + """ + This object describes the background of a gift. + + Source: https://core.telegram.org/bots/api#giftbackground + """ + + center_color: int + """Center color of the background in RGB format""" + edge_color: int + """Edge color of the background in RGB format""" + text_color: int + """Text color of the background in RGB format""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + center_color: int, + edge_color: int, + text_color: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + center_color=center_color, + edge_color=edge_color, + text_color=text_color, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/gift_info.py b/aiogram/types/gift_info.py new file mode 100644 index 00000000..bfaf49ca --- /dev/null +++ b/aiogram/types/gift_info.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .gift import Gift + from .message_entity import MessageEntity + + +class GiftInfo(TelegramObject): + """ + Describes a service message about a regular gift that was sent or received. + + Source: https://core.telegram.org/bots/api#giftinfo + """ + + gift: Gift + """Information about the gift""" + owned_gift_id: str | None = None + """*Optional*. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts""" + convert_star_count: int | None = None + """*Optional*. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible""" + prepaid_upgrade_star_count: int | None = None + """*Optional*. Number of Telegram Stars that were prepaid for the ability to upgrade the gift""" + is_upgrade_separate: bool | None = None + """*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent""" + can_be_upgraded: bool | None = None + """*Optional*. :code:`True`, if the gift can be upgraded to a unique gift""" + text: str | None = None + """*Optional*. Text of the message that was added to the gift""" + entities: list[MessageEntity] | None = None + """*Optional*. Special entities that appear in the text""" + is_private: bool | None = None + """*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them""" + unique_gift_number: int | None = None + """*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + gift: Gift, + owned_gift_id: str | None = None, + convert_star_count: int | None = None, + prepaid_upgrade_star_count: int | None = None, + is_upgrade_separate: bool | None = None, + can_be_upgraded: bool | None = None, + text: str | None = None, + entities: list[MessageEntity] | None = None, + is_private: bool | None = None, + unique_gift_number: int | None = 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__( + gift=gift, + owned_gift_id=owned_gift_id, + convert_star_count=convert_star_count, + prepaid_upgrade_star_count=prepaid_upgrade_star_count, + is_upgrade_separate=is_upgrade_separate, + can_be_upgraded=can_be_upgraded, + text=text, + entities=entities, + is_private=is_private, + unique_gift_number=unique_gift_number, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/gifts.py b/aiogram/types/gifts.py new file mode 100644 index 00000000..990d27ab --- /dev/null +++ b/aiogram/types/gifts.py @@ -0,0 +1,30 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .gift import Gift + + +class Gifts(TelegramObject): + """ + This object represent a list of gifts. + + Source: https://core.telegram.org/bots/api#gifts + """ + + gifts: list[Gift] + """The list of gifts""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, gifts: list[Gift], **__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__(gifts=gifts, **__pydantic_kwargs) diff --git a/aiogram/types/giveaway.py b/aiogram/types/giveaway.py index 1fa4f508..b07482a5 100644 --- a/aiogram/types/giveaway.py +++ b/aiogram/types/giveaway.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -16,22 +16,24 @@ class Giveaway(TelegramObject): Source: https://core.telegram.org/bots/api#giveaway """ - chats: List[Chat] + chats: list[Chat] """The list of chats which the user must join to participate in the giveaway""" winners_selection_date: DateTime """Point in time (Unix timestamp) when winners of the giveaway will be selected""" winner_count: int """The number of users which are supposed to be selected as winners of the giveaway""" - only_new_members: Optional[bool] = None + only_new_members: bool | None = None """*Optional*. :code:`True`, if only users who join the chats after the giveaway started should be eligible to win""" - has_public_winners: Optional[bool] = None + has_public_winners: bool | None = None """*Optional*. :code:`True`, if the list of giveaway winners will be visible to everyone""" - prize_description: Optional[str] = None + prize_description: str | None = None """*Optional*. Description of additional giveaway prize""" - country_codes: Optional[List[str]] = None + country_codes: list[str] | None = None """*Optional*. A list of two-letter `ISO 3166-1 alpha-2 `_ country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.""" - premium_subscription_month_count: Optional[int] = None - """*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for""" + prize_star_count: int | None = None + """*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only""" + premium_subscription_month_count: int | None = None + """*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -40,14 +42,15 @@ class Giveaway(TelegramObject): def __init__( __pydantic__self__, *, - chats: List[Chat], + chats: list[Chat], winners_selection_date: DateTime, winner_count: int, - only_new_members: Optional[bool] = None, - has_public_winners: Optional[bool] = None, - prize_description: Optional[str] = None, - country_codes: Optional[List[str]] = None, - premium_subscription_month_count: Optional[int] = None, + only_new_members: bool | None = None, + has_public_winners: bool | None = None, + prize_description: str | None = None, + country_codes: list[str] | None = None, + prize_star_count: int | None = None, + premium_subscription_month_count: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -62,6 +65,7 @@ class Giveaway(TelegramObject): has_public_winners=has_public_winners, prize_description=prize_description, country_codes=country_codes, + prize_star_count=prize_star_count, premium_subscription_month_count=premium_subscription_month_count, **__pydantic_kwargs, ) diff --git a/aiogram/types/giveaway_completed.py b/aiogram/types/giveaway_completed.py index 71d525af..18b9244c 100644 --- a/aiogram/types/giveaway_completed.py +++ b/aiogram/types/giveaway_completed.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -17,10 +17,12 @@ class GiveawayCompleted(TelegramObject): winner_count: int """Number of winners in the giveaway""" - unclaimed_prize_count: Optional[int] = None + unclaimed_prize_count: int | None = None """*Optional*. Number of undistributed prizes""" - giveaway_message: Optional[Message] = None + giveaway_message: Message | None = None """*Optional*. Message with the giveaway that was completed, if it wasn't deleted""" + is_star_giveaway: bool | None = None + """*Optional*. :code:`True`, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -30,8 +32,9 @@ class GiveawayCompleted(TelegramObject): __pydantic__self__, *, winner_count: int, - unclaimed_prize_count: Optional[int] = None, - giveaway_message: Optional[Message] = None, + unclaimed_prize_count: int | None = None, + giveaway_message: Message | None = None, + is_star_giveaway: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -42,5 +45,6 @@ class GiveawayCompleted(TelegramObject): winner_count=winner_count, unclaimed_prize_count=unclaimed_prize_count, giveaway_message=giveaway_message, + is_star_giveaway=is_star_giveaway, **__pydantic_kwargs, ) diff --git a/aiogram/types/giveaway_created.py b/aiogram/types/giveaway_created.py index cd66d75a..fad0c39a 100644 --- a/aiogram/types/giveaway_created.py +++ b/aiogram/types/giveaway_created.py @@ -1,9 +1,29 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + from .base import TelegramObject class GiveawayCreated(TelegramObject): """ - This object represents a service message about the creation of a scheduled giveaway. Currently holds no information. + This object represents a service message about the creation of a scheduled giveaway. Source: https://core.telegram.org/bots/api#giveawaycreated """ + + prize_star_count: int | None = None + """*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, prize_star_count: int | None = 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__(prize_star_count=prize_star_count, **__pydantic_kwargs) diff --git a/aiogram/types/giveaway_winners.py b/aiogram/types/giveaway_winners.py index 8a501f88..61ebff3c 100644 --- a/aiogram/types/giveaway_winners.py +++ b/aiogram/types/giveaway_winners.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -25,19 +25,21 @@ class GiveawayWinners(TelegramObject): """Point in time (Unix timestamp) when winners of the giveaway were selected""" winner_count: int """Total number of winners in the giveaway""" - winners: List[User] + winners: list[User] """List of up to 100 winners of the giveaway""" - additional_chat_count: Optional[int] = None + additional_chat_count: int | None = None """*Optional*. The number of other chats the user had to join in order to be eligible for the giveaway""" - premium_subscription_month_count: Optional[int] = None - """*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for""" - unclaimed_prize_count: Optional[int] = None + prize_star_count: int | None = None + """*Optional*. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only""" + premium_subscription_month_count: int | None = None + """*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only""" + unclaimed_prize_count: int | None = None """*Optional*. Number of undistributed prizes""" - only_new_members: Optional[bool] = None + only_new_members: bool | None = None """*Optional*. :code:`True`, if only users who had joined the chats after the giveaway started were eligible to win""" - was_refunded: Optional[bool] = None + was_refunded: bool | None = None """*Optional*. :code:`True`, if the giveaway was canceled because the payment for it was refunded""" - prize_description: Optional[str] = None + prize_description: str | None = None """*Optional*. Description of additional giveaway prize""" if TYPE_CHECKING: @@ -51,13 +53,14 @@ class GiveawayWinners(TelegramObject): giveaway_message_id: int, winners_selection_date: DateTime, winner_count: int, - winners: List[User], - additional_chat_count: Optional[int] = None, - premium_subscription_month_count: Optional[int] = None, - unclaimed_prize_count: Optional[int] = None, - only_new_members: Optional[bool] = None, - was_refunded: Optional[bool] = None, - prize_description: Optional[str] = None, + winners: list[User], + additional_chat_count: int | None = None, + prize_star_count: int | None = None, + premium_subscription_month_count: int | None = None, + unclaimed_prize_count: int | None = None, + only_new_members: bool | None = None, + was_refunded: bool | None = None, + prize_description: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -71,6 +74,7 @@ class GiveawayWinners(TelegramObject): winner_count=winner_count, winners=winners, additional_chat_count=additional_chat_count, + prize_star_count=prize_star_count, premium_subscription_month_count=premium_subscription_month_count, unclaimed_prize_count=unclaimed_prize_count, only_new_members=only_new_members, diff --git a/aiogram/types/inaccessible_message.py b/aiogram/types/inaccessible_message.py index 6ed38fe0..32262625 100644 --- a/aiogram/types/inaccessible_message.py +++ b/aiogram/types/inaccessible_message.py @@ -2,10 +2,45 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any, Literal +from aiogram.types.chat import Chat + +from ..client.default import Default from .maybe_inaccessible_message import MaybeInaccessibleMessage +from .reply_parameters import ReplyParameters if TYPE_CHECKING: - from .chat import Chat + from ..methods import ( + SendAnimation, + SendAudio, + SendContact, + SendDice, + SendDocument, + SendGame, + SendInvoice, + SendLocation, + SendMediaGroup, + SendMessage, + SendPaidMedia, + SendPhoto, + SendPoll, + SendSticker, + SendVenue, + SendVideo, + SendVideoNote, + SendVoice, + ) + from .date_time_union import DateTimeUnion + from .inline_keyboard_markup import InlineKeyboardMarkup + from .input_file import InputFile + from .input_file_union import InputFileUnion + from .input_paid_media_union import InputPaidMediaUnion + from .input_poll_option_union import InputPollOptionUnion + from .labeled_price import LabeledPrice + from .link_preview_options import LinkPreviewOptions + 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): @@ -39,3 +74,3052 @@ class InaccessibleMessage(MaybeInaccessibleMessage): # Is needed only for type checking and IDE support without any additional plugins super().__init__(chat=chat, message_id=message_id, date=date, **__pydantic_kwargs) + + def answer( + self, + text: str, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendMessage: + """ + Shortcut for method :class:`aiogram.methods.send_message.SendMessage` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendmessage + + :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 a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. + :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* + :param link_preview_options: Link preview generation options for 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 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 + :param disable_web_page_preview: Disables link previews for links in this message + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_message.SendMessage` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendMessage + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendMessage( + chat_id=self.chat.id, + 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, + 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, + disable_web_page_preview=disable_web_page_preview, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply( + self, + text: str, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), + **kwargs: Any, + ) -> SendMessage: + """ + Shortcut for method :class:`aiogram.methods.send_message.SendMessage` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendmessage + + :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 a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. + :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* + :param link_preview_options: Link preview generation options for 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 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 + :return: instance of method :class:`aiogram.methods.send_message.SendMessage` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendMessage + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendMessage( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + 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, + 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, + disable_web_page_preview=disable_web_page_preview, + **kwargs, + ).as_(self._bot) + + def answer_animation( + self, + animation: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendAnimation: + """ + Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param duration: Duration of sent animation in seconds + :param width: Animation width + :param height: Animation height + :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: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the animation 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* + :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media + :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation + :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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_animation.SendAnimation` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendAnimation + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendAnimation( + chat_id=self.chat.id, + 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, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + has_spoiler=has_spoiler, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_animation( + self, + animation: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendAnimation: + """ + Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param duration: Duration of sent animation in seconds + :param width: Animation width + :param height: Animation height + :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: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the animation 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* + :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media + :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation + :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_animation.SendAnimation` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendAnimation + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendAnimation( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + 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, + thumbnail=thumbnail, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + has_spoiler=has_spoiler, + 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, + ).as_(self._bot) + + def answer_audio( + self, + audio: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendAudio: + """ + Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. + For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param caption: Audio caption, 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. + :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param duration: Duration of the audio in seconds + :param performer: Performer + :param title: Track name + :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 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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_audio.SendAudio` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendAudio + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendAudio( + chat_id=self.chat.id, + 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, + duration=duration, + performer=performer, + title=title, + thumbnail=thumbnail, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_audio( + self, + audio: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendAudio: + """ + Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. + For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param caption: Audio caption, 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. + :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param duration: Duration of the audio in seconds + :param performer: Performer + :param title: Track name + :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 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_audio.SendAudio` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendAudio + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendAudio( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + 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, + duration=duration, + performer=performer, + title=title, + thumbnail=thumbnail, + 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, + ).as_(self._bot) + + def answer_contact( + self, + phone_number: str, + first_name: str, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + last_name: str | None = None, + vcard: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendContact: + """ + Shortcut for method :class:`aiogram.methods.send_contact.SendContact` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendcontact + + :param phone_number: Contact's phone number + :param first_name: Contact's first name + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param last_name: Contact's last name + :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes + :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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_contact.SendContact` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendContact + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendContact( + chat_id=self.chat.id, + phone_number=phone_number, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_contact( + self, + phone_number: str, + first_name: str, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + last_name: str | None = None, + vcard: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendContact: + """ + Shortcut for method :class:`aiogram.methods.send_contact.SendContact` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendcontact + + :param phone_number: Contact's phone number + :param first_name: Contact's first name + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param last_name: Contact's last name + :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes + :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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendContact + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendContact( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + phone_number=phone_number, + 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, + ).as_(self._bot) + + def answer_document( + self, + document: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendDocument: + """ + Shortcut for method :class:`aiogram.methods.send_document.SendDocument` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` + :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the document 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* + :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data + :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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_document.SendDocument` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendDocument + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendDocument( + chat_id=self.chat.id, + 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, + caption_entities=caption_entities, + disable_content_type_detection=disable_content_type_detection, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_document( + self, + document: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendDocument: + """ + Shortcut for method :class:`aiogram.methods.send_document.SendDocument` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` + :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the document 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* + :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data + :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_document.SendDocument` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendDocument + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendDocument( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + 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, + caption_entities=caption_entities, + disable_content_type_detection=disable_content_type_detection, + 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, + ).as_(self._bot) + + def answer_game( + self, + game_short_name: str, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendGame: + """ + Shortcut for method :class:`aiogram.methods.send_game.SendGame` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendgame + + :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 a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance + :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only + :param reply_parameters: Description of the message to reply to + :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. + :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 message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_game.SendGame` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendGame + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendGame( + chat_id=self.chat.id, + game_short_name=game_short_name, + business_connection_id=business_connection_id, + message_thread_id=message_thread_id, + disable_notification=disable_notification, + protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, + message_effect_id=message_effect_id, + reply_parameters=reply_parameters, + reply_markup=reply_markup, + allow_sending_without_reply=allow_sending_without_reply, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_game( + self, + game_short_name: str, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendGame: + """ + Shortcut for method :class:`aiogram.methods.send_game.SendGame` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendgame + + :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 a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance + :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only + :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. + :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_game.SendGame` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendGame + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendGame( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + game_short_name=game_short_name, + business_connection_id=business_connection_id, + message_thread_id=message_thread_id, + disable_notification=disable_notification, + protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, + message_effect_id=message_effect_id, + reply_markup=reply_markup, + allow_sending_without_reply=allow_sending_without_reply, + **kwargs, + ).as_(self._bot) + + def answer_invoice( + self, + title: str, + description: str, + payload: str, + currency: str, + prices: list[LabeledPrice], + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + provider_token: str | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + start_parameter: str | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendInvoice: + """ + Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendinvoice + + :param title: Product name, 1-32 characters + :param description: Product description, 1-255 characters + :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. + :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. + :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. + :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_. + :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*. + :param start_parameter: Unique deep-linking parameter. If left empty, **forwarded copies** of the sent message will have a *Pay* button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a *URL* button with a deep link to the bot (instead of a *Pay* button), with the value used as the start parameter + :param provider_data: JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. + :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. + :param photo_size: Photo size in bytes + :param photo_width: Photo width + :param photo_height: Photo height + :param need_name: Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_. + :param need_phone_number: Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_. + :param need_email: Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_. + :param need_shipping_address: Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_. + :param send_phone_number_to_provider: Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_. + :param send_email_to_provider: Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_. + :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. + :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: 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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_invoice.SendInvoice` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendInvoice + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendInvoice( + chat_id=self.chat.id, + title=title, + description=description, + payload=payload, + 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, + start_parameter=start_parameter, + provider_data=provider_data, + photo_url=photo_url, + photo_size=photo_size, + photo_width=photo_width, + photo_height=photo_height, + need_name=need_name, + need_phone_number=need_phone_number, + need_email=need_email, + need_shipping_address=need_shipping_address, + send_phone_number_to_provider=send_phone_number_to_provider, + send_email_to_provider=send_email_to_provider, + is_flexible=is_flexible, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_invoice( + self, + title: str, + description: str, + payload: str, + currency: str, + prices: list[LabeledPrice], + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + provider_token: str | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + start_parameter: str | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendInvoice: + """ + Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendinvoice + + :param title: Product name, 1-32 characters + :param description: Product description, 1-255 characters + :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. + :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. + :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. + :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars `_. + :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*. + :param start_parameter: Unique deep-linking parameter. If left empty, **forwarded copies** of the sent message will have a *Pay* button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a *URL* button with a deep link to the bot (instead of a *Pay* button), with the value used as the start parameter + :param provider_data: JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. + :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. + :param photo_size: Photo size in bytes + :param photo_width: Photo width + :param photo_height: Photo height + :param need_name: Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_. + :param need_phone_number: Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_. + :param need_email: Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_. + :param need_shipping_address: Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_. + :param send_phone_number_to_provider: Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_. + :param send_email_to_provider: Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_. + :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. + :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: 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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendInvoice + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendInvoice( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + title=title, + description=description, + payload=payload, + 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, + start_parameter=start_parameter, + provider_data=provider_data, + photo_url=photo_url, + photo_size=photo_size, + photo_width=photo_width, + photo_height=photo_height, + need_name=need_name, + need_phone_number=need_phone_number, + need_email=need_email, + need_shipping_address=need_shipping_address, + send_phone_number_to_provider=send_phone_number_to_provider, + send_email_to_provider=send_email_to_provider, + is_flexible=is_flexible, + 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, + ).as_(self._bot) + + def answer_location( + self, + latitude: float, + longitude: float, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendLocation: + """ + Shortcut for method :class:`aiogram.methods.send_location.SendLocation` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendlocation + + :param latitude: Latitude of the location + :param longitude: Longitude of the location + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 + :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. + :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. + :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. + :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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_location.SendLocation` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendLocation + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendLocation( + chat_id=self.chat.id, + latitude=latitude, + 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, + proximity_alert_radius=proximity_alert_radius, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_location( + self, + latitude: float, + longitude: float, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendLocation: + """ + Shortcut for method :class:`aiogram.methods.send_location.SendLocation` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendlocation + + :param latitude: Latitude of the location + :param longitude: Longitude of the location + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 + :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. + :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. + :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. + :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_location.SendLocation` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendLocation + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendLocation( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + latitude=latitude, + 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, + proximity_alert_radius=proximity_alert_radius, + 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, + ).as_(self._bot) + + def answer_media_group( + self, + media: list[MediaUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendMediaGroup: + """ + Shortcut for method :class:`aiogram.methods.send_media_group.SendMediaGroup` + will automatically fill method attributes: + + - :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 :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 a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat + :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent messages from forwarding and saving + :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 reply_parameters: Description of the message to reply to + :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 + :return: instance of method :class:`aiogram.methods.send_media_group.SendMediaGroup` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendMediaGroup + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendMediaGroup( + chat_id=self.chat.id, + 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, + message_effect_id=message_effect_id, + reply_parameters=reply_parameters, + allow_sending_without_reply=allow_sending_without_reply, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_media_group( + self, + media: list[MediaUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendMediaGroup: + """ + Shortcut for method :class:`aiogram.methods.send_media_group.SendMediaGroup` + will automatically fill method attributes: + + - :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 :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 a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat + :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent messages from forwarding and saving + :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 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_media_group.SendMediaGroup` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendMediaGroup + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendMediaGroup( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + 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, + message_effect_id=message_effect_id, + allow_sending_without_reply=allow_sending_without_reply, + **kwargs, + ).as_(self._bot) + + def answer_photo( + self, + photo: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendPhoto: + """ + Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. + :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media + :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation + :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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_photo.SendPhoto` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendPhoto + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendPhoto( + chat_id=self.chat.id, + 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, + show_caption_above_media=show_caption_above_media, + has_spoiler=has_spoiler, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_photo( + self, + photo: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendPhoto: + """ + Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. + :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media + :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation + :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_photo.SendPhoto` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendPhoto + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendPhoto( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + 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, + show_caption_above_media=show_caption_above_media, + has_spoiler=has_spoiler, + 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, + ).as_(self._bot) + + def answer_poll( + self, + question: str, + options: list[InputPollOptionUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + question_parse_mode: str | Default | None = Default("parse_mode"), + question_entities: list[MessageEntity] | None = None, + is_anonymous: bool | None = None, + type: str | None = None, + allows_multiple_answers: bool | None = None, + allows_revoting: bool | None = None, + shuffle_options: bool | None = None, + allow_adding_options: bool | None = None, + hide_results_until_closes: bool | None = None, + correct_option_ids: list[int] | None = None, + explanation: str | None = None, + explanation_parse_mode: str | Default | None = Default("parse_mode"), + explanation_entities: list[MessageEntity] | None = None, + open_period: int | None = None, + close_date: DateTimeUnion | None = None, + is_closed: bool | None = None, + description: str | None = None, + description_parse_mode: str | Default | None = Default("parse_mode"), + description_entities: list[MessageEntity] | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + correct_option_id: int | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendPoll: + """ + Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendpoll + + :param question: Poll question, 1-300 characters + :param options: A JSON-serialized list of 2-12 answer options + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed + :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* + :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` + :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' + :param allows_multiple_answers: Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False` + :param allows_revoting: Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls + :param shuffle_options: Pass :code:`True`, if the poll options must be shown in random order + :param allow_adding_options: Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes + :param hide_results_until_closes: Pass :code:`True`, if poll results must be shown only after the poll closes + :param correct_option_ids: A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode + :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing + :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. + :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* + :param open_period: Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*. + :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*. + :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. + :param description: Description of the poll to be sent, 0-1024 characters after entities parsing + :param description_parse_mode: Mode for parsing entities in the poll description. See `formatting options `_ for more details. + :param description_entities: A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode* + :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 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 + :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendPoll + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendPoll( + chat_id=self.chat.id, + question=question, + options=options, + business_connection_id=business_connection_id, + message_thread_id=message_thread_id, + question_parse_mode=question_parse_mode, + question_entities=question_entities, + is_anonymous=is_anonymous, + type=type, + allows_multiple_answers=allows_multiple_answers, + allows_revoting=allows_revoting, + shuffle_options=shuffle_options, + allow_adding_options=allow_adding_options, + hide_results_until_closes=hide_results_until_closes, + correct_option_ids=correct_option_ids, + explanation=explanation, + explanation_parse_mode=explanation_parse_mode, + explanation_entities=explanation_entities, + open_period=open_period, + close_date=close_date, + is_closed=is_closed, + description=description, + description_parse_mode=description_parse_mode, + description_entities=description_entities, + disable_notification=disable_notification, + protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, + message_effect_id=message_effect_id, + reply_parameters=reply_parameters, + reply_markup=reply_markup, + allow_sending_without_reply=allow_sending_without_reply, + correct_option_id=correct_option_id, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_poll( + self, + question: str, + options: list[InputPollOptionUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + question_parse_mode: str | Default | None = Default("parse_mode"), + question_entities: list[MessageEntity] | None = None, + is_anonymous: bool | None = None, + type: str | None = None, + allows_multiple_answers: bool | None = None, + allows_revoting: bool | None = None, + shuffle_options: bool | None = None, + allow_adding_options: bool | None = None, + hide_results_until_closes: bool | None = None, + correct_option_ids: list[int] | None = None, + explanation: str | None = None, + explanation_parse_mode: str | Default | None = Default("parse_mode"), + explanation_entities: list[MessageEntity] | None = None, + open_period: int | None = None, + close_date: DateTimeUnion | None = None, + is_closed: bool | None = None, + description: str | None = None, + description_parse_mode: str | Default | None = Default("parse_mode"), + description_entities: list[MessageEntity] | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + correct_option_id: int | None = None, + **kwargs: Any, + ) -> SendPoll: + """ + Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendpoll + + :param question: Poll question, 1-300 characters + :param options: A JSON-serialized list of 2-12 answer options + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed + :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* + :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` + :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' + :param allows_multiple_answers: Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False` + :param allows_revoting: Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls + :param shuffle_options: Pass :code:`True`, if the poll options must be shown in random order + :param allow_adding_options: Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes + :param hide_results_until_closes: Pass :code:`True`, if poll results must be shown only after the poll closes + :param correct_option_ids: A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode + :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing + :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. + :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* + :param open_period: Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*. + :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*. + :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. + :param description: Description of the poll to be sent, 0-1024 characters after entities parsing + :param description_parse_mode: Mode for parsing entities in the poll description. See `formatting options `_ for more details. + :param description_entities: A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode* + :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 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 correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode + :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendPoll + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendPoll( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + question=question, + options=options, + business_connection_id=business_connection_id, + message_thread_id=message_thread_id, + question_parse_mode=question_parse_mode, + question_entities=question_entities, + is_anonymous=is_anonymous, + type=type, + allows_multiple_answers=allows_multiple_answers, + allows_revoting=allows_revoting, + shuffle_options=shuffle_options, + allow_adding_options=allow_adding_options, + hide_results_until_closes=hide_results_until_closes, + correct_option_ids=correct_option_ids, + explanation=explanation, + explanation_parse_mode=explanation_parse_mode, + explanation_entities=explanation_entities, + open_period=open_period, + close_date=close_date, + is_closed=is_closed, + description=description, + description_parse_mode=description_parse_mode, + description_entities=description_entities, + disable_notification=disable_notification, + protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, + message_effect_id=message_effect_id, + reply_markup=reply_markup, + allow_sending_without_reply=allow_sending_without_reply, + correct_option_id=correct_option_id, + **kwargs, + ).as_(self._bot) + + def answer_dice( + self, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendDice: + """ + Shortcut for method :class:`aiogram.methods.send_dice.SendDice` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#senddice + + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_dice.SendDice` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendDice + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendDice( + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_dice( + self, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendDice: + """ + Shortcut for method :class:`aiogram.methods.send_dice.SendDice` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#senddice + + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendDice + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendDice( + chat_id=self.chat.id, + 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, + ).as_(self._bot) + + def answer_sticker( + self, + sticker: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendSticker: + """ + Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param emoji: Emoji associated with the sticker; only for just uploaded stickers + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_sticker.SendSticker` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendSticker + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendSticker( + chat_id=self.chat.id, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_sticker( + self, + sticker: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendSticker: + """ + Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param emoji: Emoji associated with the sticker; only for just uploaded stickers + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendSticker + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendSticker( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + 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, + ).as_(self._bot) + + def answer_venue( + self, + latitude: float, + longitude: float, + title: str, + address: str, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendVenue: + """ + Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendvenue + + :param latitude: Latitude of the venue + :param longitude: Longitude of the venue + :param title: Name of the venue + :param address: Address of the venue + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param foursquare_id: Foursquare identifier of the venue + :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) + :param google_place_id: Google Places identifier of the venue + :param google_place_type: Google Places type of the venue. (See `supported types `_.) + :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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_venue.SendVenue` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendVenue + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendVenue( + chat_id=self.chat.id, + latitude=latitude, + longitude=longitude, + title=title, + 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, + google_place_type=google_place_type, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_venue( + self, + latitude: float, + longitude: float, + title: str, + address: str, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendVenue: + """ + Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendvenue + + :param latitude: Latitude of the venue + :param longitude: Longitude of the venue + :param title: Name of the venue + :param address: Address of the venue + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param foursquare_id: Foursquare identifier of the venue + :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) + :param google_place_id: Google Places identifier of the venue + :param google_place_type: Google Places type of the venue. (See `supported types `_.) + :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_venue.SendVenue` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendVenue + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendVenue( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + latitude=latitude, + longitude=longitude, + title=title, + 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, + google_place_type=google_place_type, + 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, + ).as_(self._bot) + + def answer_video( + self, + video: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + cover: InputFileUnion | None = None, + start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + supports_streaming: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendVideo: + """ + Shortcut for method :class:`aiogram.methods.send_video.SendVideo` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param duration: Duration of sent video in seconds + :param width: Video width + :param height: Video height + :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 cover: Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » ` + :param start_timestamp: Start timestamp for the video in the message + :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the video 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* + :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media + :param has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation + :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming + :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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_video.SendVideo` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendVideo + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendVideo( + chat_id=self.chat.id, + 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, + thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + has_spoiler=has_spoiler, + supports_streaming=supports_streaming, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_video( + self, + video: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + cover: InputFileUnion | None = None, + start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + supports_streaming: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendVideo: + """ + Shortcut for method :class:`aiogram.methods.send_video.SendVideo` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param duration: Duration of sent video in seconds + :param width: Video width + :param height: Video height + :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 cover: Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » ` + :param start_timestamp: Start timestamp for the video in the message + :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the video 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* + :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media + :param has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation + :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming + :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_video.SendVideo` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendVideo + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendVideo( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + 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, + thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + has_spoiler=has_spoiler, + supports_streaming=supports_streaming, + 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, + ).as_(self._bot) + + def answer_video_note( + self, + video_note: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + length: int | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendVideoNote: + """ + Shortcut for method :class:`aiogram.methods.send_video_note.SendVideoNote` + will automatically fill method attributes: + + - :code:`chat_id` + + As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param duration: Duration of sent video in seconds + :param length: Video width and height, i.e. diameter of the video message + :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 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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendVideoNote + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendVideoNote( + chat_id=self.chat.id, + 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, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_video_note( + self, + video_note: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + length: int | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendVideoNote: + """ + Shortcut for method :class:`aiogram.methods.send_video_note.SendVideoNote` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param duration: Duration of sent video in seconds + :param length: Video width and height, i.e. diameter of the video message + :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 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_video_note.SendVideoNote` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendVideoNote + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendVideoNote( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + 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, + 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, + ).as_(self._bot) + + def answer_voice( + self, + voice: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, + **kwargs: Any, + ) -> SendVoice: + """ + Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param caption: Voice message caption, 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. + :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param duration: Duration of the voice message in seconds + :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 + :param reply_to_message_id: If the message is a reply, ID of the original message + :return: instance of method :class:`aiogram.methods.send_voice.SendVoice` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendVoice + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendVoice( + chat_id=self.chat.id, + 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, + duration=duration, + 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, + reply_to_message_id=reply_to_message_id, + **kwargs, + ).as_(self._bot) + + def reply_voice( + self, + voice: InputFileUnion, + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + **kwargs: Any, + ) -> SendVoice: + """ + Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. + + 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 business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param caption: Voice message caption, 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. + :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param duration: Duration of the voice message in seconds + :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_voice.SendVoice` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendVoice + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendVoice( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + 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, + duration=duration, + 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, + ).as_(self._bot) + + def answer_paid_media( + self, + star_count: int, + media: list[InputPaidMediaUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + payload: str | None = None, + caption: str | None = None, + parse_mode: str | None = None, + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | None = None, + allow_paid_broadcast: bool | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + **kwargs: Any, + ) -> SendPaidMedia: + """ + Shortcut for method :class:`aiogram.methods.send_paid_media.SendPaidMedia` + will automatically fill method attributes: + + - :code:`chat_id` + + Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendpaidmedia + + :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-25000 + :param media: A JSON-serialized array describing the media to be sent; up to 10 items + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes. + :param caption: Media caption, 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the media 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* + :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media + :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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendPaidMedia + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendPaidMedia( + chat_id=self.chat.id, + 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, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + 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, + ).as_(self._bot) + + def reply_paid_media( + self, + star_count: int, + media: list[InputPaidMediaUnion], + business_connection_id: str | None = None, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + payload: str | None = None, + caption: str | None = None, + parse_mode: str | None = None, + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | None = None, + allow_paid_broadcast: bool | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + **kwargs: Any, + ) -> SendPaidMedia: + """ + Shortcut for method :class:`aiogram.methods.send_paid_media.SendPaidMedia` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`reply_parameters` + + Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendpaidmedia + + :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-25000 + :param media: A JSON-serialized array describing the media to be sent; up to 10 items + :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes. + :param caption: Media caption, 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the media 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* + :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media + :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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendPaidMedia + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendPaidMedia( + chat_id=self.chat.id, + reply_parameters=self.as_reply_parameters(), + 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, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + 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) + + def as_reply_parameters( + self, + allow_sending_without_reply: bool | Default | None = Default( + "allow_sending_without_reply" + ), + quote: str | None = None, + quote_parse_mode: str | Default | None = Default("parse_mode"), + quote_entities: list[MessageEntity] | None = None, + quote_position: int | None = None, + ) -> ReplyParameters: + return ReplyParameters( + message_id=self.message_id, + chat_id=self.chat.id, + allow_sending_without_reply=allow_sending_without_reply, + quote=quote, + quote_parse_mode=quote_parse_mode, + quote_entities=quote_entities, + quote_position=quote_position, + ) diff --git a/aiogram/types/inline_keyboard_button.py b/aiogram/types/inline_keyboard_button.py index fa801f2c..f85418cd 100644 --- a/aiogram/types/inline_keyboard_button.py +++ b/aiogram/types/inline_keyboard_button.py @@ -1,11 +1,12 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import MutableTelegramObject if TYPE_CHECKING: from .callback_game import CallbackGame + from .copy_text_button import CopyTextButton from .login_url import LoginUrl from .switch_inline_query_chosen_chat import SwitchInlineQueryChosenChat from .web_app_info import WebAppInfo @@ -13,30 +14,36 @@ if TYPE_CHECKING: class InlineKeyboardButton(MutableTelegramObject): """ - This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button. + This object represents one button of an inline keyboard. Exactly one of the fields other than *text*, *icon_custom_emoji_id*, and *style* must be used to specify the type of the button. Source: https://core.telegram.org/bots/api#inlinekeyboardbutton """ text: str """Label text on the button""" - url: Optional[str] = None + icon_custom_emoji_id: str | None = None + """*Optional*. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on `Fragment `_ or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.""" + style: str | None = None + """*Optional*. Style of the button. Must be one of 'danger' (red), 'success' (green) or 'primary' (blue). If omitted, then an app-specific style is used.""" + url: str | None = None """*Optional*. HTTP or tg:// URL to be opened when the button is pressed. Links :code:`tg://user?id=` can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings.""" - callback_data: Optional[str] = None + callback_data: str | None = None """*Optional*. Data to be sent in a `callback query `_ to the bot when the button is pressed, 1-64 bytes""" - web_app: Optional[WebAppInfo] = None + web_app: WebAppInfo | None = None """*Optional*. Description of the `Web App `_ that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account.""" - login_url: Optional[LoginUrl] = None + login_url: LoginUrl | None = 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.""" - switch_inline_query_current_chat: Optional[str] = None + switch_inline_query: str | None = 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 in channel direct messages chats and on behalf of a Telegram Business account.""" + switch_inline_query_current_chat: str | None = 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.""" - callback_game: Optional[CallbackGame] = None + switch_inline_query_chosen_chat: SwitchInlineQueryChosenChat | None = 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 in channel direct messages chats and on behalf of a Telegram Business account.""" + copy_text: CopyTextButton | None = None + """*Optional*. Description of the button that copies the specified text to the clipboard.""" + callback_game: CallbackGame | None = None """*Optional*. Description of the game that will be launched when the user presses the button.""" - pay: Optional[bool] = None + pay: bool | None = None """*Optional*. Specify :code:`True`, to send a `Pay button `_. Substrings '⭐' and 'XTR' in the buttons's text will be replaced with a Telegram Star icon.""" if TYPE_CHECKING: @@ -47,15 +54,18 @@ class InlineKeyboardButton(MutableTelegramObject): __pydantic__self__, *, text: str, - url: Optional[str] = None, - callback_data: Optional[str] = None, - web_app: Optional[WebAppInfo] = None, - login_url: Optional[LoginUrl] = None, - switch_inline_query: Optional[str] = None, - switch_inline_query_current_chat: Optional[str] = None, - switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat] = None, - callback_game: Optional[CallbackGame] = None, - pay: Optional[bool] = None, + icon_custom_emoji_id: str | None = None, + style: str | None = None, + url: str | None = None, + callback_data: str | None = None, + web_app: WebAppInfo | None = None, + login_url: LoginUrl | None = None, + switch_inline_query: str | None = None, + switch_inline_query_current_chat: str | None = None, + switch_inline_query_chosen_chat: SwitchInlineQueryChosenChat | None = None, + copy_text: CopyTextButton | None = None, + callback_game: CallbackGame | None = None, + pay: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -64,6 +74,8 @@ class InlineKeyboardButton(MutableTelegramObject): super().__init__( text=text, + icon_custom_emoji_id=icon_custom_emoji_id, + style=style, url=url, callback_data=callback_data, web_app=web_app, @@ -71,6 +83,7 @@ class InlineKeyboardButton(MutableTelegramObject): switch_inline_query=switch_inline_query, switch_inline_query_current_chat=switch_inline_query_current_chat, switch_inline_query_chosen_chat=switch_inline_query_chosen_chat, + copy_text=copy_text, callback_game=callback_game, pay=pay, **__pydantic_kwargs, diff --git a/aiogram/types/inline_keyboard_markup.py b/aiogram/types/inline_keyboard_markup.py index e5b89671..ef1f0945 100644 --- a/aiogram/types/inline_keyboard_markup.py +++ b/aiogram/types/inline_keyboard_markup.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from .base import MutableTelegramObject @@ -15,7 +15,7 @@ class InlineKeyboardMarkup(MutableTelegramObject): Source: https://core.telegram.org/bots/api#inlinekeyboardmarkup """ - inline_keyboard: List[List[InlineKeyboardButton]] + inline_keyboard: list[list[InlineKeyboardButton]] """Array of button rows, each represented by an Array of :class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` objects""" if TYPE_CHECKING: @@ -25,7 +25,7 @@ class InlineKeyboardMarkup(MutableTelegramObject): def __init__( __pydantic__self__, *, - inline_keyboard: List[List[InlineKeyboardButton]], + inline_keyboard: list[list[InlineKeyboardButton]], **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query.py b/aiogram/types/inline_query.py index a0cad317..1443dd18 100644 --- a/aiogram/types/inline_query.py +++ b/aiogram/types/inline_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -8,26 +8,7 @@ from .base import TelegramObject if TYPE_CHECKING: from ..methods import AnswerInlineQuery - from .inline_query_result_article import InlineQueryResultArticle - from .inline_query_result_audio import InlineQueryResultAudio - from .inline_query_result_cached_audio import InlineQueryResultCachedAudio - from .inline_query_result_cached_document import InlineQueryResultCachedDocument - from .inline_query_result_cached_gif import InlineQueryResultCachedGif - from .inline_query_result_cached_mpeg4_gif import InlineQueryResultCachedMpeg4Gif - from .inline_query_result_cached_photo import InlineQueryResultCachedPhoto - from .inline_query_result_cached_sticker import InlineQueryResultCachedSticker - from .inline_query_result_cached_video import InlineQueryResultCachedVideo - from .inline_query_result_cached_voice import InlineQueryResultCachedVoice - from .inline_query_result_contact import InlineQueryResultContact - from .inline_query_result_document import InlineQueryResultDocument - from .inline_query_result_game import InlineQueryResultGame - from .inline_query_result_gif import InlineQueryResultGif - from .inline_query_result_location import InlineQueryResultLocation - from .inline_query_result_mpeg4_gif import InlineQueryResultMpeg4Gif - from .inline_query_result_photo import InlineQueryResultPhoto - from .inline_query_result_venue import InlineQueryResultVenue - from .inline_query_result_video import InlineQueryResultVideo - from .inline_query_result_voice import InlineQueryResultVoice + from .inline_query_result_union import InlineQueryResultUnion from .inline_query_results_button import InlineQueryResultsButton from .location import Location from .user import User @@ -48,9 +29,9 @@ class InlineQuery(TelegramObject): """Text of the query (up to 256 characters)""" offset: str """Offset of the results to be returned, can be controlled by the bot""" - chat_type: Optional[str] = None + chat_type: str | None = None """*Optional*. Type of the chat from which the inline query was sent. Can be either 'sender' for a private chat with the inline query sender, 'private', 'group', 'supergroup', or 'channel'. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat""" - location: Optional[Location] = None + location: Location | None = None """*Optional*. Sender location, only for bots that request user location""" if TYPE_CHECKING: @@ -64,8 +45,8 @@ class InlineQuery(TelegramObject): from_user: User, query: str, offset: str, - chat_type: Optional[str] = None, - location: Optional[Location] = None, + chat_type: str | None = None, + location: Location | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -84,36 +65,13 @@ class InlineQuery(TelegramObject): def answer( self, - results: List[ - Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ] - ], - cache_time: Optional[int] = None, - is_personal: Optional[bool] = None, - next_offset: Optional[str] = None, - button: Optional[InlineQueryResultsButton] = None, - switch_pm_parameter: Optional[str] = None, - switch_pm_text: Optional[str] = None, + results: list[InlineQueryResultUnion], + cache_time: int | None = None, + is_personal: bool | None = None, + next_offset: str | None = None, + button: InlineQueryResultsButton | None = None, + switch_pm_parameter: str | None = None, + switch_pm_text: str | None = None, **kwargs: Any, ) -> AnswerInlineQuery: """ diff --git a/aiogram/types/inline_query_result_article.py b/aiogram/types/inline_query_result_article.py index c9987382..5032987a 100644 --- a/aiogram/types/inline_query_result_article.py +++ b/aiogram/types/inline_query_result_article.py @@ -1,17 +1,15 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal + +from pydantic import Field from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion class InlineQueryResultArticle(InlineQueryResult): @@ -27,28 +25,25 @@ class InlineQueryResultArticle(InlineQueryResult): """Unique identifier for this result, 1-64 Bytes""" title: str """Title of the result""" - input_message_content: Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] + input_message_content: InputMessageContentUnion """Content of the message to be sent""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - url: Optional[str] = None + url: str | None = None """*Optional*. URL of the result""" - hide_url: Optional[bool] = None - """*Optional*. Pass :code:`True` if you don't want the URL to be shown in the message""" - description: Optional[str] = None + description: str | None = None """*Optional*. Short description of the result""" - thumbnail_url: Optional[str] = None + thumbnail_url: str | None = None """*Optional*. Url of the thumbnail for the result""" - thumbnail_width: Optional[int] = None + thumbnail_width: int | None = None """*Optional*. Thumbnail width""" - thumbnail_height: Optional[int] = None + thumbnail_height: int | None = None """*Optional*. Thumbnail height""" + hide_url: bool | None = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. Pass :code:`True` if you don't want the URL to be shown in the message + +.. deprecated:: API:8.2 + https://core.telegram.org/bots/api-changelog#january-1-2025""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -60,20 +55,14 @@ class InlineQueryResultArticle(InlineQueryResult): type: Literal[InlineQueryResultType.ARTICLE] = InlineQueryResultType.ARTICLE, id: str, title: str, - input_message_content: Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ], - reply_markup: Optional[InlineKeyboardMarkup] = None, - url: Optional[str] = None, - hide_url: Optional[bool] = None, - description: Optional[str] = None, - thumbnail_url: Optional[str] = None, - thumbnail_width: Optional[int] = None, - thumbnail_height: Optional[int] = None, + input_message_content: InputMessageContentUnion, + reply_markup: InlineKeyboardMarkup | None = None, + url: str | None = None, + description: str | None = None, + thumbnail_url: str | None = None, + thumbnail_width: int | None = None, + thumbnail_height: int | None = None, + hide_url: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -87,10 +76,10 @@ class InlineQueryResultArticle(InlineQueryResult): input_message_content=input_message_content, reply_markup=reply_markup, url=url, - hide_url=hide_url, description=description, thumbnail_url=thumbnail_url, thumbnail_width=thumbnail_width, thumbnail_height=thumbnail_height, + hide_url=hide_url, **__pydantic_kwargs, ) diff --git a/aiogram/types/inline_query_result_audio.py b/aiogram/types/inline_query_result_audio.py index 56ef5f53..1be55609 100644 --- a/aiogram/types/inline_query_result_audio.py +++ b/aiogram/types/inline_query_result_audio.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -31,27 +27,19 @@ class InlineQueryResultAudio(InlineQueryResult): """A valid URL for the audio file""" title: str """Title""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - performer: Optional[str] = None + performer: str | None = None """*Optional*. Performer""" - audio_duration: Optional[int] = None + audio_duration: int | None = None """*Optional*. Audio duration in seconds""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the audio""" if TYPE_CHECKING: @@ -65,21 +53,13 @@ class InlineQueryResultAudio(InlineQueryResult): id: str, audio_url: str, title: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - performer: Optional[str] = None, - audio_duration: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + performer: str | None = None, + audio_duration: int | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_cached_audio.py b/aiogram/types/inline_query_result_cached_audio.py index 27d923f0..488ac02c 100644 --- a/aiogram/types/inline_query_result_cached_audio.py +++ b/aiogram/types/inline_query_result_cached_audio.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -29,23 +25,15 @@ class InlineQueryResultCachedAudio(InlineQueryResult): """Unique identifier for this result, 1-64 bytes""" audio_file_id: str """A valid file identifier for the audio file""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the audio""" if TYPE_CHECKING: @@ -58,19 +46,11 @@ class InlineQueryResultCachedAudio(InlineQueryResult): type: Literal[InlineQueryResultType.AUDIO] = InlineQueryResultType.AUDIO, id: str, audio_file_id: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_cached_document.py b/aiogram/types/inline_query_result_cached_document.py index 8e0355e6..4f6c29f6 100644 --- a/aiogram/types/inline_query_result_cached_document.py +++ b/aiogram/types/inline_query_result_cached_document.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -31,25 +27,17 @@ class InlineQueryResultCachedDocument(InlineQueryResult): """Title for the result""" document_file_id: str """A valid file identifier for the file""" - description: Optional[str] = None + description: str | None = None """*Optional*. Short description of the result""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the file""" if TYPE_CHECKING: @@ -63,20 +51,12 @@ class InlineQueryResultCachedDocument(InlineQueryResult): id: str, title: str, document_file_id: str, - description: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + description: str | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_cached_gif.py b/aiogram/types/inline_query_result_cached_gif.py index 277454c9..e646e870 100644 --- a/aiogram/types/inline_query_result_cached_gif.py +++ b/aiogram/types/inline_query_result_cached_gif.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -29,27 +25,19 @@ class InlineQueryResultCachedGif(InlineQueryResult): """Unique identifier for this result, 1-64 bytes""" gif_file_id: str """A valid file identifier for the GIF file""" - title: Optional[str] = None + title: str | None = None """*Optional*. Title for the result""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the GIF animation""" if TYPE_CHECKING: @@ -62,23 +50,13 @@ class InlineQueryResultCachedGif(InlineQueryResult): type: Literal[InlineQueryResultType.GIF] = InlineQueryResultType.GIF, id: str, gif_file_id: str, - title: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + title: str | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_cached_mpeg4_gif.py b/aiogram/types/inline_query_result_cached_mpeg4_gif.py index ec043864..70ff56cc 100644 --- a/aiogram/types/inline_query_result_cached_mpeg4_gif.py +++ b/aiogram/types/inline_query_result_cached_mpeg4_gif.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -29,27 +25,19 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): """Unique identifier for this result, 1-64 bytes""" mpeg4_file_id: str """A valid file identifier for the MPEG4 file""" - title: Optional[str] = None + title: str | None = None """*Optional*. Title for the result""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the video animation""" if TYPE_CHECKING: @@ -62,23 +50,13 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): type: Literal[InlineQueryResultType.MPEG4_GIF] = InlineQueryResultType.MPEG4_GIF, id: str, mpeg4_file_id: str, - title: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + title: str | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_cached_photo.py b/aiogram/types/inline_query_result_cached_photo.py index f40b203a..513ba79e 100644 --- a/aiogram/types/inline_query_result_cached_photo.py +++ b/aiogram/types/inline_query_result_cached_photo.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -29,29 +25,21 @@ class InlineQueryResultCachedPhoto(InlineQueryResult): """Unique identifier for this result, 1-64 bytes""" photo_file_id: str """A valid file identifier of the photo""" - title: Optional[str] = None + title: str | None = None """*Optional*. Title for the result""" - description: Optional[str] = None + description: str | None = None """*Optional*. Short description of the result""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the photo""" if TYPE_CHECKING: @@ -64,24 +52,14 @@ class InlineQueryResultCachedPhoto(InlineQueryResult): type: Literal[InlineQueryResultType.PHOTO] = InlineQueryResultType.PHOTO, id: str, photo_file_id: str, - title: Optional[str] = None, - description: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + title: str | None = None, + description: str | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_cached_sticker.py b/aiogram/types/inline_query_result_cached_sticker.py index 4300023c..eb472222 100644 --- a/aiogram/types/inline_query_result_cached_sticker.py +++ b/aiogram/types/inline_query_result_cached_sticker.py @@ -1,17 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion class InlineQueryResultCachedSticker(InlineQueryResult): @@ -27,17 +23,9 @@ class InlineQueryResultCachedSticker(InlineQueryResult): """Unique identifier for this result, 1-64 bytes""" sticker_file_id: str """A valid file identifier of the sticker""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the sticker""" if TYPE_CHECKING: @@ -50,16 +38,8 @@ class InlineQueryResultCachedSticker(InlineQueryResult): type: Literal[InlineQueryResultType.STICKER] = InlineQueryResultType.STICKER, id: str, sticker_file_id: str, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_cached_video.py b/aiogram/types/inline_query_result_cached_video.py index 4095ab99..e759bab0 100644 --- a/aiogram/types/inline_query_result_cached_video.py +++ b/aiogram/types/inline_query_result_cached_video.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -31,27 +27,19 @@ class InlineQueryResultCachedVideo(InlineQueryResult): """A valid file identifier for the video file""" title: str """Title for the result""" - description: Optional[str] = None + description: str | None = None """*Optional*. Short description of the result""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the video""" if TYPE_CHECKING: @@ -65,23 +53,13 @@ class InlineQueryResultCachedVideo(InlineQueryResult): id: str, video_file_id: str, title: str, - description: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + description: str | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_cached_voice.py b/aiogram/types/inline_query_result_cached_voice.py index 4cff896b..833cf2da 100644 --- a/aiogram/types/inline_query_result_cached_voice.py +++ b/aiogram/types/inline_query_result_cached_voice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -31,23 +27,15 @@ class InlineQueryResultCachedVoice(InlineQueryResult): """A valid file identifier for the voice message""" title: str """Voice message title""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the voice message""" if TYPE_CHECKING: @@ -61,19 +49,11 @@ class InlineQueryResultCachedVoice(InlineQueryResult): id: str, voice_file_id: str, title: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_contact.py b/aiogram/types/inline_query_result_contact.py index cc2900cd..be46226b 100644 --- a/aiogram/types/inline_query_result_contact.py +++ b/aiogram/types/inline_query_result_contact.py @@ -1,17 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion class InlineQueryResultContact(InlineQueryResult): @@ -29,27 +25,19 @@ class InlineQueryResultContact(InlineQueryResult): """Contact's phone number""" first_name: str """Contact's first name""" - last_name: Optional[str] = None + last_name: str | None = None """*Optional*. Contact's last name""" - vcard: Optional[str] = None + vcard: str | None = None """*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the contact""" - thumbnail_url: Optional[str] = None + thumbnail_url: str | None = None """*Optional*. Url of the thumbnail for the result""" - thumbnail_width: Optional[int] = None + thumbnail_width: int | None = None """*Optional*. Thumbnail width""" - thumbnail_height: Optional[int] = None + thumbnail_height: int | None = None """*Optional*. Thumbnail height""" if TYPE_CHECKING: @@ -63,21 +51,13 @@ class InlineQueryResultContact(InlineQueryResult): id: str, phone_number: str, first_name: str, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - thumbnail_url: Optional[str] = None, - thumbnail_width: Optional[int] = None, - thumbnail_height: Optional[int] = None, + last_name: str | None = None, + vcard: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, + thumbnail_url: str | None = None, + thumbnail_width: int | None = None, + thumbnail_height: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_document.py b/aiogram/types/inline_query_result_document.py index 86ae993b..1665c8b3 100644 --- a/aiogram/types/inline_query_result_document.py +++ b/aiogram/types/inline_query_result_document.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -33,31 +29,23 @@ class InlineQueryResultDocument(InlineQueryResult): """A valid URL for the file""" mime_type: str """MIME type of the content of the file, either 'application/pdf' or 'application/zip'""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - description: Optional[str] = None + description: str | None = None """*Optional*. Short description of the result""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. Inline keyboard attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + reply_markup: InlineKeyboardMarkup | None = None + """*Optional*. `Inline keyboard `_ attached to the message""" + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the file""" - thumbnail_url: Optional[str] = None + thumbnail_url: str | None = None """*Optional*. URL of the thumbnail (JPEG only) for the file""" - thumbnail_width: Optional[int] = None + thumbnail_width: int | None = None """*Optional*. Thumbnail width""" - thumbnail_height: Optional[int] = None + thumbnail_height: int | None = None """*Optional*. Thumbnail height""" if TYPE_CHECKING: @@ -72,23 +60,15 @@ class InlineQueryResultDocument(InlineQueryResult): title: str, document_url: str, mime_type: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - description: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - thumbnail_url: Optional[str] = None, - thumbnail_width: Optional[int] = None, - thumbnail_height: Optional[int] = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + description: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, + thumbnail_url: str | None = None, + thumbnail_width: int | None = None, + thumbnail_height: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_game.py b/aiogram/types/inline_query_result_game.py index 3c7dcde5..81332b0f 100644 --- a/aiogram/types/inline_query_result_game.py +++ b/aiogram/types/inline_query_result_game.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult @@ -22,7 +22,7 @@ class InlineQueryResultGame(InlineQueryResult): """Unique identifier for this result, 1-64 bytes""" game_short_name: str """Short name of the game""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" if TYPE_CHECKING: @@ -35,7 +35,7 @@ class InlineQueryResultGame(InlineQueryResult): type: Literal[InlineQueryResultType.GAME] = InlineQueryResultType.GAME, id: str, game_short_name: str, - reply_markup: Optional[InlineKeyboardMarkup] = None, + reply_markup: InlineKeyboardMarkup | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_gif.py b/aiogram/types/inline_query_result_gif.py index 3ad0eef8..8911916b 100644 --- a/aiogram/types/inline_query_result_gif.py +++ b/aiogram/types/inline_query_result_gif.py @@ -1,19 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType -from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -29,38 +24,30 @@ class InlineQueryResultGif(InlineQueryResult): id: str """Unique identifier for this result, 1-64 bytes""" gif_url: str - """A valid URL for the GIF file. File size must not exceed 1MB""" + """A valid URL for the GIF file""" thumbnail_url: str """URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result""" - gif_width: Optional[int] = None + gif_width: int | None = None """*Optional*. Width of the GIF""" - gif_height: Optional[int] = None + gif_height: int | None = None """*Optional*. Height of the GIF""" - gif_duration: Optional[int] = None + gif_duration: int | None = None """*Optional*. Duration of the GIF in seconds""" - thumbnail_mime_type: Optional[str] = None + thumbnail_mime_type: str | None = None """*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'""" - title: Optional[str] = None + title: str | None = None """*Optional*. Title for the result""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the GIF animation""" if TYPE_CHECKING: @@ -74,27 +61,17 @@ class InlineQueryResultGif(InlineQueryResult): id: str, gif_url: str, thumbnail_url: str, - gif_width: Optional[int] = None, - gif_height: Optional[int] = None, - gif_duration: Optional[int] = None, - thumbnail_mime_type: Optional[str] = None, - title: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + gif_width: int | None = None, + gif_height: int | None = None, + gif_duration: int | None = None, + thumbnail_mime_type: str | None = None, + title: str | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_location.py b/aiogram/types/inline_query_result_location.py index 50b3ed8a..ac943df4 100644 --- a/aiogram/types/inline_query_result_location.py +++ b/aiogram/types/inline_query_result_location.py @@ -1,17 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion class InlineQueryResultLocation(InlineQueryResult): @@ -31,31 +27,23 @@ class InlineQueryResultLocation(InlineQueryResult): """Location longitude in degrees""" title: str """Location title""" - horizontal_accuracy: Optional[float] = None + horizontal_accuracy: float | None = None """*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500""" - live_period: Optional[int] = None + live_period: int | None = None """*Optional*. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.""" - heading: Optional[int] = None + heading: int | None = None """*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.""" - proximity_alert_radius: Optional[int] = None + proximity_alert_radius: int | None = None """*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the location""" - thumbnail_url: Optional[str] = None + thumbnail_url: str | None = None """*Optional*. Url of the thumbnail for the result""" - thumbnail_width: Optional[int] = None + thumbnail_width: int | None = None """*Optional*. Thumbnail width""" - thumbnail_height: Optional[int] = None + thumbnail_height: int | None = None """*Optional*. Thumbnail height""" if TYPE_CHECKING: @@ -70,23 +58,15 @@ class InlineQueryResultLocation(InlineQueryResult): latitude: float, longitude: float, title: str, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - thumbnail_url: Optional[str] = None, - thumbnail_width: Optional[int] = None, - thumbnail_height: Optional[int] = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, + thumbnail_url: str | None = None, + thumbnail_width: int | None = None, + thumbnail_height: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_mpeg4_gif.py b/aiogram/types/inline_query_result_mpeg4_gif.py index 6ca282e1..85e26a58 100644 --- a/aiogram/types/inline_query_result_mpeg4_gif.py +++ b/aiogram/types/inline_query_result_mpeg4_gif.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -28,38 +24,30 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): id: str """Unique identifier for this result, 1-64 bytes""" mpeg4_url: str - """A valid URL for the MPEG4 file. File size must not exceed 1MB""" + """A valid URL for the MPEG4 file""" thumbnail_url: str """URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result""" - mpeg4_width: Optional[int] = None + mpeg4_width: int | None = None """*Optional*. Video width""" - mpeg4_height: Optional[int] = None + mpeg4_height: int | None = None """*Optional*. Video height""" - mpeg4_duration: Optional[int] = None + mpeg4_duration: int | None = None """*Optional*. Video duration in seconds""" - thumbnail_mime_type: Optional[str] = None + thumbnail_mime_type: str | None = None """*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'""" - title: Optional[str] = None + title: str | None = None """*Optional*. Title for the result""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the video animation""" if TYPE_CHECKING: @@ -73,27 +61,17 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): id: str, mpeg4_url: str, thumbnail_url: str, - mpeg4_width: Optional[int] = None, - mpeg4_height: Optional[int] = None, - mpeg4_duration: Optional[int] = None, - thumbnail_mime_type: Optional[str] = None, - title: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + mpeg4_width: int | None = None, + mpeg4_height: int | None = None, + mpeg4_duration: int | None = None, + thumbnail_mime_type: str | None = None, + title: str | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_photo.py b/aiogram/types/inline_query_result_photo.py index 02f68415..53edabf3 100644 --- a/aiogram/types/inline_query_result_photo.py +++ b/aiogram/types/inline_query_result_photo.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -31,33 +27,25 @@ class InlineQueryResultPhoto(InlineQueryResult): """A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB""" thumbnail_url: str """URL of the thumbnail for the photo""" - photo_width: Optional[int] = None + photo_width: int | None = None """*Optional*. Width of the photo""" - photo_height: Optional[int] = None + photo_height: int | None = None """*Optional*. Height of the photo""" - title: Optional[str] = None + title: str | None = None """*Optional*. Title for the result""" - description: Optional[str] = None + description: str | None = None """*Optional*. Short description of the result""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the photo""" if TYPE_CHECKING: @@ -71,26 +59,16 @@ class InlineQueryResultPhoto(InlineQueryResult): id: str, photo_url: str, thumbnail_url: str, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - title: Optional[str] = None, - description: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + photo_width: int | None = None, + photo_height: int | None = None, + title: str | None = None, + description: str | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_union.py b/aiogram/types/inline_query_result_union.py new file mode 100644 index 00000000..da2d7021 --- /dev/null +++ b/aiogram/types/inline_query_result_union.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .inline_query_result_article import InlineQueryResultArticle +from .inline_query_result_audio import InlineQueryResultAudio +from .inline_query_result_cached_audio import InlineQueryResultCachedAudio +from .inline_query_result_cached_document import InlineQueryResultCachedDocument +from .inline_query_result_cached_gif import InlineQueryResultCachedGif +from .inline_query_result_cached_mpeg4_gif import InlineQueryResultCachedMpeg4Gif +from .inline_query_result_cached_photo import InlineQueryResultCachedPhoto +from .inline_query_result_cached_sticker import InlineQueryResultCachedSticker +from .inline_query_result_cached_video import InlineQueryResultCachedVideo +from .inline_query_result_cached_voice import InlineQueryResultCachedVoice +from .inline_query_result_contact import InlineQueryResultContact +from .inline_query_result_document import InlineQueryResultDocument +from .inline_query_result_game import InlineQueryResultGame +from .inline_query_result_gif import InlineQueryResultGif +from .inline_query_result_location import InlineQueryResultLocation +from .inline_query_result_mpeg4_gif import InlineQueryResultMpeg4Gif +from .inline_query_result_photo import InlineQueryResultPhoto +from .inline_query_result_venue import InlineQueryResultVenue +from .inline_query_result_video import InlineQueryResultVideo +from .inline_query_result_voice import InlineQueryResultVoice + +InlineQueryResultUnion: TypeAlias = ( + InlineQueryResultCachedAudio + | InlineQueryResultCachedDocument + | InlineQueryResultCachedGif + | InlineQueryResultCachedMpeg4Gif + | InlineQueryResultCachedPhoto + | InlineQueryResultCachedSticker + | InlineQueryResultCachedVideo + | InlineQueryResultCachedVoice + | InlineQueryResultArticle + | InlineQueryResultAudio + | InlineQueryResultContact + | InlineQueryResultGame + | InlineQueryResultDocument + | InlineQueryResultGif + | InlineQueryResultLocation + | InlineQueryResultMpeg4Gif + | InlineQueryResultPhoto + | InlineQueryResultVenue + | InlineQueryResultVideo + | InlineQueryResultVoice +) diff --git a/aiogram/types/inline_query_result_venue.py b/aiogram/types/inline_query_result_venue.py index b8775b6b..a06d3d9e 100644 --- a/aiogram/types/inline_query_result_venue.py +++ b/aiogram/types/inline_query_result_venue.py @@ -1,17 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..enums import InlineQueryResultType from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion class InlineQueryResultVenue(InlineQueryResult): @@ -33,31 +29,23 @@ class InlineQueryResultVenue(InlineQueryResult): """Title of the venue""" address: str """Address of the venue""" - foursquare_id: Optional[str] = None + foursquare_id: str | None = None """*Optional*. Foursquare identifier of the venue if known""" - foursquare_type: Optional[str] = None + foursquare_type: str | None = None """*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)""" - google_place_id: Optional[str] = None + google_place_id: str | None = None """*Optional*. Google Places identifier of the venue""" - google_place_type: Optional[str] = None + google_place_type: str | None = None """*Optional*. Google Places type of the venue. (See `supported types `_.)""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the venue""" - thumbnail_url: Optional[str] = None + thumbnail_url: str | None = None """*Optional*. Url of the thumbnail for the result""" - thumbnail_width: Optional[int] = None + thumbnail_width: int | None = None """*Optional*. Thumbnail width""" - thumbnail_height: Optional[int] = None + thumbnail_height: int | None = None """*Optional*. Thumbnail height""" if TYPE_CHECKING: @@ -73,23 +61,15 @@ class InlineQueryResultVenue(InlineQueryResult): longitude: float, title: str, address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - thumbnail_url: Optional[str] = None, - thumbnail_width: Optional[int] = None, - thumbnail_height: Optional[int] = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, + thumbnail_url: str | None = None, + thumbnail_width: int | None = None, + thumbnail_height: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_video.py b/aiogram/types/inline_query_result_video.py index 52332fd7..00496efd 100644 --- a/aiogram/types/inline_query_result_video.py +++ b/aiogram/types/inline_query_result_video.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -37,33 +33,25 @@ class InlineQueryResultVideo(InlineQueryResult): """URL of the thumbnail (JPEG only) for the video""" title: str """Title for the result""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - video_width: Optional[int] = None + video_width: int | None = None """*Optional*. Video width""" - video_height: Optional[int] = None + video_height: int | None = None """*Optional*. Video height""" - video_duration: Optional[int] = None + video_duration: int | None = None """*Optional*. Video duration in seconds""" - description: Optional[str] = None + description: str | None = None """*Optional*. Short description of the result""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the video. This field is **required** if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).""" if TYPE_CHECKING: @@ -79,26 +67,16 @@ class InlineQueryResultVideo(InlineQueryResult): mime_type: str, thumbnail_url: str, title: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - video_width: Optional[int] = None, - video_height: Optional[int] = None, - video_duration: Optional[int] = None, - description: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + video_width: int | None = None, + video_height: int | None = None, + video_duration: int | None = None, + description: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_result_voice.py b/aiogram/types/inline_query_result_voice.py index a781fc69..4260b43a 100644 --- a/aiogram/types/inline_query_result_voice.py +++ b/aiogram/types/inline_query_result_voice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InlineQueryResultType @@ -8,11 +8,7 @@ from .inline_query_result import InlineQueryResult if TYPE_CHECKING: from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent + from .input_message_content_union import InputMessageContentUnion from .message_entity import MessageEntity @@ -31,25 +27,17 @@ class InlineQueryResultVoice(InlineQueryResult): """A valid URL for the voice recording""" title: str """Recording title""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - voice_duration: Optional[int] = None + voice_duration: int | None = None """*Optional*. Recording duration in seconds""" - reply_markup: Optional[InlineKeyboardMarkup] = None + reply_markup: InlineKeyboardMarkup | None = None """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None + input_message_content: InputMessageContentUnion | None = None """*Optional*. Content of the message to be sent instead of the voice recording""" if TYPE_CHECKING: @@ -63,20 +51,12 @@ class InlineQueryResultVoice(InlineQueryResult): id: str, voice_url: str, title: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - voice_duration: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + voice_duration: int | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + input_message_content: InputMessageContentUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/inline_query_results_button.py b/aiogram/types/inline_query_results_button.py index 6943fb89..76fbf526 100644 --- a/aiogram/types/inline_query_results_button.py +++ b/aiogram/types/inline_query_results_button.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -17,9 +17,9 @@ class InlineQueryResultsButton(TelegramObject): text: str """Label text on the button""" - web_app: Optional[WebAppInfo] = None + web_app: WebAppInfo | None = None """*Optional*. Description of the `Web App `_ that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method `switchInlineQuery `_ inside the Web App.""" - start_parameter: Optional[str] = None + start_parameter: str | None = None """*Optional*. `Deep-linking `_ parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed.""" if TYPE_CHECKING: @@ -30,8 +30,8 @@ class InlineQueryResultsButton(TelegramObject): __pydantic__self__, *, text: str, - web_app: Optional[WebAppInfo] = None, - start_parameter: Optional[str] = None, + web_app: WebAppInfo | None = None, + start_parameter: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_checklist.py b/aiogram/types/input_checklist.py new file mode 100644 index 00000000..ac0250d3 --- /dev/null +++ b/aiogram/types/input_checklist.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .input_checklist_task import InputChecklistTask + from .message_entity import MessageEntity + + +class InputChecklist(TelegramObject): + """ + Describes a checklist to create. + + Source: https://core.telegram.org/bots/api#inputchecklist + """ + + title: str + """Title of the checklist; 1-255 characters after entities parsing""" + tasks: list[InputChecklistTask] + """List of 1-30 tasks in the checklist""" + parse_mode: str | None = None + """*Optional*. Mode for parsing entities in the title. See `formatting options `_ for more details.""" + title_entities: list[MessageEntity] | None = None + """*Optional*. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities are allowed.""" + others_can_add_tasks: bool | None = None + """*Optional*. Pass :code:`True` if other users can add tasks to the checklist""" + others_can_mark_tasks_as_done: bool | None = None + """*Optional*. Pass :code:`True` if other users can mark tasks as done or not done in the checklist""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + title: str, + tasks: list[InputChecklistTask], + parse_mode: str | None = None, + title_entities: list[MessageEntity] | None = None, + others_can_add_tasks: bool | None = None, + others_can_mark_tasks_as_done: bool | None = 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__( + title=title, + tasks=tasks, + parse_mode=parse_mode, + title_entities=title_entities, + others_can_add_tasks=others_can_add_tasks, + others_can_mark_tasks_as_done=others_can_mark_tasks_as_done, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_checklist_task.py b/aiogram/types/input_checklist_task.py new file mode 100644 index 00000000..27d6f0eb --- /dev/null +++ b/aiogram/types/input_checklist_task.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .message_entity import MessageEntity + + +class InputChecklistTask(TelegramObject): + """ + Describes a task to add to a checklist. + + Source: https://core.telegram.org/bots/api#inputchecklisttask + """ + + id: int + """Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist""" + text: str + """Text of the task; 1-100 characters after entities parsing""" + parse_mode: str | None = None + """*Optional*. Mode for parsing entities in the text. See `formatting options `_ for more details.""" + text_entities: list[MessageEntity] | None = None + """*Optional*. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities are allowed.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: int, + text: str, + parse_mode: str | None = None, + text_entities: list[MessageEntity] | None = 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__( + id=id, + text=text, + parse_mode=parse_mode, + text_entities=text_entities, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_contact_message_content.py b/aiogram/types/input_contact_message_content.py index 8bcb5819..bcae0b45 100644 --- a/aiogram/types/input_contact_message_content.py +++ b/aiogram/types/input_contact_message_content.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .input_message_content import InputMessageContent @@ -16,9 +16,9 @@ class InputContactMessageContent(InputMessageContent): """Contact's phone number""" first_name: str """Contact's first name""" - last_name: Optional[str] = None + last_name: str | None = None """*Optional*. Contact's last name""" - vcard: Optional[str] = None + vcard: str | None = None """*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes""" if TYPE_CHECKING: @@ -30,8 +30,8 @@ class InputContactMessageContent(InputMessageContent): *, phone_number: str, first_name: str, - last_name: Optional[str] = None, - vcard: Optional[str] = None, + last_name: str | None = None, + vcard: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_file.py b/aiogram/types/input_file.py index 5b730598..b8df230e 100644 --- a/aiogram/types/input_file.py +++ b/aiogram/types/input_file.py @@ -3,8 +3,9 @@ from __future__ import annotations import io import os from abc import ABC, abstractmethod +from collections.abc import AsyncGenerator from pathlib import Path -from typing import TYPE_CHECKING, Any, AsyncGenerator, Dict, Optional, Union +from typing import TYPE_CHECKING, Any import aiofiles @@ -21,7 +22,7 @@ class InputFile(ABC): Source: https://core.telegram.org/bots/api#inputfile """ - def __init__(self, filename: Optional[str] = None, chunk_size: int = DEFAULT_CHUNK_SIZE): + def __init__(self, filename: str | None = None, chunk_size: int = DEFAULT_CHUNK_SIZE): """ Base class for input files. Should not be used directly. Look at :class:`BufferedInputFile`, :class:`FSInputFile` :class:`URLInputFile` @@ -33,7 +34,7 @@ class InputFile(ABC): self.chunk_size = chunk_size @abstractmethod - async def read(self, bot: "Bot") -> AsyncGenerator[bytes, None]: # pragma: no cover + async def read(self, bot: Bot) -> AsyncGenerator[bytes, None]: # pragma: no cover yield b"" @@ -53,8 +54,8 @@ class BufferedInputFile(InputFile): @classmethod def from_file( cls, - path: Union[str, Path], - filename: Optional[str] = None, + path: str | Path, + filename: str | None = None, chunk_size: int = DEFAULT_CHUNK_SIZE, ) -> BufferedInputFile: """ @@ -72,7 +73,7 @@ class BufferedInputFile(InputFile): data = f.read() return cls(data, filename=filename, chunk_size=chunk_size) - async def read(self, bot: "Bot") -> AsyncGenerator[bytes, None]: + async def read(self, bot: Bot) -> AsyncGenerator[bytes, None]: buffer = io.BytesIO(self.data) while chunk := buffer.read(self.chunk_size): yield chunk @@ -81,8 +82,8 @@ class BufferedInputFile(InputFile): class FSInputFile(InputFile): def __init__( self, - path: Union[str, Path], - filename: Optional[str] = None, + path: str | Path, + filename: str | None = None, chunk_size: int = DEFAULT_CHUNK_SIZE, ): """ @@ -99,7 +100,7 @@ class FSInputFile(InputFile): self.path = path - async def read(self, bot: "Bot") -> AsyncGenerator[bytes, None]: + async def read(self, bot: Bot) -> AsyncGenerator[bytes, None]: async with aiofiles.open(self.path, "rb") as f: while chunk := await f.read(self.chunk_size): yield chunk @@ -109,11 +110,11 @@ class URLInputFile(InputFile): def __init__( self, url: str, - headers: Optional[Dict[str, Any]] = None, - filename: Optional[str] = None, + headers: dict[str, Any] | None = None, + filename: str | None = None, chunk_size: int = DEFAULT_CHUNK_SIZE, timeout: int = 30, - bot: Optional["Bot"] = None, + bot: Bot | None = None, ): """ Represents object for streaming files from internet @@ -135,7 +136,7 @@ class URLInputFile(InputFile): self.timeout = timeout self.bot = bot - async def read(self, bot: "Bot") -> AsyncGenerator[bytes, None]: + async def read(self, bot: Bot) -> AsyncGenerator[bytes, None]: bot = self.bot or bot stream = bot.session.stream_content( url=self.url, diff --git a/aiogram/types/input_file_union.py b/aiogram/types/input_file_union.py new file mode 100644 index 00000000..5f820a7d --- /dev/null +++ b/aiogram/types/input_file_union.py @@ -0,0 +1,7 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .input_file import InputFile + +InputFileUnion: TypeAlias = str | InputFile diff --git a/aiogram/types/input_invoice_message_content.py b/aiogram/types/input_invoice_message_content.py index 0dbb6d27..e5ab7141 100644 --- a/aiogram/types/input_invoice_message_content.py +++ b/aiogram/types/input_invoice_message_content.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .input_message_content import InputMessageContent @@ -20,40 +20,40 @@ class InputInvoiceMessageContent(InputMessageContent): description: str """Product description, 1-255 characters""" payload: str - """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.""" + """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.""" currency: str """Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.""" - prices: List[LabeledPrice] + prices: list[LabeledPrice] """Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.""" - provider_token: Optional[str] = None + provider_token: str | None = None """*Optional*. Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.""" - max_tip_amount: Optional[int] = None + max_tip_amount: int | None = None """*Optional*. 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 `_.""" - suggested_tip_amounts: Optional[List[int]] = None + suggested_tip_amounts: list[int] | None = None """*Optional*. A JSON-serialized array of suggested amounts of tip 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*.""" - provider_data: Optional[str] = None + provider_data: str | None = None """*Optional*. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.""" - photo_url: Optional[str] = None + photo_url: str | None = None """*Optional*. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.""" - photo_size: Optional[int] = None + photo_size: int | None = None """*Optional*. Photo size in bytes""" - photo_width: Optional[int] = None + photo_width: int | None = None """*Optional*. Photo width""" - photo_height: Optional[int] = None + photo_height: int | None = None """*Optional*. Photo height""" - need_name: Optional[bool] = None + need_name: bool | None = None """*Optional*. Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_phone_number: Optional[bool] = None + need_phone_number: bool | None = None """*Optional*. Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_email: Optional[bool] = None + need_email: bool | None = None """*Optional*. Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_shipping_address: Optional[bool] = None + need_shipping_address: bool | None = None """*Optional*. Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.""" - send_phone_number_to_provider: Optional[bool] = None + send_phone_number_to_provider: bool | None = None """*Optional*. Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - send_email_to_provider: Optional[bool] = None + send_email_to_provider: bool | None = None """*Optional*. Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - is_flexible: Optional[bool] = None + is_flexible: bool | None = None """*Optional*. Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.""" if TYPE_CHECKING: @@ -67,22 +67,22 @@ class InputInvoiceMessageContent(InputMessageContent): description: str, payload: str, currency: str, - prices: List[LabeledPrice], - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, + prices: list[LabeledPrice], + provider_token: str | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_location_message_content.py b/aiogram/types/input_location_message_content.py index 83400c13..37eb1b7c 100644 --- a/aiogram/types/input_location_message_content.py +++ b/aiogram/types/input_location_message_content.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .input_message_content import InputMessageContent @@ -16,13 +16,13 @@ class InputLocationMessageContent(InputMessageContent): """Latitude of the location in degrees""" longitude: float """Longitude of the location in degrees""" - horizontal_accuracy: Optional[float] = None + horizontal_accuracy: float | None = None """*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500""" - live_period: Optional[int] = None + live_period: int | None = None """*Optional*. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.""" - heading: Optional[int] = None + heading: int | None = None """*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.""" - proximity_alert_radius: Optional[int] = None + proximity_alert_radius: int | None = None """*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" if TYPE_CHECKING: @@ -34,10 +34,10 @@ class InputLocationMessageContent(InputMessageContent): *, latitude: float, longitude: float, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_media_animation.py b/aiogram/types/input_media_animation.py index a0251f23..05eaf475 100644 --- a/aiogram/types/input_media_animation.py +++ b/aiogram/types/input_media_animation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InputMediaType @@ -8,6 +8,7 @@ from .input_media import InputMedia if TYPE_CHECKING: from .input_file import InputFile + from .input_file_union import InputFileUnion from .message_entity import MessageEntity @@ -20,25 +21,25 @@ class InputMediaAnimation(InputMedia): type: Literal[InputMediaType.ANIMATION] = InputMediaType.ANIMATION """Type of the result, must be *animation*""" - media: Union[str, InputFile] + media: InputFileUnion """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - thumbnail: Optional[InputFile] = None + thumbnail: InputFile | None = None """*Optional*. 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 + caption: str | None = None """*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the animation caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - width: Optional[int] = None + width: int | None = None """*Optional*. Animation width""" - height: Optional[int] = None + height: int | None = None """*Optional*. Animation height""" - duration: Optional[int] = None + duration: int | None = None """*Optional*. Animation duration in seconds""" - has_spoiler: Optional[bool] = None + has_spoiler: bool | None = None """*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation""" if TYPE_CHECKING: @@ -49,18 +50,16 @@ class InputMediaAnimation(InputMedia): __pydantic__self__, *, type: Literal[InputMediaType.ANIMATION] = InputMediaType.ANIMATION, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, - has_spoiler: Optional[bool] = None, + media: InputFileUnion, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + width: int | None = None, + height: int | None = None, + duration: int | None = None, + has_spoiler: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_media_audio.py b/aiogram/types/input_media_audio.py index c3722011..09d5a192 100644 --- a/aiogram/types/input_media_audio.py +++ b/aiogram/types/input_media_audio.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InputMediaType @@ -8,6 +8,7 @@ from .input_media import InputMedia if TYPE_CHECKING: from .input_file import InputFile + from .input_file_union import InputFileUnion from .message_entity import MessageEntity @@ -20,21 +21,21 @@ class InputMediaAudio(InputMedia): type: Literal[InputMediaType.AUDIO] = InputMediaType.AUDIO """Type of the result, must be *audio*""" - media: Union[str, InputFile] + media: InputFileUnion """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - thumbnail: Optional[InputFile] = None + thumbnail: InputFile | None = None """*Optional*. 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 + caption: str | None = None """*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - duration: Optional[int] = None + duration: int | None = None """*Optional*. Duration of the audio in seconds""" - performer: Optional[str] = None + performer: str | None = None """*Optional*. Performer of the audio""" - title: Optional[str] = None + title: str | None = None """*Optional*. Title of the audio""" if TYPE_CHECKING: @@ -45,14 +46,14 @@ class InputMediaAudio(InputMedia): __pydantic__self__, *, type: Literal[InputMediaType.AUDIO] = InputMediaType.AUDIO, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, + media: InputFileUnion, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_media_document.py b/aiogram/types/input_media_document.py index 7c24b929..674a27c4 100644 --- a/aiogram/types/input_media_document.py +++ b/aiogram/types/input_media_document.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InputMediaType @@ -8,6 +8,7 @@ from .input_media import InputMedia if TYPE_CHECKING: from .input_file import InputFile + from .input_file_union import InputFileUnion from .message_entity import MessageEntity @@ -20,17 +21,17 @@ class InputMediaDocument(InputMedia): type: Literal[InputMediaType.DOCUMENT] = InputMediaType.DOCUMENT """Type of the result, must be *document*""" - media: Union[str, InputFile] + media: InputFileUnion """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - thumbnail: Optional[InputFile] = None + thumbnail: InputFile | None = None """*Optional*. 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 + caption: str | None = None """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - disable_content_type_detection: Optional[bool] = None + disable_content_type_detection: bool | None = None """*Optional*. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always :code:`True`, if the document is sent as part of an album.""" if TYPE_CHECKING: @@ -41,12 +42,12 @@ class InputMediaDocument(InputMedia): __pydantic__self__, *, type: Literal[InputMediaType.DOCUMENT] = InputMediaType.DOCUMENT, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, + media: InputFileUnion, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_media_photo.py b/aiogram/types/input_media_photo.py index 19daa261..c789a672 100644 --- a/aiogram/types/input_media_photo.py +++ b/aiogram/types/input_media_photo.py @@ -1,13 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InputMediaType from .input_media import InputMedia if TYPE_CHECKING: - from .input_file import InputFile + from .input_file_union import InputFileUnion from .message_entity import MessageEntity @@ -20,17 +20,17 @@ class InputMediaPhoto(InputMedia): type: Literal[InputMediaType.PHOTO] = InputMediaType.PHOTO """Type of the result, must be *photo*""" - media: Union[str, InputFile] + media: InputFileUnion """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - has_spoiler: Optional[bool] = None + has_spoiler: bool | None = None """*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation""" if TYPE_CHECKING: @@ -41,14 +41,12 @@ class InputMediaPhoto(InputMedia): __pydantic__self__, *, type: Literal[InputMediaType.PHOTO] = InputMediaType.PHOTO, - media: Union[str, InputFile], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, + media: InputFileUnion, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_media_union.py b/aiogram/types/input_media_union.py new file mode 100644 index 00000000..5e1f92ff --- /dev/null +++ b/aiogram/types/input_media_union.py @@ -0,0 +1,13 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .input_media_animation import InputMediaAnimation +from .input_media_audio import InputMediaAudio +from .input_media_document import InputMediaDocument +from .input_media_photo import InputMediaPhoto +from .input_media_video import InputMediaVideo + +InputMediaUnion: TypeAlias = ( + InputMediaAnimation | InputMediaDocument | InputMediaAudio | InputMediaPhoto | InputMediaVideo +) diff --git a/aiogram/types/input_media_video.py b/aiogram/types/input_media_video.py index 6f1e3263..617bb5ff 100644 --- a/aiogram/types/input_media_video.py +++ b/aiogram/types/input_media_video.py @@ -1,13 +1,15 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..client.default import Default from ..enums import InputMediaType from .input_media import InputMedia if TYPE_CHECKING: + from .date_time_union import DateTimeUnion from .input_file import InputFile + from .input_file_union import InputFileUnion from .message_entity import MessageEntity @@ -20,27 +22,31 @@ class InputMediaVideo(InputMedia): type: Literal[InputMediaType.VIDEO] = InputMediaType.VIDEO """Type of the result, must be *video*""" - media: Union[str, InputFile] + media: InputFileUnion """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - thumbnail: Optional[InputFile] = None + thumbnail: InputFile | None = None """*Optional*. 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 + cover: InputFileUnion | None = None + """*Optional*. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" + start_timestamp: DateTimeUnion | None = None + """*Optional*. Start timestamp for the video in the message""" + caption: str | None = None """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") + show_caption_above_media: bool | Default | None = Default("show_caption_above_media") """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - width: Optional[int] = None + width: int | None = None """*Optional*. Video width""" - height: Optional[int] = None + height: int | None = None """*Optional*. Video height""" - duration: Optional[int] = None + duration: int | None = None """*Optional*. Video duration in seconds""" - supports_streaming: Optional[bool] = None + supports_streaming: bool | None = None """*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming""" - has_spoiler: Optional[bool] = None + has_spoiler: bool | None = None """*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation""" if TYPE_CHECKING: @@ -51,19 +57,19 @@ class InputMediaVideo(InputMedia): __pydantic__self__, *, type: Literal[InputMediaType.VIDEO] = InputMediaType.VIDEO, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, - supports_streaming: Optional[bool] = None, - has_spoiler: Optional[bool] = None, + media: InputFileUnion, + thumbnail: InputFile | None = None, + cover: InputFileUnion | None = None, + start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + width: int | None = None, + height: int | None = None, + duration: int | None = None, + supports_streaming: bool | None = None, + has_spoiler: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -74,6 +80,8 @@ class InputMediaVideo(InputMedia): type=type, media=media, thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, diff --git a/aiogram/types/input_message_content_union.py b/aiogram/types/input_message_content_union.py new file mode 100644 index 00000000..aff60a13 --- /dev/null +++ b/aiogram/types/input_message_content_union.py @@ -0,0 +1,17 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .input_contact_message_content import InputContactMessageContent +from .input_invoice_message_content import InputInvoiceMessageContent +from .input_location_message_content import InputLocationMessageContent +from .input_text_message_content import InputTextMessageContent +from .input_venue_message_content import InputVenueMessageContent + +InputMessageContentUnion: TypeAlias = ( + InputTextMessageContent + | InputLocationMessageContent + | InputVenueMessageContent + | InputContactMessageContent + | InputInvoiceMessageContent +) diff --git a/aiogram/types/input_paid_media_photo.py b/aiogram/types/input_paid_media_photo.py index 1756db50..0f94920d 100644 --- a/aiogram/types/input_paid_media_photo.py +++ b/aiogram/types/input_paid_media_photo.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Union +from typing import TYPE_CHECKING, Any, Literal from ..enums import InputPaidMediaType -from .input_file import InputFile +from .input_file_union import InputFileUnion from .input_paid_media import InputPaidMedia @@ -16,7 +16,7 @@ class InputPaidMediaPhoto(InputPaidMedia): type: Literal[InputPaidMediaType.PHOTO] = InputPaidMediaType.PHOTO """Type of the media, must be *photo*""" - media: Union[str, InputFile] + media: InputFileUnion """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" if TYPE_CHECKING: @@ -27,7 +27,7 @@ class InputPaidMediaPhoto(InputPaidMedia): __pydantic__self__, *, type: Literal[InputPaidMediaType.PHOTO] = InputPaidMediaType.PHOTO, - media: Union[str, InputFile], + media: InputFileUnion, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_paid_media_union.py b/aiogram/types/input_paid_media_union.py new file mode 100644 index 00000000..f87a7817 --- /dev/null +++ b/aiogram/types/input_paid_media_union.py @@ -0,0 +1,8 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .input_paid_media_photo import InputPaidMediaPhoto +from .input_paid_media_video import InputPaidMediaVideo + +InputPaidMediaUnion: TypeAlias = InputPaidMediaPhoto | InputPaidMediaVideo diff --git a/aiogram/types/input_paid_media_video.py b/aiogram/types/input_paid_media_video.py index 4511afbb..49724fe2 100644 --- a/aiogram/types/input_paid_media_video.py +++ b/aiogram/types/input_paid_media_video.py @@ -1,9 +1,11 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..enums import InputPaidMediaType +from .date_time_union import DateTimeUnion from .input_file import InputFile +from .input_file_union import InputFileUnion from .input_paid_media import InputPaidMedia @@ -16,17 +18,21 @@ class InputPaidMediaVideo(InputPaidMedia): type: Literal[InputPaidMediaType.VIDEO] = InputPaidMediaType.VIDEO """Type of the media, must be *video*""" - media: Union[str, InputFile] + media: InputFileUnion """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - thumbnail: Optional[Union[InputFile, str]] = None + thumbnail: InputFile | None = None """*Optional*. 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 » `""" - width: Optional[int] = None + cover: InputFileUnion | None = None + """*Optional*. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" + start_timestamp: DateTimeUnion | None = None + """*Optional*. Start timestamp for the video in the message""" + width: int | None = None """*Optional*. Video width""" - height: Optional[int] = None + height: int | None = None """*Optional*. Video height""" - duration: Optional[int] = None + duration: int | None = None """*Optional*. Video duration in seconds""" - supports_streaming: Optional[bool] = None + supports_streaming: bool | None = None """*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming""" if TYPE_CHECKING: @@ -37,12 +43,14 @@ class InputPaidMediaVideo(InputPaidMedia): __pydantic__self__, *, type: Literal[InputPaidMediaType.VIDEO] = InputPaidMediaType.VIDEO, - media: Union[str, InputFile], - thumbnail: Optional[Union[InputFile, str]] = None, - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, - supports_streaming: Optional[bool] = None, + media: InputFileUnion, + thumbnail: InputFile | None = None, + cover: InputFileUnion | None = None, + start_timestamp: DateTimeUnion | None = None, + width: int | None = None, + height: int | None = None, + duration: int | None = None, + supports_streaming: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -53,6 +61,8 @@ class InputPaidMediaVideo(InputPaidMedia): type=type, media=media, thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, width=width, height=height, duration=duration, diff --git a/aiogram/types/input_poll_option.py b/aiogram/types/input_poll_option.py index 7bca9f6f..775f8a1f 100644 --- a/aiogram/types/input_poll_option.py +++ b/aiogram/types/input_poll_option.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from ..client.default import Default from .base import TelegramObject @@ -18,9 +18,9 @@ class InputPollOption(TelegramObject): text: str """Option text, 1-100 characters""" - text_parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + text_parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the text. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed""" - text_entities: Optional[List[MessageEntity]] = None + text_entities: list[MessageEntity] | None = None """*Optional*. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of *text_parse_mode*""" if TYPE_CHECKING: @@ -31,8 +31,8 @@ class InputPollOption(TelegramObject): __pydantic__self__, *, text: str, - text_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - text_entities: Optional[List[MessageEntity]] = None, + text_parse_mode: str | Default | None = Default("parse_mode"), + text_entities: list[MessageEntity] | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_poll_option_union.py b/aiogram/types/input_poll_option_union.py new file mode 100644 index 00000000..da824977 --- /dev/null +++ b/aiogram/types/input_poll_option_union.py @@ -0,0 +1,7 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .input_poll_option import InputPollOption + +InputPollOptionUnion: TypeAlias = InputPollOption | str diff --git a/aiogram/types/input_profile_photo.py b/aiogram/types/input_profile_photo.py new file mode 100644 index 00000000..9fc95596 --- /dev/null +++ b/aiogram/types/input_profile_photo.py @@ -0,0 +1,14 @@ +from __future__ import annotations + +from .base import TelegramObject + + +class InputProfilePhoto(TelegramObject): + """ + This object describes a profile photo to set. Currently, it can be one of + + - :class:`aiogram.types.input_profile_photo_static.InputProfilePhotoStatic` + - :class:`aiogram.types.input_profile_photo_animated.InputProfilePhotoAnimated` + + Source: https://core.telegram.org/bots/api#inputprofilephoto + """ diff --git a/aiogram/types/input_profile_photo_animated.py b/aiogram/types/input_profile_photo_animated.py new file mode 100644 index 00000000..11d9e8f2 --- /dev/null +++ b/aiogram/types/input_profile_photo_animated.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from aiogram.enums import InputProfilePhotoType + +from .input_file_union import InputFileUnion +from .input_profile_photo import InputProfilePhoto + + +class InputProfilePhotoAnimated(InputProfilePhoto): + """ + An animated profile photo in the MPEG4 format. + + Source: https://core.telegram.org/bots/api#inputprofilephotoanimated + """ + + type: Literal[InputProfilePhotoType.ANIMATED] = InputProfilePhotoType.ANIMATED + """Type of the profile photo, must be *animated*""" + animation: InputFileUnion + """The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" + main_frame_timestamp: float | None = None + """*Optional*. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputProfilePhotoType.ANIMATED] = InputProfilePhotoType.ANIMATED, + animation: InputFileUnion, + main_frame_timestamp: float | None = 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__( + type=type, + animation=animation, + main_frame_timestamp=main_frame_timestamp, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_profile_photo_static.py b/aiogram/types/input_profile_photo_static.py new file mode 100644 index 00000000..08c655bc --- /dev/null +++ b/aiogram/types/input_profile_photo_static.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from aiogram.enums import InputProfilePhotoType + +from .input_file_union import InputFileUnion +from .input_profile_photo import InputProfilePhoto + + +class InputProfilePhotoStatic(InputProfilePhoto): + """ + A static profile photo in the .JPG format. + + Source: https://core.telegram.org/bots/api#inputprofilephotostatic + """ + + type: Literal[InputProfilePhotoType.STATIC] = InputProfilePhotoType.STATIC + """Type of the profile photo, must be *static*""" + photo: InputFileUnion + """The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputProfilePhotoType.STATIC] = InputProfilePhotoType.STATIC, + photo: InputFileUnion, + **__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__(type=type, photo=photo, **__pydantic_kwargs) diff --git a/aiogram/types/input_profile_photo_union.py b/aiogram/types/input_profile_photo_union.py new file mode 100644 index 00000000..c0e4b89a --- /dev/null +++ b/aiogram/types/input_profile_photo_union.py @@ -0,0 +1,6 @@ +from typing import TypeAlias + +from .input_profile_photo_animated import InputProfilePhotoAnimated +from .input_profile_photo_static import InputProfilePhotoStatic + +InputProfilePhotoUnion: TypeAlias = InputProfilePhotoStatic | InputProfilePhotoAnimated diff --git a/aiogram/types/input_sticker.py b/aiogram/types/input_sticker.py index 85f66868..73af02e7 100644 --- a/aiogram/types/input_sticker.py +++ b/aiogram/types/input_sticker.py @@ -1,11 +1,11 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from .base import TelegramObject if TYPE_CHECKING: - from .input_file import InputFile + from .input_file_union import InputFileUnion from .mask_position import MaskPosition @@ -16,15 +16,15 @@ class InputSticker(TelegramObject): Source: https://core.telegram.org/bots/api#inputsticker """ - sticker: Union[InputFile, str] - """The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass 'attach://' to upload a new one using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » `""" + sticker: InputFileUnion + """The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass 'attach://' to upload a new file using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » `""" format: str - """Format of the added sticker, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, 'video' for a **WEBM** video""" - emoji_list: List[str] + """Format of the added sticker, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, 'video' for a **.WEBM** video""" + emoji_list: list[str] """List of 1-20 emoji associated with the sticker""" - mask_position: Optional[MaskPosition] = None + mask_position: MaskPosition | None = None """*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only.""" - keywords: Optional[List[str]] = None + keywords: list[str] | None = None """*Optional*. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.""" if TYPE_CHECKING: @@ -34,11 +34,11 @@ class InputSticker(TelegramObject): def __init__( __pydantic__self__, *, - sticker: Union[InputFile, str], + sticker: InputFileUnion, format: str, - emoji_list: List[str], - mask_position: Optional[MaskPosition] = None, - keywords: Optional[List[str]] = None, + emoji_list: list[str], + mask_position: MaskPosition | None = None, + keywords: list[str] | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_story_content.py b/aiogram/types/input_story_content.py new file mode 100644 index 00000000..0cd34efe --- /dev/null +++ b/aiogram/types/input_story_content.py @@ -0,0 +1,14 @@ +from __future__ import annotations + +from .base import TelegramObject + + +class InputStoryContent(TelegramObject): + """ + This object describes the content of a story to post. Currently, it can be one of + + - :class:`aiogram.types.input_story_content_photo.InputStoryContentPhoto` + - :class:`aiogram.types.input_story_content_video.InputStoryContentVideo` + + Source: https://core.telegram.org/bots/api#inputstorycontent + """ diff --git a/aiogram/types/input_story_content_photo.py b/aiogram/types/input_story_content_photo.py new file mode 100644 index 00000000..c4b31fe3 --- /dev/null +++ b/aiogram/types/input_story_content_photo.py @@ -0,0 +1,37 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from aiogram.enums import InputStoryContentType + +from .input_story_content import InputStoryContent + + +class InputStoryContentPhoto(InputStoryContent): + """ + Describes a photo to post as a story. + + Source: https://core.telegram.org/bots/api#inputstorycontentphoto + """ + + type: Literal[InputStoryContentType.PHOTO] = InputStoryContentType.PHOTO + """Type of the content, must be *photo*""" + photo: str + """The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the photo was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputStoryContentType.PHOTO] = InputStoryContentType.PHOTO, + photo: str, + **__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__(type=type, photo=photo, **__pydantic_kwargs) diff --git a/aiogram/types/input_story_content_union.py b/aiogram/types/input_story_content_union.py new file mode 100644 index 00000000..71f9ec88 --- /dev/null +++ b/aiogram/types/input_story_content_union.py @@ -0,0 +1,6 @@ +from typing import TypeAlias + +from .input_story_content_photo import InputStoryContentPhoto +from .input_story_content_video import InputStoryContentVideo + +InputStoryContentUnion: TypeAlias = InputStoryContentPhoto | InputStoryContentVideo diff --git a/aiogram/types/input_story_content_video.py b/aiogram/types/input_story_content_video.py new file mode 100644 index 00000000..8ea250e9 --- /dev/null +++ b/aiogram/types/input_story_content_video.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from aiogram.enums import InputStoryContentType + +from .input_story_content import InputStoryContent + + +class InputStoryContentVideo(InputStoryContent): + """ + Describes a video to post as a story. + + Source: https://core.telegram.org/bots/api#inputstorycontentvideo + """ + + type: Literal[InputStoryContentType.VIDEO] = InputStoryContentType.VIDEO + """Type of the content, must be *video*""" + video: str + """The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass 'attach://' if the video was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" + duration: float | None = None + """*Optional*. Precise duration of the video in seconds; 0-60""" + cover_frame_timestamp: float | None = None + """*Optional*. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.""" + is_animation: bool | None = None + """*Optional*. Pass :code:`True` if the video has no sound""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[InputStoryContentType.VIDEO] = InputStoryContentType.VIDEO, + video: str, + duration: float | None = None, + cover_frame_timestamp: float | None = None, + is_animation: bool | None = 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__( + type=type, + video=video, + duration=duration, + cover_frame_timestamp=cover_frame_timestamp, + is_animation=is_animation, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/input_text_message_content.py b/aiogram/types/input_text_message_content.py index 50487570..f7745c28 100644 --- a/aiogram/types/input_text_message_content.py +++ b/aiogram/types/input_text_message_content.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -21,15 +21,13 @@ class InputTextMessageContent(InputMessageContent): message_text: str """Text of the message to be sent, 1-4096 characters""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the message text. See `formatting options `_ for more details.""" - entities: Optional[List[MessageEntity]] = None + entities: list[MessageEntity] | None = None """*Optional*. List of special entities that appear in message text, which can be specified instead of *parse_mode*""" - link_preview_options: Optional[LinkPreviewOptions] = None + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview") """*Optional*. Link preview generation options for the message""" - disable_web_page_preview: Optional[Union[bool, Default]] = Field( - Default("disable_web_page_preview"), json_schema_extra={"deprecated": True} - ) + disable_web_page_preview: bool | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Disables link previews for links in the sent message .. deprecated:: API:7.0 @@ -43,12 +41,10 @@ class InputTextMessageContent(InputMessageContent): __pydantic__self__, *, message_text: str, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "disable_web_page_preview" - ), + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + disable_web_page_preview: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/input_venue_message_content.py b/aiogram/types/input_venue_message_content.py index 48dd5c4e..3de81521 100644 --- a/aiogram/types/input_venue_message_content.py +++ b/aiogram/types/input_venue_message_content.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .input_message_content import InputMessageContent @@ -20,13 +20,13 @@ class InputVenueMessageContent(InputMessageContent): """Name of the venue""" address: str """Address of the venue""" - foursquare_id: Optional[str] = None + foursquare_id: str | None = None """*Optional*. Foursquare identifier of the venue, if known""" - foursquare_type: Optional[str] = None + foursquare_type: str | None = None """*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)""" - google_place_id: Optional[str] = None + google_place_id: str | None = None """*Optional*. Google Places identifier of the venue""" - google_place_type: Optional[str] = None + google_place_type: str | None = None """*Optional*. Google Places type of the venue. (See `supported types `_.)""" if TYPE_CHECKING: @@ -40,10 +40,10 @@ class InputVenueMessageContent(InputMessageContent): longitude: float, title: str, address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/keyboard_button.py b/aiogram/types/keyboard_button.py index 0cf7d58d..ca29d5bb 100644 --- a/aiogram/types/keyboard_button.py +++ b/aiogram/types/keyboard_button.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -9,6 +9,7 @@ from .base import MutableTelegramObject if TYPE_CHECKING: from .keyboard_button_poll_type import KeyboardButtonPollType from .keyboard_button_request_chat import KeyboardButtonRequestChat + from .keyboard_button_request_managed_bot import KeyboardButtonRequestManagedBot from .keyboard_button_request_user import KeyboardButtonRequestUser from .keyboard_button_request_users import KeyboardButtonRequestUsers from .web_app_info import WebAppInfo @@ -16,27 +17,32 @@ if TYPE_CHECKING: class KeyboardButton(MutableTelegramObject): """ - This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, *String* can be used instead of this object to specify the button text. - **Note:** *request_users* and *request_chat* options will only work in Telegram versions released after 3 February, 2023. Older clients will display *unsupported message*. + This object represents one button of the reply keyboard. At most one of the fields other than *text*, *icon_custom_emoji_id*, and *style* must be used to specify the type of the button. For simple text buttons, *String* can be used instead of this object to specify the button text. Source: https://core.telegram.org/bots/api#keyboardbutton """ text: str - """Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed""" - request_users: Optional[KeyboardButtonRequestUsers] = None - """*Optional.* If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.""" - request_chat: Optional[KeyboardButtonRequestChat] = None - """*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.""" - request_contact: Optional[bool] = None + """Text of the button. If none of the fields other than *text*, *icon_custom_emoji_id*, and *style* are used, it will be sent as a message when the button is pressed""" + icon_custom_emoji_id: str | None = None + """*Optional*. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on `Fragment `_ or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.""" + style: str | None = None + """*Optional*. Style of the button. Must be one of 'danger' (red), 'success' (green) or 'primary' (blue). If omitted, then an app-specific style is used.""" + request_users: KeyboardButtonRequestUsers | None = None + """*Optional*. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.""" + request_chat: KeyboardButtonRequestChat | None = None + """*Optional*. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.""" + request_managed_bot: KeyboardButtonRequestManagedBot | None = None + """*Optional*. If specified, pressing the button will ask the user to create and share a bot that will be managed by the current bot. Available for bots that enabled management of other bots in the `@BotFather `_ Mini App. Available in private chats only.""" + request_contact: bool | None = None """*Optional*. If :code:`True`, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.""" - request_location: Optional[bool] = None + request_location: bool | None = None """*Optional*. If :code:`True`, the user's current location will be sent when the button is pressed. Available in private chats only.""" - request_poll: Optional[KeyboardButtonPollType] = None + request_poll: KeyboardButtonPollType | None = None """*Optional*. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.""" - web_app: Optional[WebAppInfo] = None + web_app: WebAppInfo | None = None """*Optional*. If specified, the described `Web App `_ will be launched when the button is pressed. The Web App will be able to send a 'web_app_data' service message. Available in private chats only.""" - request_user: Optional[KeyboardButtonRequestUser] = Field( + request_user: KeyboardButtonRequestUser | None = Field( None, json_schema_extra={"deprecated": True} ) """*Optional.* If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only. @@ -52,13 +58,16 @@ class KeyboardButton(MutableTelegramObject): __pydantic__self__, *, text: str, - request_users: Optional[KeyboardButtonRequestUsers] = None, - request_chat: Optional[KeyboardButtonRequestChat] = None, - request_contact: Optional[bool] = None, - request_location: Optional[bool] = None, - request_poll: Optional[KeyboardButtonPollType] = None, - web_app: Optional[WebAppInfo] = None, - request_user: Optional[KeyboardButtonRequestUser] = None, + icon_custom_emoji_id: str | None = None, + style: str | None = None, + request_users: KeyboardButtonRequestUsers | None = None, + request_chat: KeyboardButtonRequestChat | None = None, + request_managed_bot: KeyboardButtonRequestManagedBot | None = None, + request_contact: bool | None = None, + request_location: bool | None = None, + request_poll: KeyboardButtonPollType | None = None, + web_app: WebAppInfo | None = None, + request_user: KeyboardButtonRequestUser | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -67,8 +76,11 @@ class KeyboardButton(MutableTelegramObject): super().__init__( text=text, + icon_custom_emoji_id=icon_custom_emoji_id, + style=style, request_users=request_users, request_chat=request_chat, + request_managed_bot=request_managed_bot, request_contact=request_contact, request_location=request_location, request_poll=request_poll, diff --git a/aiogram/types/keyboard_button_poll_type.py b/aiogram/types/keyboard_button_poll_type.py index 07eadb7b..4bc93b10 100644 --- a/aiogram/types/keyboard_button_poll_type.py +++ b/aiogram/types/keyboard_button_poll_type.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import MutableTelegramObject @@ -12,7 +12,7 @@ class KeyboardButtonPollType(MutableTelegramObject): Source: https://core.telegram.org/bots/api#keyboardbuttonpolltype """ - type: Optional[str] = None + type: str | None = None """*Optional*. If *quiz* is passed, the user will be allowed to create only polls in the quiz mode. If *regular* is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.""" if TYPE_CHECKING: @@ -20,7 +20,7 @@ class KeyboardButtonPollType(MutableTelegramObject): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, type: Optional[str] = None, **__pydantic_kwargs: Any + __pydantic__self__, *, type: str | None = None, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/types/keyboard_button_request_chat.py b/aiogram/types/keyboard_button_request_chat.py index 018edcff..33db839c 100644 --- a/aiogram/types/keyboard_button_request_chat.py +++ b/aiogram/types/keyboard_button_request_chat.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from aiogram.types import TelegramObject @@ -19,23 +19,23 @@ class KeyboardButtonRequestChat(TelegramObject): """Signed 32-bit identifier of the request, which will be received back in the :class:`aiogram.types.chat_shared.ChatShared` object. Must be unique within the message""" chat_is_channel: bool """Pass :code:`True` to request a channel chat, pass :code:`False` to request a group or a supergroup chat.""" - chat_is_forum: Optional[bool] = None + chat_is_forum: bool | None = None """*Optional*. Pass :code:`True` to request a forum supergroup, pass :code:`False` to request a non-forum chat. If not specified, no additional restrictions are applied.""" - chat_has_username: Optional[bool] = None + chat_has_username: bool | None = None """*Optional*. Pass :code:`True` to request a supergroup or a channel with a username, pass :code:`False` to request a chat without a username. If not specified, no additional restrictions are applied.""" - chat_is_created: Optional[bool] = None + chat_is_created: bool | None = None """*Optional*. Pass :code:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied.""" - user_administrator_rights: Optional[ChatAdministratorRights] = None + user_administrator_rights: ChatAdministratorRights | None = None """*Optional*. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of *bot_administrator_rights*. If not specified, no additional restrictions are applied.""" - bot_administrator_rights: Optional[ChatAdministratorRights] = None + bot_administrator_rights: ChatAdministratorRights | None = None """*Optional*. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of *user_administrator_rights*. If not specified, no additional restrictions are applied.""" - bot_is_member: Optional[bool] = None + bot_is_member: bool | None = None """*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.""" - request_title: Optional[bool] = None + request_title: bool | None = None """*Optional*. Pass :code:`True` to request the chat's title""" - request_username: Optional[bool] = None + request_username: bool | None = None """*Optional*. Pass :code:`True` to request the chat's username""" - request_photo: Optional[bool] = None + request_photo: bool | None = None """*Optional*. Pass :code:`True` to request the chat's photo""" if TYPE_CHECKING: @@ -47,15 +47,15 @@ class KeyboardButtonRequestChat(TelegramObject): *, request_id: int, chat_is_channel: bool, - chat_is_forum: Optional[bool] = None, - chat_has_username: Optional[bool] = None, - chat_is_created: Optional[bool] = None, - user_administrator_rights: Optional[ChatAdministratorRights] = None, - bot_administrator_rights: Optional[ChatAdministratorRights] = None, - bot_is_member: Optional[bool] = None, - request_title: Optional[bool] = None, - request_username: Optional[bool] = None, - request_photo: Optional[bool] = None, + chat_is_forum: bool | None = None, + chat_has_username: bool | None = None, + chat_is_created: bool | None = None, + user_administrator_rights: ChatAdministratorRights | None = None, + bot_administrator_rights: ChatAdministratorRights | None = None, + bot_is_member: bool | None = None, + request_title: bool | None = None, + request_username: bool | None = None, + request_photo: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/keyboard_button_request_managed_bot.py b/aiogram/types/keyboard_button_request_managed_bot.py new file mode 100644 index 00000000..2f81e952 --- /dev/null +++ b/aiogram/types/keyboard_button_request_managed_bot.py @@ -0,0 +1,41 @@ +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class KeyboardButtonRequestManagedBot(TelegramObject): + """ + This object defines the parameters for the creation of a managed bot. Information about the created bot will be shared with the bot using the update *managed_bot* and a :class:`aiogram.types.message.Message` with the field *managed_bot_created*. + + Source: https://core.telegram.org/bots/api#keyboardbuttonrequestmanagedbot + """ + + request_id: int + """Signed 32-bit identifier of the request. Must be unique within the message""" + suggested_name: str | None = None + """*Optional*. Suggested name for the bot""" + suggested_username: str | None = None + """*Optional*. Suggested username for the bot""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + request_id: int, + suggested_name: str | None = None, + suggested_username: str | None = 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__( + request_id=request_id, + suggested_name=suggested_name, + suggested_username=suggested_username, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/keyboard_button_request_user.py b/aiogram/types/keyboard_button_request_user.py index ab44ab20..07863d2a 100644 --- a/aiogram/types/keyboard_button_request_user.py +++ b/aiogram/types/keyboard_button_request_user.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from aiogram.types import TelegramObject @@ -15,9 +15,9 @@ class KeyboardButtonRequestUser(TelegramObject): request_id: int """Signed 32-bit identifier of the request, which will be received back in the :class:`aiogram.types.user_shared.UserShared` object. Must be unique within the message""" - user_is_bot: Optional[bool] = None + user_is_bot: bool | None = None """*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to request a regular user. If not specified, no additional restrictions are applied.""" - user_is_premium: Optional[bool] = None + user_is_premium: bool | None = None """*Optional*. Pass :code:`True` to request a premium user, pass :code:`False` to request a non-premium user. If not specified, no additional restrictions are applied.""" if TYPE_CHECKING: @@ -28,8 +28,8 @@ class KeyboardButtonRequestUser(TelegramObject): __pydantic__self__, *, request_id: int, - user_is_bot: Optional[bool] = None, - user_is_premium: Optional[bool] = None, + user_is_bot: bool | None = None, + user_is_premium: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/keyboard_button_request_users.py b/aiogram/types/keyboard_button_request_users.py index 631f04b4..cac20de9 100644 --- a/aiogram/types/keyboard_button_request_users.py +++ b/aiogram/types/keyboard_button_request_users.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from aiogram.types import TelegramObject @@ -12,17 +12,17 @@ class KeyboardButtonRequestUsers(TelegramObject): request_id: int """Signed 32-bit identifier of the request that will be received back in the :class:`aiogram.types.users_shared.UsersShared` object. Must be unique within the message""" - user_is_bot: Optional[bool] = None + user_is_bot: bool | None = None """*Optional*. Pass :code:`True` to request bots, pass :code:`False` to request regular users. If not specified, no additional restrictions are applied.""" - user_is_premium: Optional[bool] = None + user_is_premium: bool | None = None """*Optional*. Pass :code:`True` to request premium users, pass :code:`False` to request non-premium users. If not specified, no additional restrictions are applied.""" - max_quantity: Optional[int] = None + max_quantity: int | None = None """*Optional*. The maximum number of users to be selected; 1-10. Defaults to 1.""" - request_name: Optional[bool] = None + request_name: bool | None = None """*Optional*. Pass :code:`True` to request the users' first and last names""" - request_username: Optional[bool] = None + request_username: bool | None = None """*Optional*. Pass :code:`True` to request the users' usernames""" - request_photo: Optional[bool] = None + request_photo: bool | None = None """*Optional*. Pass :code:`True` to request the users' photos""" if TYPE_CHECKING: @@ -33,12 +33,12 @@ class KeyboardButtonRequestUsers(TelegramObject): __pydantic__self__, *, request_id: int, - user_is_bot: Optional[bool] = None, - user_is_premium: Optional[bool] = None, - max_quantity: Optional[int] = None, - request_name: Optional[bool] = None, - request_username: Optional[bool] = None, - request_photo: Optional[bool] = None, + user_is_bot: bool | None = None, + user_is_premium: bool | None = None, + max_quantity: int | None = None, + request_name: bool | None = None, + request_username: bool | None = None, + request_photo: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/link_preview_options.py b/aiogram/types/link_preview_options.py index 8964c5ee..5074f1ea 100644 --- a/aiogram/types/link_preview_options.py +++ b/aiogram/types/link_preview_options.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from ..client.default import Default from .base import TelegramObject @@ -11,15 +11,15 @@ class LinkPreviewOptions(TelegramObject): Source: https://core.telegram.org/bots/api#linkpreviewoptions """ - is_disabled: Optional[Union[bool, Default]] = Default("link_preview_is_disabled") + is_disabled: bool | Default | None = Default("link_preview_is_disabled") """*Optional*. :code:`True`, if the link preview is disabled""" - url: Optional[str] = None + url: str | None = None """*Optional*. URL to use for the link preview. If empty, then the first URL found in the message text will be used""" - prefer_small_media: Optional[Union[bool, Default]] = Default("link_preview_prefer_small_media") + prefer_small_media: bool | Default | None = Default("link_preview_prefer_small_media") """*Optional*. :code:`True`, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview""" - prefer_large_media: Optional[Union[bool, Default]] = Default("link_preview_prefer_large_media") + prefer_large_media: bool | Default | None = Default("link_preview_prefer_large_media") """*Optional*. :code:`True`, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview""" - show_above_text: Optional[Union[bool, Default]] = Default("link_preview_show_above_text") + show_above_text: bool | Default | None = Default("link_preview_show_above_text") """*Optional*. :code:`True`, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text""" if TYPE_CHECKING: @@ -29,17 +29,11 @@ class LinkPreviewOptions(TelegramObject): def __init__( __pydantic__self__, *, - is_disabled: Optional[Union[bool, Default]] = Default("link_preview_is_disabled"), - url: Optional[str] = None, - prefer_small_media: Optional[Union[bool, Default]] = Default( - "link_preview_prefer_small_media" - ), - prefer_large_media: Optional[Union[bool, Default]] = Default( - "link_preview_prefer_large_media" - ), - show_above_text: Optional[Union[bool, Default]] = Default( - "link_preview_show_above_text" - ), + is_disabled: bool | Default | None = Default("link_preview_is_disabled"), + url: str | None = None, + prefer_small_media: bool | Default | None = Default("link_preview_prefer_small_media"), + prefer_large_media: bool | Default | None = Default("link_preview_prefer_large_media"), + show_above_text: bool | Default | None = Default("link_preview_show_above_text"), **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/location.py b/aiogram/types/location.py index 32673dae..f6274808 100644 --- a/aiogram/types/location.py +++ b/aiogram/types/location.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -16,13 +16,13 @@ class Location(TelegramObject): """Latitude as defined by the sender""" longitude: float """Longitude as defined by the sender""" - horizontal_accuracy: Optional[float] = None + horizontal_accuracy: float | None = None """*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500""" - live_period: Optional[int] = None + live_period: int | None = None """*Optional*. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.""" - heading: Optional[int] = None + heading: int | None = None """*Optional*. The direction in which user is moving, in degrees; 1-360. For active live locations only.""" - proximity_alert_radius: Optional[int] = None + proximity_alert_radius: int | None = None """*Optional*. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.""" if TYPE_CHECKING: @@ -34,10 +34,10 @@ class Location(TelegramObject): *, latitude: float, longitude: float, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/location_address.py b/aiogram/types/location_address.py new file mode 100644 index 00000000..dce668bf --- /dev/null +++ b/aiogram/types/location_address.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class LocationAddress(TelegramObject): + """ + Describes the physical address of a location. + + Source: https://core.telegram.org/bots/api#locationaddress + """ + + country_code: str + """The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located""" + state: str | None = None + """*Optional*. State of the location""" + city: str | None = None + """*Optional*. City of the location""" + street: str | None = None + """*Optional*. Street address of the location""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + country_code: str, + state: str | None = None, + city: str | None = None, + street: str | None = 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__( + country_code=country_code, + state=state, + city=city, + street=street, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/login_url.py b/aiogram/types/login_url.py index 6f6c94af..0f8a64a1 100644 --- a/aiogram/types/login_url.py +++ b/aiogram/types/login_url.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -17,11 +17,11 @@ class LoginUrl(TelegramObject): url: str """An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in `Receiving authorization data `_.""" - forward_text: Optional[str] = None + forward_text: str | None = None """*Optional*. New text of the button in forwarded messages.""" - bot_username: Optional[str] = None + bot_username: str | None = None """*Optional*. Username of a bot, which will be used for user authorization. See `Setting up a bot `_ for more details. If not specified, the current bot's username will be assumed. The *url*'s domain must be the same as the domain linked with the bot. See `Linking your domain to the bot `_ for more details.""" - request_write_access: Optional[bool] = None + request_write_access: bool | None = None """*Optional*. Pass :code:`True` to request the permission for your bot to send messages to the user.""" if TYPE_CHECKING: @@ -32,9 +32,9 @@ class LoginUrl(TelegramObject): __pydantic__self__, *, url: str, - forward_text: Optional[str] = None, - bot_username: Optional[str] = None, - request_write_access: Optional[bool] = None, + forward_text: str | None = None, + bot_username: str | None = None, + request_write_access: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/managed_bot_created.py b/aiogram/types/managed_bot_created.py new file mode 100644 index 00000000..d8fd2b19 --- /dev/null +++ b/aiogram/types/managed_bot_created.py @@ -0,0 +1,32 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from pydantic import Field + +from .base import TelegramObject + +if TYPE_CHECKING: + from .user import User + + +class ManagedBotCreated(TelegramObject): + """ + This object contains information about the bot that was created to be managed by the current bot. + + Source: https://core.telegram.org/bots/api#managedbotcreated + """ + + bot_user: User = Field(..., alias="bot") + """Information about the bot. The bot's token can be fetched using the method :class:`aiogram.methods.get_managed_bot_token.GetManagedBotToken`.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, bot_user: User, **__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__(bot_user=bot_user, **__pydantic_kwargs) diff --git a/aiogram/types/managed_bot_updated.py b/aiogram/types/managed_bot_updated.py new file mode 100644 index 00000000..fd9e8f8e --- /dev/null +++ b/aiogram/types/managed_bot_updated.py @@ -0,0 +1,36 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from pydantic import Field + +from .base import TelegramObject + +if TYPE_CHECKING: + from .user import User + + +class ManagedBotUpdated(TelegramObject): + """ + This object contains information about the creation or token update of a bot that is managed by the current bot. + + Source: https://core.telegram.org/bots/api#managedbotupdated + """ + + user: User + """User that created the bot""" + bot_user: User = Field(..., alias="bot") + """Information about the bot. Token of the bot can be fetched using the method :class:`aiogram.methods.get_managed_bot_token.GetManagedBotToken`.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, user: User, bot_user: User, **__pydantic_kwargs: Any + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__(user=user, bot_user=bot_user, **__pydantic_kwargs) diff --git a/aiogram/types/maybe_inaccessible_message_union.py b/aiogram/types/maybe_inaccessible_message_union.py new file mode 100644 index 00000000..d5829772 --- /dev/null +++ b/aiogram/types/maybe_inaccessible_message_union.py @@ -0,0 +1,8 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .inaccessible_message import InaccessibleMessage +from .message import Message + +MaybeInaccessibleMessageUnion: TypeAlias = Message | InaccessibleMessage diff --git a/aiogram/types/media_union.py b/aiogram/types/media_union.py new file mode 100644 index 00000000..cdc97398 --- /dev/null +++ b/aiogram/types/media_union.py @@ -0,0 +1,8 @@ +from typing import TypeAlias + +from .input_media_audio import InputMediaAudio +from .input_media_document import InputMediaDocument +from .input_media_photo import InputMediaPhoto +from .input_media_video import InputMediaVideo + +MediaUnion: TypeAlias = InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo diff --git a/aiogram/types/menu_button.py b/aiogram/types/menu_button.py index 4c4fbf3b..e78b0df3 100644 --- a/aiogram/types/menu_button.py +++ b/aiogram/types/menu_button.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import MutableTelegramObject @@ -23,9 +23,9 @@ class MenuButton(MutableTelegramObject): type: str """Type of the button""" - text: Optional[str] = None + text: str | None = None """*Optional*. Text on the button""" - web_app: Optional[WebAppInfo] = None + web_app: WebAppInfo | None = None """*Optional*. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. Alternatively, a :code:`t.me` link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link.""" if TYPE_CHECKING: @@ -36,8 +36,8 @@ class MenuButton(MutableTelegramObject): __pydantic__self__, *, type: str, - text: Optional[str] = None, - web_app: Optional[WebAppInfo] = None, + text: str | None = None, + web_app: WebAppInfo | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/menu_button_union.py b/aiogram/types/menu_button_union.py new file mode 100644 index 00000000..9178de3d --- /dev/null +++ b/aiogram/types/menu_button_union.py @@ -0,0 +1,9 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .menu_button_commands import MenuButtonCommands +from .menu_button_default import MenuButtonDefault +from .menu_button_web_app import MenuButtonWebApp + +MenuButtonUnion: TypeAlias = MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 57c5c8b0..d2bd7754 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -1,7 +1,6 @@ from __future__ import annotations -import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -13,9 +12,9 @@ from aiogram.utils.text_decorations import ( from ..client.default import Default from ..enums import ContentType -from . import InputPaidMediaPhoto, InputPaidMediaVideo from .custom import DateTime from .maybe_inaccessible_message import MaybeInaccessibleMessage +from .reply_parameters import ReplyParameters if TYPE_CHECKING: from ..methods import ( @@ -55,12 +54,20 @@ if TYPE_CHECKING: from .chat import Chat from .chat_background import ChatBackground from .chat_boost_added import ChatBoostAdded + from .chat_id_union import ChatIdUnion + from .chat_owner_changed import ChatOwnerChanged + from .chat_owner_left import ChatOwnerLeft from .chat_shared import ChatShared + from .checklist import Checklist + from .checklist_tasks_added import ChecklistTasksAdded + from .checklist_tasks_done import ChecklistTasksDone from .contact import Contact + 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 .force_reply import ForceReply from .forum_topic_closed import ForumTopicClosed from .forum_topic_created import ForumTopicCreated from .forum_topic_edited import ForumTopicEdited @@ -68,43 +75,51 @@ if TYPE_CHECKING: from .game import Game from .general_forum_topic_hidden import GeneralForumTopicHidden from .general_forum_topic_unhidden import GeneralForumTopicUnhidden + from .gift_info import GiftInfo from .giveaway import Giveaway from .giveaway_completed import GiveawayCompleted from .giveaway_created import GiveawayCreated from .giveaway_winners import GiveawayWinners - from .inaccessible_message import InaccessibleMessage from .inline_keyboard_markup import InlineKeyboardMarkup from .input_file import InputFile - from .input_media_animation import InputMediaAnimation - from .input_media_audio import InputMediaAudio - from .input_media_document import InputMediaDocument - from .input_media_photo import InputMediaPhoto - from .input_media_video import InputMediaVideo - from .input_poll_option import InputPollOption + from .input_file_union import InputFileUnion + from .input_media_union import InputMediaUnion + from .input_paid_media_union import InputPaidMediaUnion + from .input_poll_option_union import InputPollOptionUnion from .invoice import Invoice from .labeled_price import LabeledPrice from .link_preview_options import LinkPreviewOptions from .location import Location + from .managed_bot_created import ManagedBotCreated + from .maybe_inaccessible_message_union import MaybeInaccessibleMessageUnion + from .media_union import MediaUnion from .message_auto_delete_timer_changed import MessageAutoDeleteTimerChanged from .message_entity import MessageEntity - from .message_origin_channel import MessageOriginChannel - from .message_origin_chat import MessageOriginChat - from .message_origin_hidden_user import MessageOriginHiddenUser - from .message_origin_user import MessageOriginUser + from .message_origin_union import MessageOriginUnion from .paid_media_info import PaidMediaInfo + from .paid_message_price_changed import PaidMessagePriceChanged from .passport_data import PassportData from .photo_size import PhotoSize from .poll import Poll + from .poll_option_added import PollOptionAdded + from .poll_option_deleted import PollOptionDeleted from .proximity_alert_triggered import ProximityAlertTriggered - from .reaction_type_custom_emoji import ReactionTypeCustomEmoji - from .reaction_type_emoji import ReactionTypeEmoji + from .reaction_type_union import ReactionTypeUnion + from .refunded_payment import RefundedPayment from .reply_keyboard_markup import ReplyKeyboardMarkup - from .reply_keyboard_remove import ReplyKeyboardRemove - from .reply_parameters import ReplyParameters + from .reply_markup_union import ReplyMarkupUnion 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 from .user_shared import UserShared from .users_shared import UsersShared @@ -128,206 +143,256 @@ class Message(MaybeInaccessibleMessage): """ message_id: int - """Unique message identifier inside this chat""" + """Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent""" date: DateTime """Date the message was sent in Unix time. It is always a positive number, representing a valid date.""" chat: Chat """Chat the message belongs to""" - message_thread_id: Optional[int] = None - """*Optional*. Unique identifier of a message thread to which the message belongs; for supergroups only""" - from_user: Optional[User] = Field(None, alias="from") - """*Optional*. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.""" - sender_chat: Optional[Chat] = None - """*Optional*. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field *from* contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.""" - sender_boost_count: Optional[int] = None + message_thread_id: int | None = None + """*Optional*. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only""" + direct_messages_topic: DirectMessagesTopic | None = None + """*Optional*. Information about the direct messages chat topic that contains the message""" + from_user: User | None = 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: Chat | None = None + """*Optional*. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field *from* contains a fake sender user in non-channel chats.""" + sender_boost_count: int | None = None """*Optional*. If the sender of the message boosted the chat, the number of boosts added by the user""" - sender_business_bot: Optional[User] = None + sender_business_bot: User | None = None """*Optional*. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.""" - business_connection_id: Optional[str] = None + sender_tag: str | None = None + """*Optional*. Tag or custom title of the sender of the message; for supergroups only""" + business_connection_id: str | None = None """*Optional*. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.""" - forward_origin: Optional[ - Union[MessageOriginUser, MessageOriginHiddenUser, MessageOriginChat, MessageOriginChannel] - ] = None + forward_origin: MessageOriginUnion | None = None """*Optional*. Information about the original message for forwarded messages""" - is_topic_message: Optional[bool] = None - """*Optional*. :code:`True`, if the message is sent to a forum topic""" - is_automatic_forward: Optional[bool] = None + is_topic_message: bool | None = None + """*Optional*. :code:`True`, if the message is sent to a topic in a forum supergroup or a private chat with the bot""" + is_automatic_forward: bool | None = 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.""" - external_reply: Optional[ExternalReplyInfo] = None + reply_to_message: Message | None = None + """*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: ExternalReplyInfo | None = None """*Optional*. Information about the message that is being replied to, which may come from another chat or forum topic""" - quote: Optional[TextQuote] = None + quote: TextQuote | None = None """*Optional*. For replies that quote part of the original message, the quoted part of the message""" - reply_to_story: Optional[Story] = None + reply_to_story: Story | None = None """*Optional*. For replies to a story, the original story""" - via_bot: Optional[User] = None + reply_to_checklist_task_id: int | None = None + """*Optional*. Identifier of the specific checklist task that is being replied to""" + reply_to_poll_option_id: str | None = None + """*Optional*. Persistent identifier of the specific poll option that is being replied to""" + via_bot: User | None = None """*Optional*. Bot through which the message was sent""" - edit_date: Optional[int] = None + edit_date: int | None = None """*Optional*. Date the message was last edited in Unix time""" - has_protected_content: Optional[bool] = None + has_protected_content: bool | None = None """*Optional*. :code:`True`, if the message can't be forwarded""" - is_from_offline: Optional[bool] = None - """*Optional*. 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""" - media_group_id: Optional[str] = None - """*Optional*. The unique identifier of a media message group this message belongs to""" - author_signature: Optional[str] = None + is_from_offline: bool | None = 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: bool | None = 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: str | None = None + """*Optional*. The unique identifier inside this chat of a media message group this message belongs to""" + author_signature: str | None = None """*Optional*. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator""" - text: Optional[str] = None + paid_star_count: int | None = None + """*Optional*. The number of Telegram Stars that were paid by the sender of the message to send it""" + text: str | None = None """*Optional*. For text messages, the actual UTF-8 text of the message""" - entities: Optional[List[MessageEntity]] = None + entities: list[MessageEntity] | None = None """*Optional*. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text""" - link_preview_options: Optional[LinkPreviewOptions] = None + link_preview_options: LinkPreviewOptions | None = None """*Optional*. Options used for link preview generation for the message, if it is a text message and link preview options were changed""" - effect_id: Optional[str] = None + suggested_post_info: SuggestedPostInfo | None = 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: str | None = None """*Optional*. Unique identifier of the message effect added to the message""" - animation: Optional[Animation] = None + animation: Animation | None = None """*Optional*. Message is an animation, information about the animation. For backward compatibility, when this field is set, the *document* field will also be set""" - audio: Optional[Audio] = None + audio: Audio | None = None """*Optional*. Message is an audio file, information about the file""" - document: Optional[Document] = None + document: Document | None = None """*Optional*. Message is a general file, information about the file""" - paid_media: Optional[PaidMediaInfo] = None + paid_media: PaidMediaInfo | None = None """*Optional*. Message contains paid media; information about the paid media""" - photo: Optional[List[PhotoSize]] = None + photo: list[PhotoSize] | None = None """*Optional*. Message is a photo, available sizes of the photo""" - sticker: Optional[Sticker] = None + sticker: Sticker | None = None """*Optional*. Message is a sticker, information about the sticker""" - story: Optional[Story] = None + story: Story | None = None """*Optional*. Message is a forwarded story""" - video: Optional[Video] = None + video: Video | None = None """*Optional*. Message is a video, information about the video""" - video_note: Optional[VideoNote] = None + video_note: VideoNote | None = None """*Optional*. Message is a `video note `_, information about the video message""" - voice: Optional[Voice] = None + voice: Voice | None = None """*Optional*. Message is a voice message, information about the file""" - caption: Optional[str] = None + caption: str | None = None """*Optional*. Caption for the animation, audio, document, paid media, photo, video or voice""" - caption_entities: Optional[List[MessageEntity]] = None + caption_entities: list[MessageEntity] | None = None """*Optional*. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption""" - show_caption_above_media: Optional[bool] = None - """*Optional*. True, if the caption must be shown above the message media""" - has_media_spoiler: Optional[bool] = None + show_caption_above_media: bool | None = None + """*Optional*. :code:`True`, if the caption must be shown above the message media""" + has_media_spoiler: bool | None = None """*Optional*. :code:`True`, if the message media is covered by a spoiler animation""" - contact: Optional[Contact] = None + checklist: Checklist | None = None + """*Optional*. Message is a checklist""" + contact: Contact | None = None """*Optional*. Message is a shared contact, information about the contact""" - dice: Optional[Dice] = None + dice: Dice | None = None """*Optional*. Message is a dice with random value""" - game: Optional[Game] = None + game: Game | None = None """*Optional*. Message is a game, information about the game. `More about games » `_""" - poll: Optional[Poll] = None + poll: Poll | None = None """*Optional*. Message is a native poll, information about the poll""" - venue: Optional[Venue] = None + venue: Venue | None = None """*Optional*. Message is a venue, information about the venue. For backward compatibility, when this field is set, the *location* field will also be set""" - location: Optional[Location] = None + location: Location | None = None """*Optional*. Message is a shared location, information about the location""" - new_chat_members: Optional[List[User]] = None + new_chat_members: list[User] | None = None """*Optional*. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)""" - left_chat_member: Optional[User] = None + left_chat_member: User | None = None """*Optional*. A member was removed from the group, information about them (this member may be the bot itself)""" - new_chat_title: Optional[str] = None + chat_owner_left: ChatOwnerLeft | None = None + """*Optional*. Service message: chat owner has left""" + chat_owner_changed: ChatOwnerChanged | None = None + """*Optional*. Service message: chat owner has changed""" + new_chat_title: str | None = None """*Optional*. A chat title was changed to this value""" - new_chat_photo: Optional[List[PhotoSize]] = None + new_chat_photo: list[PhotoSize] | None = None """*Optional*. A chat photo was change to this value""" - delete_chat_photo: Optional[bool] = None + delete_chat_photo: bool | None = None """*Optional*. Service message: the chat photo was deleted""" - group_chat_created: Optional[bool] = None + group_chat_created: bool | None = None """*Optional*. Service message: the group has been created""" - supergroup_chat_created: Optional[bool] = None + supergroup_chat_created: bool | None = None """*Optional*. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.""" - channel_chat_created: Optional[bool] = None + channel_chat_created: bool | None = None """*Optional*. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.""" - message_auto_delete_timer_changed: Optional[MessageAutoDeleteTimerChanged] = None + message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged | None = None """*Optional*. Service message: auto-delete timer settings changed in the chat""" - migrate_to_chat_id: Optional[int] = None + migrate_to_chat_id: int | None = None """*Optional*. The group has been migrated to a supergroup 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.""" - migrate_from_chat_id: Optional[int] = None + migrate_from_chat_id: int | None = 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[Union[Message, InaccessibleMessage]] = 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.""" - invoice: Optional[Invoice] = None + pinned_message: MaybeInaccessibleMessageUnion | None = None + """*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: Invoice | None = None """*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments » `_""" - successful_payment: Optional[SuccessfulPayment] = None + successful_payment: SuccessfulPayment | None = None """*Optional*. Message is a service message about a successful payment, information about the payment. `More about payments » `_""" - users_shared: Optional[UsersShared] = None + refunded_payment: RefundedPayment | None = None + """*Optional*. Message is a service message about a refunded payment, information about the payment. `More about payments » `_""" + users_shared: UsersShared | None = None """*Optional*. Service message: users were shared with the bot""" - chat_shared: Optional[ChatShared] = None + chat_shared: ChatShared | None = None """*Optional*. Service message: a chat was shared with the bot""" - connected_website: Optional[str] = None + gift: GiftInfo | None = None + """*Optional*. Service message: a regular gift was sent or received""" + unique_gift: UniqueGiftInfo | None = None + """*Optional*. Service message: a unique gift was sent or received""" + gift_upgrade_sent: GiftInfo | None = None + """*Optional*. Service message: upgrade of a gift was purchased after the gift was sent""" + connected_website: str | None = None """*Optional*. The domain name of the website on which the user has logged in. `More about Telegram Login » `_""" - write_access_allowed: Optional[WriteAccessAllowed] = None + write_access_allowed: WriteAccessAllowed | None = None """*Optional*. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess `_""" - passport_data: Optional[PassportData] = None + passport_data: PassportData | None = None """*Optional*. Telegram Passport data""" - proximity_alert_triggered: Optional[ProximityAlertTriggered] = None + proximity_alert_triggered: ProximityAlertTriggered | None = None """*Optional*. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.""" - boost_added: Optional[ChatBoostAdded] = None + boost_added: ChatBoostAdded | None = None """*Optional*. Service message: user boosted the chat""" - chat_background_set: Optional[ChatBackground] = None + chat_background_set: ChatBackground | None = None """*Optional*. Service message: chat background set""" - forum_topic_created: Optional[ForumTopicCreated] = None + checklist_tasks_done: ChecklistTasksDone | None = None + """*Optional*. Service message: some tasks in a checklist were marked as done or not done""" + checklist_tasks_added: ChecklistTasksAdded | None = None + """*Optional*. Service message: tasks were added to a checklist""" + direct_message_price_changed: DirectMessagePriceChanged | None = None + """*Optional*. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed""" + forum_topic_created: ForumTopicCreated | None = None """*Optional*. Service message: forum topic created""" - forum_topic_edited: Optional[ForumTopicEdited] = None + forum_topic_edited: ForumTopicEdited | None = None """*Optional*. Service message: forum topic edited""" - forum_topic_closed: Optional[ForumTopicClosed] = None + forum_topic_closed: ForumTopicClosed | None = None """*Optional*. Service message: forum topic closed""" - forum_topic_reopened: Optional[ForumTopicReopened] = None + forum_topic_reopened: ForumTopicReopened | None = None """*Optional*. Service message: forum topic reopened""" - general_forum_topic_hidden: Optional[GeneralForumTopicHidden] = None + general_forum_topic_hidden: GeneralForumTopicHidden | None = None """*Optional*. Service message: the 'General' forum topic hidden""" - general_forum_topic_unhidden: Optional[GeneralForumTopicUnhidden] = None + general_forum_topic_unhidden: GeneralForumTopicUnhidden | None = None """*Optional*. Service message: the 'General' forum topic unhidden""" - giveaway_created: Optional[GiveawayCreated] = None + giveaway_created: GiveawayCreated | None = None """*Optional*. Service message: a scheduled giveaway was created""" - giveaway: Optional[Giveaway] = None + giveaway: Giveaway | None = None """*Optional*. The message is a scheduled giveaway message""" - giveaway_winners: Optional[GiveawayWinners] = None + giveaway_winners: GiveawayWinners | None = None """*Optional*. A giveaway with public winners was completed""" - giveaway_completed: Optional[GiveawayCompleted] = None + giveaway_completed: GiveawayCompleted | None = None """*Optional*. Service message: a giveaway without public winners was completed""" - video_chat_scheduled: Optional[VideoChatScheduled] = None + managed_bot_created: ManagedBotCreated | None = None + """*Optional*. Service message: user created a bot that will be managed by the current bot""" + paid_message_price_changed: PaidMessagePriceChanged | None = None + """*Optional*. Service message: the price for paid messages has changed in the chat""" + poll_option_added: PollOptionAdded | None = None + """*Optional*. Service message: answer option was added to a poll""" + poll_option_deleted: PollOptionDeleted | None = None + """*Optional*. Service message: answer option was deleted from a poll""" + suggested_post_approved: SuggestedPostApproved | None = None + """*Optional*. Service message: a suggested post was approved""" + suggested_post_approval_failed: SuggestedPostApprovalFailed | None = None + """*Optional*. Service message: approval of a suggested post has failed""" + suggested_post_declined: SuggestedPostDeclined | None = None + """*Optional*. Service message: a suggested post was declined""" + suggested_post_paid: SuggestedPostPaid | None = None + """*Optional*. Service message: payment for a suggested post was received""" + suggested_post_refunded: SuggestedPostRefunded | None = None + """*Optional*. Service message: payment for a suggested post was refunded""" + video_chat_scheduled: VideoChatScheduled | None = None """*Optional*. Service message: video chat scheduled""" - video_chat_started: Optional[VideoChatStarted] = None + video_chat_started: VideoChatStarted | None = None """*Optional*. Service message: video chat started""" - video_chat_ended: Optional[VideoChatEnded] = None + video_chat_ended: VideoChatEnded | None = None """*Optional*. Service message: video chat ended""" - video_chat_participants_invited: Optional[VideoChatParticipantsInvited] = None + video_chat_participants_invited: VideoChatParticipantsInvited | None = None """*Optional*. Service message: new participants invited to a video chat""" - web_app_data: Optional[WebAppData] = None + web_app_data: WebAppData | None = None """*Optional*. Service message: data sent by a Web App""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. Inline keyboard attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.""" - forward_date: Optional[DateTime] = Field(None, json_schema_extra={"deprecated": True}) + reply_markup: InlineKeyboardMarkup | None = None + """*Optional*. `Inline keyboard `_ attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.""" + forward_date: DateTime | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For forwarded messages, date the original message was sent in Unix time .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - forward_from: Optional[User] = Field(None, json_schema_extra={"deprecated": True}) + forward_from: User | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For forwarded messages, sender of the original message .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - forward_from_chat: Optional[Chat] = Field(None, json_schema_extra={"deprecated": True}) + forward_from_chat: Chat | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For messages forwarded from channels or from anonymous administrators, information about the original sender chat .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - forward_from_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) + forward_from_message_id: int | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For messages forwarded from channels, identifier of the original message in the channel .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - forward_sender_name: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + forward_sender_name: str | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - forward_signature: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) + forward_signature: str | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present .. deprecated:: API:7.0 https://core.telegram.org/bots/api-changelog#december-29-2023""" - user_shared: Optional[UserShared] = Field(None, json_schema_extra={"deprecated": True}) + user_shared: UserShared | None = Field(None, json_schema_extra={"deprecated": True}) """*Optional*. Service message: a user was shared with the bot .. deprecated:: API:7.0 @@ -343,101 +408,120 @@ class Message(MaybeInaccessibleMessage): message_id: int, date: DateTime, chat: Chat, - message_thread_id: Optional[int] = None, - from_user: Optional[User] = None, - sender_chat: Optional[Chat] = None, - sender_boost_count: Optional[int] = None, - sender_business_bot: Optional[User] = None, - business_connection_id: Optional[str] = None, - forward_origin: Optional[ - Union[ - MessageOriginUser, - MessageOriginHiddenUser, - MessageOriginChat, - MessageOriginChannel, - ] - ] = None, - is_topic_message: Optional[bool] = None, - is_automatic_forward: Optional[bool] = None, - reply_to_message: Optional[Message] = None, - external_reply: Optional[ExternalReplyInfo] = None, - quote: Optional[TextQuote] = None, - reply_to_story: Optional[Story] = None, - via_bot: Optional[User] = None, - edit_date: Optional[int] = None, - has_protected_content: Optional[bool] = None, - is_from_offline: Optional[bool] = None, - media_group_id: Optional[str] = None, - author_signature: Optional[str] = None, - text: Optional[str] = None, - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - effect_id: Optional[str] = None, - animation: Optional[Animation] = None, - audio: Optional[Audio] = None, - document: Optional[Document] = None, - paid_media: Optional[PaidMediaInfo] = None, - photo: Optional[List[PhotoSize]] = None, - sticker: Optional[Sticker] = None, - story: Optional[Story] = None, - video: Optional[Video] = None, - video_note: Optional[VideoNote] = None, - voice: Optional[Voice] = None, - caption: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[bool] = None, - has_media_spoiler: Optional[bool] = None, - contact: Optional[Contact] = None, - dice: Optional[Dice] = None, - game: Optional[Game] = None, - poll: Optional[Poll] = None, - venue: Optional[Venue] = None, - location: Optional[Location] = None, - new_chat_members: Optional[List[User]] = None, - left_chat_member: Optional[User] = None, - new_chat_title: Optional[str] = None, - new_chat_photo: Optional[List[PhotoSize]] = None, - delete_chat_photo: Optional[bool] = None, - group_chat_created: Optional[bool] = None, - supergroup_chat_created: Optional[bool] = None, - channel_chat_created: Optional[bool] = None, - message_auto_delete_timer_changed: Optional[MessageAutoDeleteTimerChanged] = None, - migrate_to_chat_id: Optional[int] = None, - migrate_from_chat_id: Optional[int] = None, - pinned_message: Optional[Union[Message, InaccessibleMessage]] = None, - invoice: Optional[Invoice] = None, - successful_payment: Optional[SuccessfulPayment] = None, - users_shared: Optional[UsersShared] = None, - chat_shared: Optional[ChatShared] = None, - connected_website: Optional[str] = None, - write_access_allowed: Optional[WriteAccessAllowed] = None, - passport_data: Optional[PassportData] = None, - proximity_alert_triggered: Optional[ProximityAlertTriggered] = None, - boost_added: Optional[ChatBoostAdded] = None, - chat_background_set: Optional[ChatBackground] = None, - forum_topic_created: Optional[ForumTopicCreated] = None, - forum_topic_edited: Optional[ForumTopicEdited] = None, - forum_topic_closed: Optional[ForumTopicClosed] = None, - forum_topic_reopened: Optional[ForumTopicReopened] = None, - general_forum_topic_hidden: Optional[GeneralForumTopicHidden] = None, - general_forum_topic_unhidden: Optional[GeneralForumTopicUnhidden] = None, - giveaway_created: Optional[GiveawayCreated] = None, - giveaway: Optional[Giveaway] = None, - giveaway_winners: Optional[GiveawayWinners] = None, - giveaway_completed: Optional[GiveawayCompleted] = None, - video_chat_scheduled: Optional[VideoChatScheduled] = None, - video_chat_started: Optional[VideoChatStarted] = None, - video_chat_ended: Optional[VideoChatEnded] = None, - video_chat_participants_invited: Optional[VideoChatParticipantsInvited] = None, - web_app_data: Optional[WebAppData] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - forward_date: Optional[DateTime] = None, - forward_from: Optional[User] = None, - forward_from_chat: Optional[Chat] = None, - forward_from_message_id: Optional[int] = None, - forward_sender_name: Optional[str] = None, - forward_signature: Optional[str] = None, - user_shared: Optional[UserShared] = None, + message_thread_id: int | None = None, + direct_messages_topic: DirectMessagesTopic | None = None, + from_user: User | None = None, + sender_chat: Chat | None = None, + sender_boost_count: int | None = None, + sender_business_bot: User | None = None, + sender_tag: str | None = None, + business_connection_id: str | None = None, + forward_origin: MessageOriginUnion | None = None, + is_topic_message: bool | None = None, + is_automatic_forward: bool | None = None, + reply_to_message: Message | None = None, + external_reply: ExternalReplyInfo | None = None, + quote: TextQuote | None = None, + reply_to_story: Story | None = None, + reply_to_checklist_task_id: int | None = None, + reply_to_poll_option_id: str | None = None, + via_bot: User | None = None, + edit_date: int | None = None, + has_protected_content: bool | None = None, + is_from_offline: bool | None = None, + is_paid_post: bool | None = None, + media_group_id: str | None = None, + author_signature: str | None = None, + paid_star_count: int | None = None, + text: str | None = None, + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | None = None, + suggested_post_info: SuggestedPostInfo | None = None, + effect_id: str | None = None, + animation: Animation | None = None, + audio: Audio | None = None, + document: Document | None = None, + paid_media: PaidMediaInfo | None = None, + photo: list[PhotoSize] | None = None, + sticker: Sticker | None = None, + story: Story | None = None, + video: Video | None = None, + video_note: VideoNote | None = None, + voice: Voice | None = None, + caption: str | None = None, + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | None = None, + has_media_spoiler: bool | None = None, + checklist: Checklist | None = None, + contact: Contact | None = None, + dice: Dice | None = None, + game: Game | None = None, + poll: Poll | None = None, + venue: Venue | None = None, + location: Location | None = None, + new_chat_members: list[User] | None = None, + left_chat_member: User | None = None, + chat_owner_left: ChatOwnerLeft | None = None, + chat_owner_changed: ChatOwnerChanged | None = None, + new_chat_title: str | None = None, + new_chat_photo: list[PhotoSize] | None = None, + delete_chat_photo: bool | None = None, + group_chat_created: bool | None = None, + supergroup_chat_created: bool | None = None, + channel_chat_created: bool | None = None, + message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged | None = None, + migrate_to_chat_id: int | None = None, + migrate_from_chat_id: int | None = None, + pinned_message: MaybeInaccessibleMessageUnion | None = None, + invoice: Invoice | None = None, + successful_payment: SuccessfulPayment | None = None, + refunded_payment: RefundedPayment | None = None, + users_shared: UsersShared | None = None, + chat_shared: ChatShared | None = None, + gift: GiftInfo | None = None, + unique_gift: UniqueGiftInfo | None = None, + gift_upgrade_sent: GiftInfo | None = None, + connected_website: str | None = None, + write_access_allowed: WriteAccessAllowed | None = None, + passport_data: PassportData | None = None, + proximity_alert_triggered: ProximityAlertTriggered | None = None, + boost_added: ChatBoostAdded | None = None, + chat_background_set: ChatBackground | None = None, + checklist_tasks_done: ChecklistTasksDone | None = None, + checklist_tasks_added: ChecklistTasksAdded | None = None, + direct_message_price_changed: DirectMessagePriceChanged | None = None, + forum_topic_created: ForumTopicCreated | None = None, + forum_topic_edited: ForumTopicEdited | None = None, + forum_topic_closed: ForumTopicClosed | None = None, + forum_topic_reopened: ForumTopicReopened | None = None, + general_forum_topic_hidden: GeneralForumTopicHidden | None = None, + general_forum_topic_unhidden: GeneralForumTopicUnhidden | None = None, + giveaway_created: GiveawayCreated | None = None, + giveaway: Giveaway | None = None, + giveaway_winners: GiveawayWinners | None = None, + giveaway_completed: GiveawayCompleted | None = None, + managed_bot_created: ManagedBotCreated | None = None, + paid_message_price_changed: PaidMessagePriceChanged | None = None, + poll_option_added: PollOptionAdded | None = None, + poll_option_deleted: PollOptionDeleted | None = None, + suggested_post_approved: SuggestedPostApproved | None = None, + suggested_post_approval_failed: SuggestedPostApprovalFailed | None = None, + suggested_post_declined: SuggestedPostDeclined | None = None, + suggested_post_paid: SuggestedPostPaid | None = None, + suggested_post_refunded: SuggestedPostRefunded | None = None, + video_chat_scheduled: VideoChatScheduled | None = None, + video_chat_started: VideoChatStarted | None = None, + video_chat_ended: VideoChatEnded | None = None, + video_chat_participants_invited: VideoChatParticipantsInvited | None = None, + web_app_data: WebAppData | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + forward_date: DateTime | None = None, + forward_from: User | None = None, + forward_from_chat: Chat | None = None, + forward_from_message_id: int | None = None, + forward_sender_name: str | None = None, + forward_signature: str | None = None, + user_shared: UserShared | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -449,10 +533,12 @@ 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, sender_business_bot=sender_business_bot, + sender_tag=sender_tag, business_connection_id=business_connection_id, forward_origin=forward_origin, is_topic_message=is_topic_message, @@ -461,15 +547,20 @@ 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, + reply_to_poll_option_id=reply_to_poll_option_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, @@ -485,6 +576,7 @@ class Message(MaybeInaccessibleMessage): caption_entities=caption_entities, show_caption_above_media=show_caption_above_media, has_media_spoiler=has_media_spoiler, + checklist=checklist, contact=contact, dice=dice, game=game, @@ -493,6 +585,8 @@ class Message(MaybeInaccessibleMessage): location=location, new_chat_members=new_chat_members, left_chat_member=left_chat_member, + chat_owner_left=chat_owner_left, + chat_owner_changed=chat_owner_changed, new_chat_title=new_chat_title, new_chat_photo=new_chat_photo, delete_chat_photo=delete_chat_photo, @@ -505,14 +599,21 @@ class Message(MaybeInaccessibleMessage): pinned_message=pinned_message, invoice=invoice, successful_payment=successful_payment, + refunded_payment=refunded_payment, users_shared=users_shared, chat_shared=chat_shared, + gift=gift, + unique_gift=unique_gift, + gift_upgrade_sent=gift_upgrade_sent, connected_website=connected_website, write_access_allowed=write_access_allowed, passport_data=passport_data, proximity_alert_triggered=proximity_alert_triggered, boost_added=boost_added, chat_background_set=chat_background_set, + checklist_tasks_done=checklist_tasks_done, + checklist_tasks_added=checklist_tasks_added, + direct_message_price_changed=direct_message_price_changed, forum_topic_created=forum_topic_created, forum_topic_edited=forum_topic_edited, forum_topic_closed=forum_topic_closed, @@ -523,6 +624,15 @@ class Message(MaybeInaccessibleMessage): giveaway=giveaway, giveaway_winners=giveaway_winners, giveaway_completed=giveaway_completed, + managed_bot_created=managed_bot_created, + paid_message_price_changed=paid_message_price_changed, + poll_option_added=poll_option_added, + poll_option_deleted=poll_option_deleted, + 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, @@ -561,6 +671,8 @@ class Message(MaybeInaccessibleMessage): return ContentType.VIDEO_NOTE if self.voice: return ContentType.VOICE + if self.checklist: + return ContentType.CHECKLIST if self.contact: return ContentType.CONTACT if self.venue: @@ -571,6 +683,10 @@ class Message(MaybeInaccessibleMessage): return ContentType.NEW_CHAT_MEMBERS if self.left_chat_member: return ContentType.LEFT_CHAT_MEMBER + if self.chat_owner_left: + return ContentType.CHAT_OWNER_LEFT + if self.chat_owner_changed: + return ContentType.CHAT_OWNER_CHANGED if self.invoice: return ContentType.INVOICE if self.successful_payment: @@ -651,7 +767,38 @@ class Message(MaybeInaccessibleMessage): return ContentType.CHAT_BACKGROUND_SET if self.boost_added: return ContentType.BOOST_ADDED - + if self.checklist_tasks_done: + return ContentType.CHECKLIST_TASKS_DONE + if self.checklist_tasks_added: + return ContentType.CHECKLIST_TASKS_ADDED + if self.direct_message_price_changed: + return ContentType.DIRECT_MESSAGE_PRICE_CHANGED + if self.refunded_payment: + return ContentType.REFUNDED_PAYMENT + if self.gift: + return ContentType.GIFT + if self.unique_gift: + return ContentType.UNIQUE_GIFT + if self.gift_upgrade_sent: + return ContentType.GIFT_UPGRADE_SENT + if self.paid_message_price_changed: + return ContentType.PAID_MESSAGE_PRICE_CHANGED + if self.suggested_post_approved: + 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 + if self.managed_bot_created: + return ContentType.MANAGED_BOT_CREATED + if self.poll_option_added: + return ContentType.POLL_OPTION_ADDED + if self.poll_option_deleted: + return ContentType.POLL_OPTION_DELETED return ContentType.UNKNOWN def _unparse_entities(self, text_decoration: TextDecoration) -> str: @@ -667,28 +814,46 @@ class Message(MaybeInaccessibleMessage): def md_text(self) -> str: return self._unparse_entities(markdown_decoration) + def as_reply_parameters( + self, + allow_sending_without_reply: bool | Default | None = Default( + "allow_sending_without_reply" + ), + quote: str | None = None, + quote_parse_mode: str | Default | None = Default("parse_mode"), + quote_entities: list[MessageEntity] | None = None, + quote_position: int | None = None, + ) -> ReplyParameters: + return ReplyParameters( + message_id=self.message_id, + chat_id=self.chat.id, + allow_sending_without_reply=allow_sending_without_reply, + quote=quote, + quote_parse_mode=quote_parse_mode, + quote_entities=quote_entities, + quote_position=quote_position, + ) + def reply_animation( self, - animation: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + animation: InputFileUnion, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendAnimation: """ @@ -698,13 +863,14 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. 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 @@ -716,8 +882,9 @@ class Message(MaybeInaccessibleMessage): :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :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 reply_parameters: Description of the message to reply to + :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` @@ -727,16 +894,17 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendAnimation - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendAnimation( 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, - reply_to_message_id=self.message_id, + reply_parameters=self.as_reply_parameters(), animation=animation, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, width=width, height=height, @@ -748,8 +916,9 @@ class Message(MaybeInaccessibleMessage): has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -757,27 +926,26 @@ class Message(MaybeInaccessibleMessage): def answer_animation( self, - animation: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + animation: InputFileUnion, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendAnimation: """ @@ -793,6 +961,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 @@ -804,7 +973,9 @@ class Message(MaybeInaccessibleMessage): :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :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 @@ -816,15 +987,16 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendAnimation - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendAnimation( 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, animation=animation, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, width=width, height=height, @@ -836,7 +1008,9 @@ class Message(MaybeInaccessibleMessage): has_spoiler=has_spoiler, 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, @@ -846,22 +1020,22 @@ class Message(MaybeInaccessibleMessage): def reply_audio( self, - audio: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + audio: InputFileUnion, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendAudio: """ @@ -871,7 +1045,7 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. @@ -879,6 +1053,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* @@ -888,8 +1063,9 @@ class Message(MaybeInaccessibleMessage): :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 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 reply_parameters: Description of the message to reply to + :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` @@ -899,16 +1075,17 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendAudio - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendAudio( 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, - reply_to_message_id=self.message_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, @@ -918,8 +1095,9 @@ class Message(MaybeInaccessibleMessage): thumbnail=thumbnail, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -927,23 +1105,24 @@ class Message(MaybeInaccessibleMessage): def answer_audio( self, - audio: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + audio: InputFileUnion, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendAudio: """ @@ -960,6 +1139,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* @@ -969,7 +1149,9 @@ class Message(MaybeInaccessibleMessage): :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 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 @@ -981,15 +1163,16 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendAudio - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendAudio( 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, audio=audio, + direct_messages_topic_id=direct_messages_topic_id, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -999,7 +1182,9 @@ class Message(MaybeInaccessibleMessage): thumbnail=thumbnail, 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, @@ -1011,16 +1196,16 @@ class Message(MaybeInaccessibleMessage): self, phone_number: str, first_name: str, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + direct_messages_topic_id: int | None = None, + last_name: str | None = None, + vcard: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendContact: """ @@ -1030,7 +1215,7 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -1038,12 +1223,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 reply_parameters: Description of the message to reply to + :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` @@ -1053,23 +1240,25 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendContact - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendContact( 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, - reply_to_message_id=self.message_id, + 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, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1079,17 +1268,18 @@ class Message(MaybeInaccessibleMessage): self, phone_number: str, first_name: str, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + direct_messages_topic_id: int | None = None, + last_name: str | None = None, + vcard: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendContact: """ @@ -1106,11 +1296,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 @@ -1122,9 +1315,9 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendContact - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendContact( chat_id=self.chat.id, @@ -1132,11 +1325,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, @@ -1146,20 +1342,20 @@ class Message(MaybeInaccessibleMessage): def reply_document( self, - document: Union[InputFile, str], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + document: InputFileUnion, + direct_messages_topic_id: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendDocument: """ @@ -1169,13 +1365,14 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. 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. @@ -1183,8 +1380,9 @@ class Message(MaybeInaccessibleMessage): :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data :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 reply_parameters: Description of the message to reply to + :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` @@ -1194,16 +1392,17 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendDocument - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendDocument( 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, - reply_to_message_id=self.message_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, @@ -1211,8 +1410,9 @@ class Message(MaybeInaccessibleMessage): disable_content_type_detection=disable_content_type_detection, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1220,21 +1420,22 @@ class Message(MaybeInaccessibleMessage): def answer_document( self, - document: Union[InputFile, str], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + document: InputFileUnion, + direct_messages_topic_id: int | None = None, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendDocument: """ @@ -1250,6 +1451,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. @@ -1257,7 +1459,9 @@ class Message(MaybeInaccessibleMessage): :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data :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 @@ -1269,15 +1473,16 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendDocument - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendDocument( 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, document=document, + direct_messages_topic_id=direct_messages_topic_id, thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, @@ -1285,7 +1490,9 @@ class Message(MaybeInaccessibleMessage): disable_content_type_detection=disable_content_type_detection, 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, @@ -1296,12 +1503,12 @@ class Message(MaybeInaccessibleMessage): def reply_game( self, game_short_name: str, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendGame: """ @@ -1311,7 +1518,7 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -1320,8 +1527,8 @@ class Message(MaybeInaccessibleMessage): :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. :param 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 reply_parameters: Description of the message to reply to :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. :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_game.SendGame` @@ -1331,20 +1538,20 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendGame - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendGame( 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, - reply_to_message_id=self.message_id, + reply_parameters=self.as_reply_parameters(), game_short_name=game_short_name, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1353,13 +1560,14 @@ class Message(MaybeInaccessibleMessage): def answer_game( self, game_short_name: str, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendGame: """ @@ -1377,6 +1585,7 @@ class Message(MaybeInaccessibleMessage): :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. :param 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 reply_parameters: Description of the message to reply to :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. @@ -1389,9 +1598,9 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendGame - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendGame( chat_id=self.chat.id, @@ -1400,6 +1609,7 @@ class Message(MaybeInaccessibleMessage): game_short_name=game_short_name, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, @@ -1414,29 +1624,31 @@ class Message(MaybeInaccessibleMessage): description: str, payload: str, currency: str, - prices: List[LabeledPrice], - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, + prices: list[LabeledPrice], + direct_messages_topic_id: int | None = None, + provider_token: str | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + start_parameter: str | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendInvoice: """ @@ -1446,7 +1658,7 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -1454,9 +1666,10 @@ class Message(MaybeInaccessibleMessage): :param title: Product name, 1-32 characters :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + :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*. @@ -1475,8 +1688,9 @@ class Message(MaybeInaccessibleMessage): :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. :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 reply_parameters: Description of the message to reply to + :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` @@ -1486,20 +1700,21 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendInvoice - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendInvoice( 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, - reply_to_message_id=self.message_id, + reply_parameters=self.as_reply_parameters(), title=title, description=description, 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, @@ -1518,8 +1733,9 @@ class Message(MaybeInaccessibleMessage): is_flexible=is_flexible, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1531,30 +1747,33 @@ class Message(MaybeInaccessibleMessage): description: str, payload: str, currency: str, - prices: List[LabeledPrice], - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + prices: list[LabeledPrice], + direct_messages_topic_id: int | None = None, + provider_token: str | None = None, + max_tip_amount: int | None = None, + suggested_tip_amounts: list[int] | None = None, + start_parameter: str | None = None, + provider_data: str | None = None, + photo_url: str | None = None, + photo_size: int | None = None, + photo_width: int | None = None, + photo_height: int | None = None, + need_name: bool | None = None, + need_phone_number: bool | None = None, + need_email: bool | None = None, + need_shipping_address: bool | None = None, + send_phone_number_to_provider: bool | None = None, + send_email_to_provider: bool | None = None, + is_flexible: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendInvoice: """ @@ -1571,9 +1790,10 @@ class Message(MaybeInaccessibleMessage): :param title: Product name, 1-32 characters :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + :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*. @@ -1592,7 +1812,9 @@ class Message(MaybeInaccessibleMessage): :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. :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: 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 @@ -1604,9 +1826,9 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendInvoice - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendInvoice( chat_id=self.chat.id, @@ -1617,6 +1839,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, @@ -1635,7 +1858,9 @@ class Message(MaybeInaccessibleMessage): is_flexible=is_flexible, 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, @@ -1647,18 +1872,18 @@ class Message(MaybeInaccessibleMessage): self, latitude: float, longitude: float, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + direct_messages_topic_id: int | None = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendLocation: """ @@ -1668,7 +1893,7 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -1676,14 +1901,16 @@ 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. :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. :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 reply_parameters: Description of the message to reply to + :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` @@ -1693,25 +1920,27 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendLocation - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendLocation( 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, - reply_to_message_id=self.message_id, + 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, proximity_alert_radius=proximity_alert_radius, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -1721,19 +1950,20 @@ class Message(MaybeInaccessibleMessage): self, latitude: float, longitude: float, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + direct_messages_topic_id: int | None = None, + horizontal_accuracy: float | None = None, + live_period: int | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendLocation: """ @@ -1750,13 +1980,16 @@ 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. :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. :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 @@ -1768,9 +2001,9 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendLocation - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendLocation( chat_id=self.chat.id, @@ -1778,13 +2011,16 @@ 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, proximity_alert_radius=proximity_alert_radius, 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, @@ -1794,12 +2030,13 @@ class Message(MaybeInaccessibleMessage): def reply_media_group( self, - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, + media: list[MediaUnion], + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendMediaGroup: """ @@ -1809,17 +2046,18 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_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 :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to :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_media_group.SendMediaGroup` """ @@ -1828,33 +2066,36 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendMediaGroup - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendMediaGroup( 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, - reply_to_message_id=self.message_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, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, allow_sending_without_reply=allow_sending_without_reply, **kwargs, ).as_(self._bot) def answer_media_group( self, - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + media: list[MediaUnion], + direct_messages_topic_id: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendMediaGroup: """ @@ -1865,13 +2106,15 @@ 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 :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only :param reply_parameters: Description of the message to reply to :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -1883,17 +2126,19 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendMediaGroup - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendMediaGroup( 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, media=media, + direct_messages_topic_id=direct_messages_topic_id, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, allow_sending_without_reply=allow_sending_without_reply, @@ -1904,22 +2149,18 @@ class Message(MaybeInaccessibleMessage): def reply( self, text: str, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), + direct_messages_topic_id: int | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), **kwargs: Any, ) -> SendMessage: """ @@ -1929,20 +2170,22 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. 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 :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 reply_parameters: Description of the message to reply to + :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 @@ -1953,23 +2196,25 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendMessage - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendMessage( 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, - reply_to_message_id=self.message_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, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, + 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, @@ -1979,23 +2224,20 @@ class Message(MaybeInaccessibleMessage): def answer( self, text: str, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, + direct_messages_topic_id: int | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendMessage: """ @@ -2011,12 +2253,15 @@ 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 :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 @@ -2029,21 +2274,24 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendMessage - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendMessage( 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, text=text, + direct_messages_topic_id=direct_messages_topic_id, parse_mode=parse_mode, entities=entities, link_preview_options=link_preview_options, 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, @@ -2054,22 +2302,20 @@ class Message(MaybeInaccessibleMessage): def reply_photo( self, - photo: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + photo: InputFileUnion, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendPhoto: """ @@ -2079,13 +2325,14 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. 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* @@ -2093,8 +2340,9 @@ class Message(MaybeInaccessibleMessage): :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :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 reply_parameters: Description of the message to reply to + :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` @@ -2104,16 +2352,17 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendPhoto - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendPhoto( 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, - reply_to_message_id=self.message_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, @@ -2121,8 +2370,9 @@ class Message(MaybeInaccessibleMessage): has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2130,23 +2380,22 @@ class Message(MaybeInaccessibleMessage): def answer_photo( self, - photo: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + photo: InputFileUnion, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendPhoto: """ @@ -2162,6 +2411,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* @@ -2169,7 +2419,9 @@ class Message(MaybeInaccessibleMessage): :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :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 @@ -2181,15 +2433,16 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendPhoto - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendPhoto( 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, photo=photo, + direct_messages_topic_id=direct_messages_topic_id, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2197,7 +2450,9 @@ class Message(MaybeInaccessibleMessage): has_spoiler=has_spoiler, 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, @@ -2208,27 +2463,33 @@ class Message(MaybeInaccessibleMessage): def reply_poll( self, question: str, - options: List[Union[InputPollOption, str]], - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + options: list[InputPollOptionUnion], + question_parse_mode: str | Default | None = Default("parse_mode"), + question_entities: list[MessageEntity] | None = None, + is_anonymous: bool | None = None, + type: str | None = None, + allows_multiple_answers: bool | None = None, + allows_revoting: bool | None = None, + shuffle_options: bool | None = None, + allow_adding_options: bool | None = None, + hide_results_until_closes: bool | None = None, + correct_option_ids: list[int] | None = None, + explanation: str | None = None, + explanation_parse_mode: str | Default | None = Default("parse_mode"), + explanation_entities: list[MessageEntity] | None = None, + open_period: int | None = None, + close_date: DateTimeUnion | None = None, + is_closed: bool | None = None, + description: str | None = None, + description_parse_mode: str | Default | None = Default("parse_mode"), + description_entities: list[MessageEntity] | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + correct_option_id: int | None = None, **kwargs: Any, ) -> SendPoll: """ @@ -2238,32 +2499,40 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode + :param allows_multiple_answers: Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False` + :param allows_revoting: Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls + :param shuffle_options: Pass :code:`True`, if the poll options must be shown in random order + :param allow_adding_options: Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes + :param hide_results_until_closes: Pass :code:`True`, if poll results must be shown only after the poll closes + :param correct_option_ids: A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. + :param open_period: Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*. + :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*. :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. + :param description: Description of the poll to be sent, 0-1024 characters after entities parsing + :param description_parse_mode: Mode for parsing entities in the poll description. See `formatting options `_ for more details. + :param description_entities: A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode* :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 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 + :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` """ # DO NOT EDIT MANUALLY!!! @@ -2271,15 +2540,15 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendPoll - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendPoll( 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, - reply_to_message_id=self.message_id, + reply_parameters=self.as_reply_parameters(), question=question, options=options, question_parse_mode=question_parse_mode, @@ -2287,47 +2556,62 @@ class Message(MaybeInaccessibleMessage): is_anonymous=is_anonymous, type=type, allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, + allows_revoting=allows_revoting, + shuffle_options=shuffle_options, + allow_adding_options=allow_adding_options, + hide_results_until_closes=hide_results_until_closes, + correct_option_ids=correct_option_ids, explanation=explanation, explanation_parse_mode=explanation_parse_mode, explanation_entities=explanation_entities, open_period=open_period, close_date=close_date, is_closed=is_closed, + description=description, + description_parse_mode=description_parse_mode, + description_entities=description_entities, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, + correct_option_id=correct_option_id, **kwargs, ).as_(self._bot) def answer_poll( self, question: str, - options: List[Union[InputPollOption, str]], - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + options: list[InputPollOptionUnion], + question_parse_mode: str | Default | None = Default("parse_mode"), + question_entities: list[MessageEntity] | None = None, + is_anonymous: bool | None = None, + type: str | None = None, + allows_multiple_answers: bool | None = None, + allows_revoting: bool | None = None, + shuffle_options: bool | None = None, + allow_adding_options: bool | None = None, + hide_results_until_closes: bool | None = None, + correct_option_ids: list[int] | None = None, + explanation: str | None = None, + explanation_parse_mode: str | Default | None = Default("parse_mode"), + explanation_entities: list[MessageEntity] | None = None, + open_period: int | None = None, + close_date: DateTimeUnion | None = None, + is_closed: bool | None = None, + description: str | None = None, + description_parse_mode: str | Default | None = Default("parse_mode"), + description_entities: list[MessageEntity] | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + correct_option_id: int | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendPoll: """ @@ -2343,25 +2627,34 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#sendpoll :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options + :param options: A JSON-serialized list of 2-12 answer options :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode + :param allows_multiple_answers: Pass :code:`True`, if the poll allows multiple answers, defaults to :code:`False` + :param allows_revoting: Pass :code:`True`, if the poll allows to change chosen answer options, defaults to :code:`False` for quizzes and to :code:`True` for regular polls + :param shuffle_options: Pass :code:`True`, if the poll options must be shown in random order + :param allow_adding_options: Pass :code:`True`, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes + :param hide_results_until_closes: Pass :code:`True`, if poll results must be shown only after the poll closes + :param correct_option_ids: A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. + :param open_period: Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with *close_date*. + :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with *open_period*. :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. + :param description: Description of the poll to be sent, 0-1024 characters after entities parsing + :param description_parse_mode: Mode for parsing entities in the poll description. See `formatting options `_ for more details. + :param description_entities: A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of *description_parse_mode* :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 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 + :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param reply_to_message_id: If the message is a reply, ID of the original message :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` """ @@ -2370,9 +2663,9 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendPoll - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendPoll( chat_id=self.chat.id, @@ -2385,34 +2678,43 @@ class Message(MaybeInaccessibleMessage): is_anonymous=is_anonymous, type=type, allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, + allows_revoting=allows_revoting, + shuffle_options=shuffle_options, + allow_adding_options=allow_adding_options, + hide_results_until_closes=hide_results_until_closes, + correct_option_ids=correct_option_ids, explanation=explanation, explanation_parse_mode=explanation_parse_mode, explanation_entities=explanation_entities, open_period=open_period, close_date=close_date, is_closed=is_closed, + description=description, + description_parse_mode=description_parse_mode, + description_entities=description_entities, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, reply_parameters=reply_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, + correct_option_id=correct_option_id, reply_to_message_id=reply_to_message_id, **kwargs, ).as_(self._bot) def reply_dice( self, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendDice: """ @@ -2422,17 +2724,19 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. 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 reply_parameters: Description of the message to reply to + :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` @@ -2442,20 +2746,22 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendDice - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendDice( 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, - reply_to_message_id=self.message_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, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2463,16 +2769,17 @@ class Message(MaybeInaccessibleMessage): def answer_dice( self, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendDice: """ @@ -2487,10 +2794,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 @@ -2502,18 +2812,21 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendDice - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendDice( 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, @@ -2523,16 +2836,16 @@ class Message(MaybeInaccessibleMessage): def reply_sticker( self, - sticker: Union[InputFile, str], - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + sticker: InputFileUnion, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendSticker: """ @@ -2542,18 +2855,20 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. 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 reply_parameters: Description of the message to reply to + :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` @@ -2563,21 +2878,23 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendSticker - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendSticker( 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, - reply_to_message_id=self.message_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, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2585,17 +2902,18 @@ class Message(MaybeInaccessibleMessage): def answer_sticker( self, - sticker: Union[InputFile, str], - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + sticker: InputFileUnion, + direct_messages_topic_id: int | None = None, + emoji: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendSticker: """ @@ -2611,10 +2929,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 @@ -2626,19 +2947,22 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendSticker - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendSticker( 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, 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, @@ -2652,18 +2976,18 @@ class Message(MaybeInaccessibleMessage): longitude: float, title: str, address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + direct_messages_topic_id: int | None = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendVenue: """ @@ -2673,7 +2997,7 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. @@ -2683,14 +3007,16 @@ 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 :param google_place_type: Google Places type of the venue. (See `supported types `_.) :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 reply_parameters: Description of the message to reply to + :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` @@ -2700,27 +3026,29 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendVenue - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendVenue( 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, - reply_to_message_id=self.message_id, + reply_parameters=self.as_reply_parameters(), latitude=latitude, 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, google_place_type=google_place_type, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2732,19 +3060,20 @@ class Message(MaybeInaccessibleMessage): longitude: float, title: str, address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + direct_messages_topic_id: int | None = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVenue: """ @@ -2763,13 +3092,16 @@ 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 :param google_place_type: Google Places type of the venue. (See `supported types `_.) :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 @@ -2781,9 +3113,9 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendVenue - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendVenue( chat_id=self.chat.id, @@ -2793,13 +3125,16 @@ 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, google_place_type=google_place_type, 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, @@ -2809,27 +3144,27 @@ class Message(MaybeInaccessibleMessage): def reply_video( self, - video: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + video: InputFileUnion, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + cover: InputFileUnion | None = None, + start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + supports_streaming: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendVideo: """ @@ -2839,17 +3174,20 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. 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 :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 cover: Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » ` + :param start_timestamp: Start timestamp for the video in the message :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the video 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* @@ -2858,8 +3196,9 @@ class Message(MaybeInaccessibleMessage): :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming :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 reply_parameters: Description of the message to reply to + :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` @@ -2869,20 +3208,23 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendVideo - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendVideo( 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, - reply_to_message_id=self.message_id, + reply_parameters=self.as_reply_parameters(), video=video, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, width=width, height=height, thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2891,8 +3233,9 @@ class Message(MaybeInaccessibleMessage): supports_streaming=supports_streaming, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -2900,28 +3243,29 @@ class Message(MaybeInaccessibleMessage): def answer_video( self, - video: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + video: InputFileUnion, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + width: int | None = None, + height: int | None = None, + thumbnail: InputFile | None = None, + cover: InputFileUnion | None = None, + start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + has_spoiler: bool | None = None, + supports_streaming: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVideo: """ @@ -2937,10 +3281,13 @@ 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 :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 cover: Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » ` + :param start_timestamp: Start timestamp for the video in the message :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the video 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* @@ -2949,7 +3296,9 @@ class Message(MaybeInaccessibleMessage): :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming :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 @@ -2961,19 +3310,22 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendVideo - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendVideo( 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, video=video, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, width=width, height=height, thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2982,7 +3334,9 @@ class Message(MaybeInaccessibleMessage): supports_streaming=supports_streaming, 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, @@ -2992,18 +3346,18 @@ class Message(MaybeInaccessibleMessage): def reply_video_note( self, - video_note: Union[InputFile, str], - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + video_note: InputFileUnion, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + length: int | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendVideoNote: """ @@ -3013,20 +3367,22 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. 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 » ` :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 reply_parameters: Description of the message to reply to + :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` @@ -3036,23 +3392,25 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendVideoNote - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendVideoNote( 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, - reply_to_message_id=self.message_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, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -3060,19 +3418,20 @@ class Message(MaybeInaccessibleMessage): def answer_video_note( self, - video_note: Union[InputFile, str], - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + video_note: InputFileUnion, + direct_messages_topic_id: int | None = None, + duration: int | None = None, + length: int | None = None, + thumbnail: InputFile | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVideoNote: """ @@ -3088,12 +3447,15 @@ 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 » ` :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 @@ -3105,21 +3467,24 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendVideoNote - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendVideoNote( 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, video_note=video_note, + direct_messages_topic_id=direct_messages_topic_id, duration=duration, length=length, thumbnail=thumbnail, 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, @@ -3129,19 +3494,19 @@ class Message(MaybeInaccessibleMessage): def reply_voice( self, - voice: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, + voice: InputFileUnion, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, **kwargs: Any, ) -> SendVoice: """ @@ -3151,21 +3516,23 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_thread_id` - :code:`business_connection_id` - - :code:`reply_to_message_id` + - :code:`reply_parameters` Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. 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* :param duration: Duration of the voice message in seconds :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 reply_parameters: Description of the message to reply to + :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` @@ -3175,24 +3542,26 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendVoice - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendVoice( 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, - reply_to_message_id=self.message_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, duration=duration, disable_notification=disable_notification, protect_content=protect_content, + allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, - reply_parameters=reply_parameters, + suggested_post_parameters=suggested_post_parameters, reply_markup=reply_markup, allow_sending_without_reply=allow_sending_without_reply, **kwargs, @@ -3200,20 +3569,21 @@ class Message(MaybeInaccessibleMessage): def answer_voice( self, - voice: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + voice: InputFileUnion, + direct_messages_topic_id: int | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> SendVoice: """ @@ -3229,13 +3599,16 @@ 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* :param duration: Duration of the voice message in seconds :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 @@ -3247,22 +3620,25 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendVoice - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendVoice( 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, voice=voice, + direct_messages_topic_id=direct_messages_topic_id, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, duration=duration, 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, @@ -3272,33 +3648,33 @@ class Message(MaybeInaccessibleMessage): def send_copy( # noqa: C901 self: Message, - chat_id: Union[str, int], - disable_notification: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, None] = None, - allow_sending_without_reply: Optional[bool] = None, - message_thread_id: Optional[int] = None, - business_connection_id: Optional[str] = None, - parse_mode: Optional[str] = None, - message_effect_id: Optional[str] = None, - ) -> Union[ - ForwardMessage, - SendAnimation, - SendAudio, - SendContact, - SendDocument, - SendLocation, - SendMessage, - SendPhoto, - SendPoll, - SendDice, - SendSticker, - SendVenue, - SendVideo, - SendVideoNote, - SendVoice, - ]: + chat_id: ChatIdUnion, + disable_notification: bool | None = None, + reply_to_message_id: int | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: InlineKeyboardMarkup | ReplyKeyboardMarkup | None = None, + allow_sending_without_reply: bool | None = None, + message_thread_id: int | None = None, + business_connection_id: str | None = None, + parse_mode: str | None = None, + message_effect_id: str | None = None, + ) -> ( + ForwardMessage + | SendAnimation + | SendAudio + | SendContact + | SendDocument + | SendLocation + | SendMessage + | SendPhoto + | SendPoll + | SendDice + | SendSticker + | SendVenue + | SendVideo + | SendVideoNote + | SendVoice + ): """ Send copy of a message. @@ -3340,7 +3716,7 @@ class Message(MaybeInaccessibleMessage): SendVoice, ) - kwargs: Dict[str, Any] = { + kwargs: dict[str, Any] = { "chat_id": chat_id, "reply_markup": reply_markup or self.reply_markup, "disable_notification": disable_notification, @@ -3469,22 +3845,23 @@ class Message(MaybeInaccessibleMessage): def copy_to( self, - chat_id: Union[int, str], - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, + chat_id: ChatIdUnion, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + video_start_timestamp: DateTimeUnion | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + allow_paid_broadcast: bool | None = None, + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + allow_sending_without_reply: bool | None = None, + reply_to_message_id: int | None = None, **kwargs: Any, ) -> CopyMessage: """ @@ -3499,13 +3876,18 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#copymessage :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param video_start_timestamp: New start timestamp for the copied video in the message :param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept :param parse_mode: Mode for parsing entities in the new caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode* :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media. Ignored if a new caption isn't specified. :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving + :param allow_paid_broadcast: Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits `_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance + :param message_effect_id: Unique identifier of the message effect to be added to the message; only available when copying to private chats + :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. :param reply_parameters: Description of the message to reply to :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -3517,21 +3899,26 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import CopyMessage - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return CopyMessage( from_chat_id=self.chat.id, 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, caption_entities=caption_entities, show_caption_above_media=show_caption_above_media, 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, @@ -3542,15 +3929,12 @@ class Message(MaybeInaccessibleMessage): def edit_text( self, text: str, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), + inline_message_id: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + entities: list[MessageEntity] | None = None, + link_preview_options: LinkPreviewOptions | Default | None = Default("link_preview"), + reply_markup: InlineKeyboardMarkup | None = None, + disable_web_page_preview: bool | Default | None = Default("link_preview_is_disabled"), **kwargs: Any, ) -> EditMessageText: """ @@ -3559,13 +3943,13 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_id` + - :code:`business_connection_id` 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. Source: https://core.telegram.org/bots/api#editmessagetext :param text: New text of the message, 1-4096 characters after entities parsing - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message :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* @@ -3579,15 +3963,15 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import EditMessageText - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return EditMessageText( chat_id=self.chat.id, message_id=self.message_id, + business_connection_id=self.business_connection_id, text=text, - business_connection_id=business_connection_id, inline_message_id=inline_message_id, parse_mode=parse_mode, entities=entities, @@ -3599,10 +3983,14 @@ class Message(MaybeInaccessibleMessage): def forward( self, - chat_id: Union[int, str], - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), + chat_id: ChatIdUnion, + message_thread_id: int | None = None, + direct_messages_topic_id: int | None = None, + video_start_timestamp: DateTimeUnion | None = None, + disable_notification: bool | None = None, + protect_content: bool | Default | None = Default("protect_content"), + message_effect_id: str | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, **kwargs: Any, ) -> ForwardMessage: """ @@ -3617,9 +4005,13 @@ class Message(MaybeInaccessibleMessage): Source: https://core.telegram.org/bots/api#forwardmessage :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat + :param video_start_timestamp: New start timestamp for the forwarded video in the message :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the forwarded message from forwarding and saving + :param message_effect_id: Unique identifier of the message effect to be added to the message; only available when forwarding to private chats + :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only :return: instance of method :class:`aiogram.methods.forward_message.ForwardMessage` """ # DO NOT EDIT MANUALLY!!! @@ -3627,32 +4019,29 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import ForwardMessage - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return ForwardMessage( from_chat_id=self.chat.id, 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, + message_effect_id=message_effect_id, + suggested_post_parameters=suggested_post_parameters, **kwargs, ).as_(self._bot) def edit_media( self, - media: Union[ - InputMediaAnimation, - InputMediaDocument, - InputMediaAudio, - InputMediaPhoto, - InputMediaVideo, - ], - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, + media: InputMediaUnion, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, **kwargs: Any, ) -> EditMessageMedia: """ @@ -3661,13 +4050,13 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_id` + - :code:`business_connection_id` - Use this method to edit animation, audio, document, photo, or video 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. + 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. Source: https://core.telegram.org/bots/api#editmessagemedia :param media: A JSON-serialized object for a new media content of the message - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. :return: instance of method :class:`aiogram.methods.edit_message_media.EditMessageMedia` @@ -3677,15 +4066,15 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import EditMessageMedia - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return EditMessageMedia( chat_id=self.chat.id, message_id=self.message_id, + business_connection_id=self.business_connection_id, media=media, - business_connection_id=business_connection_id, inline_message_id=inline_message_id, reply_markup=reply_markup, **kwargs, @@ -3693,9 +4082,8 @@ class Message(MaybeInaccessibleMessage): def edit_reply_markup( self, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, **kwargs: Any, ) -> EditMessageReplyMarkup: """ @@ -3704,12 +4092,12 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_id` + - :code:`business_connection_id` 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. Source: https://core.telegram.org/bots/api#editmessagereplymarkup - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message :param reply_markup: A JSON-serialized object for an `inline keyboard `_. :return: instance of method :class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup` @@ -3719,14 +4107,14 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import EditMessageReplyMarkup - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return EditMessageReplyMarkup( chat_id=self.chat.id, message_id=self.message_id, - business_connection_id=business_connection_id, + business_connection_id=self.business_connection_id, inline_message_id=inline_message_id, reply_markup=reply_markup, **kwargs, @@ -3734,8 +4122,7 @@ class Message(MaybeInaccessibleMessage): def delete_reply_markup( self, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, + inline_message_id: str | None = None, **kwargs: Any, ) -> EditMessageReplyMarkup: """ @@ -3744,13 +4131,13 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_id` + - :code:`business_connection_id` - :code:`reply_markup` 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. Source: https://core.telegram.org/bots/api#editmessagereplymarkup - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message :return: instance of method :class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup` """ @@ -3759,15 +4146,15 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import EditMessageReplyMarkup - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return EditMessageReplyMarkup( chat_id=self.chat.id, message_id=self.message_id, + business_connection_id=self.business_connection_id, reply_markup=None, - business_connection_id=business_connection_id, inline_message_id=inline_message_id, **kwargs, ).as_(self._bot) @@ -3776,13 +4163,12 @@ class Message(MaybeInaccessibleMessage): self, latitude: float, longitude: float, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - live_period: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, + inline_message_id: str | None = None, + live_period: int | None = None, + horizontal_accuracy: float | None = None, + heading: int | None = None, + proximity_alert_radius: int | None = None, + reply_markup: InlineKeyboardMarkup | None = None, **kwargs: Any, ) -> EditMessageLiveLocation: """ @@ -3791,6 +4177,7 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_id` + - :code:`business_connection_id` 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. @@ -3798,7 +4185,6 @@ class Message(MaybeInaccessibleMessage): :param latitude: Latitude of new location :param longitude: Longitude of new location - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message :param live_period: 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 :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 @@ -3812,16 +4198,16 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import EditMessageLiveLocation - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return EditMessageLiveLocation( chat_id=self.chat.id, message_id=self.message_id, + business_connection_id=self.business_connection_id, latitude=latitude, longitude=longitude, - business_connection_id=business_connection_id, inline_message_id=inline_message_id, live_period=live_period, horizontal_accuracy=horizontal_accuracy, @@ -3833,9 +4219,8 @@ class Message(MaybeInaccessibleMessage): def stop_live_location( self, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, + inline_message_id: str | None = None, + reply_markup: InlineKeyboardMarkup | None = None, **kwargs: Any, ) -> StopMessageLiveLocation: """ @@ -3844,12 +4229,12 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_id` + - :code:`business_connection_id` 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. Source: https://core.telegram.org/bots/api#stopmessagelivelocation - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. :return: instance of method :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation` @@ -3859,14 +4244,14 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import StopMessageLiveLocation - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return StopMessageLiveLocation( chat_id=self.chat.id, message_id=self.message_id, - business_connection_id=business_connection_id, + business_connection_id=self.business_connection_id, inline_message_id=inline_message_id, reply_markup=reply_markup, **kwargs, @@ -3874,15 +4259,12 @@ class Message(MaybeInaccessibleMessage): def edit_caption( self, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, + inline_message_id: str | None = None, + caption: str | None = None, + parse_mode: str | Default | None = Default("parse_mode"), + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | Default | None = Default("show_caption_above_media"), + reply_markup: InlineKeyboardMarkup | None = None, **kwargs: Any, ) -> EditMessageCaption: """ @@ -3891,12 +4273,12 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_id` + - :code:`business_connection_id` 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. Source: https://core.telegram.org/bots/api#editmessagecaption - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message :param caption: New caption of the message, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the message caption. See `formatting options `_ for more details. @@ -3910,14 +4292,14 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import EditMessageCaption - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return EditMessageCaption( chat_id=self.chat.id, message_id=self.message_id, - business_connection_id=business_connection_id, + business_connection_id=self.business_connection_id, inline_message_id=inline_message_id, caption=caption, parse_mode=parse_mode, @@ -3937,6 +4319,7 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_id` + - :code:`business_connection_id` Use this method to delete a message, including service messages, with the following limitations: @@ -3954,7 +4337,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. @@ -3967,19 +4352,20 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import DeleteMessage - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return DeleteMessage( chat_id=self.chat.id, message_id=self.message_id, + business_connection_id=self.business_connection_id, **kwargs, ).as_(self._bot) def pin( self, - disable_notification: Optional[bool] = None, + disable_notification: bool | None = None, **kwargs: Any, ) -> PinChatMessage: """ @@ -3988,8 +4374,9 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :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 @@ -4001,13 +4388,14 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import PinChatMessage - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return PinChatMessage( chat_id=self.chat.id, message_id=self.message_id, + business_connection_id=self.business_connection_id, disable_notification=disable_notification, **kwargs, ).as_(self._bot) @@ -4022,8 +4410,9 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :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 @@ -4034,26 +4423,28 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import UnpinChatMessage - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return UnpinChatMessage( chat_id=self.chat.id, message_id=self.message_id, + business_connection_id=self.business_connection_id, **kwargs, ).as_(self._bot) - def get_url(self, force_private: bool = False) -> Optional[str]: + def get_url(self, force_private: bool = False, include_thread_id: bool = False) -> str | None: """ Returns message URL. Cannot be used in private (one-to-one) chats. If chat has a username, returns URL like https://t.me/username/message_id Otherwise (or if {force_private} flag is set), returns https://t.me/c/shifted_chat_id/message_id :param force_private: if set, a private URL is returned even for a public chat + :param include_thread_id: if set, adds chat thread id to URL and returns like https://t.me/username/thread_id/message_id :return: string with full message URL """ - if self.chat.type in ("private", "group"): + if self.chat.type in {"private", "group"}: return None chat_value = ( @@ -4062,12 +4453,18 @@ class Message(MaybeInaccessibleMessage): else self.chat.username ) - return f"https://t.me/{chat_value}/{self.message_id}" + message_id_value = ( + f"{self.message_thread_id}/{self.message_id}" + if include_thread_id and self.message_thread_id and self.is_topic_message + else f"{self.message_id}" + ) + + return f"https://t.me/{chat_value}/{message_id_value}" def react( self, - reaction: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = None, - is_big: Optional[bool] = None, + reaction: list[ReactionTypeUnion] | None = None, + is_big: bool | None = None, **kwargs: Any, ) -> SetMessageReaction: """ @@ -4076,12 +4473,13 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_id` + - :code:`business_connection_id` - Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns :code:`True` on success. + Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#setmessagereaction - :param reaction: A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. + :param reaction: A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots. :param is_big: Pass :code:`True` to set the reaction with a big animation :return: instance of method :class:`aiogram.methods.set_message_reaction.SetMessageReaction` """ @@ -4090,13 +4488,14 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SetMessageReaction - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SetMessageReaction( chat_id=self.chat.id, message_id=self.message_id, + business_connection_id=self.business_connection_id, reaction=reaction, is_big=is_big, **kwargs, @@ -4105,17 +4504,19 @@ class Message(MaybeInaccessibleMessage): def answer_paid_media( self, star_count: int, - media: List[Union[InputPaidMediaPhoto, InputPaidMediaVideo]], - caption: Optional[str] = None, - parse_mode: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, + media: list[InputPaidMediaUnion], + direct_messages_topic_id: int | None = None, + payload: str | None = None, + caption: str | None = None, + parse_mode: str | None = None, + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | None = None, + allow_paid_broadcast: bool | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_parameters: ReplyParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, **kwargs: Any, ) -> SendPaidMedia: """ @@ -4126,18 +4527,22 @@ class Message(MaybeInaccessibleMessage): - :code:`message_thread_id` - :code:`business_connection_id` - Use this method to send paid media to channel chats. On success, the sent :class:`aiogram.types.message.Message` is returned. + Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned. Source: https://core.telegram.org/bots/api#sendpaidmedia - :param star_count: The number of Telegram Stars that must be paid to buy access to the media + :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-25000 :param media: A JSON-serialized array describing the media to be sent; up to 10 items + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes. :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. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media :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` @@ -4147,9 +4552,9 @@ class Message(MaybeInaccessibleMessage): from aiogram.methods import SendPaidMedia - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) return SendPaidMedia( chat_id=self.chat.id, @@ -4157,13 +4562,92 @@ 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, caption_entities=caption_entities, show_caption_above_media=show_caption_above_media, 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, ).as_(self._bot) + + def reply_paid_media( + self, + star_count: int, + media: list[InputPaidMediaUnion], + direct_messages_topic_id: int | None = None, + payload: str | None = None, + caption: str | None = None, + parse_mode: str | None = None, + caption_entities: list[MessageEntity] | None = None, + show_caption_above_media: bool | None = None, + disable_notification: bool | None = None, + protect_content: bool | None = None, + allow_paid_broadcast: bool | None = None, + suggested_post_parameters: SuggestedPostParameters | None = None, + reply_markup: ReplyMarkupUnion | None = None, + **kwargs: Any, + ) -> SendPaidMedia: + """ + Shortcut for method :class:`aiogram.methods.send_paid_media.SendPaidMedia` + will automatically fill method attributes: + + - :code:`chat_id` + - :code:`message_thread_id` + - :code:`business_connection_id` + - :code:`reply_parameters` + + Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned. + + Source: https://core.telegram.org/bots/api#sendpaidmedia + + :param star_count: The number of Telegram Stars that must be paid to buy access to the media; 1-25000 + :param media: A JSON-serialized array describing the media to be sent; up to 10 items + :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat + :param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes. + :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. + :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media + :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` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import SendPaidMedia + + assert self.chat is not None, ( + "This method can be used only if chat is present in the message." + ) + + return SendPaidMedia( + 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, + 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, + caption_entities=caption_entities, + show_caption_above_media=show_caption_above_media, + 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/message_entity.py b/aiogram/types/message_entity.py index ee774b09..68ae3025 100644 --- a/aiogram/types/message_entity.py +++ b/aiogram/types/message_entity.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from ..utils.text_decorations import add_surrogates, remove_surrogates from .base import MutableTelegramObject @@ -17,19 +17,23 @@ class MessageEntity(MutableTelegramObject): """ type: str - """Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag`), 'cashtag' (:code:`$USD`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'expandable_blockquote' (collapsed-by-default block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames `_), 'custom_emoji' (for inline custom emoji stickers)""" + """Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag` or :code:`#hashtag@chatusername`), 'cashtag' (:code:`$USD` or :code:`$USD@chatusername`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'expandable_blockquote' (collapsed-by-default block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames `_), 'custom_emoji' (for inline custom emoji stickers), or 'date_time' (for formatted date and time)""" offset: int """Offset in `UTF-16 code units `_ to the start of the entity""" length: int """Length of the entity in `UTF-16 code units `_""" - url: Optional[str] = None + url: str | None = None """*Optional*. For 'text_link' only, URL that will be opened after user taps on the text""" - user: Optional[User] = None + user: User | None = None """*Optional*. For 'text_mention' only, the mentioned user""" - language: Optional[str] = None + language: str | None = None """*Optional*. For 'pre' only, the programming language of the entity text""" - custom_emoji_id: Optional[str] = None + custom_emoji_id: str | None = None """*Optional*. For 'custom_emoji' only, unique identifier of the custom emoji. Use :class:`aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers` to get full information about the sticker""" + unix_time: int | None = None + """*Optional*. For 'date_time' only, the Unix time associated with the entity""" + date_time_format: str | None = None + """*Optional*. For 'date_time' only, the string that defines the formatting of the date and time. See `date-time entity formatting `_ for more details.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -41,10 +45,12 @@ class MessageEntity(MutableTelegramObject): type: str, offset: int, length: int, - url: Optional[str] = None, - user: Optional[User] = None, - language: Optional[str] = None, - custom_emoji_id: Optional[str] = None, + url: str | None = None, + user: User | None = None, + language: str | None = None, + custom_emoji_id: str | None = None, + unix_time: int | None = None, + date_time_format: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -59,6 +65,8 @@ class MessageEntity(MutableTelegramObject): user=user, language=language, custom_emoji_id=custom_emoji_id, + unix_time=unix_time, + date_time_format=date_time_format, **__pydantic_kwargs, ) diff --git a/aiogram/types/message_id.py b/aiogram/types/message_id.py index d50888f8..65efaa35 100644 --- a/aiogram/types/message_id.py +++ b/aiogram/types/message_id.py @@ -13,7 +13,7 @@ class MessageId(TelegramObject): """ message_id: int - """Unique message identifier""" + """Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/message_origin_channel.py b/aiogram/types/message_origin_channel.py index 9decfafe..4d745c6e 100644 --- a/aiogram/types/message_origin_channel.py +++ b/aiogram/types/message_origin_channel.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal from ..enums import MessageOriginType from .custom import DateTime @@ -25,7 +25,7 @@ class MessageOriginChannel(MessageOrigin): """Channel chat to which the message was originally sent""" message_id: int """Unique message identifier inside the chat""" - author_signature: Optional[str] = None + author_signature: str | None = None """*Optional*. Signature of the original post author""" if TYPE_CHECKING: @@ -39,7 +39,7 @@ class MessageOriginChannel(MessageOrigin): date: DateTime, chat: Chat, message_id: int, - author_signature: Optional[str] = None, + author_signature: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/message_origin_chat.py b/aiogram/types/message_origin_chat.py index b1e5fb9f..2d6d17fc 100644 --- a/aiogram/types/message_origin_chat.py +++ b/aiogram/types/message_origin_chat.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal from ..enums import MessageOriginType from .custom import DateTime @@ -23,7 +23,7 @@ class MessageOriginChat(MessageOrigin): """Date the message was sent originally in Unix time""" sender_chat: Chat """Chat that sent the message originally""" - author_signature: Optional[str] = None + author_signature: str | None = None """*Optional*. For messages originally sent by an anonymous chat administrator, original message author signature""" if TYPE_CHECKING: @@ -36,7 +36,7 @@ class MessageOriginChat(MessageOrigin): type: Literal[MessageOriginType.CHAT] = MessageOriginType.CHAT, date: DateTime, sender_chat: Chat, - author_signature: Optional[str] = None, + author_signature: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/message_origin_union.py b/aiogram/types/message_origin_union.py new file mode 100644 index 00000000..1a285c8b --- /dev/null +++ b/aiogram/types/message_origin_union.py @@ -0,0 +1,12 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .message_origin_channel import MessageOriginChannel +from .message_origin_chat import MessageOriginChat +from .message_origin_hidden_user import MessageOriginHiddenUser +from .message_origin_user import MessageOriginUser + +MessageOriginUnion: TypeAlias = ( + MessageOriginUser | MessageOriginHiddenUser | MessageOriginChat | MessageOriginChannel +) diff --git a/aiogram/types/message_reaction_count_updated.py b/aiogram/types/message_reaction_count_updated.py index e9d0f8b5..7e9b3bdc 100644 --- a/aiogram/types/message_reaction_count_updated.py +++ b/aiogram/types/message_reaction_count_updated.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -23,7 +23,7 @@ class MessageReactionCountUpdated(TelegramObject): """Unique message identifier inside the chat""" date: DateTime """Date of the change in Unix time""" - reactions: List[ReactionCount] + reactions: list[ReactionCount] """List of reactions that are present on the message""" if TYPE_CHECKING: @@ -36,7 +36,7 @@ class MessageReactionCountUpdated(TelegramObject): chat: Chat, message_id: int, date: DateTime, - reactions: List[ReactionCount], + reactions: list[ReactionCount], **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/message_reaction_updated.py b/aiogram/types/message_reaction_updated.py index 714029e9..1d83c594 100644 --- a/aiogram/types/message_reaction_updated.py +++ b/aiogram/types/message_reaction_updated.py @@ -1,14 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from .base import TelegramObject if TYPE_CHECKING: from .chat import Chat from .custom import DateTime - from .reaction_type_custom_emoji import ReactionTypeCustomEmoji - from .reaction_type_emoji import ReactionTypeEmoji + from .reaction_type_union import ReactionTypeUnion from .user import User @@ -25,13 +24,13 @@ class MessageReactionUpdated(TelegramObject): """Unique identifier of the message inside the chat""" date: DateTime """Date of the change in Unix time""" - old_reaction: List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]] + old_reaction: list[ReactionTypeUnion] """Previous list of reaction types that were set by the user""" - new_reaction: List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]] + new_reaction: list[ReactionTypeUnion] """New list of reaction types that have been set by the user""" - user: Optional[User] = None + user: User | None = None """*Optional*. The user that changed the reaction, if the user isn't anonymous""" - actor_chat: Optional[Chat] = None + actor_chat: Chat | None = None """*Optional*. The chat on behalf of which the reaction was changed, if the user is anonymous""" if TYPE_CHECKING: @@ -44,10 +43,10 @@ class MessageReactionUpdated(TelegramObject): chat: Chat, message_id: int, date: DateTime, - old_reaction: List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]], - new_reaction: List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]], - user: Optional[User] = None, - actor_chat: Optional[Chat] = None, + old_reaction: list[ReactionTypeUnion], + new_reaction: list[ReactionTypeUnion], + user: User | None = None, + actor_chat: Chat | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/order_info.py b/aiogram/types/order_info.py index 5d71f657..a5b46c0f 100644 --- a/aiogram/types/order_info.py +++ b/aiogram/types/order_info.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -15,13 +15,13 @@ class OrderInfo(TelegramObject): Source: https://core.telegram.org/bots/api#orderinfo """ - name: Optional[str] = None + name: str | None = None """*Optional*. User name""" - phone_number: Optional[str] = None + phone_number: str | None = None """*Optional*. User's phone number""" - email: Optional[str] = None + email: str | None = None """*Optional*. User email""" - shipping_address: Optional[ShippingAddress] = None + shipping_address: ShippingAddress | None = None """*Optional*. User shipping address""" if TYPE_CHECKING: @@ -31,10 +31,10 @@ class OrderInfo(TelegramObject): def __init__( __pydantic__self__, *, - name: Optional[str] = None, - phone_number: Optional[str] = None, - email: Optional[str] = None, - shipping_address: Optional[ShippingAddress] = None, + name: str | None = None, + phone_number: str | None = None, + email: str | None = None, + shipping_address: ShippingAddress | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/owned_gift.py b/aiogram/types/owned_gift.py new file mode 100644 index 00000000..68686a4a --- /dev/null +++ b/aiogram/types/owned_gift.py @@ -0,0 +1,14 @@ +from __future__ import annotations + +from .base import TelegramObject + + +class OwnedGift(TelegramObject): + """ + This object describes a gift received and owned by a user or a chat. Currently, it can be one of + + - :class:`aiogram.types.owned_gift_regular.OwnedGiftRegular` + - :class:`aiogram.types.owned_gift_unique.OwnedGiftUnique` + + Source: https://core.telegram.org/bots/api#ownedgift + """ diff --git a/aiogram/types/owned_gift_regular.py b/aiogram/types/owned_gift_regular.py new file mode 100644 index 00000000..329989b8 --- /dev/null +++ b/aiogram/types/owned_gift_regular.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from aiogram.enums import OwnedGiftType + +from .owned_gift import OwnedGift + +if TYPE_CHECKING: + from .gift import Gift + from .message_entity import MessageEntity + from .user import User + + +class OwnedGiftRegular(OwnedGift): + """ + Describes a regular gift owned by a user or a chat. + + Source: https://core.telegram.org/bots/api#ownedgiftregular + """ + + type: Literal[OwnedGiftType.REGULAR] = OwnedGiftType.REGULAR + """Type of the gift, always 'regular'""" + gift: Gift + """Information about the regular gift""" + send_date: int + """Date the gift was sent in Unix time""" + owned_gift_id: str | None = None + """*Optional*. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only""" + sender_user: User | None = None + """*Optional*. Sender of the gift if it is a known user""" + text: str | None = None + """*Optional*. Text of the message that was added to the gift""" + entities: list[MessageEntity] | None = None + """*Optional*. Special entities that appear in the text""" + is_private: bool | None = None + """*Optional*. :code:`True`, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them""" + is_saved: bool | None = None + """*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only""" + can_be_upgraded: bool | None = None + """*Optional*. :code:`True`, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only""" + was_refunded: bool | None = None + """*Optional*. :code:`True`, if the gift was refunded and isn't available anymore""" + convert_star_count: int | None = None + """*Optional*. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only""" + prepaid_upgrade_star_count: int | None = None + """*Optional*. Number of Telegram Stars that were paid for the ability to upgrade the gift""" + is_upgrade_separate: bool | None = None + """*Optional*. :code:`True`, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only""" + unique_gift_number: int | None = None + """*Optional*. Unique number reserved for this gift when upgraded. See the *number* field in :class:`aiogram.types.unique_gift.UniqueGift`""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[OwnedGiftType.REGULAR] = OwnedGiftType.REGULAR, + gift: Gift, + send_date: int, + owned_gift_id: str | None = None, + sender_user: User | None = None, + text: str | None = None, + entities: list[MessageEntity] | None = None, + is_private: bool | None = None, + is_saved: bool | None = None, + can_be_upgraded: bool | None = None, + was_refunded: bool | None = None, + convert_star_count: int | None = None, + prepaid_upgrade_star_count: int | None = None, + is_upgrade_separate: bool | None = None, + unique_gift_number: int | None = 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__( + type=type, + gift=gift, + send_date=send_date, + owned_gift_id=owned_gift_id, + sender_user=sender_user, + text=text, + entities=entities, + is_private=is_private, + is_saved=is_saved, + can_be_upgraded=can_be_upgraded, + was_refunded=was_refunded, + convert_star_count=convert_star_count, + prepaid_upgrade_star_count=prepaid_upgrade_star_count, + is_upgrade_separate=is_upgrade_separate, + unique_gift_number=unique_gift_number, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/owned_gift_union.py b/aiogram/types/owned_gift_union.py new file mode 100644 index 00000000..7c0eeed7 --- /dev/null +++ b/aiogram/types/owned_gift_union.py @@ -0,0 +1,6 @@ +from typing import TypeAlias + +from .owned_gift_regular import OwnedGiftRegular +from .owned_gift_unique import OwnedGiftUnique + +OwnedGiftUnion: TypeAlias = OwnedGiftRegular | OwnedGiftUnique diff --git a/aiogram/types/owned_gift_unique.py b/aiogram/types/owned_gift_unique.py new file mode 100644 index 00000000..3b310624 --- /dev/null +++ b/aiogram/types/owned_gift_unique.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from aiogram.enums import OwnedGiftType + +from .custom import DateTime +from .owned_gift import OwnedGift + +if TYPE_CHECKING: + from .unique_gift import UniqueGift + from .user import User + + +class OwnedGiftUnique(OwnedGift): + """ + Describes a unique gift received and owned by a user or a chat. + + Source: https://core.telegram.org/bots/api#ownedgiftunique + """ + + type: Literal[OwnedGiftType.UNIQUE] = OwnedGiftType.UNIQUE + """Type of the gift, always 'unique'""" + gift: UniqueGift + """Information about the unique gift""" + send_date: int + """Date the gift was sent in Unix time""" + owned_gift_id: str | None = None + """*Optional*. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only""" + sender_user: User | None = None + """*Optional*. Sender of the gift if it is a known user""" + is_saved: bool | None = None + """*Optional*. :code:`True`, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only""" + can_be_transferred: bool | None = None + """*Optional*. :code:`True`, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only""" + transfer_star_count: int | None = None + """*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift""" + next_transfer_date: DateTime | None = None + """*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[OwnedGiftType.UNIQUE] = OwnedGiftType.UNIQUE, + gift: UniqueGift, + send_date: int, + owned_gift_id: str | None = None, + sender_user: User | None = None, + is_saved: bool | None = None, + can_be_transferred: bool | None = None, + transfer_star_count: int | None = None, + next_transfer_date: DateTime | None = 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__( + type=type, + gift=gift, + send_date=send_date, + owned_gift_id=owned_gift_id, + sender_user=sender_user, + is_saved=is_saved, + can_be_transferred=can_be_transferred, + transfer_star_count=transfer_star_count, + next_transfer_date=next_transfer_date, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/owned_gifts.py b/aiogram/types/owned_gifts.py new file mode 100644 index 00000000..8153d258 --- /dev/null +++ b/aiogram/types/owned_gifts.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .owned_gift_union import OwnedGiftUnion + + +class OwnedGifts(TelegramObject): + """ + Contains the list of gifts received and owned by a user or a chat. + + Source: https://core.telegram.org/bots/api#ownedgifts + """ + + total_count: int + """The total number of gifts owned by the user or the chat""" + gifts: list[OwnedGiftUnion] + """The list of gifts""" + next_offset: str | None = None + """*Optional*. Offset for the next request. If empty, then there are no more results""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + total_count: int, + gifts: list[OwnedGiftUnion], + next_offset: str | None = 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__( + total_count=total_count, gifts=gifts, next_offset=next_offset, **__pydantic_kwargs + ) diff --git a/aiogram/types/paid_media_info.py b/aiogram/types/paid_media_info.py index db5bbf0a..566c63e4 100644 --- a/aiogram/types/paid_media_info.py +++ b/aiogram/types/paid_media_info.py @@ -1,13 +1,11 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Union +from typing import TYPE_CHECKING, Any from .base import TelegramObject if TYPE_CHECKING: - from .paid_media_photo import PaidMediaPhoto - from .paid_media_preview import PaidMediaPreview - from .paid_media_video import PaidMediaVideo + from .paid_media_union import PaidMediaUnion class PaidMediaInfo(TelegramObject): @@ -19,7 +17,7 @@ class PaidMediaInfo(TelegramObject): star_count: int """The number of Telegram Stars that must be paid to buy access to the media""" - paid_media: List[Union[PaidMediaPreview, PaidMediaPhoto, PaidMediaVideo]] + paid_media: list[PaidMediaUnion] """Information about the paid media""" if TYPE_CHECKING: @@ -30,7 +28,7 @@ class PaidMediaInfo(TelegramObject): __pydantic__self__, *, star_count: int, - paid_media: List[Union[PaidMediaPreview, PaidMediaPhoto, PaidMediaVideo]], + paid_media: list[PaidMediaUnion], **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/paid_media_photo.py b/aiogram/types/paid_media_photo.py index 71c2e10b..a6ab7b93 100644 --- a/aiogram/types/paid_media_photo.py +++ b/aiogram/types/paid_media_photo.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import PaidMediaType from .paid_media import PaidMedia @@ -18,7 +18,7 @@ class PaidMediaPhoto(PaidMedia): type: Literal[PaidMediaType.PHOTO] = PaidMediaType.PHOTO """Type of the paid media, always 'photo'""" - photo: List[PhotoSize] + photo: list[PhotoSize] """The photo""" if TYPE_CHECKING: @@ -29,7 +29,7 @@ class PaidMediaPhoto(PaidMedia): __pydantic__self__, *, type: Literal[PaidMediaType.PHOTO] = PaidMediaType.PHOTO, - photo: List[PhotoSize], + photo: list[PhotoSize], **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/paid_media_preview.py b/aiogram/types/paid_media_preview.py index 5054de23..ab6b3775 100644 --- a/aiogram/types/paid_media_preview.py +++ b/aiogram/types/paid_media_preview.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal from ..enums import PaidMediaType from .paid_media import PaidMedia @@ -15,11 +15,11 @@ class PaidMediaPreview(PaidMedia): type: Literal[PaidMediaType.PREVIEW] = PaidMediaType.PREVIEW """Type of the paid media, always 'preview'""" - width: Optional[int] = None + width: int | None = None """*Optional*. Media width as defined by the sender""" - height: Optional[int] = None + height: int | None = None """*Optional*. Media height as defined by the sender""" - duration: Optional[int] = None + duration: int | None = None """*Optional*. Duration of the media in seconds as defined by the sender""" if TYPE_CHECKING: @@ -30,9 +30,9 @@ class PaidMediaPreview(PaidMedia): __pydantic__self__, *, type: Literal[PaidMediaType.PREVIEW] = PaidMediaType.PREVIEW, - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, + width: int | None = None, + height: int | None = None, + duration: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/paid_media_purchased.py b/aiogram/types/paid_media_purchased.py new file mode 100644 index 00000000..c115adbd --- /dev/null +++ b/aiogram/types/paid_media_purchased.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from pydantic import Field + +from .base import TelegramObject + +if TYPE_CHECKING: + from .user import User + + +class PaidMediaPurchased(TelegramObject): + """ + This object contains information about a paid media purchase. + + Source: https://core.telegram.org/bots/api#paidmediapurchased + """ + + from_user: User = Field(..., alias="from") + """User who purchased the media""" + paid_media_payload: str + """Bot-specified paid media payload""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + from_user: User, + paid_media_payload: str, + **__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__( + from_user=from_user, paid_media_payload=paid_media_payload, **__pydantic_kwargs + ) diff --git a/aiogram/types/paid_media_union.py b/aiogram/types/paid_media_union.py new file mode 100644 index 00000000..75f0d563 --- /dev/null +++ b/aiogram/types/paid_media_union.py @@ -0,0 +1,9 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .paid_media_photo import PaidMediaPhoto +from .paid_media_preview import PaidMediaPreview +from .paid_media_video import PaidMediaVideo + +PaidMediaUnion: TypeAlias = PaidMediaPreview | PaidMediaPhoto | PaidMediaVideo diff --git a/aiogram/types/paid_message_price_changed.py b/aiogram/types/paid_message_price_changed.py new file mode 100644 index 00000000..228f0ecb --- /dev/null +++ b/aiogram/types/paid_message_price_changed.py @@ -0,0 +1,29 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class PaidMessagePriceChanged(TelegramObject): + """ + Describes a service message about a change in the price of paid messages within a chat. + + Source: https://core.telegram.org/bots/api#paidmessagepricechanged + """ + + paid_message_star_count: int + """The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, paid_message_star_count: 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__(paid_message_star_count=paid_message_star_count, **__pydantic_kwargs) diff --git a/aiogram/types/passport_data.py b/aiogram/types/passport_data.py index d93af1f0..8a1233c3 100644 --- a/aiogram/types/passport_data.py +++ b/aiogram/types/passport_data.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -16,7 +16,7 @@ class PassportData(TelegramObject): Source: https://core.telegram.org/bots/api#passportdata """ - data: List[EncryptedPassportElement] + data: list[EncryptedPassportElement] """Array with information about documents and other Telegram Passport elements that was shared with the bot""" credentials: EncryptedCredentials """Encrypted credentials required to decrypt the data""" @@ -28,7 +28,7 @@ class PassportData(TelegramObject): def __init__( __pydantic__self__, *, - data: List[EncryptedPassportElement], + data: list[EncryptedPassportElement], credentials: EncryptedCredentials, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/types/passport_element_error_files.py b/aiogram/types/passport_element_error_files.py index 3639da26..740bfcc2 100644 --- a/aiogram/types/passport_element_error_files.py +++ b/aiogram/types/passport_element_error_files.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -17,7 +17,7 @@ class PassportElementErrorFiles(PassportElementError): """Error source, must be *files*""" type: str """The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'""" - file_hashes: List[str] + file_hashes: list[str] """List of base64-encoded file hashes""" message: str """Error message""" @@ -31,7 +31,7 @@ class PassportElementErrorFiles(PassportElementError): *, source: Literal[PassportElementErrorType.FILES] = PassportElementErrorType.FILES, type: str, - file_hashes: List[str], + file_hashes: list[str], message: str, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/types/passport_element_error_translation_files.py b/aiogram/types/passport_element_error_translation_files.py index 65e9940e..de81b132 100644 --- a/aiogram/types/passport_element_error_translation_files.py +++ b/aiogram/types/passport_element_error_translation_files.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Literal +from typing import TYPE_CHECKING, Any, Literal from ..enums import PassportElementErrorType from .passport_element_error import PassportElementError @@ -19,7 +19,7 @@ class PassportElementErrorTranslationFiles(PassportElementError): """Error source, must be *translation_files*""" type: str """Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'""" - file_hashes: List[str] + file_hashes: list[str] """List of base64-encoded file hashes""" message: str """Error message""" @@ -35,7 +35,7 @@ class PassportElementErrorTranslationFiles(PassportElementError): PassportElementErrorType.TRANSLATION_FILES ] = PassportElementErrorType.TRANSLATION_FILES, type: str, - file_hashes: List[str], + file_hashes: list[str], message: str, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/types/passport_element_error_union.py b/aiogram/types/passport_element_error_union.py new file mode 100644 index 00000000..6bed5c4e --- /dev/null +++ b/aiogram/types/passport_element_error_union.py @@ -0,0 +1,27 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .passport_element_error_data_field import PassportElementErrorDataField +from .passport_element_error_file import PassportElementErrorFile +from .passport_element_error_files import PassportElementErrorFiles +from .passport_element_error_front_side import PassportElementErrorFrontSide +from .passport_element_error_reverse_side import PassportElementErrorReverseSide +from .passport_element_error_selfie import PassportElementErrorSelfie +from .passport_element_error_translation_file import PassportElementErrorTranslationFile +from .passport_element_error_translation_files import ( + PassportElementErrorTranslationFiles, +) +from .passport_element_error_unspecified import PassportElementErrorUnspecified + +PassportElementErrorUnion: TypeAlias = ( + PassportElementErrorDataField + | PassportElementErrorFrontSide + | PassportElementErrorReverseSide + | PassportElementErrorSelfie + | PassportElementErrorFile + | PassportElementErrorFiles + | PassportElementErrorTranslationFile + | PassportElementErrorTranslationFiles + | PassportElementErrorUnspecified +) diff --git a/aiogram/types/photo_size.py b/aiogram/types/photo_size.py index 9a2ccbe1..7c9c7cf8 100644 --- a/aiogram/types/photo_size.py +++ b/aiogram/types/photo_size.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -20,7 +20,7 @@ class PhotoSize(TelegramObject): """Photo width""" height: int """Photo height""" - file_size: Optional[int] = None + file_size: int | None = None """*Optional*. File size in bytes""" if TYPE_CHECKING: @@ -34,7 +34,7 @@ class PhotoSize(TelegramObject): file_unique_id: str, width: int, height: int, - file_size: Optional[int] = None, + file_size: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/poll.py b/aiogram/types/poll.py index 58052241..88714145 100644 --- a/aiogram/types/poll.py +++ b/aiogram/types/poll.py @@ -1,6 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any + +from pydantic import Field from .base import TelegramObject from .custom import DateTime @@ -21,7 +23,7 @@ class Poll(TelegramObject): """Unique poll identifier""" question: str """Poll question, 1-300 characters""" - options: List[PollOption] + options: list[PollOption] """List of poll options""" total_voter_count: int """Total number of users that voted in the poll""" @@ -33,18 +35,29 @@ class Poll(TelegramObject): """Poll type, currently can be 'regular' or 'quiz'""" allows_multiple_answers: bool """:code:`True`, if the poll allows multiple answers""" - question_entities: Optional[List[MessageEntity]] = None + allows_revoting: bool + """:code:`True`, if the poll allows to change the chosen answer options""" + question_entities: list[MessageEntity] | None = None """*Optional*. Special entities that appear in the *question*. Currently, only custom emoji entities are allowed in poll questions""" - correct_option_id: Optional[int] = None - """*Optional*. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.""" - explanation: Optional[str] = None + correct_option_ids: list[int] | None = None + """*Optional*. Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which are closed or were sent (not forwarded) by the bot or to the private chat with the bot.""" + explanation: str | None = None """*Optional*. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters""" - explanation_entities: Optional[List[MessageEntity]] = None + explanation_entities: list[MessageEntity] | None = None """*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the *explanation*""" - open_period: Optional[int] = None + open_period: int | None = None """*Optional*. Amount of time in seconds the poll will be active after creation""" - close_date: Optional[DateTime] = None + close_date: DateTime | None = None """*Optional*. Point in time (Unix timestamp) when the poll will be automatically closed""" + description: str | None = None + """*Optional*. Description of the poll; for polls inside the :class:`aiogram.types.message.Message` object only""" + description_entities: list[MessageEntity] | None = None + """*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the description""" + correct_option_id: int | None = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot. + +.. deprecated:: API:9.6 + https://core.telegram.org/bots/api-changelog#april-3-2026""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -55,18 +68,22 @@ class Poll(TelegramObject): *, id: str, question: str, - options: List[PollOption], + options: list[PollOption], total_voter_count: int, is_closed: bool, is_anonymous: bool, type: str, allows_multiple_answers: bool, - question_entities: Optional[List[MessageEntity]] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[DateTime] = None, + allows_revoting: bool, + question_entities: list[MessageEntity] | None = None, + correct_option_ids: list[int] | None = None, + explanation: str | None = None, + explanation_entities: list[MessageEntity] | None = None, + open_period: int | None = None, + close_date: DateTime | None = None, + description: str | None = None, + description_entities: list[MessageEntity] | None = None, + correct_option_id: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -82,11 +99,15 @@ class Poll(TelegramObject): is_anonymous=is_anonymous, type=type, allows_multiple_answers=allows_multiple_answers, + allows_revoting=allows_revoting, question_entities=question_entities, - correct_option_id=correct_option_id, + correct_option_ids=correct_option_ids, explanation=explanation, explanation_entities=explanation_entities, open_period=open_period, close_date=close_date, + description=description, + description_entities=description_entities, + correct_option_id=correct_option_id, **__pydantic_kwargs, ) diff --git a/aiogram/types/poll_answer.py b/aiogram/types/poll_answer.py index c12be34f..2a991316 100644 --- a/aiogram/types/poll_answer.py +++ b/aiogram/types/poll_answer.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -18,11 +18,13 @@ class PollAnswer(TelegramObject): poll_id: str """Unique poll identifier""" - option_ids: List[int] + option_ids: list[int] """0-based identifiers of chosen answer options. May be empty if the vote was retracted.""" - voter_chat: Optional[Chat] = None + option_persistent_ids: list[str] + """Persistent identifiers of the chosen answer options. May be empty if the vote was retracted.""" + voter_chat: Chat | None = None """*Optional*. The chat that changed the answer to the poll, if the voter is anonymous""" - user: Optional[User] = None + user: User | None = None """*Optional*. The user that changed the answer to the poll, if the voter isn't anonymous""" if TYPE_CHECKING: @@ -33,9 +35,10 @@ class PollAnswer(TelegramObject): __pydantic__self__, *, poll_id: str, - option_ids: List[int], - voter_chat: Optional[Chat] = None, - user: Optional[User] = None, + option_ids: list[int], + option_persistent_ids: list[str], + voter_chat: Chat | None = None, + user: User | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -45,6 +48,7 @@ class PollAnswer(TelegramObject): super().__init__( poll_id=poll_id, option_ids=option_ids, + option_persistent_ids=option_persistent_ids, voter_chat=voter_chat, user=user, **__pydantic_kwargs, diff --git a/aiogram/types/poll_option.py b/aiogram/types/poll_option.py index f380934c..24c23b5f 100644 --- a/aiogram/types/poll_option.py +++ b/aiogram/types/poll_option.py @@ -1,11 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject +from .custom import DateTime if TYPE_CHECKING: + from .chat import Chat from .message_entity import MessageEntity + from .user import User class PollOption(TelegramObject): @@ -15,12 +18,20 @@ class PollOption(TelegramObject): Source: https://core.telegram.org/bots/api#polloption """ + persistent_id: str + """Unique identifier of the option, persistent on option addition and deletion""" text: str """Option text, 1-100 characters""" voter_count: int - """Number of users that voted for this option""" - text_entities: Optional[List[MessageEntity]] = None + """Number of users who voted for this option; may be 0 if unknown""" + text_entities: list[MessageEntity] | None = None """*Optional*. Special entities that appear in the option *text*. Currently, only custom emoji entities are allowed in poll option texts""" + added_by_user: User | None = None + """*Optional*. User who added the option; omitted if the option wasn't added by a user after poll creation""" + added_by_chat: Chat | None = None + """*Optional*. Chat that added the option; omitted if the option wasn't added by a chat after poll creation""" + addition_date: DateTime | None = None + """*Optional*. Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original poll""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -29,9 +40,13 @@ class PollOption(TelegramObject): def __init__( __pydantic__self__, *, + persistent_id: str, text: str, voter_count: int, - text_entities: Optional[List[MessageEntity]] = None, + text_entities: list[MessageEntity] | None = None, + added_by_user: User | None = None, + added_by_chat: Chat | None = None, + addition_date: DateTime | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -39,8 +54,12 @@ class PollOption(TelegramObject): # Is needed only for type checking and IDE support without any additional plugins super().__init__( + persistent_id=persistent_id, text=text, voter_count=voter_count, text_entities=text_entities, + added_by_user=added_by_user, + added_by_chat=added_by_chat, + addition_date=addition_date, **__pydantic_kwargs, ) diff --git a/aiogram/types/poll_option_added.py b/aiogram/types/poll_option_added.py new file mode 100644 index 00000000..ff3a2006 --- /dev/null +++ b/aiogram/types/poll_option_added.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .maybe_inaccessible_message_union import MaybeInaccessibleMessageUnion + from .message_entity import MessageEntity + + +class PollOptionAdded(TelegramObject): + """ + Describes a service message about an option added to a poll. + + Source: https://core.telegram.org/bots/api#polloptionadded + """ + + option_persistent_id: str + """Unique identifier of the added option""" + option_text: str + """Option text""" + poll_message: MaybeInaccessibleMessageUnion | None = None + """*Optional*. Message containing the poll to which the option was added, if known. 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.""" + option_text_entities: list[MessageEntity] | None = None + """*Optional*. Special entities that appear in the *option_text*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + option_persistent_id: str, + option_text: str, + poll_message: MaybeInaccessibleMessageUnion | None = None, + option_text_entities: list[MessageEntity] | None = 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__( + option_persistent_id=option_persistent_id, + option_text=option_text, + poll_message=poll_message, + option_text_entities=option_text_entities, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/poll_option_deleted.py b/aiogram/types/poll_option_deleted.py new file mode 100644 index 00000000..a2d7d01e --- /dev/null +++ b/aiogram/types/poll_option_deleted.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .maybe_inaccessible_message_union import MaybeInaccessibleMessageUnion + from .message_entity import MessageEntity + + +class PollOptionDeleted(TelegramObject): + """ + Describes a service message about an option deleted from a poll. + + Source: https://core.telegram.org/bots/api#polloptiondeleted + """ + + option_persistent_id: str + """Unique identifier of the deleted option""" + option_text: str + """Option text""" + poll_message: MaybeInaccessibleMessageUnion | None = None + """*Optional*. Message containing the poll from which the option was deleted, if known. 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.""" + option_text_entities: list[MessageEntity] | None = None + """*Optional*. Special entities that appear in the *option_text*""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + option_persistent_id: str, + option_text: str, + poll_message: MaybeInaccessibleMessageUnion | None = None, + option_text_entities: list[MessageEntity] | None = 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__( + option_persistent_id=option_persistent_id, + option_text=option_text, + poll_message=poll_message, + option_text_entities=option_text_entities, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/pre_checkout_query.py b/aiogram/types/pre_checkout_query.py index 41bda8ca..305315dc 100644 --- a/aiogram/types/pre_checkout_query.py +++ b/aiogram/types/pre_checkout_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -29,9 +29,9 @@ class PreCheckoutQuery(TelegramObject): """Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`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).""" invoice_payload: str """Bot-specified invoice payload""" - shipping_option_id: Optional[str] = None + shipping_option_id: str | None = None """*Optional*. Identifier of the shipping option chosen by the user""" - order_info: Optional[OrderInfo] = None + order_info: OrderInfo | None = None """*Optional*. Order information provided by the user""" if TYPE_CHECKING: @@ -46,8 +46,8 @@ class PreCheckoutQuery(TelegramObject): currency: str, total_amount: int, invoice_payload: str, - shipping_option_id: Optional[str] = None, - order_info: Optional[OrderInfo] = None, + shipping_option_id: str | None = None, + order_info: OrderInfo | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -68,7 +68,7 @@ class PreCheckoutQuery(TelegramObject): def answer( self, ok: bool, - error_message: Optional[str] = None, + error_message: str | None = None, **kwargs: Any, ) -> AnswerPreCheckoutQuery: """ diff --git a/aiogram/types/prepared_inline_message.py b/aiogram/types/prepared_inline_message.py new file mode 100644 index 00000000..17597381 --- /dev/null +++ b/aiogram/types/prepared_inline_message.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .date_time_union import DateTimeUnion + + +class PreparedInlineMessage(TelegramObject): + """ + Describes an inline message to be sent by a user of a Mini App. + + Source: https://core.telegram.org/bots/api#preparedinlinemessage + """ + + id: str + """Unique identifier of the prepared message""" + expiration_date: DateTimeUnion + """Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + id: str, + expiration_date: DateTimeUnion, + **__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__(id=id, expiration_date=expiration_date, **__pydantic_kwargs) diff --git a/aiogram/types/prepared_keyboard_button.py b/aiogram/types/prepared_keyboard_button.py new file mode 100644 index 00000000..b3322311 --- /dev/null +++ b/aiogram/types/prepared_keyboard_button.py @@ -0,0 +1,25 @@ +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class PreparedKeyboardButton(TelegramObject): + """ + Describes a keyboard button to be used by a user of a Mini App. + + Source: https://core.telegram.org/bots/api#preparedkeyboardbutton + """ + + id: str + """Unique identifier of the keyboard button""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__(__pydantic__self__, *, id: str, **__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__(id=id, **__pydantic_kwargs) diff --git a/aiogram/types/reaction_count.py b/aiogram/types/reaction_count.py index 6ec4794e..4a64f0eb 100644 --- a/aiogram/types/reaction_count.py +++ b/aiogram/types/reaction_count.py @@ -1,12 +1,11 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any from .base import TelegramObject if TYPE_CHECKING: - from .reaction_type_custom_emoji import ReactionTypeCustomEmoji - from .reaction_type_emoji import ReactionTypeEmoji + from .reaction_type_union import ReactionTypeUnion class ReactionCount(TelegramObject): @@ -16,7 +15,7 @@ class ReactionCount(TelegramObject): Source: https://core.telegram.org/bots/api#reactioncount """ - type: Union[ReactionTypeEmoji, ReactionTypeCustomEmoji] + type: ReactionTypeUnion """Type of the reaction""" total_count: int """Number of times the reaction was added""" @@ -28,7 +27,7 @@ class ReactionCount(TelegramObject): def __init__( __pydantic__self__, *, - type: Union[ReactionTypeEmoji, ReactionTypeCustomEmoji], + type: ReactionTypeUnion, total_count: int, **__pydantic_kwargs: Any, ) -> None: diff --git a/aiogram/types/reaction_type.py b/aiogram/types/reaction_type.py index c7a87728..335d35d8 100644 --- a/aiogram/types/reaction_type.py +++ b/aiogram/types/reaction_type.py @@ -7,6 +7,7 @@ class ReactionType(TelegramObject): - :class:`aiogram.types.reaction_type_emoji.ReactionTypeEmoji` - :class:`aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji` + - :class:`aiogram.types.reaction_type_paid.ReactionTypePaid` Source: https://core.telegram.org/bots/api#reactiontype """ diff --git a/aiogram/types/reaction_type_emoji.py b/aiogram/types/reaction_type_emoji.py index a209fe2f..e1a3128b 100644 --- a/aiogram/types/reaction_type_emoji.py +++ b/aiogram/types/reaction_type_emoji.py @@ -14,7 +14,7 @@ class ReactionTypeEmoji(ReactionType): type: Literal[ReactionTypeType.EMOJI] = ReactionTypeType.EMOJI """Type of the reaction, always 'emoji'""" emoji: str - """Reaction emoji. Currently, it can be one of "👍", "👎", "❤", "🔥", "🥰", "👏", "😁", "🤔", "🤯", "😱", "🤬", "😢", "🎉", "🤩", "🤮", "💩", "🙏", "👌", "🕊", "🤡", "🥱", "🥴", "😍", "🐳", "❤‍🔥", "🌚", "🌭", "💯", "🤣", "⚡", "🍌", "🏆", "💔", "🤨", "😐", "🍓", "🍾", "💋", "🖕", "😈", "😴", "😭", "🤓", "👻", "👨‍💻", "👀", "🎃", "🙈", "😇", "😨", "🤝", "✍", "🤗", "🫡", "🎅", "🎄", "☃", "💅", "🤪", "🗿", "🆒", "💘", "🙉", "🦄", "😘", "💊", "🙊", "😎", "👾", "🤷‍♂", "🤷", "🤷‍♀", "😡" """ + """Reaction emoji. Currently, it can be one of "❤", "👍", "👎", "🔥", "🥰", "👏", "😁", "🤔", "🤯", "😱", "🤬", "😢", "🎉", "🤩", "🤮", "💩", "🙏", "👌", "🕊", "🤡", "🥱", "🥴", "😍", "🐳", "❤‍🔥", "🌚", "🌭", "💯", "🤣", "⚡", "🍌", "🏆", "💔", "🤨", "😐", "🍓", "🍾", "💋", "🖕", "😈", "😴", "😭", "🤓", "👻", "👨‍💻", "👀", "🎃", "🙈", "😇", "😨", "🤝", "✍", "🤗", "🫡", "🎅", "🎄", "☃", "💅", "🤪", "🗿", "🆒", "💘", "🙉", "🦄", "😘", "💊", "🙊", "😎", "👾", "🤷‍♂", "🤷", "🤷‍♀", "😡" """ if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/reaction_type_paid.py b/aiogram/types/reaction_type_paid.py new file mode 100644 index 00000000..c5c11c81 --- /dev/null +++ b/aiogram/types/reaction_type_paid.py @@ -0,0 +1,31 @@ +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import ReactionTypeType +from .reaction_type import ReactionType + + +class ReactionTypePaid(ReactionType): + """ + The reaction is paid. + + Source: https://core.telegram.org/bots/api#reactiontypepaid + """ + + type: Literal[ReactionTypeType.PAID] = ReactionTypeType.PAID + """Type of the reaction, always 'paid'""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ReactionTypeType.PAID] = ReactionTypeType.PAID, + **__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__(type=type, **__pydantic_kwargs) diff --git a/aiogram/types/reaction_type_union.py b/aiogram/types/reaction_type_union.py new file mode 100644 index 00000000..4694af75 --- /dev/null +++ b/aiogram/types/reaction_type_union.py @@ -0,0 +1,9 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .reaction_type_custom_emoji import ReactionTypeCustomEmoji +from .reaction_type_emoji import ReactionTypeEmoji +from .reaction_type_paid import ReactionTypePaid + +ReactionTypeUnion: TypeAlias = ReactionTypeEmoji | ReactionTypeCustomEmoji | ReactionTypePaid diff --git a/aiogram/types/refunded_payment.py b/aiogram/types/refunded_payment.py new file mode 100644 index 00000000..c2561ea1 --- /dev/null +++ b/aiogram/types/refunded_payment.py @@ -0,0 +1,49 @@ +from typing import TYPE_CHECKING, Any, Literal + +from .base import TelegramObject + + +class RefundedPayment(TelegramObject): + """ + This object contains basic information about a refunded payment. + + Source: https://core.telegram.org/bots/api#refundedpayment + """ + + currency: Literal["XTR"] = "XTR" + """Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_. Currently, always 'XTR'""" + total_amount: int + """Total refunded price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45`, :code:`total_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).""" + invoice_payload: str + """Bot-specified invoice payload""" + telegram_payment_charge_id: str + """Telegram payment identifier""" + provider_payment_charge_id: str | None = None + """*Optional*. Provider payment identifier""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + currency: Literal["XTR"] = "XTR", + total_amount: int, + invoice_payload: str, + telegram_payment_charge_id: str, + provider_payment_charge_id: str | None = 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, + total_amount=total_amount, + invoice_payload=invoice_payload, + telegram_payment_charge_id=telegram_payment_charge_id, + provider_payment_charge_id=provider_payment_charge_id, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/reply_keyboard_markup.py b/aiogram/types/reply_keyboard_markup.py index f3d6dabd..1f4ae86e 100644 --- a/aiogram/types/reply_keyboard_markup.py +++ b/aiogram/types/reply_keyboard_markup.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .base import MutableTelegramObject @@ -15,17 +15,17 @@ class ReplyKeyboardMarkup(MutableTelegramObject): Source: https://core.telegram.org/bots/api#replykeyboardmarkup """ - keyboard: List[List[KeyboardButton]] + keyboard: list[list[KeyboardButton]] """Array of button rows, each represented by an Array of :class:`aiogram.types.keyboard_button.KeyboardButton` objects""" - is_persistent: Optional[bool] = None + is_persistent: bool | None = None """*Optional*. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to *false*, in which case the custom keyboard can be hidden and opened with a keyboard icon.""" - resize_keyboard: Optional[bool] = None + resize_keyboard: bool | None = None """*Optional*. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to *false*, in which case the custom keyboard is always of the same height as the app's standard keyboard.""" - one_time_keyboard: Optional[bool] = None + one_time_keyboard: bool | None = None """*Optional*. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to *false*.""" - input_field_placeholder: Optional[str] = None + input_field_placeholder: str | None = None """*Optional*. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters""" - selective: Optional[bool] = None + selective: bool | None = None """*Optional*. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.""" if TYPE_CHECKING: @@ -35,12 +35,12 @@ class ReplyKeyboardMarkup(MutableTelegramObject): def __init__( __pydantic__self__, *, - keyboard: List[List[KeyboardButton]], - is_persistent: Optional[bool] = None, - resize_keyboard: Optional[bool] = None, - one_time_keyboard: Optional[bool] = None, - input_field_placeholder: Optional[str] = None, - selective: Optional[bool] = None, + keyboard: list[list[KeyboardButton]], + is_persistent: bool | None = None, + resize_keyboard: bool | None = None, + one_time_keyboard: bool | None = None, + input_field_placeholder: str | None = None, + selective: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/reply_keyboard_remove.py b/aiogram/types/reply_keyboard_remove.py index 9c135a10..51d83ad4 100644 --- a/aiogram/types/reply_keyboard_remove.py +++ b/aiogram/types/reply_keyboard_remove.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal from .base import MutableTelegramObject @@ -14,7 +14,7 @@ class ReplyKeyboardRemove(MutableTelegramObject): remove_keyboard: Literal[True] = True """Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use *one_time_keyboard* in :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup`)""" - selective: Optional[bool] = None + selective: bool | None = None """*Optional*. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.""" if TYPE_CHECKING: @@ -25,7 +25,7 @@ class ReplyKeyboardRemove(MutableTelegramObject): __pydantic__self__, *, remove_keyboard: Literal[True] = True, - selective: Optional[bool] = None, + selective: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/reply_markup_union.py b/aiogram/types/reply_markup_union.py new file mode 100644 index 00000000..65f40250 --- /dev/null +++ b/aiogram/types/reply_markup_union.py @@ -0,0 +1,12 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .force_reply import ForceReply +from .inline_keyboard_markup import InlineKeyboardMarkup +from .reply_keyboard_markup import ReplyKeyboardMarkup +from .reply_keyboard_remove import ReplyKeyboardRemove + +ReplyMarkupUnion: TypeAlias = ( + InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply +) diff --git a/aiogram/types/reply_parameters.py b/aiogram/types/reply_parameters.py index 5b03fdab..9e265b1d 100644 --- a/aiogram/types/reply_parameters.py +++ b/aiogram/types/reply_parameters.py @@ -1,11 +1,12 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional, Union +from typing import TYPE_CHECKING, Any from ..client.default import Default from .base import TelegramObject if TYPE_CHECKING: + from .chat_id_union import ChatIdUnion from .message_entity import MessageEntity @@ -18,20 +19,22 @@ 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[Union[int, str]] = 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.""" - allow_sending_without_reply: Optional[Union[bool, Default]] = Default( - "allow_sending_without_reply" - ) + chat_id: ChatIdUnion | None = 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 and messages from channel direct messages chats.""" + allow_sending_without_reply: bool | Default | None = Default("allow_sending_without_reply") """*Optional*. Pass :code:`True` if the message should be sent even if the specified message to be replied to is not found. Always :code:`False` for replies in another chat or forum topic. Always :code:`True` for messages sent on behalf of a business account.""" - quote: Optional[str] = None - """*Optional*. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities. The message will fail to send if the quote isn't found in the original message.""" - quote_parse_mode: Optional[Union[str, Default]] = Default("parse_mode") + quote: str | None = None + """*Optional*. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities. The message will fail to send if the quote isn't found in the original message.""" + quote_parse_mode: str | Default | None = Default("parse_mode") """*Optional*. Mode for parsing entities in the quote. See `formatting options `_ for more details.""" - quote_entities: Optional[List[MessageEntity]] = None + quote_entities: list[MessageEntity] | None = None """*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 + quote_position: int | None = None """*Optional*. Position of the quote in the original message in UTF-16 code units""" + checklist_task_id: int | None = None + """*Optional*. Identifier of the specific checklist task to be replied to""" + poll_option_id: str | None = None + """*Optional*. Persistent identifier of the specific poll option to be replied to""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -41,14 +44,16 @@ class ReplyParameters(TelegramObject): __pydantic__self__, *, message_id: int, - chat_id: Optional[Union[int, str]] = None, - allow_sending_without_reply: Optional[Union[bool, Default]] = Default( + chat_id: ChatIdUnion | None = None, + allow_sending_without_reply: bool | Default | None = Default( "allow_sending_without_reply" ), - quote: Optional[str] = None, - quote_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - quote_entities: Optional[List[MessageEntity]] = None, - quote_position: Optional[int] = None, + quote: str | None = None, + quote_parse_mode: str | Default | None = Default("parse_mode"), + quote_entities: list[MessageEntity] | None = None, + quote_position: int | None = None, + checklist_task_id: int | None = None, + poll_option_id: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -63,5 +68,7 @@ class ReplyParameters(TelegramObject): quote_parse_mode=quote_parse_mode, quote_entities=quote_entities, quote_position=quote_position, + checklist_task_id=checklist_task_id, + poll_option_id=poll_option_id, **__pydantic_kwargs, ) diff --git a/aiogram/types/response_parameters.py b/aiogram/types/response_parameters.py index 19fc54fb..514b2d32 100644 --- a/aiogram/types/response_parameters.py +++ b/aiogram/types/response_parameters.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -12,9 +12,9 @@ class ResponseParameters(TelegramObject): Source: https://core.telegram.org/bots/api#responseparameters """ - migrate_to_chat_id: Optional[int] = None + migrate_to_chat_id: int | None = None """*Optional*. The group has been migrated to a supergroup 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.""" - retry_after: Optional[int] = None + retry_after: int | None = None """*Optional*. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated""" if TYPE_CHECKING: @@ -24,8 +24,8 @@ class ResponseParameters(TelegramObject): def __init__( __pydantic__self__, *, - migrate_to_chat_id: Optional[int] = None, - retry_after: Optional[int] = None, + migrate_to_chat_id: int | None = None, + retry_after: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/result_chat_member_union.py b/aiogram/types/result_chat_member_union.py new file mode 100644 index 00000000..67c8083c --- /dev/null +++ b/aiogram/types/result_chat_member_union.py @@ -0,0 +1,17 @@ +from typing import TypeAlias + +from .chat_member_administrator import ChatMemberAdministrator +from .chat_member_banned import ChatMemberBanned +from .chat_member_left import ChatMemberLeft +from .chat_member_member import ChatMemberMember +from .chat_member_owner import ChatMemberOwner +from .chat_member_restricted import ChatMemberRestricted + +ResultChatMemberUnion: TypeAlias = ( + ChatMemberOwner + | ChatMemberAdministrator + | ChatMemberMember + | ChatMemberRestricted + | ChatMemberLeft + | ChatMemberBanned +) diff --git a/aiogram/types/result_menu_button_union.py b/aiogram/types/result_menu_button_union.py new file mode 100644 index 00000000..d88ffc12 --- /dev/null +++ b/aiogram/types/result_menu_button_union.py @@ -0,0 +1,7 @@ +from typing import TypeAlias + +from .menu_button_commands import MenuButtonCommands +from .menu_button_default import MenuButtonDefault +from .menu_button_web_app import MenuButtonWebApp + +ResultMenuButtonUnion: TypeAlias = MenuButtonDefault | MenuButtonWebApp | MenuButtonCommands diff --git a/aiogram/types/revenue_withdrawal_state_union.py b/aiogram/types/revenue_withdrawal_state_union.py new file mode 100644 index 00000000..a15e77bb --- /dev/null +++ b/aiogram/types/revenue_withdrawal_state_union.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .revenue_withdrawal_state_failed import RevenueWithdrawalStateFailed +from .revenue_withdrawal_state_pending import RevenueWithdrawalStatePending +from .revenue_withdrawal_state_succeeded import RevenueWithdrawalStateSucceeded + +RevenueWithdrawalStateUnion: TypeAlias = ( + RevenueWithdrawalStatePending | RevenueWithdrawalStateSucceeded | RevenueWithdrawalStateFailed +) diff --git a/aiogram/types/sent_web_app_message.py b/aiogram/types/sent_web_app_message.py index e8241a5f..0beb96e1 100644 --- a/aiogram/types/sent_web_app_message.py +++ b/aiogram/types/sent_web_app_message.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -12,7 +12,7 @@ class SentWebAppMessage(TelegramObject): Source: https://core.telegram.org/bots/api#sentwebappmessage """ - inline_message_id: Optional[str] = None + inline_message_id: str | None = None """*Optional*. Identifier of the sent inline message. Available only if there is an `inline keyboard `_ attached to the message.""" if TYPE_CHECKING: @@ -20,10 +20,7 @@ class SentWebAppMessage(TelegramObject): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, - *, - inline_message_id: Optional[str] = None, - **__pydantic_kwargs: Any, + __pydantic__self__, *, inline_message_id: str | None = None, **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/types/shared_user.py b/aiogram/types/shared_user.py index e160b894..e38e0ac8 100644 --- a/aiogram/types/shared_user.py +++ b/aiogram/types/shared_user.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -17,13 +17,13 @@ class SharedUser(TelegramObject): user_id: int """Identifier of the shared user. 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 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.""" - first_name: Optional[str] = None + first_name: str | None = None """*Optional*. First name of the user, if the name was requested by the bot""" - last_name: Optional[str] = None + last_name: str | None = None """*Optional*. Last name of the user, if the name was requested by the bot""" - username: Optional[str] = None + username: str | None = None """*Optional*. Username of the user, if the username was requested by the bot""" - photo: Optional[List[PhotoSize]] = None + photo: list[PhotoSize] | None = None """*Optional*. Available sizes of the chat photo, if the photo was requested by the bot""" if TYPE_CHECKING: @@ -34,10 +34,10 @@ class SharedUser(TelegramObject): __pydantic__self__, *, user_id: int, - first_name: Optional[str] = None, - last_name: Optional[str] = None, - username: Optional[str] = None, - photo: Optional[List[PhotoSize]] = None, + first_name: str | None = None, + last_name: str | None = None, + username: str | None = None, + photo: list[PhotoSize] | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/shipping_option.py b/aiogram/types/shipping_option.py index b0274518..9c3dadaa 100644 --- a/aiogram/types/shipping_option.py +++ b/aiogram/types/shipping_option.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -19,7 +19,7 @@ class ShippingOption(TelegramObject): """Shipping option identifier""" title: str """Option title""" - prices: List[LabeledPrice] + prices: list[LabeledPrice] """List of price portions""" if TYPE_CHECKING: @@ -31,7 +31,7 @@ class ShippingOption(TelegramObject): *, id: str, title: str, - prices: List[LabeledPrice], + prices: list[LabeledPrice], **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/shipping_query.py b/aiogram/types/shipping_query.py index 61b4ae42..8ecae45e 100644 --- a/aiogram/types/shipping_query.py +++ b/aiogram/types/shipping_query.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -57,8 +57,8 @@ class ShippingQuery(TelegramObject): def answer( self, ok: bool, - shipping_options: Optional[List[ShippingOption]] = None, - error_message: Optional[str] = None, + shipping_options: list[ShippingOption] | None = None, + error_message: str | None = None, **kwargs: Any, ) -> AnswerShippingQuery: """ @@ -73,7 +73,7 @@ class ShippingQuery(TelegramObject): :param ok: Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible) :param shipping_options: Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options. - :param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user. + :param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user. :return: instance of method :class:`aiogram.methods.answer_shipping_query.AnswerShippingQuery` """ # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/star_amount.py b/aiogram/types/star_amount.py new file mode 100644 index 00000000..4e3936ae --- /dev/null +++ b/aiogram/types/star_amount.py @@ -0,0 +1,35 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class StarAmount(TelegramObject): + """ + Describes an amount of Telegram Stars. + + Source: https://core.telegram.org/bots/api#staramount + """ + + amount: int + """Integer amount of Telegram Stars, rounded to 0; can be negative""" + nanostar_amount: int | None = None + """*Optional*. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if *amount* is non-positive""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + amount: int, + nanostar_amount: int | None = 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__(amount=amount, nanostar_amount=nanostar_amount, **__pydantic_kwargs) diff --git a/aiogram/types/star_transaction.py b/aiogram/types/star_transaction.py index 5d680af7..181ed786 100644 --- a/aiogram/types/star_transaction.py +++ b/aiogram/types/star_transaction.py @@ -1,47 +1,32 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any from .base import TelegramObject from .custom import DateTime if TYPE_CHECKING: - from .transaction_partner_fragment import TransactionPartnerFragment - from .transaction_partner_other import TransactionPartnerOther - from .transaction_partner_telegram_ads import TransactionPartnerTelegramAds - from .transaction_partner_user import TransactionPartnerUser + from .transaction_partner_union import TransactionPartnerUnion class StarTransaction(TelegramObject): """ - Describes a Telegram Star transaction. + Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control. Source: https://core.telegram.org/bots/api#startransaction """ id: str - """Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with *SuccessfulPayment.telegram_payment_charge_id* for successful incoming payments from users.""" + """Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with *SuccessfulPayment.telegram_payment_charge_id* for successful incoming payments from users.""" amount: int - """Number of Telegram Stars transferred by the transaction""" + """Integer amount of Telegram Stars transferred by the transaction""" date: DateTime """Date the transaction was created in Unix time""" - source: Optional[ - Union[ - TransactionPartnerUser, - TransactionPartnerFragment, - TransactionPartnerTelegramAds, - TransactionPartnerOther, - ] - ] = None + nanostar_amount: int | None = None + """*Optional*. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999""" + source: TransactionPartnerUnion | None = None """*Optional*. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions""" - receiver: Optional[ - Union[ - TransactionPartnerUser, - TransactionPartnerFragment, - TransactionPartnerTelegramAds, - TransactionPartnerOther, - ] - ] = None + receiver: TransactionPartnerUnion | None = None """*Optional*. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions""" if TYPE_CHECKING: @@ -54,22 +39,9 @@ class StarTransaction(TelegramObject): id: str, amount: int, date: DateTime, - source: Optional[ - Union[ - TransactionPartnerUser, - TransactionPartnerFragment, - TransactionPartnerTelegramAds, - TransactionPartnerOther, - ] - ] = None, - receiver: Optional[ - Union[ - TransactionPartnerUser, - TransactionPartnerFragment, - TransactionPartnerTelegramAds, - TransactionPartnerOther, - ] - ] = None, + nanostar_amount: int | None = None, + source: TransactionPartnerUnion | None = None, + receiver: TransactionPartnerUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -80,6 +52,7 @@ class StarTransaction(TelegramObject): id=id, amount=amount, date=date, + nanostar_amount=nanostar_amount, source=source, receiver=receiver, **__pydantic_kwargs, diff --git a/aiogram/types/star_transactions.py b/aiogram/types/star_transactions.py index d2ee5b0f..b0039f4e 100644 --- a/aiogram/types/star_transactions.py +++ b/aiogram/types/star_transactions.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -15,7 +15,7 @@ class StarTransactions(TelegramObject): Source: https://core.telegram.org/bots/api#startransactions """ - transactions: List[StarTransaction] + transactions: list[StarTransaction] """The list of transactions""" if TYPE_CHECKING: @@ -23,7 +23,7 @@ class StarTransactions(TelegramObject): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, transactions: List[StarTransaction], **__pydantic_kwargs: Any + __pydantic__self__, *, transactions: list[StarTransaction], **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/types/sticker.py b/aiogram/types/sticker.py index 4c1b8646..d0fb8d59 100644 --- a/aiogram/types/sticker.py +++ b/aiogram/types/sticker.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -32,21 +32,21 @@ class Sticker(TelegramObject): """:code:`True`, if the sticker is `animated `_""" is_video: bool """:code:`True`, if the sticker is a `video sticker `_""" - thumbnail: Optional[PhotoSize] = None + thumbnail: PhotoSize | None = None """*Optional*. Sticker thumbnail in the .WEBP or .JPG format""" - emoji: Optional[str] = None + emoji: str | None = None """*Optional*. Emoji associated with the sticker""" - set_name: Optional[str] = None + set_name: str | None = None """*Optional*. Name of the sticker set to which the sticker belongs""" - premium_animation: Optional[File] = None + premium_animation: File | None = None """*Optional*. For premium regular stickers, premium animation for the sticker""" - mask_position: Optional[MaskPosition] = None + mask_position: MaskPosition | None = None """*Optional*. For mask stickers, the position where the mask should be placed""" - custom_emoji_id: Optional[str] = None + custom_emoji_id: str | None = None """*Optional*. For custom emoji stickers, unique identifier of the custom emoji""" - needs_repainting: Optional[bool] = None + needs_repainting: bool | None = None """*Optional*. :code:`True`, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places""" - file_size: Optional[int] = None + file_size: int | None = None """*Optional*. File size in bytes""" if TYPE_CHECKING: @@ -63,14 +63,14 @@ class Sticker(TelegramObject): height: int, is_animated: bool, is_video: bool, - thumbnail: Optional[PhotoSize] = None, - emoji: Optional[str] = None, - set_name: Optional[str] = None, - premium_animation: Optional[File] = None, - mask_position: Optional[MaskPosition] = None, - custom_emoji_id: Optional[str] = None, - needs_repainting: Optional[bool] = None, - file_size: Optional[int] = None, + thumbnail: PhotoSize | None = None, + emoji: str | None = None, + set_name: str | None = None, + premium_animation: File | None = None, + mask_position: MaskPosition | None = None, + custom_emoji_id: str | None = None, + needs_repainting: bool | None = None, + file_size: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/sticker_set.py b/aiogram/types/sticker_set.py index 29f9962f..b9b10bf5 100644 --- a/aiogram/types/sticker_set.py +++ b/aiogram/types/sticker_set.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -24,16 +24,16 @@ class StickerSet(TelegramObject): """Sticker set title""" sticker_type: str """Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'""" - stickers: List[Sticker] + stickers: list[Sticker] """List of all set stickers""" - thumbnail: Optional[PhotoSize] = None + thumbnail: PhotoSize | None = None """*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format""" - is_animated: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + is_animated: bool | None = Field(None, json_schema_extra={"deprecated": True}) """:code:`True`, if the sticker set contains `animated stickers `_ .. deprecated:: API:7.2 https://core.telegram.org/bots/api-changelog#march-31-2024""" - is_video: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) + is_video: bool | None = Field(None, json_schema_extra={"deprecated": True}) """:code:`True`, if the sticker set contains `video stickers `_ .. deprecated:: API:7.2 @@ -49,10 +49,10 @@ class StickerSet(TelegramObject): name: str, title: str, sticker_type: str, - stickers: List[Sticker], - thumbnail: Optional[PhotoSize] = None, - is_animated: Optional[bool] = None, - is_video: Optional[bool] = None, + stickers: list[Sticker], + thumbnail: PhotoSize | None = None, + is_animated: bool | None = None, + is_video: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/story_area.py b/aiogram/types/story_area.py new file mode 100644 index 00000000..b992cf23 --- /dev/null +++ b/aiogram/types/story_area.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .story_area_position import StoryAreaPosition + from .story_area_type_union import StoryAreaTypeUnion + + +class StoryArea(TelegramObject): + """ + Describes a clickable area on a story media. + + Source: https://core.telegram.org/bots/api#storyarea + """ + + position: StoryAreaPosition + """Position of the area""" + type: StoryAreaTypeUnion + """Type of the area""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + position: StoryAreaPosition, + type: StoryAreaTypeUnion, + **__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__(position=position, type=type, **__pydantic_kwargs) diff --git a/aiogram/types/story_area_position.py b/aiogram/types/story_area_position.py new file mode 100644 index 00000000..25647023 --- /dev/null +++ b/aiogram/types/story_area_position.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class StoryAreaPosition(TelegramObject): + """ + Describes the position of a clickable area within a story. + + Source: https://core.telegram.org/bots/api#storyareaposition + """ + + x_percentage: float + """The abscissa of the area's center, as a percentage of the media width""" + y_percentage: float + """The ordinate of the area's center, as a percentage of the media height""" + width_percentage: float + """The width of the area's rectangle, as a percentage of the media width""" + height_percentage: float + """The height of the area's rectangle, as a percentage of the media height""" + rotation_angle: float + """The clockwise rotation angle of the rectangle, in degrees; 0-360""" + corner_radius_percentage: float + """The radius of the rectangle corner rounding, as a percentage of the media width""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + x_percentage: float, + y_percentage: float, + width_percentage: float, + height_percentage: float, + rotation_angle: float, + corner_radius_percentage: float, + **__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__( + x_percentage=x_percentage, + y_percentage=y_percentage, + width_percentage=width_percentage, + height_percentage=height_percentage, + rotation_angle=rotation_angle, + corner_radius_percentage=corner_radius_percentage, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/story_area_type.py b/aiogram/types/story_area_type.py new file mode 100644 index 00000000..6c63bf0a --- /dev/null +++ b/aiogram/types/story_area_type.py @@ -0,0 +1,17 @@ +from __future__ import annotations + +from .base import TelegramObject + + +class StoryAreaType(TelegramObject): + """ + Describes the type of a clickable area on a story. Currently, it can be one of + + - :class:`aiogram.types.story_area_type_location.StoryAreaTypeLocation` + - :class:`aiogram.types.story_area_type_suggested_reaction.StoryAreaTypeSuggestedReaction` + - :class:`aiogram.types.story_area_type_link.StoryAreaTypeLink` + - :class:`aiogram.types.story_area_type_weather.StoryAreaTypeWeather` + - :class:`aiogram.types.story_area_type_unique_gift.StoryAreaTypeUniqueGift` + + Source: https://core.telegram.org/bots/api#storyareatype + """ diff --git a/aiogram/types/story_area_type_link.py b/aiogram/types/story_area_type_link.py new file mode 100644 index 00000000..8cbd9e77 --- /dev/null +++ b/aiogram/types/story_area_type_link.py @@ -0,0 +1,37 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from aiogram.enums import StoryAreaTypeType + +from .story_area_type import StoryAreaType + + +class StoryAreaTypeLink(StoryAreaType): + """ + Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas. + + Source: https://core.telegram.org/bots/api#storyareatypelink + """ + + type: Literal[StoryAreaTypeType.LINK] = StoryAreaTypeType.LINK + """Type of the area, always 'link'""" + url: str + """HTTP or tg:// URL to be opened when the area is clicked""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[StoryAreaTypeType.LINK] = StoryAreaTypeType.LINK, + url: str, + **__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__(type=type, url=url, **__pydantic_kwargs) diff --git a/aiogram/types/story_area_type_location.py b/aiogram/types/story_area_type_location.py new file mode 100644 index 00000000..bda9cde3 --- /dev/null +++ b/aiogram/types/story_area_type_location.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from aiogram.enums import StoryAreaTypeType + +from .story_area_type import StoryAreaType + +if TYPE_CHECKING: + from .location_address import LocationAddress + + +class StoryAreaTypeLocation(StoryAreaType): + """ + Describes a story area pointing to a location. Currently, a story can have up to 10 location areas. + + Source: https://core.telegram.org/bots/api#storyareatypelocation + """ + + type: Literal[StoryAreaTypeType.LOCATION] = StoryAreaTypeType.LOCATION + """Type of the area, always 'location'""" + latitude: float + """Location latitude in degrees""" + longitude: float + """Location longitude in degrees""" + address: LocationAddress | None = None + """*Optional*. Address of the location""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[StoryAreaTypeType.LOCATION] = StoryAreaTypeType.LOCATION, + latitude: float, + longitude: float, + address: LocationAddress | None = 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__( + type=type, + latitude=latitude, + longitude=longitude, + address=address, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/story_area_type_suggested_reaction.py b/aiogram/types/story_area_type_suggested_reaction.py new file mode 100644 index 00000000..4d9a121a --- /dev/null +++ b/aiogram/types/story_area_type_suggested_reaction.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from aiogram.enums import StoryAreaTypeType + +from .story_area_type import StoryAreaType + +if TYPE_CHECKING: + from .reaction_type_union import ReactionTypeUnion + + +class StoryAreaTypeSuggestedReaction(StoryAreaType): + """ + Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas. + + Source: https://core.telegram.org/bots/api#storyareatypesuggestedreaction + """ + + type: Literal[StoryAreaTypeType.SUGGESTED_REACTION] = StoryAreaTypeType.SUGGESTED_REACTION + """Type of the area, always 'suggested_reaction'""" + reaction_type: ReactionTypeUnion + """Type of the reaction""" + is_dark: bool | None = None + """*Optional*. Pass :code:`True` if the reaction area has a dark background""" + is_flipped: bool | None = None + """*Optional*. Pass :code:`True` if reaction area corner is flipped""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + StoryAreaTypeType.SUGGESTED_REACTION + ] = StoryAreaTypeType.SUGGESTED_REACTION, + reaction_type: ReactionTypeUnion, + is_dark: bool | None = None, + is_flipped: bool | None = 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__( + type=type, + reaction_type=reaction_type, + is_dark=is_dark, + is_flipped=is_flipped, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/story_area_type_union.py b/aiogram/types/story_area_type_union.py new file mode 100644 index 00000000..0d63425e --- /dev/null +++ b/aiogram/types/story_area_type_union.py @@ -0,0 +1,15 @@ +from typing import TypeAlias + +from .story_area_type_link import StoryAreaTypeLink +from .story_area_type_location import StoryAreaTypeLocation +from .story_area_type_suggested_reaction import StoryAreaTypeSuggestedReaction +from .story_area_type_unique_gift import StoryAreaTypeUniqueGift +from .story_area_type_weather import StoryAreaTypeWeather + +StoryAreaTypeUnion: TypeAlias = ( + StoryAreaTypeLocation + | StoryAreaTypeSuggestedReaction + | StoryAreaTypeLink + | StoryAreaTypeWeather + | StoryAreaTypeUniqueGift +) diff --git a/aiogram/types/story_area_type_unique_gift.py b/aiogram/types/story_area_type_unique_gift.py new file mode 100644 index 00000000..65c600f9 --- /dev/null +++ b/aiogram/types/story_area_type_unique_gift.py @@ -0,0 +1,37 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from aiogram.enums import StoryAreaTypeType + +from .story_area_type import StoryAreaType + + +class StoryAreaTypeUniqueGift(StoryAreaType): + """ + Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area. + + Source: https://core.telegram.org/bots/api#storyareatypeuniquegift + """ + + type: Literal[StoryAreaTypeType.UNIQUE_GIFT] = StoryAreaTypeType.UNIQUE_GIFT + """Type of the area, always 'unique_gift'""" + name: str + """Unique name of the gift""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[StoryAreaTypeType.UNIQUE_GIFT] = StoryAreaTypeType.UNIQUE_GIFT, + name: str, + **__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__(type=type, name=name, **__pydantic_kwargs) diff --git a/aiogram/types/story_area_type_weather.py b/aiogram/types/story_area_type_weather.py new file mode 100644 index 00000000..1bc82ad2 --- /dev/null +++ b/aiogram/types/story_area_type_weather.py @@ -0,0 +1,49 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from aiogram.enums import StoryAreaTypeType + +from .story_area_type import StoryAreaType + + +class StoryAreaTypeWeather(StoryAreaType): + """ + Describes a story area containing weather information. Currently, a story can have up to 3 weather areas. + + Source: https://core.telegram.org/bots/api#storyareatypeweather + """ + + type: Literal[StoryAreaTypeType.WEATHER] = StoryAreaTypeType.WEATHER + """Type of the area, always 'weather'""" + temperature: float + """Temperature, in degree Celsius""" + emoji: str + """Emoji representing the weather""" + background_color: int + """A color of the area background in the ARGB format""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[StoryAreaTypeType.WEATHER] = StoryAreaTypeType.WEATHER, + temperature: float, + emoji: str, + background_color: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + type=type, + temperature=temperature, + emoji=emoji, + background_color=background_color, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/successful_payment.py b/aiogram/types/successful_payment.py index 30d43561..a0f728d4 100644 --- a/aiogram/types/successful_payment.py +++ b/aiogram/types/successful_payment.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -10,7 +10,7 @@ if TYPE_CHECKING: class SuccessfulPayment(TelegramObject): """ - This object contains basic information about a successful payment. + This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control. Source: https://core.telegram.org/bots/api#successfulpayment """ @@ -25,9 +25,15 @@ class SuccessfulPayment(TelegramObject): """Telegram payment identifier""" provider_payment_charge_id: str """Provider payment identifier""" - shipping_option_id: Optional[str] = None + subscription_expiration_date: int | None = None + """*Optional*. Expiration date of the subscription, in Unix time; for recurring payments only""" + is_recurring: bool | None = None + """*Optional*. :code:`True`, if the payment is a recurring payment for a subscription""" + is_first_recurring: bool | None = None + """*Optional*. :code:`True`, if the payment is the first payment for a subscription""" + shipping_option_id: str | None = None """*Optional*. Identifier of the shipping option chosen by the user""" - order_info: Optional[OrderInfo] = None + order_info: OrderInfo | None = None """*Optional*. Order information provided by the user""" if TYPE_CHECKING: @@ -42,8 +48,11 @@ class SuccessfulPayment(TelegramObject): invoice_payload: str, telegram_payment_charge_id: str, provider_payment_charge_id: str, - shipping_option_id: Optional[str] = None, - order_info: Optional[OrderInfo] = None, + subscription_expiration_date: int | None = None, + is_recurring: bool | None = None, + is_first_recurring: bool | None = None, + shipping_option_id: str | None = None, + order_info: OrderInfo | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -56,6 +65,9 @@ class SuccessfulPayment(TelegramObject): invoice_payload=invoice_payload, telegram_payment_charge_id=telegram_payment_charge_id, provider_payment_charge_id=provider_payment_charge_id, + subscription_expiration_date=subscription_expiration_date, + is_recurring=is_recurring, + is_first_recurring=is_first_recurring, shipping_option_id=shipping_option_id, order_info=order_info, **__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..c36756f3 --- /dev/null +++ b/aiogram/types/suggested_post_approval_failed.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +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: Message | None = 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: Message | None = 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..d2969b5e --- /dev/null +++ b/aiogram/types/suggested_post_approved.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +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: Message | None = 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: SuggestedPostPrice | None = 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: Message | None = None, + price: SuggestedPostPrice | None = 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..01699d3f --- /dev/null +++ b/aiogram/types/suggested_post_declined.py @@ -0,0 +1,40 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +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: Message | None = 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: str | None = 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: Message | None = None, + comment: str | None = 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..37d34ba4 --- /dev/null +++ b/aiogram/types/suggested_post_info.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +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: SuggestedPostPrice | None = None + """*Optional*. Proposed price of the post. If the field is omitted, then the post is unpaid.""" + send_date: DateTime | None = 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: SuggestedPostPrice | None = None, + send_date: DateTime | None = 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..941d8b17 --- /dev/null +++ b/aiogram/types/suggested_post_paid.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +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: Message | None = 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: int | None = None + """*Optional*. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only""" + star_amount: StarAmount | None = 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: Message | None = None, + amount: int | None = None, + star_amount: StarAmount | None = 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..8faa5825 --- /dev/null +++ b/aiogram/types/suggested_post_parameters.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +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: SuggestedPostPrice | None = None + """*Optional*. Proposed price for the post. If the field is omitted, then the post is unpaid.""" + send_date: DateTime | None = 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: SuggestedPostPrice | None = None, + send_date: DateTime | None = 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..88d73332 --- /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): + """ + Describes the 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..02b4cfa6 --- /dev/null +++ b/aiogram/types/suggested_post_refunded.py @@ -0,0 +1,40 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +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: Message | None = 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: Message | None = 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/switch_inline_query_chosen_chat.py b/aiogram/types/switch_inline_query_chosen_chat.py index 9a25dca5..70721d79 100644 --- a/aiogram/types/switch_inline_query_chosen_chat.py +++ b/aiogram/types/switch_inline_query_chosen_chat.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -10,16 +10,16 @@ class SwitchInlineQueryChosenChat(TelegramObject): Source: https://core.telegram.org/bots/api#switchinlinequerychosenchat """ - query: Optional[str] = None + query: str | None = None """*Optional*. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted""" - allow_user_chats: Optional[bool] = None - """*Optional*. True, if private chats with users can be chosen""" - allow_bot_chats: Optional[bool] = None - """*Optional*. True, if private chats with bots can be chosen""" - allow_group_chats: Optional[bool] = None - """*Optional*. True, if group and supergroup chats can be chosen""" - allow_channel_chats: Optional[bool] = None - """*Optional*. True, if channel chats can be chosen""" + allow_user_chats: bool | None = None + """*Optional*. :code:`True`, if private chats with users can be chosen""" + allow_bot_chats: bool | None = None + """*Optional*. :code:`True`, if private chats with bots can be chosen""" + allow_group_chats: bool | None = None + """*Optional*. :code:`True`, if group and supergroup chats can be chosen""" + allow_channel_chats: bool | None = None + """*Optional*. :code:`True`, if channel chats can be chosen""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -28,11 +28,11 @@ class SwitchInlineQueryChosenChat(TelegramObject): def __init__( __pydantic__self__, *, - query: Optional[str] = None, - allow_user_chats: Optional[bool] = None, - allow_bot_chats: Optional[bool] = None, - allow_group_chats: Optional[bool] = None, - allow_channel_chats: Optional[bool] = None, + query: str | None = None, + allow_user_chats: bool | None = None, + allow_bot_chats: bool | None = None, + allow_group_chats: bool | None = None, + allow_channel_chats: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/text_quote.py b/aiogram/types/text_quote.py index a882ccf6..2b534763 100644 --- a/aiogram/types/text_quote.py +++ b/aiogram/types/text_quote.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -19,10 +19,10 @@ class TextQuote(TelegramObject): """Text of the quoted part of a message that is replied to by the given message""" position: int """Approximate quote position in the original message in UTF-16 code units as specified by the sender""" - entities: Optional[List[MessageEntity]] = None - """*Optional*. Special entities that appear in the quote. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are kept in quotes.""" - is_manual: Optional[bool] = None - """*Optional*. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.""" + entities: list[MessageEntity] | None = None + """*Optional*. Special entities that appear in the quote. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, *custom_emoji*, and *date_time* entities are kept in quotes.""" + is_manual: bool | None = None + """*Optional*. :code:`True`, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -33,8 +33,8 @@ class TextQuote(TelegramObject): *, text: str, position: int, - entities: Optional[List[MessageEntity]] = None, - is_manual: Optional[bool] = None, + entities: list[MessageEntity] | None = None, + is_manual: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/transaction_partner.py b/aiogram/types/transaction_partner.py index a26b0fcd..b7516dec 100644 --- a/aiogram/types/transaction_partner.py +++ b/aiogram/types/transaction_partner.py @@ -6,8 +6,11 @@ class TransactionPartner(TelegramObject): This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser` + - :class:`aiogram.types.transaction_partner_chat.TransactionPartnerChat` + - :class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram` - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment` - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds` + - :class:`aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi` - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther` Source: https://core.telegram.org/bots/api#transactionpartner diff --git a/aiogram/types/transaction_partner_affiliate_program.py b/aiogram/types/transaction_partner_affiliate_program.py new file mode 100644 index 00000000..9b33ea34 --- /dev/null +++ b/aiogram/types/transaction_partner_affiliate_program.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import TransactionPartnerType +from .transaction_partner import TransactionPartner + +if TYPE_CHECKING: + from .user import User + + +class TransactionPartnerAffiliateProgram(TransactionPartner): + """ + Describes the affiliate program that issued the affiliate commission received via this transaction. + + Source: https://core.telegram.org/bots/api#transactionpartneraffiliateprogram + """ + + type: Literal[TransactionPartnerType.AFFILIATE_PROGRAM] = ( + TransactionPartnerType.AFFILIATE_PROGRAM + ) + """Type of the transaction partner, always 'affiliate_program'""" + commission_per_mille: int + """The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users""" + sponsor_user: User | None = None + """*Optional*. Information about the bot that sponsored the affiliate program""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + TransactionPartnerType.AFFILIATE_PROGRAM + ] = TransactionPartnerType.AFFILIATE_PROGRAM, + commission_per_mille: int, + sponsor_user: User | None = 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__( + type=type, + commission_per_mille=commission_per_mille, + sponsor_user=sponsor_user, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/transaction_partner_chat.py b/aiogram/types/transaction_partner_chat.py new file mode 100644 index 00000000..e3a36e7a --- /dev/null +++ b/aiogram/types/transaction_partner_chat.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import TransactionPartnerType +from .transaction_partner import TransactionPartner + +if TYPE_CHECKING: + from .chat import Chat + from .gift import Gift + + +class TransactionPartnerChat(TransactionPartner): + """ + Describes a transaction with a chat. + + Source: https://core.telegram.org/bots/api#transactionpartnerchat + """ + + type: Literal[TransactionPartnerType.CHAT] = TransactionPartnerType.CHAT + """Type of the transaction partner, always 'chat'""" + chat: Chat + """Information about the chat""" + gift: Gift | None = None + """*Optional*. The gift sent to the chat by the bot""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[TransactionPartnerType.CHAT] = TransactionPartnerType.CHAT, + chat: Chat, + gift: Gift | None = 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__(type=type, chat=chat, gift=gift, **__pydantic_kwargs) diff --git a/aiogram/types/transaction_partner_fragment.py b/aiogram/types/transaction_partner_fragment.py index 350109e0..25383908 100644 --- a/aiogram/types/transaction_partner_fragment.py +++ b/aiogram/types/transaction_partner_fragment.py @@ -1,14 +1,12 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Literal from ..enums import TransactionPartnerType from .transaction_partner import TransactionPartner if TYPE_CHECKING: - from .revenue_withdrawal_state_failed import RevenueWithdrawalStateFailed - from .revenue_withdrawal_state_pending import RevenueWithdrawalStatePending - from .revenue_withdrawal_state_succeeded import RevenueWithdrawalStateSucceeded + from .revenue_withdrawal_state_union import RevenueWithdrawalStateUnion class TransactionPartnerFragment(TransactionPartner): @@ -20,13 +18,7 @@ class TransactionPartnerFragment(TransactionPartner): type: Literal[TransactionPartnerType.FRAGMENT] = TransactionPartnerType.FRAGMENT """Type of the transaction partner, always 'fragment'""" - withdrawal_state: Optional[ - Union[ - RevenueWithdrawalStatePending, - RevenueWithdrawalStateSucceeded, - RevenueWithdrawalStateFailed, - ] - ] = None + withdrawal_state: RevenueWithdrawalStateUnion | None = None """*Optional*. State of the transaction if the transaction is outgoing""" if TYPE_CHECKING: @@ -37,13 +29,7 @@ class TransactionPartnerFragment(TransactionPartner): __pydantic__self__, *, type: Literal[TransactionPartnerType.FRAGMENT] = TransactionPartnerType.FRAGMENT, - withdrawal_state: Optional[ - Union[ - RevenueWithdrawalStatePending, - RevenueWithdrawalStateSucceeded, - RevenueWithdrawalStateFailed, - ] - ] = None, + withdrawal_state: RevenueWithdrawalStateUnion | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/transaction_partner_telegram_api.py b/aiogram/types/transaction_partner_telegram_api.py new file mode 100644 index 00000000..ec815bde --- /dev/null +++ b/aiogram/types/transaction_partner_telegram_api.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from ..enums import TransactionPartnerType +from .transaction_partner import TransactionPartner + + +class TransactionPartnerTelegramApi(TransactionPartner): + """ + Describes a transaction with payment for `paid broadcasting `_. + + Source: https://core.telegram.org/bots/api#transactionpartnertelegramapi + """ + + type: Literal[TransactionPartnerType.TELEGRAM_API] = TransactionPartnerType.TELEGRAM_API + """Type of the transaction partner, always 'telegram_api'""" + request_count: int + """The number of successful requests that exceeded regular limits and were therefore billed""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + type: Literal[ + TransactionPartnerType.TELEGRAM_API + ] = TransactionPartnerType.TELEGRAM_API, + request_count: 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__(type=type, request_count=request_count, **__pydantic_kwargs) diff --git a/aiogram/types/transaction_partner_union.py b/aiogram/types/transaction_partner_union.py new file mode 100644 index 00000000..49bb3336 --- /dev/null +++ b/aiogram/types/transaction_partner_union.py @@ -0,0 +1,21 @@ +from __future__ import annotations + +from typing import TypeAlias + +from .transaction_partner_affiliate_program import TransactionPartnerAffiliateProgram +from .transaction_partner_chat import TransactionPartnerChat +from .transaction_partner_fragment import TransactionPartnerFragment +from .transaction_partner_other import TransactionPartnerOther +from .transaction_partner_telegram_ads import TransactionPartnerTelegramAds +from .transaction_partner_telegram_api import TransactionPartnerTelegramApi +from .transaction_partner_user import TransactionPartnerUser + +TransactionPartnerUnion: TypeAlias = ( + TransactionPartnerUser + | TransactionPartnerChat + | TransactionPartnerAffiliateProgram + | TransactionPartnerFragment + | TransactionPartnerTelegramAds + | TransactionPartnerTelegramApi + | TransactionPartnerOther +) diff --git a/aiogram/types/transaction_partner_user.py b/aiogram/types/transaction_partner_user.py index 4489dc11..482cf481 100644 --- a/aiogram/types/transaction_partner_user.py +++ b/aiogram/types/transaction_partner_user.py @@ -1,11 +1,14 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, Optional +from typing import TYPE_CHECKING, Any, Literal from ..enums import TransactionPartnerType from .transaction_partner import TransactionPartner if TYPE_CHECKING: + from .affiliate_info import AffiliateInfo + from .gift import Gift + from .paid_media_union import PaidMediaUnion from .user import User @@ -18,10 +21,24 @@ class TransactionPartnerUser(TransactionPartner): type: Literal[TransactionPartnerType.USER] = TransactionPartnerType.USER """Type of the transaction partner, always 'user'""" + transaction_type: str + """Type of the transaction, currently one of 'invoice_payment' for payments via invoices, 'paid_media_payment' for payments for paid media, 'gift_purchase' for gifts sent by the bot, 'premium_purchase' for Telegram Premium subscriptions gifted by the bot, 'business_account_transfer' for direct transfers from managed business accounts""" user: User """Information about the user""" - invoice_payload: Optional[str] = None - """*Optional*. Bot-specified invoice payload""" + affiliate: AffiliateInfo | None = None + """*Optional*. Information about the affiliate that received a commission via this transaction. Can be available only for 'invoice_payment' and 'paid_media_payment' transactions.""" + invoice_payload: str | None = None + """*Optional*. Bot-specified invoice payload. Can be available only for 'invoice_payment' transactions.""" + subscription_period: int | None = None + """*Optional*. The duration of the paid subscription. Can be available only for 'invoice_payment' transactions.""" + paid_media: list[PaidMediaUnion] | None = None + """*Optional*. Information about the paid media bought by the user; for 'paid_media_payment' transactions only""" + paid_media_payload: str | None = None + """*Optional*. Bot-specified paid media payload. Can be available only for 'paid_media_payment' transactions.""" + gift: Gift | None = None + """*Optional*. The gift sent to the user by the bot; for 'gift_purchase' transactions only""" + premium_subscription_duration: int | None = None + """*Optional*. Number of months the gifted Telegram Premium subscription will be active for; for 'premium_purchase' transactions only""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -31,8 +48,15 @@ class TransactionPartnerUser(TransactionPartner): __pydantic__self__, *, type: Literal[TransactionPartnerType.USER] = TransactionPartnerType.USER, + transaction_type: str, user: User, - invoice_payload: Optional[str] = None, + affiliate: AffiliateInfo | None = None, + invoice_payload: str | None = None, + subscription_period: int | None = None, + paid_media: list[PaidMediaUnion] | None = None, + paid_media_payload: str | None = None, + gift: Gift | None = None, + premium_subscription_duration: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -40,5 +64,15 @@ class TransactionPartnerUser(TransactionPartner): # Is needed only for type checking and IDE support without any additional plugins super().__init__( - type=type, user=user, invoice_payload=invoice_payload, **__pydantic_kwargs + type=type, + transaction_type=transaction_type, + user=user, + affiliate=affiliate, + invoice_payload=invoice_payload, + subscription_period=subscription_period, + paid_media=paid_media, + paid_media_payload=paid_media_payload, + gift=gift, + premium_subscription_duration=premium_subscription_duration, + **__pydantic_kwargs, ) diff --git a/aiogram/types/unique_gift.py b/aiogram/types/unique_gift.py new file mode 100644 index 00000000..1b23337c --- /dev/null +++ b/aiogram/types/unique_gift.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .chat import Chat + from .unique_gift_backdrop import UniqueGiftBackdrop + from .unique_gift_colors import UniqueGiftColors + from .unique_gift_model import UniqueGiftModel + from .unique_gift_symbol import UniqueGiftSymbol + + +class UniqueGift(TelegramObject): + """ + This object describes a unique gift that was upgraded from a regular gift. + + Source: https://core.telegram.org/bots/api#uniquegift + """ + + gift_id: str + """Identifier of the regular gift from which the gift was upgraded""" + base_name: str + """Human-readable name of the regular gift from which this unique gift was upgraded""" + name: str + """Unique name of the gift. This name can be used in :code:`https://t.me/nft/...` links and story areas""" + number: int + """Unique number of the upgraded gift among gifts upgraded from the same regular gift""" + model: UniqueGiftModel + """Model of the gift""" + symbol: UniqueGiftSymbol + """Symbol of the gift""" + backdrop: UniqueGiftBackdrop + """Backdrop of the gift""" + is_premium: bool | None = None + """*Optional*. :code:`True`, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers""" + is_burned: bool | None = None + """*Optional*. :code:`True`, if the gift was used to craft another gift and isn't available anymore""" + is_from_blockchain: bool | None = None + """*Optional*. :code:`True`, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram""" + colors: UniqueGiftColors | None = None + """*Optional*. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only""" + publisher_chat: Chat | None = None + """*Optional*. Information about the chat that published the gift""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + gift_id: str, + base_name: str, + name: str, + number: int, + model: UniqueGiftModel, + symbol: UniqueGiftSymbol, + backdrop: UniqueGiftBackdrop, + is_premium: bool | None = None, + is_burned: bool | None = None, + is_from_blockchain: bool | None = None, + colors: UniqueGiftColors | None = None, + publisher_chat: Chat | None = 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__( + gift_id=gift_id, + base_name=base_name, + name=name, + number=number, + model=model, + symbol=symbol, + backdrop=backdrop, + is_premium=is_premium, + is_burned=is_burned, + is_from_blockchain=is_from_blockchain, + colors=colors, + publisher_chat=publisher_chat, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/unique_gift_backdrop.py b/aiogram/types/unique_gift_backdrop.py new file mode 100644 index 00000000..730a0fe3 --- /dev/null +++ b/aiogram/types/unique_gift_backdrop.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .unique_gift_backdrop_colors import UniqueGiftBackdropColors + + +class UniqueGiftBackdrop(TelegramObject): + """ + This object describes the backdrop of a unique gift. + + Source: https://core.telegram.org/bots/api#uniquegiftbackdrop + """ + + name: str + """Name of the backdrop""" + colors: UniqueGiftBackdropColors + """Colors of the backdrop""" + rarity_per_mille: int + """The number of unique gifts that receive this backdrop for every 1000 gifts upgraded""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str, + colors: UniqueGiftBackdropColors, + rarity_per_mille: 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__( + name=name, colors=colors, rarity_per_mille=rarity_per_mille, **__pydantic_kwargs + ) diff --git a/aiogram/types/unique_gift_backdrop_colors.py b/aiogram/types/unique_gift_backdrop_colors.py new file mode 100644 index 00000000..7d37cf87 --- /dev/null +++ b/aiogram/types/unique_gift_backdrop_colors.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class UniqueGiftBackdropColors(TelegramObject): + """ + This object describes the colors of the backdrop of a unique gift. + + Source: https://core.telegram.org/bots/api#uniquegiftbackdropcolors + """ + + center_color: int + """The color in the center of the backdrop in RGB format""" + edge_color: int + """The color on the edges of the backdrop in RGB format""" + symbol_color: int + """The color to be applied to the symbol in RGB format""" + text_color: int + """The color for the text on the backdrop in RGB format""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + center_color: int, + edge_color: int, + symbol_color: int, + text_color: int, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + center_color=center_color, + edge_color=edge_color, + symbol_color=symbol_color, + text_color=text_color, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/unique_gift_colors.py b/aiogram/types/unique_gift_colors.py new file mode 100644 index 00000000..1d78e6e7 --- /dev/null +++ b/aiogram/types/unique_gift_colors.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class UniqueGiftColors(TelegramObject): + """ + This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift. + + Source: https://core.telegram.org/bots/api#uniquegiftcolors + """ + + model_custom_emoji_id: str + """Custom emoji identifier of the unique gift's model""" + symbol_custom_emoji_id: str + """Custom emoji identifier of the unique gift's symbol""" + light_theme_main_color: int + """Main color used in light themes; RGB format""" + light_theme_other_colors: list[int] + """List of 1-3 additional colors used in light themes; RGB format""" + dark_theme_main_color: int + """Main color used in dark themes; RGB format""" + dark_theme_other_colors: list[int] + """List of 1-3 additional colors used in dark themes; RGB format""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + model_custom_emoji_id: str, + symbol_custom_emoji_id: str, + light_theme_main_color: int, + light_theme_other_colors: list[int], + dark_theme_main_color: int, + dark_theme_other_colors: list[int], + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + model_custom_emoji_id=model_custom_emoji_id, + symbol_custom_emoji_id=symbol_custom_emoji_id, + light_theme_main_color=light_theme_main_color, + light_theme_other_colors=light_theme_other_colors, + dark_theme_main_color=dark_theme_main_color, + dark_theme_other_colors=dark_theme_other_colors, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/unique_gift_info.py b/aiogram/types/unique_gift_info.py new file mode 100644 index 00000000..0897c1be --- /dev/null +++ b/aiogram/types/unique_gift_info.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from pydantic import Field + +from .base import TelegramObject +from .custom import DateTime + +if TYPE_CHECKING: + from .unique_gift import UniqueGift + + +class UniqueGiftInfo(TelegramObject): + """ + Describes a service message about a unique gift that was sent or received. + + Source: https://core.telegram.org/bots/api#uniquegiftinfo + """ + + gift: UniqueGift + """Information about the gift""" + origin: str + """Origin of the gift. Currently, either 'upgrade' for gifts upgraded from regular gifts, 'transfer' for gifts transferred from other users or channels, 'resale' for gifts bought from other users, 'gifted_upgrade' for upgrades purchased after the gift was sent, or 'offer' for gifts bought or sold through gift purchase offers""" + last_resale_currency: str | None = None + """*Optional*. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of 'XTR' for Telegram Stars or 'TON' for toncoins.""" + last_resale_amount: int | None = None + """*Optional*. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins""" + owned_gift_id: str | None = None + """*Optional*. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts""" + transfer_star_count: int | None = None + """*Optional*. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift""" + next_transfer_date: DateTime | None = None + """*Optional*. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now""" + last_resale_star_count: int | None = Field(None, json_schema_extra={"deprecated": True}) + """*Optional*. For gifts bought from other users, the price paid for the gift + +.. deprecated:: API:9.3 + https://core.telegram.org/bots/api-changelog#december-31-2025""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + gift: UniqueGift, + origin: str, + last_resale_currency: str | None = None, + last_resale_amount: int | None = None, + owned_gift_id: str | None = None, + transfer_star_count: int | None = None, + next_transfer_date: DateTime | None = None, + last_resale_star_count: int | None = 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__( + gift=gift, + origin=origin, + last_resale_currency=last_resale_currency, + last_resale_amount=last_resale_amount, + owned_gift_id=owned_gift_id, + transfer_star_count=transfer_star_count, + next_transfer_date=next_transfer_date, + last_resale_star_count=last_resale_star_count, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/unique_gift_model.py b/aiogram/types/unique_gift_model.py new file mode 100644 index 00000000..17faedfd --- /dev/null +++ b/aiogram/types/unique_gift_model.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .sticker import Sticker + + +class UniqueGiftModel(TelegramObject): + """ + This object describes the model of a unique gift. + + Source: https://core.telegram.org/bots/api#uniquegiftmodel + """ + + name: str + """Name of the model""" + sticker: Sticker + """The sticker that represents the unique gift""" + rarity_per_mille: int + """The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0 for crafted gifts.""" + rarity: str | None = None + """*Optional*. Rarity of the model if it is a crafted model. Currently, can be 'uncommon', 'rare', 'epic', or 'legendary'.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str, + sticker: Sticker, + rarity_per_mille: int, + rarity: str | None = 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__( + name=name, + sticker=sticker, + rarity_per_mille=rarity_per_mille, + rarity=rarity, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/unique_gift_symbol.py b/aiogram/types/unique_gift_symbol.py new file mode 100644 index 00000000..32f20ab3 --- /dev/null +++ b/aiogram/types/unique_gift_symbol.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .sticker import Sticker + + +class UniqueGiftSymbol(TelegramObject): + """ + This object describes the symbol shown on the pattern of a unique gift. + + Source: https://core.telegram.org/bots/api#uniquegiftsymbol + """ + + name: str + """Name of the symbol""" + sticker: Sticker + """The sticker that represents the unique gift""" + rarity_per_mille: int + """The number of unique gifts that receive this model for every 1000 gifts upgraded""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + name: str, + sticker: Sticker, + rarity_per_mille: 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__( + name=name, sticker=sticker, rarity_per_mille=rarity_per_mille, **__pydantic_kwargs + ) diff --git a/aiogram/types/update.py b/aiogram/types/update.py index 0533996d..cf13b22a 100644 --- a/aiogram/types/update.py +++ b/aiogram/types/update.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional, cast +from typing import TYPE_CHECKING, Any, cast from ..utils.mypy_hacks import lru_cache from .base import TelegramObject @@ -15,9 +15,11 @@ if TYPE_CHECKING: from .chat_member_updated import ChatMemberUpdated from .chosen_inline_result import ChosenInlineResult from .inline_query import InlineQuery + from .managed_bot_updated import ManagedBotUpdated from .message import Message from .message_reaction_count_updated import MessageReactionCountUpdated from .message_reaction_updated import MessageReactionUpdated + from .paid_media_purchased import PaidMediaPurchased from .poll import Poll from .poll_answer import PollAnswer from .pre_checkout_query import PreCheckoutQuery @@ -35,50 +37,54 @@ class Update(TelegramObject): update_id: int """The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using `webhooks `_, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.""" - message: Optional[Message] = None + message: Message | None = None """*Optional*. New incoming message of any kind - text, photo, sticker, etc.""" - edited_message: Optional[Message] = None + edited_message: Message | None = None """*Optional*. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.""" - channel_post: Optional[Message] = None + channel_post: Message | None = None """*Optional*. New incoming channel post of any kind - text, photo, sticker, etc.""" - edited_channel_post: Optional[Message] = None + edited_channel_post: Message | None = None """*Optional*. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.""" - business_connection: Optional[BusinessConnection] = None + business_connection: BusinessConnection | None = None """*Optional*. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot""" - business_message: Optional[Message] = None + business_message: Message | None = None """*Optional*. New message from a connected business account""" - edited_business_message: Optional[Message] = None + edited_business_message: Message | None = None """*Optional*. New version of a message from a connected business account""" - deleted_business_messages: Optional[BusinessMessagesDeleted] = None + deleted_business_messages: BusinessMessagesDeleted | None = None """*Optional*. Messages were deleted from a connected business account""" - message_reaction: Optional[MessageReactionUpdated] = None + message_reaction: MessageReactionUpdated | None = None """*Optional*. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify :code:`"message_reaction"` in the list of *allowed_updates* to receive these updates. The update isn't received for reactions set by bots.""" - message_reaction_count: Optional[MessageReactionCountUpdated] = None + message_reaction_count: MessageReactionCountUpdated | None = None """*Optional*. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify :code:`"message_reaction_count"` in the list of *allowed_updates* to receive these updates. The updates are grouped and can be sent with delay up to a few minutes.""" - inline_query: Optional[InlineQuery] = None + inline_query: InlineQuery | None = None """*Optional*. New incoming `inline `_ query""" - chosen_inline_result: Optional[ChosenInlineResult] = None + chosen_inline_result: ChosenInlineResult | None = None """*Optional*. The result of an `inline `_ query that was chosen by a user and sent to their chat partner. Please see our documentation on the `feedback collecting `_ for details on how to enable these updates for your bot.""" - callback_query: Optional[CallbackQuery] = None + callback_query: CallbackQuery | None = None """*Optional*. New incoming callback query""" - shipping_query: Optional[ShippingQuery] = None + shipping_query: ShippingQuery | None = None """*Optional*. New incoming shipping query. Only for invoices with flexible price""" - pre_checkout_query: Optional[PreCheckoutQuery] = None + pre_checkout_query: PreCheckoutQuery | None = None """*Optional*. New incoming pre-checkout query. Contains full information about checkout""" - poll: Optional[Poll] = None + purchased_paid_media: PaidMediaPurchased | None = None + """*Optional*. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat""" + poll: Poll | None = None """*Optional*. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot""" - poll_answer: Optional[PollAnswer] = None + poll_answer: PollAnswer | None = None """*Optional*. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.""" - my_chat_member: Optional[ChatMemberUpdated] = None + my_chat_member: ChatMemberUpdated | None = None """*Optional*. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.""" - chat_member: Optional[ChatMemberUpdated] = None + chat_member: ChatMemberUpdated | None = None """*Optional*. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify :code:`"chat_member"` in the list of *allowed_updates* to receive these updates.""" - chat_join_request: Optional[ChatJoinRequest] = None + chat_join_request: ChatJoinRequest | None = None """*Optional*. A request to join the chat has been sent. The bot must have the *can_invite_users* administrator right in the chat to receive these updates.""" - chat_boost: Optional[ChatBoostUpdated] = None + chat_boost: ChatBoostUpdated | None = None """*Optional*. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.""" - removed_chat_boost: Optional[ChatBoostRemoved] = None + removed_chat_boost: ChatBoostRemoved | None = None """*Optional*. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.""" + managed_bot: ManagedBotUpdated | None = None + """*Optional*. A new bot was created to be managed by the bot or token of a bot was changed""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -88,28 +94,30 @@ class Update(TelegramObject): __pydantic__self__, *, update_id: int, - message: Optional[Message] = None, - edited_message: Optional[Message] = None, - channel_post: Optional[Message] = None, - edited_channel_post: Optional[Message] = None, - business_connection: Optional[BusinessConnection] = None, - business_message: Optional[Message] = None, - edited_business_message: Optional[Message] = None, - deleted_business_messages: Optional[BusinessMessagesDeleted] = None, - message_reaction: Optional[MessageReactionUpdated] = None, - message_reaction_count: Optional[MessageReactionCountUpdated] = None, - inline_query: Optional[InlineQuery] = None, - chosen_inline_result: Optional[ChosenInlineResult] = None, - callback_query: Optional[CallbackQuery] = None, - shipping_query: Optional[ShippingQuery] = None, - pre_checkout_query: Optional[PreCheckoutQuery] = None, - poll: Optional[Poll] = None, - poll_answer: Optional[PollAnswer] = None, - my_chat_member: Optional[ChatMemberUpdated] = None, - chat_member: Optional[ChatMemberUpdated] = None, - chat_join_request: Optional[ChatJoinRequest] = None, - chat_boost: Optional[ChatBoostUpdated] = None, - removed_chat_boost: Optional[ChatBoostRemoved] = None, + message: Message | None = None, + edited_message: Message | None = None, + channel_post: Message | None = None, + edited_channel_post: Message | None = None, + business_connection: BusinessConnection | None = None, + business_message: Message | None = None, + edited_business_message: Message | None = None, + deleted_business_messages: BusinessMessagesDeleted | None = None, + message_reaction: MessageReactionUpdated | None = None, + message_reaction_count: MessageReactionCountUpdated | None = None, + inline_query: InlineQuery | None = None, + chosen_inline_result: ChosenInlineResult | None = None, + callback_query: CallbackQuery | None = None, + shipping_query: ShippingQuery | None = None, + pre_checkout_query: PreCheckoutQuery | None = None, + purchased_paid_media: PaidMediaPurchased | None = None, + poll: Poll | None = None, + poll_answer: PollAnswer | None = None, + my_chat_member: ChatMemberUpdated | None = None, + chat_member: ChatMemberUpdated | None = None, + chat_join_request: ChatJoinRequest | None = None, + chat_boost: ChatBoostUpdated | None = None, + removed_chat_boost: ChatBoostRemoved | None = None, + managed_bot: ManagedBotUpdated | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -133,6 +141,7 @@ class Update(TelegramObject): callback_query=callback_query, shipping_query=shipping_query, pre_checkout_query=pre_checkout_query, + purchased_paid_media=purchased_paid_media, poll=poll, poll_answer=poll_answer, my_chat_member=my_chat_member, @@ -140,6 +149,7 @@ class Update(TelegramObject): chat_join_request=chat_join_request, chat_boost=chat_boost, removed_chat_boost=removed_chat_boost, + managed_bot=managed_bot, **__pydantic_kwargs, ) @@ -199,6 +209,10 @@ class Update(TelegramObject): return "edited_business_message" if self.business_message: return "business_message" + if self.purchased_paid_media: + return "purchased_paid_media" + if self.managed_bot: + return "managed_bot" raise UpdateTypeLookupError("Update does not contain any known event type.") diff --git a/aiogram/types/user.py b/aiogram/types/user.py index 7236effc..3722a56f 100644 --- a/aiogram/types/user.py +++ b/aiogram/types/user.py @@ -1,13 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from ..utils import markdown from ..utils.link import create_tg_link from .base import TelegramObject if TYPE_CHECKING: - from ..methods import GetUserProfilePhotos + from ..methods import GetUserProfileAudios, GetUserProfilePhotos class User(TelegramObject): @@ -23,24 +23,32 @@ class User(TelegramObject): """:code:`True`, if this user is a bot""" first_name: str """User's or bot's first name""" - last_name: Optional[str] = None + last_name: str | None = None """*Optional*. User's or bot's last name""" - username: Optional[str] = None + username: str | None = None """*Optional*. User's or bot's username""" - language_code: Optional[str] = None + language_code: str | None = None """*Optional*. `IETF language tag `_ of the user's language""" - is_premium: Optional[bool] = None + is_premium: bool | None = None """*Optional*. :code:`True`, if this user is a Telegram Premium user""" - added_to_attachment_menu: Optional[bool] = None + added_to_attachment_menu: bool | None = None """*Optional*. :code:`True`, if this user added the bot to the attachment menu""" - can_join_groups: Optional[bool] = None + can_join_groups: bool | None = None """*Optional*. :code:`True`, if the bot can be invited to groups. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" - can_read_all_group_messages: Optional[bool] = None + can_read_all_group_messages: bool | None = None """*Optional*. :code:`True`, if `privacy mode `_ is disabled for the bot. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" - supports_inline_queries: Optional[bool] = None + supports_inline_queries: bool | None = None """*Optional*. :code:`True`, if the bot supports inline queries. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" - can_connect_to_business: Optional[bool] = None + can_connect_to_business: bool | None = None """*Optional*. :code:`True`, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" + has_main_web_app: bool | None = None + """*Optional*. :code:`True`, if the bot has a main Web App. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" + has_topics_enabled: bool | None = None + """*Optional*. :code:`True`, if the bot has forum topic mode enabled in private chats. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" + allows_users_to_create_topics: bool | None = None + """*Optional*. :code:`True`, if the bot allows users to create and delete topics in private chats. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" + can_manage_bots: bool | None = None + """*Optional*. :code:`True`, if other bots can be created to be controlled by the bot. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -52,15 +60,19 @@ class User(TelegramObject): id: int, is_bot: bool, first_name: str, - last_name: Optional[str] = None, - username: Optional[str] = None, - language_code: Optional[str] = None, - is_premium: Optional[bool] = None, - added_to_attachment_menu: Optional[bool] = None, - can_join_groups: Optional[bool] = None, - can_read_all_group_messages: Optional[bool] = None, - supports_inline_queries: Optional[bool] = None, - can_connect_to_business: Optional[bool] = None, + last_name: str | None = None, + username: str | None = None, + language_code: str | None = None, + is_premium: bool | None = None, + added_to_attachment_menu: bool | None = None, + can_join_groups: bool | None = None, + can_read_all_group_messages: bool | None = None, + supports_inline_queries: bool | None = None, + can_connect_to_business: bool | None = None, + has_main_web_app: bool | None = None, + has_topics_enabled: bool | None = None, + allows_users_to_create_topics: bool | None = None, + can_manage_bots: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -80,6 +92,10 @@ class User(TelegramObject): can_read_all_group_messages=can_read_all_group_messages, supports_inline_queries=supports_inline_queries, can_connect_to_business=can_connect_to_business, + has_main_web_app=has_main_web_app, + has_topics_enabled=has_topics_enabled, + allows_users_to_create_topics=allows_users_to_create_topics, + can_manage_bots=can_manage_bots, **__pydantic_kwargs, ) @@ -93,20 +109,20 @@ class User(TelegramObject): def url(self) -> str: return create_tg_link("user", id=self.id) - def mention_markdown(self, name: Optional[str] = None) -> str: + def mention_markdown(self, name: str | None = None) -> str: if name is None: name = self.full_name return markdown.link(name, self.url) - def mention_html(self, name: Optional[str] = None) -> str: + def mention_html(self, name: str | None = None) -> str: if name is None: name = self.full_name return markdown.hlink(name, self.url) def get_profile_photos( self, - offset: Optional[int] = None, - limit: Optional[int] = None, + offset: int | None = None, + limit: int | None = None, **kwargs: Any, ) -> GetUserProfilePhotos: """ @@ -134,3 +150,35 @@ class User(TelegramObject): limit=limit, **kwargs, ).as_(self._bot) + + def get_profile_audios( + self, + offset: int | None = None, + limit: int | None = None, + **kwargs: Any, + ) -> GetUserProfileAudios: + """ + Shortcut for method :class:`aiogram.methods.get_user_profile_audios.GetUserProfileAudios` + will automatically fill method attributes: + + - :code:`user_id` + + Use this method to get a list of profile audios for a user. Returns a :class:`aiogram.types.user_profile_audios.UserProfileAudios` object. + + Source: https://core.telegram.org/bots/api#getuserprofileaudios + + :param offset: Sequential number of the first audio to be returned. By default, all audios are returned. + :param limit: Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100. + :return: instance of method :class:`aiogram.methods.get_user_profile_audios.GetUserProfileAudios` + """ + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + + from aiogram.methods import GetUserProfileAudios + + return GetUserProfileAudios( + user_id=self.id, + offset=offset, + limit=limit, + **kwargs, + ).as_(self._bot) diff --git a/aiogram/types/user_chat_boosts.py b/aiogram/types/user_chat_boosts.py index 3da8d370..5182ba34 100644 --- a/aiogram/types/user_chat_boosts.py +++ b/aiogram/types/user_chat_boosts.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -15,7 +15,7 @@ class UserChatBoosts(TelegramObject): Source: https://core.telegram.org/bots/api#userchatboosts """ - boosts: List[ChatBoost] + boosts: list[ChatBoost] """The list of boosts added to the chat by the user""" if TYPE_CHECKING: @@ -23,7 +23,7 @@ class UserChatBoosts(TelegramObject): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, boosts: List[ChatBoost], **__pydantic_kwargs: Any + __pydantic__self__, *, boosts: list[ChatBoost], **__pydantic_kwargs: Any ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/types/user_profile_audios.py b/aiogram/types/user_profile_audios.py new file mode 100644 index 00000000..a8f7eb9a --- /dev/null +++ b/aiogram/types/user_profile_audios.py @@ -0,0 +1,34 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + +if TYPE_CHECKING: + from .audio import Audio + + +class UserProfileAudios(TelegramObject): + """ + This object represents the audios displayed on a user's profile. + + Source: https://core.telegram.org/bots/api#userprofileaudios + """ + + total_count: int + """Total number of profile audios for the target user""" + audios: list[Audio] + """Requested profile audios""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, *, total_count: int, audios: list[Audio], **__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__(total_count=total_count, audios=audios, **__pydantic_kwargs) diff --git a/aiogram/types/user_profile_photos.py b/aiogram/types/user_profile_photos.py index c1c5d28d..004bfeb9 100644 --- a/aiogram/types/user_profile_photos.py +++ b/aiogram/types/user_profile_photos.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -17,7 +17,7 @@ class UserProfilePhotos(TelegramObject): total_count: int """Total number of profile pictures the target user has""" - photos: List[List[PhotoSize]] + photos: list[list[PhotoSize]] """Requested profile pictures (in up to 4 sizes each)""" if TYPE_CHECKING: @@ -28,7 +28,7 @@ class UserProfilePhotos(TelegramObject): __pydantic__self__, *, total_count: int, - photos: List[List[PhotoSize]], + photos: list[list[PhotoSize]], **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/user_rating.py b/aiogram/types/user_rating.py new file mode 100644 index 00000000..d16cbc52 --- /dev/null +++ b/aiogram/types/user_rating.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class UserRating(TelegramObject): + """ + This object describes the rating of a user based on their Telegram Star spendings. + + Source: https://core.telegram.org/bots/api#userrating + """ + + level: int + """Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.""" + rating: int + """Numerical value of the user's rating; the higher the rating, the better""" + current_level_rating: int + """The rating value required to get the current level""" + next_level_rating: int | None = None + """*Optional*. The rating value required to get to the next level; omitted if the maximum level was reached""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + level: int, + rating: int, + current_level_rating: int, + next_level_rating: int | None = None, + **__pydantic_kwargs: Any, + ) -> None: + # DO NOT EDIT MANUALLY!!! + # This method was auto-generated via `butcher` + # Is needed only for type checking and IDE support without any additional plugins + + super().__init__( + level=level, + rating=rating, + current_level_rating=current_level_rating, + next_level_rating=next_level_rating, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/users_shared.py b/aiogram/types/users_shared.py index 351fc0e2..8228a9b9 100644 --- a/aiogram/types/users_shared.py +++ b/aiogram/types/users_shared.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from pydantic import Field @@ -19,9 +19,9 @@ class UsersShared(TelegramObject): request_id: int """Identifier of the request""" - users: List[SharedUser] + users: list[SharedUser] """Information about users shared with the bot.""" - user_ids: Optional[List[int]] = Field(None, json_schema_extra={"deprecated": True}) + user_ids: list[int] | None = Field(None, json_schema_extra={"deprecated": True}) """Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means. .. deprecated:: API:7.2 @@ -35,8 +35,8 @@ class UsersShared(TelegramObject): __pydantic__self__, *, request_id: int, - users: List[SharedUser], - user_ids: Optional[List[int]] = None, + users: list[SharedUser], + user_ids: list[int] | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/venue.py b/aiogram/types/venue.py index e0a3f848..108e80a4 100644 --- a/aiogram/types/venue.py +++ b/aiogram/types/venue.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -21,13 +21,13 @@ class Venue(TelegramObject): """Name of the venue""" address: str """Address of the venue""" - foursquare_id: Optional[str] = None + foursquare_id: str | None = None """*Optional*. Foursquare identifier of the venue""" - foursquare_type: Optional[str] = None + foursquare_type: str | None = None """*Optional*. Foursquare type of the venue. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)""" - google_place_id: Optional[str] = None + google_place_id: str | None = None """*Optional*. Google Places identifier of the venue""" - google_place_type: Optional[str] = None + google_place_type: str | None = None """*Optional*. Google Places type of the venue. (See `supported types `_.)""" if TYPE_CHECKING: @@ -40,10 +40,10 @@ class Venue(TelegramObject): location: Location, title: str, address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, + foursquare_id: str | None = None, + foursquare_type: str | None = None, + google_place_id: str | None = None, + google_place_type: str | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/video.py b/aiogram/types/video.py index e8ecf1f4..1674f6c2 100644 --- a/aiogram/types/video.py +++ b/aiogram/types/video.py @@ -1,11 +1,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +import datetime +from typing import TYPE_CHECKING, Any from .base import TelegramObject if TYPE_CHECKING: from .photo_size import PhotoSize + from .video_quality import VideoQuality class Video(TelegramObject): @@ -25,13 +27,19 @@ class Video(TelegramObject): """Video height as defined by the sender""" duration: int """Duration of the video in seconds as defined by the sender""" - thumbnail: Optional[PhotoSize] = None + thumbnail: PhotoSize | None = None """*Optional*. Video thumbnail""" - file_name: Optional[str] = None + cover: list[PhotoSize] | None = None + """*Optional*. Available sizes of the cover of the video in the message""" + start_timestamp: datetime.datetime | None = None + """*Optional*. Timestamp in seconds from which the video will play in the message""" + qualities: list[VideoQuality] | None = None + """*Optional*. List of available qualities of the video""" + file_name: str | None = None """*Optional*. Original filename as defined by the sender""" - mime_type: Optional[str] = None + mime_type: str | None = None """*Optional*. MIME type of the file as defined by the sender""" - file_size: Optional[int] = None + file_size: int | None = None """*Optional*. File size in bytes. It can be bigger than 2^31 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 value.""" if TYPE_CHECKING: @@ -46,10 +54,13 @@ class Video(TelegramObject): width: int, height: int, duration: int, - thumbnail: Optional[PhotoSize] = None, - file_name: Optional[str] = None, - mime_type: Optional[str] = None, - file_size: Optional[int] = None, + thumbnail: PhotoSize | None = None, + cover: list[PhotoSize] | None = None, + start_timestamp: datetime.datetime | None = None, + qualities: list[VideoQuality] | None = None, + file_name: str | None = None, + mime_type: str | None = None, + file_size: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! @@ -63,6 +74,9 @@ class Video(TelegramObject): height=height, duration=duration, thumbnail=thumbnail, + cover=cover, + start_timestamp=start_timestamp, + qualities=qualities, file_name=file_name, mime_type=mime_type, file_size=file_size, diff --git a/aiogram/types/video_chat_participants_invited.py b/aiogram/types/video_chat_participants_invited.py index 74e1a357..31c0d77a 100644 --- a/aiogram/types/video_chat_participants_invited.py +++ b/aiogram/types/video_chat_participants_invited.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -15,14 +15,14 @@ class VideoChatParticipantsInvited(TelegramObject): Source: https://core.telegram.org/bots/api#videochatparticipantsinvited """ - users: List[User] + users: list[User] """New members that were invited to the video chat""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! # This section was auto-generated via `butcher` - def __init__(__pydantic__self__, *, users: List[User], **__pydantic_kwargs: Any) -> None: + def __init__(__pydantic__self__, *, users: list[User], **__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 diff --git a/aiogram/types/video_note.py b/aiogram/types/video_note.py index 5be85028..223458c2 100644 --- a/aiogram/types/video_note.py +++ b/aiogram/types/video_note.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -23,9 +23,9 @@ class VideoNote(TelegramObject): """Video width and height (diameter of the video message) as defined by the sender""" duration: int """Duration of the video in seconds as defined by the sender""" - thumbnail: Optional[PhotoSize] = None + thumbnail: PhotoSize | None = None """*Optional*. Video thumbnail""" - file_size: Optional[int] = None + file_size: int | None = None """*Optional*. File size in bytes""" if TYPE_CHECKING: @@ -39,8 +39,8 @@ class VideoNote(TelegramObject): file_unique_id: str, length: int, duration: int, - thumbnail: Optional[PhotoSize] = None, - file_size: Optional[int] = None, + thumbnail: PhotoSize | None = None, + file_size: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/video_quality.py b/aiogram/types/video_quality.py new file mode 100644 index 00000000..9b17e79c --- /dev/null +++ b/aiogram/types/video_quality.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from .base import TelegramObject + + +class VideoQuality(TelegramObject): + """ + This object represents a video file of a specific quality. + + Source: https://core.telegram.org/bots/api#videoquality + """ + + file_id: str + """Identifier for this file, which can be used to download or reuse the file""" + file_unique_id: str + """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" + width: int + """Video width""" + height: int + """Video height""" + codec: str + """Codec that was used to encode the video, for example, 'h264', 'h265', or 'av01'""" + file_size: int | None = None + """*Optional*. File size in bytes. It can be bigger than 2^31 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 value.""" + + if TYPE_CHECKING: + # DO NOT EDIT MANUALLY!!! + # This section was auto-generated via `butcher` + + def __init__( + __pydantic__self__, + *, + file_id: str, + file_unique_id: str, + width: int, + height: int, + codec: str, + file_size: int | None = 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__( + file_id=file_id, + file_unique_id=file_unique_id, + width=width, + height=height, + codec=codec, + file_size=file_size, + **__pydantic_kwargs, + ) diff --git a/aiogram/types/voice.py b/aiogram/types/voice.py index d5e0abcd..1fdcf1dc 100644 --- a/aiogram/types/voice.py +++ b/aiogram/types/voice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject @@ -18,9 +18,9 @@ class Voice(TelegramObject): """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" duration: int """Duration of the audio in seconds as defined by the sender""" - mime_type: Optional[str] = None + mime_type: str | None = None """*Optional*. MIME type of the file as defined by the sender""" - file_size: Optional[int] = None + file_size: int | None = None """*Optional*. File size in bytes. It can be bigger than 2^31 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 value.""" if TYPE_CHECKING: @@ -33,8 +33,8 @@ class Voice(TelegramObject): file_id: str, file_unique_id: str, duration: int, - mime_type: Optional[str] = None, - file_size: Optional[int] = None, + mime_type: str | None = None, + file_size: int | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/webhook_info.py b/aiogram/types/webhook_info.py index 1753df41..c0d2c4e1 100644 --- a/aiogram/types/webhook_info.py +++ b/aiogram/types/webhook_info.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, List, Optional +from typing import TYPE_CHECKING, Any from .base import TelegramObject from .custom import DateTime @@ -19,17 +19,17 @@ class WebhookInfo(TelegramObject): """:code:`True`, if a custom certificate was provided for webhook certificate checks""" pending_update_count: int """Number of updates awaiting delivery""" - ip_address: Optional[str] = None + ip_address: str | None = None """*Optional*. Currently used webhook IP address""" - last_error_date: Optional[DateTime] = None + last_error_date: DateTime | None = None """*Optional*. Unix time for the most recent error that happened when trying to deliver an update via webhook""" - last_error_message: Optional[str] = None + last_error_message: str | None = None """*Optional*. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook""" - last_synchronization_error_date: Optional[DateTime] = None + last_synchronization_error_date: DateTime | None = None """*Optional*. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters""" - max_connections: Optional[int] = None + max_connections: int | None = None """*Optional*. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery""" - allowed_updates: Optional[List[str]] = None + allowed_updates: list[str] | None = None """*Optional*. A list of update types the bot is subscribed to. Defaults to all update types except *chat_member*""" if TYPE_CHECKING: @@ -42,12 +42,12 @@ class WebhookInfo(TelegramObject): url: str, has_custom_certificate: bool, pending_update_count: int, - ip_address: Optional[str] = None, - last_error_date: Optional[DateTime] = None, - last_error_message: Optional[str] = None, - last_synchronization_error_date: Optional[DateTime] = None, - max_connections: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, + ip_address: str | None = None, + last_error_date: DateTime | None = None, + last_error_message: str | None = None, + last_synchronization_error_date: DateTime | None = None, + max_connections: int | None = None, + allowed_updates: list[str] | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/types/write_access_allowed.py b/aiogram/types/write_access_allowed.py index 6b8e50a0..77e933f2 100644 --- a/aiogram/types/write_access_allowed.py +++ b/aiogram/types/write_access_allowed.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any from aiogram.types import TelegramObject @@ -10,12 +10,12 @@ class WriteAccessAllowed(TelegramObject): Source: https://core.telegram.org/bots/api#writeaccessallowed """ - from_request: Optional[bool] = None - """*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_""" - web_app_name: Optional[str] = None + from_request: bool | None = None + """*Optional*. :code:`True`, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_""" + web_app_name: str | None = None """*Optional*. Name of the Web App, if the access was granted when the Web App was launched from a link""" - from_attachment_menu: Optional[bool] = None - """*Optional*. True, if the access was granted when the bot was added to the attachment or side menu""" + from_attachment_menu: bool | None = None + """*Optional*. :code:`True`, if the access was granted when the bot was added to the attachment or side menu""" if TYPE_CHECKING: # DO NOT EDIT MANUALLY!!! @@ -24,9 +24,9 @@ class WriteAccessAllowed(TelegramObject): def __init__( __pydantic__self__, *, - from_request: Optional[bool] = None, - web_app_name: Optional[str] = None, - from_attachment_menu: Optional[bool] = None, + from_request: bool | None = None, + web_app_name: str | None = None, + from_attachment_menu: bool | None = None, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! diff --git a/aiogram/utils/auth_widget.py b/aiogram/utils/auth_widget.py index 080183e9..4793f28c 100644 --- a/aiogram/utils/auth_widget.py +++ b/aiogram/utils/auth_widget.py @@ -1,6 +1,6 @@ import hashlib import hmac -from typing import Any, Dict +from typing import Any def check_signature(token: str, hash: str, **kwargs: Any) -> bool: @@ -17,12 +17,14 @@ def check_signature(token: str, hash: str, **kwargs: Any) -> bool: secret = hashlib.sha256(token.encode("utf-8")) check_string = "\n".join(f"{k}={kwargs[k]}" for k in sorted(kwargs)) hmac_string = hmac.new( - secret.digest(), check_string.encode("utf-8"), digestmod=hashlib.sha256 + secret.digest(), + check_string.encode("utf-8"), + digestmod=hashlib.sha256, ).hexdigest() return hmac_string == hash -def check_integrity(token: str, data: Dict[str, Any]) -> bool: +def check_integrity(token: str, data: dict[str, Any]) -> bool: """ Verify the authentication and the integrity of the data received on user's auth diff --git a/aiogram/utils/backoff.py b/aiogram/utils/backoff.py index ebe08e97..5fc1c2d2 100644 --- a/aiogram/utils/backoff.py +++ b/aiogram/utils/backoff.py @@ -13,9 +13,11 @@ class BackoffConfig: def __post_init__(self) -> None: if self.max_delay <= self.min_delay: - raise ValueError("`max_delay` should be greater than `min_delay`") + msg = "`max_delay` should be greater than `min_delay`" + raise ValueError(msg) if self.factor <= 1: - raise ValueError("`factor` should be greater than 1") + msg = "`factor` should be greater than 1" + raise ValueError(msg) class Backoff: diff --git a/aiogram/utils/callback_answer.py b/aiogram/utils/callback_answer.py index 1515a7e6..5cf30598 100644 --- a/aiogram/utils/callback_answer.py +++ b/aiogram/utils/callback_answer.py @@ -1,4 +1,5 @@ -from typing import Any, Awaitable, Callable, Dict, Optional, Union +from collections.abc import Awaitable, Callable +from typing import Any from aiogram import BaseMiddleware, loggers from aiogram.dispatcher.flags import get_flag @@ -12,10 +13,10 @@ class CallbackAnswer: self, answered: bool, disabled: bool = False, - text: Optional[str] = None, - show_alert: Optional[bool] = None, - url: Optional[str] = None, - cache_time: Optional[int] = None, + text: str | None = None, + show_alert: bool | None = None, + url: str | None = None, + cache_time: int | None = None, ) -> None: """ Callback answer configuration @@ -48,7 +49,8 @@ class CallbackAnswer: @disabled.setter def disabled(self, value: bool) -> None: if self._answered: - raise CallbackAnswerException("Can't change disabled state after answer") + msg = "Can't change disabled state after answer" + raise CallbackAnswerException(msg) self._disabled = value @property @@ -59,7 +61,7 @@ class CallbackAnswer: return self._answered @property - def text(self) -> Optional[str]: + def text(self) -> str | None: """ Response text :return: @@ -67,48 +69,52 @@ class CallbackAnswer: return self._text @text.setter - def text(self, value: Optional[str]) -> None: + def text(self, value: str | None) -> None: if self._answered: - raise CallbackAnswerException("Can't change text after answer") + msg = "Can't change text after answer" + raise CallbackAnswerException(msg) self._text = value @property - def show_alert(self) -> Optional[bool]: + def show_alert(self) -> bool | None: """ Whether to display an alert """ return self._show_alert @show_alert.setter - def show_alert(self, value: Optional[bool]) -> None: + def show_alert(self, value: bool | None) -> None: if self._answered: - raise CallbackAnswerException("Can't change show_alert after answer") + msg = "Can't change show_alert after answer" + raise CallbackAnswerException(msg) self._show_alert = value @property - def url(self) -> Optional[str]: + def url(self) -> str | None: """ Game url """ return self._url @url.setter - def url(self, value: Optional[str]) -> None: + def url(self, value: str | None) -> None: if self._answered: - raise CallbackAnswerException("Can't change url after answer") + msg = "Can't change url after answer" + raise CallbackAnswerException(msg) self._url = value @property - def cache_time(self) -> Optional[int]: + def cache_time(self) -> int | None: """ Response cache time """ return self._cache_time @cache_time.setter - def cache_time(self, value: Optional[int]) -> None: + def cache_time(self, value: int | None) -> None: if self._answered: - raise CallbackAnswerException("Can't change cache_time after answer") + msg = "Can't change cache_time after answer" + raise CallbackAnswerException(msg) self._cache_time = value def __str__(self) -> str: @@ -131,10 +137,10 @@ class CallbackAnswerMiddleware(BaseMiddleware): def __init__( self, pre: bool = False, - text: Optional[str] = None, - show_alert: Optional[bool] = None, - url: Optional[str] = None, - cache_time: Optional[int] = None, + text: str | None = None, + show_alert: bool | None = None, + url: str | None = None, + cache_time: int | None = None, ) -> None: """ Inner middleware for callback query handlers, can be useful in bots with a lot of callback @@ -154,15 +160,15 @@ class CallbackAnswerMiddleware(BaseMiddleware): async def __call__( self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], + handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]], event: TelegramObject, - data: Dict[str, Any], + data: dict[str, Any], ) -> Any: if not isinstance(event, CallbackQuery): return await handler(event, data) callback_answer = data["callback_answer"] = self.construct_callback_answer( - properties=get_flag(data, "callback_answer") + properties=get_flag(data, "callback_answer"), ) if not callback_answer.disabled and callback_answer.answered: @@ -174,7 +180,8 @@ class CallbackAnswerMiddleware(BaseMiddleware): await self.answer(event, callback_answer) def construct_callback_answer( - self, properties: Optional[Union[Dict[str, Any], bool]] + self, + properties: dict[str, Any] | bool | None, ) -> CallbackAnswer: pre, disabled, text, show_alert, url, cache_time = ( self.pre, diff --git a/aiogram/utils/chat_action.py b/aiogram/utils/chat_action.py index a2f3b465..fdb55b13 100644 --- a/aiogram/utils/chat_action.py +++ b/aiogram/utils/chat_action.py @@ -2,9 +2,10 @@ import asyncio import logging import time from asyncio import Event, Lock +from collections.abc import Awaitable, Callable from contextlib import suppress from types import TracebackType -from typing import Any, Awaitable, Callable, Dict, Optional, Type, Union +from typing import Any from aiogram import BaseMiddleware, Bot from aiogram.dispatcher.flags import get_flag @@ -32,8 +33,8 @@ class ChatActionSender: self, *, bot: Bot, - chat_id: Union[str, int], - message_thread_id: Optional[int] = None, + chat_id: str | int, + message_thread_id: int | None = None, action: str = "typing", interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, @@ -56,7 +57,7 @@ class ChatActionSender: self._lock = Lock() self._close_event = Event() self._closed_event = Event() - self._task: Optional[asyncio.Task[Any]] = None + self._task: asyncio.Task[Any] | None = None @property def running(self) -> bool: @@ -108,7 +109,8 @@ class ChatActionSender: self._close_event.clear() self._closed_event.clear() if self.running: - raise RuntimeError("Already running") + msg = "Already running" + raise RuntimeError(msg) self._task = asyncio.create_task(self._worker()) async def _stop(self) -> None: @@ -126,18 +128,18 @@ class ChatActionSender: async def __aexit__( self, - exc_type: Optional[Type[BaseException]], - exc_value: Optional[BaseException], - traceback: Optional[TracebackType], + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + traceback: TracebackType | None, ) -> Any: await self._stop() @classmethod def typing( cls, - chat_id: Union[int, str], + chat_id: int | str, bot: Bot, - message_thread_id: Optional[int] = None, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -154,9 +156,9 @@ class ChatActionSender: @classmethod def upload_photo( cls, - chat_id: Union[int, str], + chat_id: int | str, bot: Bot, - message_thread_id: Optional[int] = None, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -173,9 +175,9 @@ class ChatActionSender: @classmethod def record_video( cls, - chat_id: Union[int, str], + chat_id: int | str, bot: Bot, - message_thread_id: Optional[int] = None, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -192,9 +194,9 @@ class ChatActionSender: @classmethod def upload_video( cls, - chat_id: Union[int, str], + chat_id: int | str, bot: Bot, - message_thread_id: Optional[int] = None, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -211,9 +213,9 @@ class ChatActionSender: @classmethod def record_voice( cls, - chat_id: Union[int, str], + chat_id: int | str, bot: Bot, - message_thread_id: Optional[int] = None, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -230,9 +232,9 @@ class ChatActionSender: @classmethod def upload_voice( cls, - chat_id: Union[int, str], + chat_id: int | str, bot: Bot, - message_thread_id: Optional[int] = None, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -249,9 +251,9 @@ class ChatActionSender: @classmethod def upload_document( cls, - chat_id: Union[int, str], + chat_id: int | str, bot: Bot, - message_thread_id: Optional[int] = None, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -268,9 +270,9 @@ class ChatActionSender: @classmethod def choose_sticker( cls, - chat_id: Union[int, str], + chat_id: int | str, bot: Bot, - message_thread_id: Optional[int] = None, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -287,9 +289,9 @@ class ChatActionSender: @classmethod def find_location( cls, - chat_id: Union[int, str], + chat_id: int | str, bot: Bot, - message_thread_id: Optional[int] = None, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -306,9 +308,9 @@ class ChatActionSender: @classmethod def record_video_note( cls, - chat_id: Union[int, str], + chat_id: int | str, bot: Bot, - message_thread_id: Optional[int] = None, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -325,9 +327,9 @@ class ChatActionSender: @classmethod def upload_video_note( cls, - chat_id: Union[int, str], + chat_id: int | str, bot: Bot, - message_thread_id: Optional[int] = None, + message_thread_id: int | None = None, interval: float = DEFAULT_INTERVAL, initial_sleep: float = DEFAULT_INITIAL_SLEEP, ) -> "ChatActionSender": @@ -349,9 +351,9 @@ class ChatActionMiddleware(BaseMiddleware): async def __call__( self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], + handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]], event: TelegramObject, - data: Dict[str, Any], + data: dict[str, Any], ) -> Any: if not isinstance(event, Message): return await handler(event, data) diff --git a/aiogram/utils/chat_member.py b/aiogram/utils/chat_member.py index 7ac666c5..817f1732 100644 --- a/aiogram/utils/chat_member.py +++ b/aiogram/utils/chat_member.py @@ -1,7 +1,6 @@ -from typing import Tuple, Type, Union +from typing import Annotated from pydantic import Field, TypeAdapter -from typing_extensions import Annotated from aiogram.types import ( ChatMember, @@ -13,22 +12,22 @@ from aiogram.types import ( ChatMemberRestricted, ) -ChatMemberUnion = Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, -] +ChatMemberUnion = ( + ChatMemberOwner + | ChatMemberAdministrator + | ChatMemberMember + | ChatMemberRestricted + | ChatMemberLeft + | ChatMemberBanned +) -ChatMemberCollection = Tuple[Type[ChatMember], ...] +ChatMemberCollection = tuple[type[ChatMember], ...] ChatMemberAdapter: TypeAdapter[ChatMemberUnion] = TypeAdapter( Annotated[ ChatMemberUnion, Field(discriminator="status"), - ] + ], ) ADMINS: ChatMemberCollection = (ChatMemberOwner, ChatMemberAdministrator) diff --git a/aiogram/utils/class_attrs_resolver.py b/aiogram/utils/class_attrs_resolver.py new file mode 100644 index 00000000..5ffd624b --- /dev/null +++ b/aiogram/utils/class_attrs_resolver.py @@ -0,0 +1,87 @@ +import inspect +from collections.abc import Generator +from dataclasses import dataclass +from operator import itemgetter +from typing import Any, NamedTuple, Protocol + +from aiogram.utils.dataclass import dataclass_kwargs + + +class ClassAttrsResolver(Protocol): + def __call__(self, cls: type) -> Generator[tuple[str, Any], None, None]: ... + + +def inspect_members_resolver(cls: type) -> Generator[tuple[str, Any], None, None]: + """ + Inspects and resolves attributes of a given class. + + This function uses the `inspect.getmembers` utility to yield all attributes of + a provided class. The output is a generator that produces tuples containing + attribute names and their corresponding values. This function is suitable for + analyzing class attributes dynamically. However, it guarantees alphabetical + order of attributes. + + :param cls: The class for which the attributes will be resolved. + :return: A generator yielding tuples containing attribute names and their values. + """ + yield from inspect.getmembers(cls) + + +def get_reversed_mro_unique_attrs_resolver(cls: type) -> Generator[tuple[str, Any], None, None]: + """ + Resolve and yield attributes from the reversed method resolution order (MRO) of a given class. + + This function iterates through the reversed MRO of a class and yields attributes + that have not yet been encountered. It avoids duplicates by keeping track of + attribute names that have already been processed. + + :param cls: The class for which the attributes will be resolved. + :return: A generator yielding tuples containing attribute names and their values. + """ + known_attrs = set() + for base in reversed(inspect.getmro(cls)): + for name, value in base.__dict__.items(): + if name in known_attrs: + continue + + yield name, value + known_attrs.add(name) + + +class _Position(NamedTuple): + in_mro: int + in_class: int + + +@dataclass(**dataclass_kwargs(slots=True)) +class _AttributeContainer: + position: _Position + value: Any + + def __lt__(self, other: "_AttributeContainer") -> bool: + return self.position < other.position + + +def get_sorted_mro_attrs_resolver(cls: type) -> Generator[tuple[str, Any], None, None]: + """ + Resolve and yield attributes from the method resolution order (MRO) of a given class. + + Iterates through a class's method resolution order (MRO) and collects its attributes + along with their respective positions in the MRO and the class hierarchy. This generator + yields a tuple containing the name of each attribute and its associated value. + + :param cls: The class for which the attributes will be resolved. + :return: A generator yielding tuples containing attribute names and their values. + """ + attributes: dict[str, _AttributeContainer] = {} + for position_in_mro, base in enumerate(inspect.getmro(cls)): + for position_in_class, (name, value) in enumerate(vars(base).items()): + position = _Position(position_in_mro, position_in_class) + if attribute := attributes.get(name): + attribute.position = position + continue + + attributes[name] = _AttributeContainer(value=value, position=position) + + for name, attribute in sorted(attributes.items(), key=itemgetter(1)): + yield name, attribute.value diff --git a/aiogram/utils/dataclass.py b/aiogram/utils/dataclass.py new file mode 100644 index 00000000..28ffc68e --- /dev/null +++ b/aiogram/utils/dataclass.py @@ -0,0 +1,63 @@ +""" +This module contains utility functions for working with dataclasses in Python. + +DO NOT USE THIS MODULE DIRECTLY. IT IS INTENDED FOR INTERNAL USE ONLY. +""" + +import sys +from typing import Any + + +def dataclass_kwargs( + init: bool | None = None, + repr: bool | None = None, + eq: bool | None = None, + order: bool | None = None, + unsafe_hash: bool | None = None, + frozen: bool | None = None, + match_args: bool | None = None, + kw_only: bool | None = None, + slots: bool | None = None, + weakref_slot: bool | None = None, +) -> dict[str, Any]: + """ + Generates a dictionary of keyword arguments that can be passed to a Python + dataclass. This function allows specifying attributes related to the behavior + and configuration of dataclasses, including attributes added in specific + Python versions. This abstraction improves compatibility across different + Python versions by ensuring only the parameters supported by the current + version are included. + + :return: A dictionary containing the specified dataclass configuration that + dynamically adapts to the current Python version. + """ + params = {} + + # All versions + if init is not None: + params["init"] = init + if repr is not None: + params["repr"] = repr + if eq is not None: + params["eq"] = eq + if order is not None: + params["order"] = order + if unsafe_hash is not None: + params["unsafe_hash"] = unsafe_hash + if frozen is not None: + params["frozen"] = frozen + + # Added in 3.10 + if match_args is not None: + params["match_args"] = match_args + if kw_only is not None: + params["kw_only"] = kw_only + if slots is not None: + params["slots"] = slots + + # Added in 3.11 + if sys.version_info >= (3, 11): + if weakref_slot is not None: + params["weakref_slot"] = weakref_slot + + return params diff --git a/aiogram/utils/deep_linking.py b/aiogram/utils/deep_linking.py index 19cc64c6..1de7581e 100644 --- a/aiogram/utils/deep_linking.py +++ b/aiogram/utils/deep_linking.py @@ -1,37 +1,40 @@ from __future__ import annotations __all__ = [ - "create_start_link", - "create_startgroup_link", "create_deep_link", + "create_start_link", + "create_startapp_link", + "create_startgroup_link", "create_telegram_link", - "encode_payload", "decode_payload", + "encode_payload", ] import re -from typing import TYPE_CHECKING, Callable, Literal, Optional, cast +from typing import TYPE_CHECKING, Literal, cast from aiogram.utils.link import create_telegram_link from aiogram.utils.payload import decode_payload, encode_payload if TYPE_CHECKING: + from collections.abc import Callable + from aiogram import Bot -BAD_PATTERN = re.compile(r"[^A-z0-9-]") +BAD_PATTERN = re.compile(r"[^a-zA-Z0-9-_]") +DEEPLINK_PAYLOAD_LENGTH = 64 async def create_start_link( bot: Bot, payload: str, encode: bool = False, - encoder: Optional[Callable[[bytes], bytes]] = None, + encoder: Callable[[bytes], bytes] | None = None, ) -> str: """ Create 'start' deep link with your payload. - If you need to encode payload or pass special characters - - set encode as True + If you need to encode payload or pass special characters - set encode as True :param bot: bot instance :param payload: args passed with /start @@ -53,13 +56,12 @@ async def create_startgroup_link( bot: Bot, payload: str, encode: bool = False, - encoder: Optional[Callable[[bytes], bytes]] = None, + encoder: Callable[[bytes], bytes] | None = None, ) -> str: """ Create 'startgroup' deep link with your payload. - If you need to encode payload or pass special characters - - set encode as True + If you need to encode payload or pass special characters - set encode as True :param bot: bot instance :param payload: args passed with /start @@ -77,19 +79,56 @@ async def create_startgroup_link( ) -def create_deep_link( - username: str, - link_type: Literal["start", "startgroup"], +async def create_startapp_link( + bot: Bot, payload: str, encode: bool = False, - encoder: Optional[Callable[[bytes], bytes]] = None, + app_name: str | None = None, + encoder: Callable[[bytes], bytes] | None = None, +) -> str: + """ + Create 'startapp' deep link with your payload. + + If you need to encode payload or pass special characters - set encode as True + + **Read more**: + + - `Main Mini App links `_ + - `Direct mini app links `_ + + :param bot: bot instance + :param payload: args passed with /start + :param encode: encode payload with base64url or custom encoder + :param app_name: if you want direct mini app link + :param encoder: custom encoder callable + :return: link + """ + username = (await bot.me()).username + return create_deep_link( + username=cast(str, username), + link_type="startapp", + payload=payload, + app_name=app_name, + encode=encode, + encoder=encoder, + ) + + +def create_deep_link( + username: str, + link_type: Literal["start", "startgroup", "startapp"], + payload: str, + app_name: str | None = None, + encode: bool = False, + encoder: Callable[[bytes], bytes] | None = None, ) -> str: """ Create deep link. :param username: - :param link_type: `start` or `startgroup` + :param link_type: `start`, `startgroup` or `startapp` :param payload: any string-convertible data + :param app_name: if you want direct mini app link :param encode: encode payload with base64url or custom encoder :param encoder: custom encoder callable :return: deeplink @@ -101,12 +140,19 @@ def create_deep_link( payload = encode_payload(payload, encoder=encoder) if re.search(BAD_PATTERN, payload): - raise ValueError( + msg = ( "Wrong payload! Only A-Z, a-z, 0-9, _ and - are allowed. " "Pass `encode=True` or encode payload manually." ) + raise ValueError(msg) - if len(payload) > 64: - raise ValueError("Payload must be up to 64 characters long.") + if len(payload) > DEEPLINK_PAYLOAD_LENGTH: + msg = f"Payload must be up to {DEEPLINK_PAYLOAD_LENGTH} characters long." + raise ValueError(msg) - return create_telegram_link(username, **{cast(str, link_type): payload}) + if not app_name: + deep_link = create_telegram_link(username, **{cast(str, link_type): payload}) + else: + deep_link = create_telegram_link(username, app_name, **{cast(str, link_type): payload}) + + return deep_link diff --git a/aiogram/utils/formatting.py b/aiogram/utils/formatting.py index 145eadcf..4dfccd64 100644 --- a/aiogram/utils/formatting.py +++ b/aiogram/utils/formatting.py @@ -1,16 +1,9 @@ +from __future__ import annotations + import textwrap -from typing import ( - Any, - ClassVar, - Dict, - Generator, - Iterable, - Iterator, - List, - Optional, - Tuple, - Type, -) +from collections.abc import Generator, Iterable, Iterator +from datetime import datetime +from typing import Any, ClassVar from typing_extensions import Self @@ -35,7 +28,7 @@ class Text(Iterable[NodeType]): Simple text element """ - type: ClassVar[Optional[str]] = None + type: ClassVar[str | None] = None __slots__ = ("_body", "_params") @@ -44,16 +37,16 @@ class Text(Iterable[NodeType]): *body: NodeType, **params: Any, ) -> None: - self._body: Tuple[NodeType, ...] = body - self._params: Dict[str, Any] = params + self._body: tuple[NodeType, ...] = body + self._params: dict[str, Any] = params @classmethod - def from_entities(cls, text: str, entities: List[MessageEntity]) -> "Text": + def from_entities(cls, text: str, entities: list[MessageEntity]) -> Text: return cls( *_unparse_entities( text=add_surrogates(text), entities=sorted(entities, key=lambda item: item.offset) if entities else [], - ) + ), ) def render( @@ -62,7 +55,7 @@ class Text(Iterable[NodeType]): _offset: int = 0, _sort: bool = True, _collect_entities: bool = True, - ) -> Tuple[str, List[MessageEntity]]: + ) -> tuple[str, list[MessageEntity]]: """ Render elements tree as text with entities list @@ -108,9 +101,9 @@ class Text(Iterable[NodeType]): entities_key: str = "entities", replace_parse_mode: bool = True, parse_mode_key: str = "parse_mode", - ) -> Dict[str, Any]: + ) -> dict[str, Any]: """ - Render elements tree as keyword arguments for usage in the API call, for example: + Render element tree as keyword arguments for usage in an API call, for example: .. code-block:: python @@ -124,7 +117,7 @@ class Text(Iterable[NodeType]): :return: """ text_value, entities_value = self.render() - result: Dict[str, Any] = { + result: dict[str, Any] = { text_key: text_value, entities_key: entities_value, } @@ -132,6 +125,90 @@ class Text(Iterable[NodeType]): result[parse_mode_key] = None return result + def as_caption_kwargs(self, *, replace_parse_mode: bool = True) -> dict[str, Any]: + """ + Shortcut for :meth:`as_kwargs` for usage with API calls that take + ``caption`` as a parameter. + + .. code-block:: python + + entities = Text(...) + await message.answer_photo(**entities.as_caption_kwargs(), photo=phot) + + :param replace_parse_mode: Will be passed to :meth:`as_kwargs`. + :return: + """ + return self.as_kwargs( + text_key="caption", + entities_key="caption_entities", + replace_parse_mode=replace_parse_mode, + ) + + def as_poll_question_kwargs(self, *, replace_parse_mode: bool = True) -> dict[str, Any]: + """ + Shortcut for :meth:`as_kwargs` for usage with + method :class:`aiogram.methods.send_poll.SendPoll`. + + .. code-block:: python + + entities = Text(...) + await message.answer_poll(**entities.as_poll_question_kwargs(), options=options) + + :param replace_parse_mode: Will be passed to :meth:`as_kwargs`. + :return: + """ + return self.as_kwargs( + text_key="question", + entities_key="question_entities", + parse_mode_key="question_parse_mode", + replace_parse_mode=replace_parse_mode, + ) + + def as_poll_explanation_kwargs(self, *, replace_parse_mode: bool = True) -> dict[str, Any]: + """ + Shortcut for :meth:`as_kwargs` for usage with + method :class:`aiogram.methods.send_poll.SendPoll`. + + .. code-block:: python + + question_entities = Text(...) + explanation_entities = Text(...) + await message.answer_poll( + **question_entities.as_poll_question_kwargs(), + options=options, + **explanation_entities.as_poll_explanation_kwargs(), + ) + + :param replace_parse_mode: Will be passed to :meth:`as_kwargs`. + :return: + """ + return self.as_kwargs( + text_key="explanation", + entities_key="explanation_entities", + parse_mode_key="explanation_parse_mode", + replace_parse_mode=replace_parse_mode, + ) + + def as_gift_text_kwargs(self, *, replace_parse_mode: bool = True) -> dict[str, Any]: + """ + Shortcut for :meth:`as_kwargs` for usage with + method :class:`aiogram.methods.send_gift.SendGift`. + + .. code-block:: python + + entities = Text(...) + await bot.send_gift(gift_id=gift_id, user_id=user_id, **entities.as_gift_text_kwargs()) + + :param replace_parse_mode: Will be passed to :meth:`as_kwargs`. + :return: + """ + return self.as_kwargs( + text_key="text", + entities_key="text_entities", + parse_mode_key="text_parse_mode", + replace_parse_mode=replace_parse_mode, + ) + def as_html(self) -> str: """ Render elements tree as HTML markup @@ -168,10 +245,10 @@ class Text(Iterable[NodeType]): args_str = textwrap.indent("\n" + args_str + "\n", " ") return f"{type(self).__name__}({args_str})" - def __add__(self, other: NodeType) -> "Text": + def __add__(self, other: NodeType) -> Text: if isinstance(other, Text) and other.type == self.type and self._params == other._params: return type(self)(*self, *other, **self._params) - if type(self) == Text and isinstance(other, str): + if type(self) is Text and isinstance(other, str): return type(self)(*self, other, **self._params) return Text(self, other) @@ -182,9 +259,10 @@ class Text(Iterable[NodeType]): text, _ = self.render(_collect_entities=False) return sizeof(text) - def __getitem__(self, item: slice) -> "Text": + def __getitem__(self, item: slice) -> Text: if not isinstance(item, slice): - raise TypeError("Can only be sliced") + msg = "Can only be sliced" + raise TypeError(msg) if (item.start is None or item.start == 0) and item.stop is None: return self.replace(*self._body) start = 0 if item.start is None else item.start @@ -229,9 +307,11 @@ class HashTag(Text): def __init__(self, *body: NodeType, **params: Any) -> None: if len(body) != 1: - raise ValueError("Hashtag can contain only one element") + msg = "Hashtag can contain only one element" + raise ValueError(msg) if not isinstance(body[0], str): - raise ValueError("Hashtag can contain only string") + msg = "Hashtag can contain only string" + raise ValueError(msg) if not body[0].startswith("#"): body = ("#" + body[0],) super().__init__(*body, **params) @@ -253,9 +333,11 @@ class CashTag(Text): def __init__(self, *body: NodeType, **params: Any) -> None: if len(body) != 1: - raise ValueError("Cashtag can contain only one element") + msg = "Cashtag can contain only one element" + raise ValueError(msg) if not isinstance(body[0], str): - raise ValueError("Cashtag can contain only string") + msg = "Cashtag can contain only string" + raise ValueError(msg) if not body[0].startswith("$"): body = ("$" + body[0],) super().__init__(*body, **params) @@ -385,7 +467,7 @@ class Pre(Text): type = MessageEntityType.PRE - def __init__(self, *body: NodeType, language: Optional[str] = None, **params: Any) -> None: + def __init__(self, *body: NodeType, language: str | None = None, **params: Any) -> None: super().__init__(*body, language=language, **params) @@ -453,7 +535,27 @@ class ExpandableBlockQuote(Text): type = MessageEntityType.EXPANDABLE_BLOCKQUOTE -NODE_TYPES: Dict[Optional[str], Type[Text]] = { +class DateTime(Text): + type = MessageEntityType.DATE_TIME + + def __init__( + self, + *body: NodeType, + unix_time: int | datetime, + date_time_format: str | None = None, + **params: Any, + ) -> None: + if isinstance(unix_time, datetime): + unix_time = int(unix_time.timestamp()) + super().__init__( + *body, + unix_time=unix_time, + date_time_format=date_time_format, + **params, + ) + + +NODE_TYPES: dict[str | None, type[Text]] = { Text.type: Text, HashTag.type: HashTag, CashTag.type: CashTag, @@ -473,6 +575,7 @@ NODE_TYPES: Dict[Optional[str], Type[Text]] = { CustomEmoji.type: CustomEmoji, BlockQuote.type: BlockQuote, ExpandableBlockQuote.type: ExpandableBlockQuote, + DateTime.type: DateTime, } @@ -486,15 +589,16 @@ def _apply_entity(entity: MessageEntity, *nodes: NodeType) -> NodeType: """ node_type = NODE_TYPES.get(entity.type, Text) return node_type( - *nodes, **entity.model_dump(exclude={"type", "offset", "length"}, warnings=False) + *nodes, + **entity.model_dump(exclude={"type", "offset", "length"}, warnings=False), ) def _unparse_entities( text: bytes, - entities: List[MessageEntity], - offset: Optional[int] = None, - length: Optional[int] = None, + entities: list[MessageEntity], + offset: int | None = None, + length: int | None = None, ) -> Generator[NodeType, None, None]: if offset is None: offset = 0 @@ -531,8 +635,7 @@ def as_line(*items: NodeType, end: str = "\n", sep: str = "") -> Text: nodes = [] for item in items[:-1]: nodes.extend([item, sep]) - nodes.append(items[-1]) - nodes.append(end) + nodes.extend([items[-1], end]) else: nodes = [*items, end] return Text(*nodes) diff --git a/aiogram/utils/i18n/__init__.py b/aiogram/utils/i18n/__init__.py index e48a4c7f..16033e42 100644 --- a/aiogram/utils/i18n/__init__.py +++ b/aiogram/utils/i18n/__init__.py @@ -8,14 +8,14 @@ from .middleware import ( ) __all__ = ( + "ConstI18nMiddleware", + "FSMI18nMiddleware", "I18n", "I18nMiddleware", "SimpleI18nMiddleware", - "ConstI18nMiddleware", - "FSMI18nMiddleware", + "get_i18n", "gettext", "lazy_gettext", - "ngettext", "lazy_ngettext", - "get_i18n", + "ngettext", ) diff --git a/aiogram/utils/i18n/context.py b/aiogram/utils/i18n/context.py index 245fee34..77b7baeb 100644 --- a/aiogram/utils/i18n/context.py +++ b/aiogram/utils/i18n/context.py @@ -7,7 +7,8 @@ from aiogram.utils.i18n.lazy_proxy import LazyProxy def get_i18n() -> I18n: i18n = I18n.get_current(no_error=True) if i18n is None: - raise LookupError("I18n context is not set") + msg = "I18n context is not set" + raise LookupError(msg) return i18n diff --git a/aiogram/utils/i18n/core.py b/aiogram/utils/i18n/core.py index db7c7979..088e62fb 100644 --- a/aiogram/utils/i18n/core.py +++ b/aiogram/utils/i18n/core.py @@ -1,23 +1,27 @@ +from __future__ import annotations + import gettext -import os from contextlib import contextmanager from contextvars import ContextVar from pathlib import Path -from typing import Dict, Generator, Optional, Tuple, Union +from typing import TYPE_CHECKING from aiogram.utils.i18n.lazy_proxy import LazyProxy from aiogram.utils.mixins import ContextInstanceMixin +if TYPE_CHECKING: + from collections.abc import Generator + class I18n(ContextInstanceMixin["I18n"]): def __init__( self, *, - path: Union[str, Path], + path: str | Path, default_locale: str = "en", domain: str = "messages", ) -> None: - self.path = path + self.path = Path(path).resolve() self.default_locale = default_locale self.domain = domain self.ctx_locale = ContextVar("aiogram_ctx_locale", default=default_locale) @@ -43,7 +47,7 @@ class I18n(ContextInstanceMixin["I18n"]): self.ctx_locale.reset(ctx_token) @contextmanager - def context(self) -> Generator["I18n", None, None]: + def context(self) -> Generator[I18n, None, None]: """ Use I18n context """ @@ -53,24 +57,25 @@ class I18n(ContextInstanceMixin["I18n"]): finally: self.reset_current(token) - def find_locales(self) -> Dict[str, gettext.GNUTranslations]: + def find_locales(self) -> dict[str, gettext.GNUTranslations]: """ Load all compiled locales from path :return: dict with locales """ - translations: Dict[str, gettext.GNUTranslations] = {} + translations: dict[str, gettext.GNUTranslations] = {} - for name in os.listdir(self.path): - if not os.path.isdir(os.path.join(self.path, name)): + for name in self.path.iterdir(): + if not name.is_dir(): continue - mo_path = os.path.join(self.path, name, "LC_MESSAGES", self.domain + ".mo") + mo_path = name / "LC_MESSAGES" / (self.domain + ".mo") - if os.path.exists(mo_path): - with open(mo_path, "rb") as fp: - translations[name] = gettext.GNUTranslations(fp) - elif os.path.exists(mo_path[:-2] + "po"): # pragma: no cover - raise RuntimeError(f"Found locale '{name}' but this language is not compiled!") + if mo_path.exists(): + with mo_path.open("rb") as fp: + translations[name.name] = gettext.GNUTranslations(fp) + elif mo_path.with_suffix(".po").exists(): # pragma: no cover + msg = f"Found locale '{name.name}' but this language is not compiled!" + raise RuntimeError(msg) return translations @@ -81,7 +86,7 @@ class I18n(ContextInstanceMixin["I18n"]): self.locales = self.find_locales() @property - def available_locales(self) -> Tuple[str, ...]: + def available_locales(self) -> tuple[str, ...]: """ list of loaded locales @@ -90,7 +95,11 @@ class I18n(ContextInstanceMixin["I18n"]): return tuple(self.locales.keys()) def gettext( - self, singular: str, plural: Optional[str] = None, n: int = 1, locale: Optional[str] = None + self, + singular: str, + plural: str | None = None, + n: int = 1, + locale: str | None = None, ) -> str: """ Get text @@ -107,7 +116,7 @@ class I18n(ContextInstanceMixin["I18n"]): if locale not in self.locales: if n == 1: return singular - return plural if plural else singular + return plural or singular translator = self.locales[locale] @@ -116,8 +125,17 @@ class I18n(ContextInstanceMixin["I18n"]): return translator.ngettext(singular, plural, n) def lazy_gettext( - self, singular: str, plural: Optional[str] = None, n: int = 1, locale: Optional[str] = None + self, + singular: str, + plural: str | None = None, + n: int = 1, + locale: str | None = None, ) -> LazyProxy: return LazyProxy( - self.gettext, singular=singular, plural=plural, n=n, locale=locale, enable_cache=False + self.gettext, + singular=singular, + plural=plural, + n=n, + locale=locale, + enable_cache=False, ) diff --git a/aiogram/utils/i18n/lazy_proxy.py b/aiogram/utils/i18n/lazy_proxy.py index 6852540d..3c861840 100644 --- a/aiogram/utils/i18n/lazy_proxy.py +++ b/aiogram/utils/i18n/lazy_proxy.py @@ -6,8 +6,9 @@ except ImportError: # pragma: no cover class LazyProxy: # type: ignore def __init__(self, func: Any, *args: Any, **kwargs: Any) -> None: - raise RuntimeError( + msg = ( "LazyProxy can be used only when Babel installed\n" "Just install Babel (`pip install Babel`) " "or aiogram with i18n support (`pip install aiogram[i18n]`)" ) + raise RuntimeError(msg) diff --git a/aiogram/utils/i18n/middleware.py b/aiogram/utils/i18n/middleware.py index 68be22bc..462f4db0 100644 --- a/aiogram/utils/i18n/middleware.py +++ b/aiogram/utils/i18n/middleware.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from abc import ABC, abstractmethod -from typing import Any, Awaitable, Callable, Dict, Optional, Set +from typing import TYPE_CHECKING, Any try: from babel import Locale, UnknownLocaleError @@ -11,9 +13,13 @@ except ImportError: # pragma: no cover from aiogram import BaseMiddleware, Router -from aiogram.fsm.context import FSMContext -from aiogram.types import TelegramObject, User -from aiogram.utils.i18n.core import I18n + +if TYPE_CHECKING: + from collections.abc import Awaitable, Callable + + from aiogram.fsm.context import FSMContext + from aiogram.types import TelegramObject, User + from aiogram.utils.i18n.core import I18n class I18nMiddleware(BaseMiddleware, ABC): @@ -24,7 +30,7 @@ class I18nMiddleware(BaseMiddleware, ABC): def __init__( self, i18n: I18n, - i18n_key: Optional[str] = "i18n", + i18n_key: str | None = "i18n", middleware_key: str = "i18n_middleware", ) -> None: """ @@ -39,7 +45,9 @@ class I18nMiddleware(BaseMiddleware, ABC): self.middleware_key = middleware_key def setup( - self: BaseMiddleware, router: Router, exclude: Optional[Set[str]] = None + self: BaseMiddleware, + router: Router, + exclude: set[str] | None = None, ) -> BaseMiddleware: """ Register middleware for all events in the Router @@ -59,9 +67,9 @@ class I18nMiddleware(BaseMiddleware, ABC): async def __call__( self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], + handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]], event: TelegramObject, - data: Dict[str, Any], + data: dict[str, Any], ) -> Any: current_locale = await self.get_locale(event=event, data=data) or self.i18n.default_locale @@ -74,7 +82,7 @@ class I18nMiddleware(BaseMiddleware, ABC): return await handler(event, data) @abstractmethod - async def get_locale(self, event: TelegramObject, data: Dict[str, Any]) -> str: + async def get_locale(self, event: TelegramObject, data: dict[str, Any]) -> str: """ Detect current user locale based on event and context. @@ -84,7 +92,6 @@ class I18nMiddleware(BaseMiddleware, ABC): :param data: :return: """ - pass class SimpleI18nMiddleware(I18nMiddleware): @@ -97,27 +104,29 @@ class SimpleI18nMiddleware(I18nMiddleware): def __init__( self, i18n: I18n, - i18n_key: Optional[str] = "i18n", + i18n_key: str | None = "i18n", middleware_key: str = "i18n_middleware", ) -> None: super().__init__(i18n=i18n, i18n_key=i18n_key, middleware_key=middleware_key) if Locale is None: # pragma: no cover - raise RuntimeError( + msg = ( f"{type(self).__name__} can be used only when Babel installed\n" "Just install Babel (`pip install Babel`) " "or aiogram with i18n support (`pip install aiogram[i18n]`)" ) + raise RuntimeError(msg) - async def get_locale(self, event: TelegramObject, data: Dict[str, Any]) -> str: + async def get_locale(self, event: TelegramObject, data: dict[str, Any]) -> str: if Locale is None: # pragma: no cover - raise RuntimeError( + msg = ( f"{type(self).__name__} can be used only when Babel installed\n" "Just install Babel (`pip install Babel`) " "or aiogram with i18n support (`pip install aiogram[i18n]`)" ) + raise RuntimeError(msg) - event_from_user: Optional[User] = data.get("event_from_user", None) + event_from_user: User | None = data.get("event_from_user") if event_from_user is None or event_from_user.language_code is None: return self.i18n.default_locale try: @@ -139,13 +148,13 @@ class ConstI18nMiddleware(I18nMiddleware): self, locale: str, i18n: I18n, - i18n_key: Optional[str] = "i18n", + i18n_key: str | None = "i18n", middleware_key: str = "i18n_middleware", ) -> None: super().__init__(i18n=i18n, i18n_key=i18n_key, middleware_key=middleware_key) self.locale = locale - async def get_locale(self, event: TelegramObject, data: Dict[str, Any]) -> str: + async def get_locale(self, event: TelegramObject, data: dict[str, Any]) -> str: return self.locale @@ -158,14 +167,14 @@ class FSMI18nMiddleware(SimpleI18nMiddleware): self, i18n: I18n, key: str = "locale", - i18n_key: Optional[str] = "i18n", + i18n_key: str | None = "i18n", middleware_key: str = "i18n_middleware", ) -> None: super().__init__(i18n=i18n, i18n_key=i18n_key, middleware_key=middleware_key) self.key = key - async def get_locale(self, event: TelegramObject, data: Dict[str, Any]) -> str: - fsm_context: Optional[FSMContext] = data.get("state") + async def get_locale(self, event: TelegramObject, data: dict[str, Any]) -> str: + fsm_context: FSMContext | None = data.get("state") locale = None if fsm_context: fsm_data = await fsm_context.get_data() diff --git a/aiogram/utils/keyboard.py b/aiogram/utils/keyboard.py index 921c28c1..2dba452c 100644 --- a/aiogram/utils/keyboard.py +++ b/aiogram/utils/keyboard.py @@ -4,23 +4,12 @@ from abc import ABC from copy import deepcopy from itertools import chain from itertools import cycle as repeat_all -from typing import ( - TYPE_CHECKING, - Any, - Generator, - Generic, - Iterable, - List, - Optional, - Type, - TypeVar, - Union, - cast, -) +from typing import TYPE_CHECKING, Any, Generic, TypeVar, cast from aiogram.filters.callback_data import CallbackData from aiogram.types import ( CallbackGame, + CopyTextButton, InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, @@ -33,11 +22,14 @@ from aiogram.types import ( WebAppInfo, ) +if TYPE_CHECKING: + from collections.abc import Generator, Iterable + ButtonType = TypeVar("ButtonType", InlineKeyboardButton, KeyboardButton) T = TypeVar("T") -class KeyboardBuilder(Generic[ButtonType], ABC): +class KeyboardBuilder(ABC, Generic[ButtonType]): """ Generic keyboard builder that helps to adjust your markup with defined shape of lines. @@ -49,16 +41,19 @@ class KeyboardBuilder(Generic[ButtonType], ABC): max_buttons: int = 0 def __init__( - self, button_type: Type[ButtonType], markup: Optional[List[List[ButtonType]]] = None + self, + button_type: type[ButtonType], + markup: list[list[ButtonType]] | None = None, ) -> None: if not issubclass(button_type, (InlineKeyboardButton, KeyboardButton)): - raise ValueError(f"Button type {button_type} are not allowed here") - self._button_type: Type[ButtonType] = button_type + msg = f"Button type {button_type} are not allowed here" + raise ValueError(msg) + self._button_type: type[ButtonType] = button_type if markup: self._validate_markup(markup) else: markup = [] - self._markup: List[List[ButtonType]] = markup + self._markup: list[list[ButtonType]] = markup @property def buttons(self) -> Generator[ButtonType, None, None]: @@ -78,9 +73,8 @@ class KeyboardBuilder(Generic[ButtonType], ABC): """ allowed = self._button_type if not isinstance(button, allowed): - raise ValueError( - f"{button!r} should be type {allowed.__name__!r} not {type(button).__name__!r}" - ) + msg = f"{button!r} should be type {allowed.__name__!r} not {type(button).__name__!r}" + raise ValueError(msg) return True def _validate_buttons(self, *buttons: ButtonType) -> bool: @@ -92,7 +86,7 @@ class KeyboardBuilder(Generic[ButtonType], ABC): """ return all(map(self._validate_button, buttons)) - def _validate_row(self, row: List[ButtonType]) -> bool: + def _validate_row(self, row: list[ButtonType]) -> bool: """ Check that row of buttons are correct Row can be only list of allowed button types and has length 0 <= n <= 8 @@ -101,16 +95,18 @@ class KeyboardBuilder(Generic[ButtonType], ABC): :return: """ if not isinstance(row, list): - raise ValueError( - f"Row {row!r} should be type 'List[{self._button_type.__name__}]' " + msg = ( + f"Row {row!r} should be type 'list[{self._button_type.__name__}]' " f"not type {type(row).__name__}" ) + raise ValueError(msg) if len(row) > self.max_width: - raise ValueError(f"Row {row!r} is too long (max width: {self.max_width})") + msg = f"Row {row!r} is too long (max width: {self.max_width})" + raise ValueError(msg) self._validate_buttons(*row) return True - def _validate_markup(self, markup: List[List[ButtonType]]) -> bool: + def _validate_markup(self, markup: list[list[ButtonType]]) -> bool: """ Check that passed markup has correct data structure Markup is list of lists of buttons @@ -120,15 +116,17 @@ class KeyboardBuilder(Generic[ButtonType], ABC): """ count = 0 if not isinstance(markup, list): - raise ValueError( - f"Markup should be type 'List[List[{self._button_type.__name__}]]' " + msg = ( + f"Markup should be type 'list[list[{self._button_type.__name__}]]' " f"not type {type(markup).__name__!r}" ) + raise ValueError(msg) for row in markup: self._validate_row(row) count += len(row) if count > self.max_buttons: - raise ValueError(f"Too much buttons detected Max allowed count - {self.max_buttons}") + msg = f"Too much buttons detected Max allowed count - {self.max_buttons}" + raise ValueError(msg) return True def _validate_size(self, size: Any) -> int: @@ -139,14 +137,14 @@ class KeyboardBuilder(Generic[ButtonType], ABC): :return: """ if not isinstance(size, int): - raise ValueError("Only int sizes are allowed") + msg = "Only int sizes are allowed" + raise ValueError(msg) if size not in range(self.min_width, self.max_width + 1): - raise ValueError( - f"Row size {size} is not allowed, range: [{self.min_width}, {self.max_width}]" - ) + msg = f"Row size {size} is not allowed, range: [{self.min_width}, {self.max_width}]" + raise ValueError(msg) return size - def export(self) -> List[List[ButtonType]]: + def export(self) -> list[list[ButtonType]]: """ Export configured markup as list of lists of buttons @@ -160,7 +158,7 @@ class KeyboardBuilder(Generic[ButtonType], ABC): """ return deepcopy(self._markup) - def add(self, *buttons: ButtonType) -> "KeyboardBuilder[ButtonType]": + def add(self, *buttons: ButtonType) -> KeyboardBuilder[ButtonType]: """ Add one or many buttons to markup. @@ -178,16 +176,17 @@ class KeyboardBuilder(Generic[ButtonType], ABC): last_row.extend(head) # Separate buttons to exclusive rows with max possible row width - while buttons: - row, buttons = buttons[: self.max_width], buttons[self.max_width :] - markup.append(list(row)) + if self.max_width > 0: + while buttons: + row, buttons = buttons[: self.max_width], buttons[self.max_width :] + markup.append(list(row)) + else: + markup.append(list(buttons)) self._markup = markup return self - def row( - self, *buttons: ButtonType, width: Optional[int] = None - ) -> "KeyboardBuilder[ButtonType]": + def row(self, *buttons: ButtonType, width: int | None = None) -> KeyboardBuilder[ButtonType]: """ Add row to markup @@ -207,7 +206,7 @@ class KeyboardBuilder(Generic[ButtonType], ABC): ) return self - def adjust(self, *sizes: int, repeat: bool = False) -> "KeyboardBuilder[ButtonType]": + def adjust(self, *sizes: int, repeat: bool = False) -> KeyboardBuilder[ButtonType]: """ Adjust previously added buttons to specific row sizes. @@ -228,7 +227,7 @@ class KeyboardBuilder(Generic[ButtonType], ABC): size = next(sizes_iter) markup = [] - row: List[ButtonType] = [] + row: list[ButtonType] = [] for button in self.buttons: if len(row) >= size: markup.append(row) @@ -240,33 +239,35 @@ class KeyboardBuilder(Generic[ButtonType], ABC): self._markup = markup return self - def _button(self, **kwargs: Any) -> "KeyboardBuilder[ButtonType]": + def _button(self, **kwargs: Any) -> KeyboardBuilder[ButtonType]: """ Add button to markup :param kwargs: :return: """ - if isinstance(callback_data := kwargs.get("callback_data", None), CallbackData): + if isinstance(callback_data := kwargs.get("callback_data"), CallbackData): kwargs["callback_data"] = callback_data.pack() button = self._button_type(**kwargs) return self.add(button) - def as_markup(self, **kwargs: Any) -> Union[InlineKeyboardMarkup, ReplyKeyboardMarkup]: + def as_markup(self, **kwargs: Any) -> InlineKeyboardMarkup | ReplyKeyboardMarkup: if self._button_type is KeyboardButton: - keyboard = cast(List[List[KeyboardButton]], self.export()) # type: ignore + keyboard = cast(list[list[KeyboardButton]], self.export()) # type: ignore return ReplyKeyboardMarkup(keyboard=keyboard, **kwargs) - inline_keyboard = cast(List[List[InlineKeyboardButton]], self.export()) # type: ignore + inline_keyboard = cast(list[list[InlineKeyboardButton]], self.export()) # type: ignore return InlineKeyboardMarkup(inline_keyboard=inline_keyboard) - def attach(self, builder: "KeyboardBuilder[ButtonType]") -> "KeyboardBuilder[ButtonType]": + def attach(self, builder: KeyboardBuilder[ButtonType]) -> KeyboardBuilder[ButtonType]: if not isinstance(builder, KeyboardBuilder): - raise ValueError(f"Only KeyboardBuilder can be attached, not {type(builder).__name__}") + msg = f"Only KeyboardBuilder can be attached, not {type(builder).__name__}" + raise ValueError(msg) if builder._button_type is not self._button_type: - raise ValueError( + msg = ( f"Only builders with same button type can be attached, " f"not {self._button_type.__name__} and {builder._button_type.__name__}" ) + raise ValueError(msg) self._markup.extend(builder.export()) return self @@ -302,21 +303,26 @@ class InlineKeyboardBuilder(KeyboardBuilder[InlineKeyboardButton]): self, *, text: str, - url: Optional[str] = None, - callback_data: Optional[Union[str, CallbackData]] = None, - web_app: Optional[WebAppInfo] = None, - login_url: Optional[LoginUrl] = None, - switch_inline_query: Optional[str] = None, - switch_inline_query_current_chat: Optional[str] = None, - switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat] = None, - callback_game: Optional[CallbackGame] = None, - pay: Optional[bool] = None, + icon_custom_emoji_id: str | None = None, + style: str | None = None, + url: str | None = None, + callback_data: str | CallbackData | None = None, + web_app: WebAppInfo | None = None, + login_url: LoginUrl | None = None, + switch_inline_query: str | None = None, + switch_inline_query_current_chat: str | None = None, + switch_inline_query_chosen_chat: SwitchInlineQueryChosenChat | None = None, + copy_text: CopyTextButton | None = None, + callback_game: CallbackGame | None = None, + pay: bool | None = None, **kwargs: Any, - ) -> "InlineKeyboardBuilder": + ) -> InlineKeyboardBuilder: return cast( InlineKeyboardBuilder, self._button( text=text, + icon_custom_emoji_id=icon_custom_emoji_id, + style=style, url=url, callback_data=callback_data, web_app=web_app, @@ -324,22 +330,21 @@ class InlineKeyboardBuilder(KeyboardBuilder[InlineKeyboardButton]): switch_inline_query=switch_inline_query, switch_inline_query_current_chat=switch_inline_query_current_chat, switch_inline_query_chosen_chat=switch_inline_query_chosen_chat, + copy_text=copy_text, callback_game=callback_game, pay=pay, **kwargs, ), ) - if TYPE_CHECKING: + def as_markup(self, **kwargs: Any) -> InlineKeyboardMarkup: + """Construct an InlineKeyboardMarkup""" + return cast(InlineKeyboardMarkup, super().as_markup(**kwargs)) - def as_markup(self, **kwargs: Any) -> InlineKeyboardMarkup: - """Construct an InlineKeyboardMarkup""" - ... - - def __init__(self, markup: Optional[List[List[InlineKeyboardButton]]] = None) -> None: + def __init__(self, markup: list[list[InlineKeyboardButton]] | None = None) -> None: super().__init__(button_type=InlineKeyboardButton, markup=markup) - def copy(self: "InlineKeyboardBuilder") -> "InlineKeyboardBuilder": + def copy(self: InlineKeyboardBuilder) -> InlineKeyboardBuilder: """ Make full copy of current builder with markup @@ -349,8 +354,9 @@ class InlineKeyboardBuilder(KeyboardBuilder[InlineKeyboardButton]): @classmethod def from_markup( - cls: Type["InlineKeyboardBuilder"], markup: InlineKeyboardMarkup - ) -> "InlineKeyboardBuilder": + cls: type[InlineKeyboardBuilder], + markup: InlineKeyboardMarkup, + ) -> InlineKeyboardBuilder: """ Create builder from existing markup @@ -373,18 +379,22 @@ class ReplyKeyboardBuilder(KeyboardBuilder[KeyboardButton]): self, *, text: str, - request_users: Optional[KeyboardButtonRequestUsers] = None, - request_chat: Optional[KeyboardButtonRequestChat] = None, - request_contact: Optional[bool] = None, - request_location: Optional[bool] = None, - request_poll: Optional[KeyboardButtonPollType] = None, - web_app: Optional[WebAppInfo] = None, + icon_custom_emoji_id: str | None = None, + style: str | None = None, + request_users: KeyboardButtonRequestUsers | None = None, + request_chat: KeyboardButtonRequestChat | None = None, + request_contact: bool | None = None, + request_location: bool | None = None, + request_poll: KeyboardButtonPollType | None = None, + web_app: WebAppInfo | None = None, **kwargs: Any, - ) -> "ReplyKeyboardBuilder": + ) -> ReplyKeyboardBuilder: return cast( ReplyKeyboardBuilder, self._button( text=text, + icon_custom_emoji_id=icon_custom_emoji_id, + style=style, request_users=request_users, request_chat=request_chat, request_contact=request_contact, @@ -395,14 +405,14 @@ class ReplyKeyboardBuilder(KeyboardBuilder[KeyboardButton]): ), ) - if TYPE_CHECKING: + def as_markup(self, **kwargs: Any) -> ReplyKeyboardMarkup: + """Construct a ReplyKeyboardMarkup""" + return cast(ReplyKeyboardMarkup, super().as_markup(**kwargs)) - def as_markup(self, **kwargs: Any) -> ReplyKeyboardMarkup: ... - - def __init__(self, markup: Optional[List[List[KeyboardButton]]] = None) -> None: + def __init__(self, markup: list[list[KeyboardButton]] | None = None) -> None: super().__init__(button_type=KeyboardButton, markup=markup) - def copy(self: "ReplyKeyboardBuilder") -> "ReplyKeyboardBuilder": + def copy(self: ReplyKeyboardBuilder) -> ReplyKeyboardBuilder: """ Make full copy of current builder with markup @@ -411,7 +421,7 @@ class ReplyKeyboardBuilder(KeyboardBuilder[KeyboardButton]): return ReplyKeyboardBuilder(markup=self.export()) @classmethod - def from_markup(cls, markup: ReplyKeyboardMarkup) -> "ReplyKeyboardBuilder": + def from_markup(cls, markup: ReplyKeyboardMarkup) -> ReplyKeyboardBuilder: """ Create builder from existing markup diff --git a/aiogram/utils/link.py b/aiogram/utils/link.py index 051247fa..e1575303 100644 --- a/aiogram/utils/link.py +++ b/aiogram/utils/link.py @@ -1,4 +1,4 @@ -from typing import Any, Optional +from typing import Any from urllib.parse import urlencode, urljoin BASE_DOCS_URL = "https://docs.aiogram.dev/" @@ -7,7 +7,7 @@ BRANCH = "dev-3.x" BASE_PAGE_URL = f"{BASE_DOCS_URL}/en/{BRANCH}/" -def _format_url(url: str, *path: str, fragment_: Optional[str] = None, **query: Any) -> str: +def _format_url(url: str, *path: str, fragment_: str | None = None, **query: Any) -> str: url = urljoin(url, "/".join(path), allow_fragments=True) if query: url += "?" + urlencode(query) @@ -16,7 +16,7 @@ def _format_url(url: str, *path: str, fragment_: Optional[str] = None, **query: return url -def docs_url(*path: str, fragment_: Optional[str] = None, **query: Any) -> str: +def docs_url(*path: str, fragment_: str | None = None, **query: Any) -> str: return _format_url(BASE_PAGE_URL, *path, fragment_=fragment_, **query) @@ -30,7 +30,7 @@ def create_telegram_link(*path: str, **kwargs: Any) -> str: def create_channel_bot_link( username: str, - parameter: Optional[str] = None, + parameter: str | None = None, change_info: bool = False, post_messages: bool = False, edit_messages: bool = False, diff --git a/aiogram/utils/magic_filter.py b/aiogram/utils/magic_filter.py index 94c92079..563492e7 100644 --- a/aiogram/utils/magic_filter.py +++ b/aiogram/utils/magic_filter.py @@ -1,4 +1,5 @@ -from typing import Any, Iterable +from collections.abc import Iterable +from typing import Any from magic_filter import MagicFilter as _MagicFilter from magic_filter import MagicT as _MagicT diff --git a/aiogram/utils/markdown.py b/aiogram/utils/markdown.py index 52c6e1d9..290cfddb 100644 --- a/aiogram/utils/markdown.py +++ b/aiogram/utils/markdown.py @@ -137,7 +137,7 @@ def strikethrough(*content: Any, sep: str = " ") -> str: :return: """ return markdown_decoration.strikethrough( - value=markdown_decoration.quote(_join(*content, sep=sep)) + value=markdown_decoration.quote(_join(*content, sep=sep)), ) @@ -183,7 +183,7 @@ def blockquote(*content: Any, sep: str = "\n") -> str: :return: """ return markdown_decoration.blockquote( - value=markdown_decoration.quote(_join(*content, sep=sep)) + value=markdown_decoration.quote(_join(*content, sep=sep)), ) diff --git a/aiogram/utils/media_group.py b/aiogram/utils/media_group.py index ff985258..8a7eb53a 100644 --- a/aiogram/utils/media_group.py +++ b/aiogram/utils/media_group.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Literal, Optional, Union, overload +from typing import Any, Literal, overload from aiogram.enums import InputMediaType from aiogram.types import ( @@ -12,12 +12,7 @@ from aiogram.types import ( MessageEntity, ) -MediaType = Union[ - InputMediaAudio, - InputMediaPhoto, - InputMediaVideo, - InputMediaDocument, -] +MediaType = InputMediaAudio | InputMediaPhoto | InputMediaVideo | InputMediaDocument MAX_MEDIA_GROUP_SIZE = 10 @@ -27,9 +22,9 @@ class MediaGroupBuilder: def __init__( self, - media: Optional[List[MediaType]] = None, - caption: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, + media: list[MediaType] | None = None, + caption: str | None = None, + caption_entities: list[MessageEntity] | None = None, ) -> None: """ Helper class for building media groups. @@ -39,7 +34,7 @@ class MediaGroupBuilder: :param caption_entities: List of special entities in the caption, like usernames, URLs, etc. (optional) """ - self._media: List[MediaType] = [] + self._media: list[MediaType] = [] self.caption = caption self.caption_entities = caption_entities @@ -47,14 +42,16 @@ class MediaGroupBuilder: def _add(self, media: MediaType) -> None: if not isinstance(media, InputMedia): - raise ValueError("Media must be instance of InputMedia") + msg = "Media must be instance of InputMedia" + raise ValueError(msg) if len(self._media) >= MAX_MEDIA_GROUP_SIZE: - raise ValueError("Media group can't contain more than 10 elements") + msg = "Media group can't contain more than 10 elements" + raise ValueError(msg) self._media.append(media) - def _extend(self, media: List[MediaType]) -> None: + def _extend(self, media: list[MediaType]) -> None: for m in media: self._add(m) @@ -63,13 +60,13 @@ class MediaGroupBuilder: self, *, type: Literal[InputMediaType.AUDIO], - media: Union[str, InputFile], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, + media: str | InputFile, + caption: str | None = None, + parse_mode: str | None = UNSET_PARSE_MODE, + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, **kwargs: Any, ) -> None: pass @@ -79,11 +76,11 @@ class MediaGroupBuilder: self, *, type: Literal[InputMediaType.PHOTO], - media: Union[str, InputFile], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - has_spoiler: Optional[bool] = None, + media: str | InputFile, + caption: str | None = None, + parse_mode: str | None = UNSET_PARSE_MODE, + caption_entities: list[MessageEntity] | None = None, + has_spoiler: bool | None = None, **kwargs: Any, ) -> None: pass @@ -93,16 +90,16 @@ class MediaGroupBuilder: self, *, type: Literal[InputMediaType.VIDEO], - media: Union[str, InputFile], - thumbnail: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, - supports_streaming: Optional[bool] = None, - has_spoiler: Optional[bool] = None, + media: str | InputFile, + thumbnail: InputFile | str | None = None, + caption: str | None = None, + parse_mode: str | None = UNSET_PARSE_MODE, + caption_entities: list[MessageEntity] | None = None, + width: int | None = None, + height: int | None = None, + duration: int | None = None, + supports_streaming: bool | None = None, + has_spoiler: bool | None = None, **kwargs: Any, ) -> None: pass @@ -112,12 +109,12 @@ class MediaGroupBuilder: self, *, type: Literal[InputMediaType.DOCUMENT], - media: Union[str, InputFile], - thumbnail: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, + media: str | InputFile, + thumbnail: InputFile | str | None = None, + caption: str | None = None, + parse_mode: str | None = UNSET_PARSE_MODE, + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, **kwargs: Any, ) -> None: pass @@ -140,18 +137,19 @@ class MediaGroupBuilder: elif type_ == InputMediaType.DOCUMENT: self.add_document(**kwargs) else: - raise ValueError(f"Unknown media type: {type_!r}") + msg = f"Unknown media type: {type_!r}" + raise ValueError(msg) def add_audio( self, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, + media: str | InputFile, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | None = UNSET_PARSE_MODE, + caption_entities: list[MessageEntity] | None = None, + duration: int | None = None, + performer: str | None = None, + title: str | None = None, **kwargs: Any, ) -> None: """ @@ -189,16 +187,16 @@ class MediaGroupBuilder: performer=performer, title=title, **kwargs, - ) + ), ) def add_photo( self, - media: Union[str, InputFile], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - has_spoiler: Optional[bool] = None, + media: str | InputFile, + caption: str | None = None, + parse_mode: str | None = UNSET_PARSE_MODE, + caption_entities: list[MessageEntity] | None = None, + has_spoiler: bool | None = None, **kwargs: Any, ) -> None: """ @@ -228,21 +226,21 @@ class MediaGroupBuilder: caption_entities=caption_entities, has_spoiler=has_spoiler, **kwargs, - ) + ), ) def add_video( self, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, - supports_streaming: Optional[bool] = None, - has_spoiler: Optional[bool] = None, + media: str | InputFile, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | None = UNSET_PARSE_MODE, + caption_entities: list[MessageEntity] | None = None, + width: int | None = None, + height: int | None = None, + duration: int | None = None, + supports_streaming: bool | None = None, + has_spoiler: bool | None = None, **kwargs: Any, ) -> None: """ @@ -290,17 +288,17 @@ class MediaGroupBuilder: supports_streaming=supports_streaming, has_spoiler=has_spoiler, **kwargs, - ) + ), ) def add_document( self, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, + media: str | InputFile, + thumbnail: InputFile | None = None, + caption: str | None = None, + parse_mode: str | None = UNSET_PARSE_MODE, + caption_entities: list[MessageEntity] | None = None, + disable_content_type_detection: bool | None = None, **kwargs: Any, ) -> None: """ @@ -342,10 +340,10 @@ class MediaGroupBuilder: caption_entities=caption_entities, disable_content_type_detection=disable_content_type_detection, **kwargs, - ) + ), ) - def build(self) -> List[MediaType]: + def build(self) -> list[MediaType]: """ Builds a list of media objects for a media group. @@ -353,7 +351,7 @@ class MediaGroupBuilder: :return: List of media objects. """ - update_first_media: Dict[str, Any] = {"caption": self.caption} + update_first_media: dict[str, Any] = {"caption": self.caption} if self.caption_entities is not None: update_first_media["caption_entities"] = self.caption_entities update_first_media["parse_mode"] = None diff --git a/aiogram/utils/mixins.py b/aiogram/utils/mixins.py index 86b3ed84..70d90cc4 100644 --- a/aiogram/utils/mixins.py +++ b/aiogram/utils/mixins.py @@ -1,21 +1,21 @@ from __future__ import annotations import contextvars -from typing import TYPE_CHECKING, Any, Dict, Generic, Optional, TypeVar, cast, overload +from typing import TYPE_CHECKING, Any, Generic, TypeVar, cast, overload if TYPE_CHECKING: - from typing_extensions import Literal + from typing import Literal __all__ = ("ContextInstanceMixin", "DataMixin") class DataMixin: @property - def data(self) -> Dict[str, Any]: - data: Optional[Dict[str, Any]] = getattr(self, "_data", None) + def data(self) -> dict[str, Any]: + data: dict[str, Any] | None = getattr(self, "_data", None) if data is None: data = {} - setattr(self, "_data", data) + self._data = data return data def __getitem__(self, key: str) -> Any: @@ -30,7 +30,7 @@ class DataMixin: def __contains__(self, key: str) -> bool: return key in self.data - def get(self, key: str, default: Optional[Any] = None) -> Optional[Any]: + def get(self, key: str, default: Any | None = None) -> Any | None: return self.data.get(key, default) @@ -44,36 +44,40 @@ class ContextInstanceMixin(Generic[ContextInstance]): super().__init_subclass__() cls.__context_instance = contextvars.ContextVar(f"instance_{cls.__name__}") - @overload # noqa: F811 + @overload @classmethod - def get_current(cls) -> Optional[ContextInstance]: # pragma: no cover # noqa: F811 + def get_current(cls) -> ContextInstance | None: # pragma: no cover ... - @overload # noqa: F811 + @overload @classmethod - def get_current( # noqa: F811 - cls, no_error: Literal[True] - ) -> Optional[ContextInstance]: # pragma: no cover # noqa: F811 + def get_current( + cls, + no_error: Literal[True], + ) -> ContextInstance | None: # pragma: no cover ... - @overload # noqa: F811 + @overload @classmethod - def get_current( # noqa: F811 - cls, no_error: Literal[False] - ) -> ContextInstance: # pragma: no cover # noqa: F811 + def get_current( + cls, + no_error: Literal[False], + ) -> ContextInstance: # pragma: no cover ... - @classmethod # noqa: F811 - def get_current( # noqa: F811 - cls, no_error: bool = True - ) -> Optional[ContextInstance]: # pragma: no cover # noqa: F811 + @classmethod + def get_current( + cls, + no_error: bool = True, + ) -> ContextInstance | None: # pragma: no cover # on mypy 0.770 I catch that contextvars.ContextVar always contextvars.ContextVar[Any] cls.__context_instance = cast( - contextvars.ContextVar[ContextInstance], cls.__context_instance + contextvars.ContextVar[ContextInstance], + cls.__context_instance, ) try: - current: Optional[ContextInstance] = cls.__context_instance.get() + current: ContextInstance | None = cls.__context_instance.get() except LookupError: if no_error: current = None @@ -85,9 +89,8 @@ class ContextInstanceMixin(Generic[ContextInstance]): @classmethod def set_current(cls, value: ContextInstance) -> contextvars.Token[ContextInstance]: if not isinstance(value, cls): - raise TypeError( - f"Value should be instance of {cls.__name__!r} not {type(value).__name__!r}" - ) + msg = f"Value should be instance of {cls.__name__!r} not {type(value).__name__!r}" + raise TypeError(msg) return cls.__context_instance.set(value) @classmethod diff --git a/aiogram/utils/mypy_hacks.py b/aiogram/utils/mypy_hacks.py index ea47a9dc..2041f6a6 100644 --- a/aiogram/utils/mypy_hacks.py +++ b/aiogram/utils/mypy_hacks.py @@ -1,5 +1,10 @@ +from __future__ import annotations + import functools -from typing import Callable, TypeVar +from typing import TYPE_CHECKING, TypeVar + +if TYPE_CHECKING: + from collections.abc import Callable T = TypeVar("T") diff --git a/aiogram/utils/payload.py b/aiogram/utils/payload.py index dbdba653..057ee76f 100644 --- a/aiogram/utils/payload.py +++ b/aiogram/utils/payload.py @@ -61,13 +61,18 @@ Encoding and decoding with your own methods: """ +from __future__ import annotations + from base64 import urlsafe_b64decode, urlsafe_b64encode -from typing import Callable, Optional +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from collections.abc import Callable def encode_payload( payload: str, - encoder: Optional[Callable[[bytes], bytes]] = None, + encoder: Callable[[bytes], bytes] | None = None, ) -> str: """Encode payload with encoder. @@ -85,7 +90,7 @@ def encode_payload( def decode_payload( payload: str, - decoder: Optional[Callable[[bytes], bytes]] = None, + decoder: Callable[[bytes], bytes] | None = None, ) -> str: """Decode URL-safe base64url payload with decoder.""" original_payload = _decode_b64(payload) diff --git a/aiogram/utils/serialization.py b/aiogram/utils/serialization.py index cc6ef8aa..cfa47f4d 100644 --- a/aiogram/utils/serialization.py +++ b/aiogram/utils/serialization.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Any, Dict, Optional +from typing import Any from pydantic import BaseModel @@ -9,7 +9,7 @@ from aiogram.methods import TelegramMethod from aiogram.types import InputFile -def _get_fake_bot(default: Optional[DefaultBotProperties] = None) -> Bot: +def _get_fake_bot(default: DefaultBotProperties | None = None) -> Bot: if default is None: default = DefaultBotProperties() return Bot(token="42:Fake", default=default) @@ -24,16 +24,16 @@ class DeserializedTelegramObject: :type data: Any :param files: The dictionary containing the file names as keys and the corresponding `InputFile` objects as values. - :type files: Dict[str, InputFile] + :type files: dict[str, InputFile] """ data: Any - files: Dict[str, InputFile] + files: dict[str, InputFile] def deserialize_telegram_object( obj: Any, - default: Optional[DefaultBotProperties] = None, + default: DefaultBotProperties | None = None, include_api_method_name: bool = True, ) -> DeserializedTelegramObject: """ @@ -55,7 +55,7 @@ def deserialize_telegram_object( # Fake bot is needed to exclude global defaults from the object. fake_bot = _get_fake_bot(default=default) - files: Dict[str, InputFile] = {} + files: dict[str, InputFile] = {} prepared = fake_bot.session.prepare_value( obj, bot=fake_bot, @@ -70,7 +70,7 @@ def deserialize_telegram_object( def deserialize_telegram_object_to_python( obj: Any, - default: Optional[DefaultBotProperties] = None, + default: DefaultBotProperties | None = None, include_api_method_name: bool = True, ) -> Any: """ diff --git a/aiogram/utils/text_decorations.py b/aiogram/utils/text_decorations.py index 440fffa6..c835c27b 100644 --- a/aiogram/utils/text_decorations.py +++ b/aiogram/utils/text_decorations.py @@ -3,20 +3,25 @@ from __future__ import annotations import html import re from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Generator, List, Optional, Pattern, cast +from datetime import date, datetime, time +from typing import TYPE_CHECKING, cast from aiogram.enums import MessageEntityType +from aiogram.utils.link import create_tg_link if TYPE_CHECKING: + from collections.abc import Generator + from re import Pattern + from aiogram.types import MessageEntity __all__ = ( "HtmlDecoration", "MarkdownDecoration", "TextDecoration", + "add_surrogates", "html_decoration", "markdown_decoration", - "add_surrogates", "remove_surrogates", ) @@ -75,12 +80,18 @@ class TextDecoration(ABC): return self.link(value=text, link=cast(str, entity.url)) if entity.type == MessageEntityType.CUSTOM_EMOJI: return self.custom_emoji(value=text, custom_emoji_id=cast(str, entity.custom_emoji_id)) + if entity.type == MessageEntityType.DATE_TIME: + return self.date_time( + value=text, + unix_time=cast(int, entity.unix_time), + date_time_format=entity.date_time_format, + ) # This case is not possible because of `if` above, but if any new entity is added to # API it will be here too return self.quote(text) - def unparse(self, text: str, entities: Optional[List[MessageEntity]] = None) -> str: + def unparse(self, text: str, entities: list[MessageEntity] | None = None) -> str: """ Unparse message entities @@ -92,15 +103,15 @@ class TextDecoration(ABC): self._unparse_entities( add_surrogates(text), sorted(entities, key=lambda item: item.offset) if entities else [], - ) + ), ) def _unparse_entities( self, text: bytes, - entities: List[MessageEntity], - offset: Optional[int] = None, - length: Optional[int] = None, + entities: list[MessageEntity], + offset: int | None = None, + length: int | None = None, ) -> Generator[str, None, None]: if offset is None: offset = 0 @@ -115,7 +126,7 @@ class TextDecoration(ABC): offset = entity.offset * 2 + entity.length * 2 sub_entities = list( - filter(lambda e: e.offset * 2 < (offset or 0), entities[index + 1 :]) + filter(lambda e: e.offset * 2 < (offset or 0), entities[index + 1 :]), ) yield self.apply_entity( entity, @@ -177,54 +188,105 @@ class TextDecoration(ABC): def expandable_blockquote(self, value: str) -> str: pass + @abstractmethod + def date_time( + self, + value: str, + unix_time: int | datetime, + date_time_format: str | None = None, + ) -> str: + pass + class HtmlDecoration(TextDecoration): BOLD_TAG = "b" ITALIC_TAG = "i" UNDERLINE_TAG = "u" STRIKETHROUGH_TAG = "s" + CODE_TAG = "code" + PRE_TAG = "pre" + LINK_TAG = "a" SPOILER_TAG = "tg-spoiler" EMOJI_TAG = "tg-emoji" + DATE_TIME_TAG = "tg-time" BLOCKQUOTE_TAG = "blockquote" + def _tag( + self, + tag: str, + content: str, + *, + attrs: dict[str, str] | None = None, + flags: list[str] | None = None, + ) -> str: + prepared_attrs: list[str] = [] + if attrs: + prepared_attrs.extend(f'{k}="{v}"' for k, v in attrs.items()) + if flags: + prepared_attrs.extend(f"{flag}" for flag in flags) + + attrs_str = " ".join(prepared_attrs) + if attrs_str: + attrs_str = " " + attrs_str + + return f"<{tag}{attrs_str}>{content}" + def link(self, value: str, link: str) -> str: - return f'{value}' + return self._tag(self.LINK_TAG, value, attrs={"href": link}) def bold(self, value: str) -> str: - return f"<{self.BOLD_TAG}>{value}" + return self._tag(self.BOLD_TAG, value) def italic(self, value: str) -> str: - return f"<{self.ITALIC_TAG}>{value}" + return self._tag(self.ITALIC_TAG, value) def code(self, value: str) -> str: - return f"{value}" + return self._tag(self.CODE_TAG, value) def pre(self, value: str) -> str: - return f"
{value}
" + return self._tag(self.PRE_TAG, value) def pre_language(self, value: str, language: str) -> str: - return f'
{value}
' + return self._tag( + self.PRE_TAG, + self._tag(self.CODE_TAG, value, attrs={"language": f"language-{language}"}), + ) def underline(self, value: str) -> str: - return f"<{self.UNDERLINE_TAG}>{value}" + return self._tag(self.UNDERLINE_TAG, value) def strikethrough(self, value: str) -> str: - return f"<{self.STRIKETHROUGH_TAG}>{value}" + return self._tag(self.STRIKETHROUGH_TAG, value) def spoiler(self, value: str) -> str: - return f"<{self.SPOILER_TAG}>{value}" + return self._tag(self.SPOILER_TAG, value) def quote(self, value: str) -> str: return html.escape(value, quote=False) def custom_emoji(self, value: str, custom_emoji_id: str) -> str: - return f'<{self.EMOJI_TAG} emoji-id="{custom_emoji_id}">{value}
' + return self._tag(self.EMOJI_TAG, value, attrs={"emoji-id": custom_emoji_id}) def blockquote(self, value: str) -> str: - return f"<{self.BLOCKQUOTE_TAG}>{value}" + return self._tag(self.BLOCKQUOTE_TAG, value) def expandable_blockquote(self, value: str) -> str: - return f"<{self.BLOCKQUOTE_TAG} expandable>{value}" + return self._tag(self.BLOCKQUOTE_TAG, value, flags=["expandable"]) + + def date_time( + self, + value: str, + unix_time: int | datetime, + date_time_format: str | None = None, + ) -> str: + if isinstance(unix_time, datetime): + unix_time = int(unix_time.timestamp()) + + args = {"unix": str(unix_time)} + if date_time_format: + args["format"] = date_time_format + + return self._tag(self.DATE_TIME_TAG, value, attrs=args) class MarkdownDecoration(TextDecoration): @@ -261,7 +323,8 @@ class MarkdownDecoration(TextDecoration): return re.sub(pattern=self.MARKDOWN_QUOTE_PATTERN, repl=r"\\\1", string=value) def custom_emoji(self, value: str, custom_emoji_id: str) -> str: - return f'!{self.link(value=value, link=f"tg://emoji?id={custom_emoji_id}")}' + link = create_tg_link("emoji", emoji_id=custom_emoji_id) + return f"!{self.link(value=value, link=link)}" def blockquote(self, value: str) -> str: return "\n".join(f">{line}" for line in value.splitlines()) @@ -269,6 +332,22 @@ class MarkdownDecoration(TextDecoration): def expandable_blockquote(self, value: str) -> str: return "\n".join(f">{line}" for line in value.splitlines()) + "||" + def date_time( + self, + value: str, + unix_time: int | datetime, + date_time_format: str | None = None, + ) -> str: + if isinstance(unix_time, datetime): + unix_time = int(unix_time.timestamp()) + + link_params = {"unix": str(unix_time)} + if date_time_format: + link_params["format"] = date_time_format + link = create_tg_link("time", **link_params) + + return f"!{self.link(value, link=link)}" + html_decoration = HtmlDecoration() markdown_decoration = MarkdownDecoration() diff --git a/aiogram/utils/token.py b/aiogram/utils/token.py index c0738467..73821324 100644 --- a/aiogram/utils/token.py +++ b/aiogram/utils/token.py @@ -5,7 +5,7 @@ class TokenValidationError(Exception): pass -@lru_cache() +@lru_cache def validate_token(token: str) -> bool: """ Validate Telegram token @@ -14,9 +14,8 @@ def validate_token(token: str) -> bool: :return: """ if not isinstance(token, str): - raise TokenValidationError( - f"Token is invalid! It must be 'str' type instead of {type(token)} type." - ) + msg = f"Token is invalid! It must be 'str' type instead of {type(token)} type." + raise TokenValidationError(msg) if any(x.isspace() for x in token): message = "Token is invalid! It can't contains spaces." @@ -24,12 +23,13 @@ def validate_token(token: str) -> bool: left, sep, right = token.partition(":") if (not sep) or (not left.isdigit()) or (not right): - raise TokenValidationError("Token is invalid!") + msg = "Token is invalid!" + raise TokenValidationError(msg) return True -@lru_cache() +@lru_cache def extract_bot_id(token: str) -> int: """ Extract bot ID from Telegram token diff --git a/aiogram/utils/web_app.py b/aiogram/utils/web_app.py index 192776fd..2e4b6cb8 100644 --- a/aiogram/utils/web_app.py +++ b/aiogram/utils/web_app.py @@ -1,9 +1,10 @@ import hashlib import hmac import json +from collections.abc import Callable from datetime import datetime from operator import itemgetter -from typing import Any, Callable, Optional +from typing import Any from urllib.parse import parse_qsl from aiogram.types import TelegramObject @@ -25,9 +26,9 @@ class WebAppChat(TelegramObject): """Type of chat, can be either “group”, “supergroup” or “channel”""" title: str """Title of the chat""" - username: Optional[str] = None + username: str | None = None """Username of the chat""" - photo_url: Optional[str] = None + photo_url: str | None = None """URL of the chat’s photo. The photo can be in .jpeg or .svg formats. Only returned for Web Apps launched from the attachment menu.""" @@ -44,23 +45,23 @@ class WebAppUser(TelegramObject): and some programming languages may have difficulty/silent defects in interpreting it. It has at most 52 significant bits, so a 64-bit integer or a double-precision float type is safe for storing this identifier.""" - is_bot: Optional[bool] = None + is_bot: bool | None = None """True, if this user is a bot. Returns in the receiver field only.""" first_name: str """First name of the user or bot.""" - last_name: Optional[str] = None + last_name: str | None = None """Last name of the user or bot.""" - username: Optional[str] = None + username: str | None = None """Username of the user or bot.""" - language_code: Optional[str] = None + language_code: str | None = None """IETF language tag of the user's language. Returns in user field only.""" - is_premium: Optional[bool] = None + is_premium: bool | None = None """True, if this user is a Telegram Premium user.""" - added_to_attachment_menu: Optional[bool] = None + added_to_attachment_menu: bool | None = None """True, if this user added the bot to the attachment menu.""" - allows_write_to_pm: Optional[bool] = None + allows_write_to_pm: bool | None = None """True, if this user allowed the bot to message them.""" - photo_url: Optional[str] = None + photo_url: str | None = None """URL of the user’s profile photo. The photo can be in .jpeg or .svg formats. Only returned for Web Apps launched from the attachment menu.""" @@ -73,33 +74,33 @@ class WebAppInitData(TelegramObject): Source: https://core.telegram.org/bots/webapps#webappinitdata """ - query_id: Optional[str] = None + query_id: str | None = None """A unique identifier for the Web App session, required for sending messages via the answerWebAppQuery method.""" - user: Optional[WebAppUser] = None + user: WebAppUser | None = None """An object containing data about the current user.""" - receiver: Optional[WebAppUser] = None + receiver: WebAppUser | None = None """An object containing data about the chat partner of the current user in the chat where the bot was launched via the attachment menu. Returned only for Web Apps launched via the attachment menu.""" - chat: Optional[WebAppChat] = None + chat: WebAppChat | None = None """An object containing data about the chat where the bot was launched via the attachment menu. Returned for supergroups, channels, and group chats – only for Web Apps launched via the attachment menu.""" - chat_type: Optional[str] = None + chat_type: str | None = None """Type of the chat from which the Web App was opened. Can be either “sender” for a private chat with the user opening the link, “private”, “group”, “supergroup”, or “channel”. Returned only for Web Apps launched from direct links.""" - chat_instance: Optional[str] = None + chat_instance: str | None = None """Global identifier, uniquely corresponding to the chat from which the Web App was opened. Returned only for Web Apps launched from a direct link.""" - start_param: Optional[str] = None + start_param: str | None = None """The value of the startattach parameter, passed via link. Only returned for Web Apps when launched from the attachment menu via link. The value of the start_param parameter will also be passed in the GET-parameter tgWebAppStartParam, so the Web App can load the correct interface right away.""" - can_send_after: Optional[int] = None + can_send_after: int | None = None """Time in seconds, after which a message can be sent via the answerWebAppQuery method.""" auth_date: datetime """Unix time when the form was opened.""" @@ -132,9 +133,11 @@ def check_webapp_signature(token: str, init_data: str) -> bool: ) secret_key = hmac.new(key=b"WebAppData", msg=token.encode(), digestmod=hashlib.sha256) calculated_hash = hmac.new( - key=secret_key.digest(), msg=data_check_string.encode(), digestmod=hashlib.sha256 + key=secret_key.digest(), + msg=data_check_string.encode(), + digestmod=hashlib.sha256, ).hexdigest() - return calculated_hash == hash_ + return hmac.compare_digest(calculated_hash, hash_) def parse_webapp_init_data( @@ -180,4 +183,5 @@ def safe_parse_webapp_init_data( """ if check_webapp_signature(token, init_data): return parse_webapp_init_data(init_data, loads=loads) - raise ValueError("Invalid init data signature") + msg = "Invalid init data signature" + raise ValueError(msg) diff --git a/aiogram/utils/web_app_signature.py b/aiogram/utils/web_app_signature.py new file mode 100644 index 00000000..6a5a934b --- /dev/null +++ b/aiogram/utils/web_app_signature.py @@ -0,0 +1,76 @@ +import base64 +from operator import itemgetter +from urllib.parse import parse_qsl + +from cryptography.exceptions import InvalidSignature +from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey + +from .web_app import WebAppInitData, parse_webapp_init_data + +PRODUCTION_PUBLIC_KEY = bytes.fromhex( + "e7bf03a2fa4602af4580703d88dda5bb59f32ed8b02a56c187fe7d34caed242d", +) +TEST_PUBLIC_KEY = bytes.fromhex("40055058a4ee38156a06562e52eece92a771bcd8346a8c4615cb7376eddf72ec") + + +def check_webapp_signature( + bot_id: int, + init_data: str, + public_key_bytes: bytes = PRODUCTION_PUBLIC_KEY, +) -> bool: + """ + Check incoming WebApp init data signature without bot token using only bot id. + + Source: https://core.telegram.org/bots/webapps#validating-data-for-third-party-use + + :param bot_id: Bot ID + :param init_data: WebApp init data + :param public_key: Public key + :return: True if signature is valid, False otherwise + """ + try: + parsed_data = dict(parse_qsl(init_data, strict_parsing=True)) + except ValueError: + return False + + signature_b64 = parsed_data.pop("signature", None) + if not signature_b64: + return False + + parsed_data.pop("hash", None) + + data_check_string = f"{bot_id}:WebAppData\n" + "\n".join( + f"{k}={v}" for k, v in sorted(parsed_data.items(), key=itemgetter(0)) + ) + message = data_check_string.encode() + + padding = "=" * (-len(signature_b64) % 4) + signature = base64.urlsafe_b64decode(signature_b64 + padding) + + public_key = Ed25519PublicKey.from_public_bytes(public_key_bytes) + + try: + public_key.verify(signature, message) + except InvalidSignature: + return False + else: + return True + + +def safe_check_webapp_init_data_from_signature( + bot_id: int, + init_data: str, + public_key_bytes: bytes = PRODUCTION_PUBLIC_KEY, +) -> WebAppInitData: + """ + Validate raw WebApp init data using only bot id and return it as WebAppInitData object + + :param bot_id: bot id + :param init_data: data from frontend to be parsed and validated + :param public_key_bytes: public key + :return: WebAppInitData object + """ + if check_webapp_signature(bot_id, init_data, public_key_bytes): + return parse_webapp_init_data(init_data) + msg = "Invalid init data signature" + raise ValueError(msg) diff --git a/aiogram/webhook/aiohttp_server.py b/aiogram/webhook/aiohttp_server.py index 7caa0e15..4e390a4d 100644 --- a/aiogram/webhook/aiohttp_server.py +++ b/aiogram/webhook/aiohttp_server.py @@ -2,19 +2,22 @@ import asyncio import secrets from abc import ABC, abstractmethod from asyncio import Transport -from typing import Any, Awaitable, Callable, Dict, Optional, Set, Tuple, cast +from collections.abc import Awaitable, Callable +from typing import TYPE_CHECKING, Any, cast -from aiohttp import MultipartWriter, web -from aiohttp.abc import Application +from aiohttp import JsonPayload, MultipartWriter, Payload, web from aiohttp.typedefs import Handler +from aiohttp.web_app import Application from aiohttp.web_middlewares import middleware from aiogram import Bot, Dispatcher, loggers from aiogram.methods import TelegramMethod from aiogram.methods.base import TelegramType -from aiogram.types import InputFile from aiogram.webhook.security import IPFilter +if TYPE_CHECKING: + from aiogram.types import InputFile + def setup_application(app: Application, dispatcher: Dispatcher, /, **kwargs: Any) -> None: """ @@ -42,7 +45,7 @@ def setup_application(app: Application, dispatcher: Dispatcher, /, **kwargs: Any app.on_shutdown.append(on_shutdown) -def check_ip(ip_filter: IPFilter, request: web.Request) -> Tuple[str, bool]: +def check_ip(ip_filter: IPFilter, request: web.Request) -> tuple[str, bool]: # Try to resolve client IP over reverse proxy if forwarded_for := request.headers.get("X-Forwarded-For", ""): # Get the left-most ip when there is multiple ips @@ -98,7 +101,7 @@ class BaseRequestHandler(ABC): self.dispatcher = dispatcher self.handle_in_background = handle_in_background self.data = data - self._background_feed_update_tasks: Set[asyncio.Task[Any]] = set() + self._background_feed_update_tasks: set[asyncio.Task[Any]] = set() def register(self, app: Application, /, path: str, **kwargs: Any) -> None: """ @@ -111,7 +114,7 @@ class BaseRequestHandler(ABC): app.on_shutdown.append(self._handle_close) app.router.add_route("POST", path, self.handle, **kwargs) - async def _handle_close(self, app: Application) -> None: + async def _handle_close(self, *a: Any, **kw: Any) -> None: await self.close() @abstractmethod @@ -128,13 +131,12 @@ class BaseRequestHandler(ABC): :param request: :return: Bot instance """ - pass @abstractmethod def verify_secret(self, telegram_secret_token: str, bot: Bot) -> bool: pass - async def _background_feed_update(self, bot: Bot, update: Dict[str, Any]) -> None: + async def _background_feed_update(self, bot: Bot, update: dict[str, Any]) -> None: result = await self.dispatcher.feed_raw_update(bot=bot, update=update, **self.data) if isinstance(result, TelegramMethod): await self.dispatcher.silent_call_request(bot=bot, result=result) @@ -142,27 +144,34 @@ class BaseRequestHandler(ABC): async def _handle_request_background(self, bot: Bot, request: web.Request) -> web.Response: feed_update_task = asyncio.create_task( self._background_feed_update( - bot=bot, update=await request.json(loads=bot.session.json_loads) - ) + bot=bot, + update=await request.json(loads=bot.session.json_loads), + ), ) self._background_feed_update_tasks.add(feed_update_task) feed_update_task.add_done_callback(self._background_feed_update_tasks.discard) return web.json_response({}, dumps=bot.session.json_dumps) def _build_response_writer( - self, bot: Bot, result: Optional[TelegramMethod[TelegramType]] - ) -> MultipartWriter: + self, + bot: Bot, + result: TelegramMethod[TelegramType] | None, + ) -> Payload: + if not result: + # we need to return something "empty" + # and "empty" form doesn't work + # since it's sending only "end" boundary w/o "start" + return JsonPayload({}) + writer = MultipartWriter( "form-data", boundary=f"webhookBoundary{secrets.token_urlsafe(16)}", ) - if not result: - return writer payload = writer.append(result.__api_method__) payload.set_content_disposition("form-data", name="method") - files: Dict[str, InputFile] = {} + files: dict[str, InputFile] = {} for key, value in result.model_dump(warnings=False).items(): value = bot.session.prepare_value(value, bot=bot, files=files) if not value: @@ -181,7 +190,7 @@ class BaseRequestHandler(ABC): return writer async def _handle_request(self, bot: Bot, request: web.Request) -> web.Response: - result: Optional[TelegramMethod[Any]] = await self.dispatcher.feed_webhook_update( + result: TelegramMethod[Any] | None = await self.dispatcher.feed_webhook_update( bot, await request.json(loads=bot.session.json_loads), **self.data, @@ -205,7 +214,7 @@ class SimpleRequestHandler(BaseRequestHandler): dispatcher: Dispatcher, bot: Bot, handle_in_background: bool = True, - secret_token: Optional[str] = None, + secret_token: str | None = None, **data: Any, ) -> None: """ @@ -240,7 +249,7 @@ class TokenBasedRequestHandler(BaseRequestHandler): self, dispatcher: Dispatcher, handle_in_background: bool = True, - bot_settings: Optional[Dict[str, Any]] = None, + bot_settings: dict[str, Any] | None = None, **data: Any, ) -> None: """ @@ -261,7 +270,7 @@ class TokenBasedRequestHandler(BaseRequestHandler): if bot_settings is None: bot_settings = {} self.bot_settings = bot_settings - self.bots: Dict[str, Bot] = {} + self.bots: dict[str, Bot] = {} def verify_secret(self, telegram_secret_token: str, bot: Bot) -> bool: return True @@ -279,7 +288,8 @@ class TokenBasedRequestHandler(BaseRequestHandler): :param kwargs: """ if "{bot_token}" not in path: - raise ValueError("Path should contains '{bot_token}' substring") + msg = "Path should contains '{bot_token}' substring" + raise ValueError(msg) super().register(app, path=path, **kwargs) async def resolve_bot(self, request: web.Request) -> Bot: diff --git a/aiogram/webhook/security.py b/aiogram/webhook/security.py index 91d38204..71248e9f 100644 --- a/aiogram/webhook/security.py +++ b/aiogram/webhook/security.py @@ -1,5 +1,5 @@ +from collections.abc import Sequence from ipaddress import IPv4Address, IPv4Network -from typing import Optional, Sequence, Set, Union DEFAULT_TELEGRAM_NETWORKS = [ IPv4Network("149.154.160.0/20"), @@ -8,17 +8,17 @@ DEFAULT_TELEGRAM_NETWORKS = [ class IPFilter: - def __init__(self, ips: Optional[Sequence[Union[str, IPv4Network, IPv4Address]]] = None): - self._allowed_ips: Set[IPv4Address] = set() + def __init__(self, ips: Sequence[str | IPv4Network | IPv4Address] | None = None): + self._allowed_ips: set[IPv4Address] = set() if ips: self.allow(*ips) - def allow(self, *ips: Union[str, IPv4Network, IPv4Address]) -> None: + def allow(self, *ips: str | IPv4Network | IPv4Address) -> None: for ip in ips: self.allow_ip(ip) - def allow_ip(self, ip: Union[str, IPv4Network, IPv4Address]) -> None: + def allow_ip(self, ip: str | IPv4Network | IPv4Address) -> None: if isinstance(ip, str): ip = IPv4Network(ip) if "/" in ip else IPv4Address(ip) if isinstance(ip, IPv4Address): @@ -26,16 +26,17 @@ class IPFilter: elif isinstance(ip, IPv4Network): self._allowed_ips.update(ip.hosts()) else: - raise ValueError(f"Invalid type of ipaddress: {type(ip)} ('{ip}')") + msg = f"Invalid type of ipaddress: {type(ip)} ('{ip}')" + raise ValueError(msg) @classmethod def default(cls) -> "IPFilter": return cls(DEFAULT_TELEGRAM_NETWORKS) - def check(self, ip: Union[str, IPv4Address]) -> bool: + def check(self, ip: str | IPv4Address) -> bool: if not isinstance(ip, IPv4Address): ip = IPv4Address(ip) return ip in self._allowed_ips - def __contains__(self, item: Union[str, IPv4Address]) -> bool: + def __contains__(self, item: str | IPv4Address) -> bool: return self.check(item) diff --git a/docs/api/defaults.rst b/docs/api/defaults.rst index 93f3a59b..69de1528 100644 --- a/docs/api/defaults.rst +++ b/docs/api/defaults.rst @@ -31,7 +31,7 @@ Here is an example of setting default parse mode for all requests to Telegram Bo bot = Bot( token=..., - defaults=DefaultBotProperties( + default=DefaultBotProperties( parse_mode=ParseMode.HTML, ) ) diff --git a/docs/api/enums/button_style.rst b/docs/api/enums/button_style.rst new file mode 100644 index 00000000..d9ac08ca --- /dev/null +++ b/docs/api/enums/button_style.rst @@ -0,0 +1,9 @@ +########### +ButtonStyle +########### + + +.. automodule:: aiogram.enums.button_style + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/index.rst b/docs/api/enums/index.rst index 08f5457a..8082a207 100644 --- a/docs/api/enums/index.rst +++ b/docs/api/enums/index.rst @@ -11,6 +11,7 @@ Here is list of all available enums: :maxdepth: 1 bot_command_scope_type + button_style chat_action chat_boost_source_type chat_member_status @@ -22,11 +23,14 @@ Here is list of all available enums: inline_query_result_type input_media_type input_paid_media_type + input_profile_photo_type + input_story_content_type keyboard_button_poll_type_type mask_position_point menu_button_type message_entity_type message_origin_type + owned_gift_type paid_media_type parse_mode passport_element_error_type @@ -35,6 +39,8 @@ Here is list of all available enums: revenue_withdrawal_state_type sticker_format sticker_type + story_area_type_type topic_icon_color transaction_partner_type + transaction_partner_user_transaction_type_enum update_type diff --git a/docs/api/enums/input_profile_photo_type.rst b/docs/api/enums/input_profile_photo_type.rst new file mode 100644 index 00000000..262dc68b --- /dev/null +++ b/docs/api/enums/input_profile_photo_type.rst @@ -0,0 +1,9 @@ +##################### +InputProfilePhotoType +##################### + + +.. automodule:: aiogram.enums.input_profile_photo_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/input_story_content_type.rst b/docs/api/enums/input_story_content_type.rst new file mode 100644 index 00000000..fde3a400 --- /dev/null +++ b/docs/api/enums/input_story_content_type.rst @@ -0,0 +1,9 @@ +##################### +InputStoryContentType +##################### + + +.. automodule:: aiogram.enums.input_story_content_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/owned_gift_type.rst b/docs/api/enums/owned_gift_type.rst new file mode 100644 index 00000000..cc0a87fe --- /dev/null +++ b/docs/api/enums/owned_gift_type.rst @@ -0,0 +1,9 @@ +############# +OwnedGiftType +############# + + +.. automodule:: aiogram.enums.owned_gift_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/story_area_type_type.rst b/docs/api/enums/story_area_type_type.rst new file mode 100644 index 00000000..df0538ee --- /dev/null +++ b/docs/api/enums/story_area_type_type.rst @@ -0,0 +1,9 @@ +################# +StoryAreaTypeType +################# + + +.. automodule:: aiogram.enums.story_area_type_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/transaction_partner_user_transaction_type_enum.rst b/docs/api/enums/transaction_partner_user_transaction_type_enum.rst new file mode 100644 index 00000000..7616a8d1 --- /dev/null +++ b/docs/api/enums/transaction_partner_user_transaction_type_enum.rst @@ -0,0 +1,9 @@ +######################################### +TransactionPartnerUserTransactionTypeEnum +######################################### + + +.. automodule:: aiogram.enums.transaction_partner_user_transaction_type_enum + :members: + :member-order: bysource + :undoc-members: True 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/convert_gift_to_stars.rst b/docs/api/methods/convert_gift_to_stars.rst new file mode 100644 index 00000000..1e1ad02b --- /dev/null +++ b/docs/api/methods/convert_gift_to_stars.rst @@ -0,0 +1,45 @@ +################## +convertGiftToStars +################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.convert_gift_to_stars + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.convert_gift_to_stars(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.convert_gift_to_stars import ConvertGiftToStars` +- alias: :code:`from aiogram.methods import ConvertGiftToStars` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(ConvertGiftToStars(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return ConvertGiftToStars(...) diff --git a/docs/api/methods/copy_messages.rst b/docs/api/methods/copy_messages.rst index ad4fd527..99bc2b47 100644 --- a/docs/api/methods/copy_messages.rst +++ b/docs/api/methods/copy_messages.rst @@ -2,7 +2,7 @@ copyMessages ############ -Returns: :obj:`List[MessageId]` +Returns: :obj:`list[MessageId]` .. automodule:: aiogram.methods.copy_messages :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: List[MessageId] = await bot.copy_messages(...) + result: list[MessageId] = await bot.copy_messages(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: List[MessageId] = await bot(CopyMessages(...)) + result: list[MessageId] = await bot(CopyMessages(...)) As reply into Webhook in handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/create_chat_subscription_invite_link.rst b/docs/api/methods/create_chat_subscription_invite_link.rst new file mode 100644 index 00000000..9da0261a --- /dev/null +++ b/docs/api/methods/create_chat_subscription_invite_link.rst @@ -0,0 +1,45 @@ +################################ +createChatSubscriptionInviteLink +################################ + +Returns: :obj:`ChatInviteLink` + +.. automodule:: aiogram.methods.create_chat_subscription_invite_link + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: ChatInviteLink = await bot.create_chat_subscription_invite_link(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.create_chat_subscription_invite_link import CreateChatSubscriptionInviteLink` +- alias: :code:`from aiogram.methods import CreateChatSubscriptionInviteLink` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: ChatInviteLink = await bot(CreateChatSubscriptionInviteLink(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return CreateChatSubscriptionInviteLink(...) 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/delete_business_messages.rst b/docs/api/methods/delete_business_messages.rst new file mode 100644 index 00000000..fafa2725 --- /dev/null +++ b/docs/api/methods/delete_business_messages.rst @@ -0,0 +1,45 @@ +###################### +deleteBusinessMessages +###################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.delete_business_messages + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.delete_business_messages(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.delete_business_messages import DeleteBusinessMessages` +- alias: :code:`from aiogram.methods import DeleteBusinessMessages` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(DeleteBusinessMessages(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return DeleteBusinessMessages(...) diff --git a/docs/api/methods/delete_story.rst b/docs/api/methods/delete_story.rst new file mode 100644 index 00000000..6a1d1e18 --- /dev/null +++ b/docs/api/methods/delete_story.rst @@ -0,0 +1,45 @@ +########### +deleteStory +########### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.delete_story + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.delete_story(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.delete_story import DeleteStory` +- alias: :code:`from aiogram.methods import DeleteStory` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(DeleteStory(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return DeleteStory(...) diff --git a/docs/api/methods/edit_chat_subscription_invite_link.rst b/docs/api/methods/edit_chat_subscription_invite_link.rst new file mode 100644 index 00000000..51f9af85 --- /dev/null +++ b/docs/api/methods/edit_chat_subscription_invite_link.rst @@ -0,0 +1,45 @@ +############################## +editChatSubscriptionInviteLink +############################## + +Returns: :obj:`ChatInviteLink` + +.. automodule:: aiogram.methods.edit_chat_subscription_invite_link + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: ChatInviteLink = await bot.edit_chat_subscription_invite_link(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.edit_chat_subscription_invite_link import EditChatSubscriptionInviteLink` +- alias: :code:`from aiogram.methods import EditChatSubscriptionInviteLink` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: ChatInviteLink = await bot(EditChatSubscriptionInviteLink(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return EditChatSubscriptionInviteLink(...) diff --git a/docs/api/methods/edit_message_caption.rst b/docs/api/methods/edit_message_caption.rst index a37c17a5..85959fbc 100644 --- a/docs/api/methods/edit_message_caption.rst +++ b/docs/api/methods/edit_message_caption.rst @@ -2,7 +2,7 @@ editMessageCaption ################## -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.edit_message_caption :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: Union[Message, bool] = await bot.edit_message_caption(...) + result: Message | bool = await bot.edit_message_caption(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: Union[Message, bool] = await bot(EditMessageCaption(...)) + result: Message | bool = await bot(EditMessageCaption(...)) As reply into Webhook in handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_message_checklist.rst b/docs/api/methods/edit_message_checklist.rst new file mode 100644 index 00000000..c5839f02 --- /dev/null +++ b/docs/api/methods/edit_message_checklist.rst @@ -0,0 +1,45 @@ +#################### +editMessageChecklist +#################### + +Returns: :obj:`Message` + +.. automodule:: aiogram.methods.edit_message_checklist + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: Message = await bot.edit_message_checklist(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.edit_message_checklist import EditMessageChecklist` +- alias: :code:`from aiogram.methods import EditMessageChecklist` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: Message = await bot(EditMessageChecklist(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return EditMessageChecklist(...) diff --git a/docs/api/methods/edit_message_live_location.rst b/docs/api/methods/edit_message_live_location.rst index f2f0b3df..eb384aa5 100644 --- a/docs/api/methods/edit_message_live_location.rst +++ b/docs/api/methods/edit_message_live_location.rst @@ -2,7 +2,7 @@ editMessageLiveLocation ####################### -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.edit_message_live_location :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: Union[Message, bool] = await bot.edit_message_live_location(...) + result: Message | bool = await bot.edit_message_live_location(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: Union[Message, bool] = await bot(EditMessageLiveLocation(...)) + result: Message | bool = await bot(EditMessageLiveLocation(...)) As reply into Webhook in handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_message_media.rst b/docs/api/methods/edit_message_media.rst index aae7d89b..1cd05a5f 100644 --- a/docs/api/methods/edit_message_media.rst +++ b/docs/api/methods/edit_message_media.rst @@ -2,7 +2,7 @@ editMessageMedia ################ -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.edit_message_media :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: Union[Message, bool] = await bot.edit_message_media(...) + result: Message | bool = await bot.edit_message_media(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: Union[Message, bool] = await bot(EditMessageMedia(...)) + result: Message | bool = await bot(EditMessageMedia(...)) As reply into Webhook in handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_message_reply_markup.rst b/docs/api/methods/edit_message_reply_markup.rst index 6d67bdbe..309ef712 100644 --- a/docs/api/methods/edit_message_reply_markup.rst +++ b/docs/api/methods/edit_message_reply_markup.rst @@ -2,7 +2,7 @@ editMessageReplyMarkup ###################### -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.edit_message_reply_markup :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: Union[Message, bool] = await bot.edit_message_reply_markup(...) + result: Message | bool = await bot.edit_message_reply_markup(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: Union[Message, bool] = await bot(EditMessageReplyMarkup(...)) + result: Message | bool = await bot(EditMessageReplyMarkup(...)) As reply into Webhook in handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_message_text.rst b/docs/api/methods/edit_message_text.rst index b707de73..cab3bb89 100644 --- a/docs/api/methods/edit_message_text.rst +++ b/docs/api/methods/edit_message_text.rst @@ -2,7 +2,7 @@ editMessageText ############### -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.edit_message_text :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: Union[Message, bool] = await bot.edit_message_text(...) + result: Message | bool = await bot.edit_message_text(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: Union[Message, bool] = await bot(EditMessageText(...)) + result: Message | bool = await bot(EditMessageText(...)) As reply into Webhook in handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_story.rst b/docs/api/methods/edit_story.rst new file mode 100644 index 00000000..705eee8b --- /dev/null +++ b/docs/api/methods/edit_story.rst @@ -0,0 +1,45 @@ +######### +editStory +######### + +Returns: :obj:`Story` + +.. automodule:: aiogram.methods.edit_story + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: Story = await bot.edit_story(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.edit_story import EditStory` +- alias: :code:`from aiogram.methods import EditStory` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: Story = await bot(EditStory(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return EditStory(...) diff --git a/docs/api/methods/edit_user_star_subscription.rst b/docs/api/methods/edit_user_star_subscription.rst new file mode 100644 index 00000000..7c9b5400 --- /dev/null +++ b/docs/api/methods/edit_user_star_subscription.rst @@ -0,0 +1,45 @@ +######################## +editUserStarSubscription +######################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.edit_user_star_subscription + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.edit_user_star_subscription(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.edit_user_star_subscription import EditUserStarSubscription` +- alias: :code:`from aiogram.methods import EditUserStarSubscription` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(EditUserStarSubscription(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return EditUserStarSubscription(...) diff --git a/docs/api/methods/forward_messages.rst b/docs/api/methods/forward_messages.rst index b1eb4dde..8907e6fa 100644 --- a/docs/api/methods/forward_messages.rst +++ b/docs/api/methods/forward_messages.rst @@ -2,7 +2,7 @@ forwardMessages ############### -Returns: :obj:`List[MessageId]` +Returns: :obj:`list[MessageId]` .. automodule:: aiogram.methods.forward_messages :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: List[MessageId] = await bot.forward_messages(...) + result: list[MessageId] = await bot.forward_messages(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: List[MessageId] = await bot(ForwardMessages(...)) + result: list[MessageId] = await bot(ForwardMessages(...)) As reply into Webhook in handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_available_gifts.rst b/docs/api/methods/get_available_gifts.rst new file mode 100644 index 00000000..a6fddae7 --- /dev/null +++ b/docs/api/methods/get_available_gifts.rst @@ -0,0 +1,38 @@ +################# +getAvailableGifts +################# + +Returns: :obj:`Gifts` + +.. automodule:: aiogram.methods.get_available_gifts + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: Gifts = await bot.get_available_gifts(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_available_gifts import GetAvailableGifts` +- alias: :code:`from aiogram.methods import GetAvailableGifts` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: Gifts = await bot(GetAvailableGifts(...)) diff --git a/docs/api/methods/get_business_account_gifts.rst b/docs/api/methods/get_business_account_gifts.rst new file mode 100644 index 00000000..0b9fa427 --- /dev/null +++ b/docs/api/methods/get_business_account_gifts.rst @@ -0,0 +1,38 @@ +####################### +getBusinessAccountGifts +####################### + +Returns: :obj:`OwnedGifts` + +.. automodule:: aiogram.methods.get_business_account_gifts + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: OwnedGifts = await bot.get_business_account_gifts(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_business_account_gifts import GetBusinessAccountGifts` +- alias: :code:`from aiogram.methods import GetBusinessAccountGifts` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: OwnedGifts = await bot(GetBusinessAccountGifts(...)) diff --git a/docs/api/methods/get_business_account_star_balance.rst b/docs/api/methods/get_business_account_star_balance.rst new file mode 100644 index 00000000..163dcb84 --- /dev/null +++ b/docs/api/methods/get_business_account_star_balance.rst @@ -0,0 +1,38 @@ +############################# +getBusinessAccountStarBalance +############################# + +Returns: :obj:`StarAmount` + +.. automodule:: aiogram.methods.get_business_account_star_balance + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: StarAmount = await bot.get_business_account_star_balance(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_business_account_star_balance import GetBusinessAccountStarBalance` +- alias: :code:`from aiogram.methods import GetBusinessAccountStarBalance` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: StarAmount = await bot(GetBusinessAccountStarBalance(...)) diff --git a/docs/api/methods/get_chat_administrators.rst b/docs/api/methods/get_chat_administrators.rst index 9a1784b5..7936090e 100644 --- a/docs/api/methods/get_chat_administrators.rst +++ b/docs/api/methods/get_chat_administrators.rst @@ -2,7 +2,7 @@ getChatAdministrators ##################### -Returns: :obj:`List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]]` +Returns: :obj:`list[ResultChatMemberUnion]` .. automodule:: aiogram.methods.get_chat_administrators :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]] = await bot.get_chat_administrators(...) + result: list[ResultChatMemberUnion] = await bot.get_chat_administrators(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]] = await bot(GetChatAdministrators(...)) + result: list[ResultChatMemberUnion] = await bot(GetChatAdministrators(...)) diff --git a/docs/api/methods/get_chat_gifts.rst b/docs/api/methods/get_chat_gifts.rst new file mode 100644 index 00000000..87f48d3b --- /dev/null +++ b/docs/api/methods/get_chat_gifts.rst @@ -0,0 +1,38 @@ +############ +getChatGifts +############ + +Returns: :obj:`OwnedGifts` + +.. automodule:: aiogram.methods.get_chat_gifts + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: OwnedGifts = await bot.get_chat_gifts(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_chat_gifts import GetChatGifts` +- alias: :code:`from aiogram.methods import GetChatGifts` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: OwnedGifts = await bot(GetChatGifts(...)) diff --git a/docs/api/methods/get_chat_member.rst b/docs/api/methods/get_chat_member.rst index 60742bf6..653eb7f6 100644 --- a/docs/api/methods/get_chat_member.rst +++ b/docs/api/methods/get_chat_member.rst @@ -2,7 +2,7 @@ getChatMember ############# -Returns: :obj:`Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]` +Returns: :obj:`ResultChatMemberUnion` .. automodule:: aiogram.methods.get_chat_member :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned] = await bot.get_chat_member(...) + result: ResultChatMemberUnion = await bot.get_chat_member(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned] = await bot(GetChatMember(...)) + result: ResultChatMemberUnion = await bot(GetChatMember(...)) diff --git a/docs/api/methods/get_chat_menu_button.rst b/docs/api/methods/get_chat_menu_button.rst index e70fddb0..16ae0bc4 100644 --- a/docs/api/methods/get_chat_menu_button.rst +++ b/docs/api/methods/get_chat_menu_button.rst @@ -2,7 +2,7 @@ getChatMenuButton ################# -Returns: :obj:`Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands]` +Returns: :obj:`ResultMenuButtonUnion` .. automodule:: aiogram.methods.get_chat_menu_button :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands] = await bot.get_chat_menu_button(...) + result: ResultMenuButtonUnion = await bot.get_chat_menu_button(...) Method as object @@ -35,4 +35,4 @@ With specific bot .. code-block:: python - result: Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands] = await bot(GetChatMenuButton(...)) + result: ResultMenuButtonUnion = await bot(GetChatMenuButton(...)) diff --git a/docs/api/methods/get_custom_emoji_stickers.rst b/docs/api/methods/get_custom_emoji_stickers.rst index c7b4dbc5..26806e57 100644 --- a/docs/api/methods/get_custom_emoji_stickers.rst +++ b/docs/api/methods/get_custom_emoji_stickers.rst @@ -2,7 +2,7 @@ getCustomEmojiStickers ###################### -Returns: :obj:`List[Sticker]` +Returns: :obj:`list[Sticker]` .. automodule:: aiogram.methods.get_custom_emoji_stickers :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: List[Sticker] = await bot.get_custom_emoji_stickers(...) + result: list[Sticker] = await bot.get_custom_emoji_stickers(...) Method as object @@ -35,4 +35,4 @@ With specific bot .. code-block:: python - result: List[Sticker] = await bot(GetCustomEmojiStickers(...)) + result: list[Sticker] = await bot(GetCustomEmojiStickers(...)) diff --git a/docs/api/methods/get_forum_topic_icon_stickers.rst b/docs/api/methods/get_forum_topic_icon_stickers.rst index 5e6680a7..8d3e3062 100644 --- a/docs/api/methods/get_forum_topic_icon_stickers.rst +++ b/docs/api/methods/get_forum_topic_icon_stickers.rst @@ -2,7 +2,7 @@ getForumTopicIconStickers ######################### -Returns: :obj:`List[Sticker]` +Returns: :obj:`list[Sticker]` .. automodule:: aiogram.methods.get_forum_topic_icon_stickers :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: List[Sticker] = await bot.get_forum_topic_icon_stickers(...) + result: list[Sticker] = await bot.get_forum_topic_icon_stickers(...) Method as object @@ -35,4 +35,4 @@ With specific bot .. code-block:: python - result: List[Sticker] = await bot(GetForumTopicIconStickers(...)) + result: list[Sticker] = await bot(GetForumTopicIconStickers(...)) diff --git a/docs/api/methods/get_game_high_scores.rst b/docs/api/methods/get_game_high_scores.rst index 67b40ef3..9ca7fdc9 100644 --- a/docs/api/methods/get_game_high_scores.rst +++ b/docs/api/methods/get_game_high_scores.rst @@ -2,7 +2,7 @@ getGameHighScores ################# -Returns: :obj:`List[GameHighScore]` +Returns: :obj:`list[GameHighScore]` .. automodule:: aiogram.methods.get_game_high_scores :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: List[GameHighScore] = await bot.get_game_high_scores(...) + result: list[GameHighScore] = await bot.get_game_high_scores(...) Method as object @@ -35,4 +35,4 @@ With specific bot .. code-block:: python - result: List[GameHighScore] = await bot(GetGameHighScores(...)) + result: list[GameHighScore] = await bot(GetGameHighScores(...)) diff --git a/docs/api/methods/get_managed_bot_token.rst b/docs/api/methods/get_managed_bot_token.rst new file mode 100644 index 00000000..5ad46aaf --- /dev/null +++ b/docs/api/methods/get_managed_bot_token.rst @@ -0,0 +1,38 @@ +################## +getManagedBotToken +################## + +Returns: :obj:`str` + +.. automodule:: aiogram.methods.get_managed_bot_token + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: str = await bot.get_managed_bot_token(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_managed_bot_token import GetManagedBotToken` +- alias: :code:`from aiogram.methods import GetManagedBotToken` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: str = await bot(GetManagedBotToken(...)) diff --git a/docs/api/methods/get_my_commands.rst b/docs/api/methods/get_my_commands.rst index 9ca3a907..1a4d7b80 100644 --- a/docs/api/methods/get_my_commands.rst +++ b/docs/api/methods/get_my_commands.rst @@ -2,7 +2,7 @@ getMyCommands ############# -Returns: :obj:`List[BotCommand]` +Returns: :obj:`list[BotCommand]` .. automodule:: aiogram.methods.get_my_commands :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: List[BotCommand] = await bot.get_my_commands(...) + result: list[BotCommand] = await bot.get_my_commands(...) Method as object @@ -35,4 +35,4 @@ With specific bot .. code-block:: python - result: List[BotCommand] = await bot(GetMyCommands(...)) + result: list[BotCommand] = await bot(GetMyCommands(...)) diff --git a/docs/api/methods/get_my_star_balance.rst b/docs/api/methods/get_my_star_balance.rst new file mode 100644 index 00000000..ef7ab550 --- /dev/null +++ b/docs/api/methods/get_my_star_balance.rst @@ -0,0 +1,38 @@ +################ +getMyStarBalance +################ + +Returns: :obj:`StarAmount` + +.. automodule:: aiogram.methods.get_my_star_balance + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: StarAmount = await bot.get_my_star_balance(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_my_star_balance import GetMyStarBalance` +- alias: :code:`from aiogram.methods import GetMyStarBalance` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: StarAmount = await bot(GetMyStarBalance(...)) diff --git a/docs/api/methods/get_updates.rst b/docs/api/methods/get_updates.rst index f774aef1..005fd6de 100644 --- a/docs/api/methods/get_updates.rst +++ b/docs/api/methods/get_updates.rst @@ -2,7 +2,7 @@ getUpdates ########## -Returns: :obj:`List[Update]` +Returns: :obj:`list[Update]` .. automodule:: aiogram.methods.get_updates :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: List[Update] = await bot.get_updates(...) + result: list[Update] = await bot.get_updates(...) Method as object @@ -35,4 +35,4 @@ With specific bot .. code-block:: python - result: List[Update] = await bot(GetUpdates(...)) + result: list[Update] = await bot(GetUpdates(...)) diff --git a/docs/api/methods/get_user_gifts.rst b/docs/api/methods/get_user_gifts.rst new file mode 100644 index 00000000..77b96e0f --- /dev/null +++ b/docs/api/methods/get_user_gifts.rst @@ -0,0 +1,38 @@ +############ +getUserGifts +############ + +Returns: :obj:`OwnedGifts` + +.. automodule:: aiogram.methods.get_user_gifts + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: OwnedGifts = await bot.get_user_gifts(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_user_gifts import GetUserGifts` +- alias: :code:`from aiogram.methods import GetUserGifts` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: OwnedGifts = await bot(GetUserGifts(...)) diff --git a/docs/api/methods/get_user_profile_audios.rst b/docs/api/methods/get_user_profile_audios.rst new file mode 100644 index 00000000..553ab296 --- /dev/null +++ b/docs/api/methods/get_user_profile_audios.rst @@ -0,0 +1,46 @@ +#################### +getUserProfileAudios +#################### + +Returns: :obj:`UserProfileAudios` + +.. automodule:: aiogram.methods.get_user_profile_audios + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: UserProfileAudios = await bot.get_user_profile_audios(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_user_profile_audios import GetUserProfileAudios` +- alias: :code:`from aiogram.methods import GetUserProfileAudios` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: UserProfileAudios = await bot(GetUserProfileAudios(...)) + + + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.user.User.get_profile_audios` diff --git a/docs/api/methods/gift_premium_subscription.rst b/docs/api/methods/gift_premium_subscription.rst new file mode 100644 index 00000000..031fd33b --- /dev/null +++ b/docs/api/methods/gift_premium_subscription.rst @@ -0,0 +1,45 @@ +####################### +giftPremiumSubscription +####################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.gift_premium_subscription + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.gift_premium_subscription(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.gift_premium_subscription import GiftPremiumSubscription` +- alias: :code:`from aiogram.methods import GiftPremiumSubscription` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(GiftPremiumSubscription(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return GiftPremiumSubscription(...) diff --git a/docs/api/methods/index.rst b/docs/api/methods/index.rst index f9de2188..187f8bb6 100644 --- a/docs/api/methods/index.rst +++ b/docs/api/methods/index.rst @@ -35,35 +35,47 @@ Available methods :maxdepth: 1 answer_callback_query + answer_web_app_query approve_chat_join_request ban_chat_member ban_chat_sender_chat 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 + get_chat_gifts get_chat_member get_chat_member_count get_chat_menu_button get_file get_forum_topic_icon_stickers + get_managed_bot_token get_me get_my_commands get_my_default_administrator_rights @@ -71,25 +83,41 @@ Available methods get_my_name get_my_short_description get_user_chat_boosts + get_user_gifts + get_user_profile_audios 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_my_profile_photo + remove_user_verification reopen_forum_topic reopen_general_forum_topic + replace_managed_bot_token + repost_story restrict_chat_member revoke_chat_invite_link + save_prepared_inline_message + save_prepared_keyboard_button send_animation send_audio send_chat_action + send_checklist send_contact send_dice send_document + send_gift send_location send_media_group send_message + send_message_draft send_paid_media send_photo send_poll @@ -97,8 +125,14 @@ 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_member_tag set_chat_menu_button set_chat_permissions set_chat_photo @@ -109,7 +143,11 @@ Available methods set_my_default_administrator_rights set_my_description set_my_name + set_my_profile_photo 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 @@ -117,6 +155,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 ================= @@ -124,9 +165,12 @@ Updating messages .. toctree:: :maxdepth: 1 + approve_suggested_post + decline_suggested_post delete_message delete_messages edit_message_caption + edit_message_checklist edit_message_live_location edit_message_media edit_message_reply_markup @@ -134,15 +178,6 @@ Updating messages stop_message_live_location stop_poll -Inline mode -=========== - -.. toctree:: - :maxdepth: 1 - - answer_inline_query - answer_web_app_query - Games ===== @@ -162,6 +197,8 @@ Payments answer_pre_checkout_query answer_shipping_query create_invoice_link + edit_user_star_subscription + get_my_star_balance get_star_transactions refund_star_payment send_invoice @@ -184,3 +221,11 @@ Telegram Passport :maxdepth: 1 set_passport_data_errors + +Inline mode +=========== + +.. toctree:: + :maxdepth: 1 + + answer_inline_query diff --git a/docs/api/methods/post_story.rst b/docs/api/methods/post_story.rst new file mode 100644 index 00000000..728399b6 --- /dev/null +++ b/docs/api/methods/post_story.rst @@ -0,0 +1,45 @@ +######### +postStory +######### + +Returns: :obj:`Story` + +.. automodule:: aiogram.methods.post_story + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: Story = await bot.post_story(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.post_story import PostStory` +- alias: :code:`from aiogram.methods import PostStory` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: Story = await bot(PostStory(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return PostStory(...) diff --git a/docs/api/methods/read_business_message.rst b/docs/api/methods/read_business_message.rst new file mode 100644 index 00000000..a071a54d --- /dev/null +++ b/docs/api/methods/read_business_message.rst @@ -0,0 +1,45 @@ +################### +readBusinessMessage +################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.read_business_message + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.read_business_message(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.read_business_message import ReadBusinessMessage` +- alias: :code:`from aiogram.methods import ReadBusinessMessage` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(ReadBusinessMessage(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return ReadBusinessMessage(...) diff --git a/docs/api/methods/remove_business_account_profile_photo.rst b/docs/api/methods/remove_business_account_profile_photo.rst new file mode 100644 index 00000000..426d2cae --- /dev/null +++ b/docs/api/methods/remove_business_account_profile_photo.rst @@ -0,0 +1,45 @@ +################################# +removeBusinessAccountProfilePhoto +################################# + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.remove_business_account_profile_photo + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.remove_business_account_profile_photo(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.remove_business_account_profile_photo import RemoveBusinessAccountProfilePhoto` +- alias: :code:`from aiogram.methods import RemoveBusinessAccountProfilePhoto` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(RemoveBusinessAccountProfilePhoto(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return RemoveBusinessAccountProfilePhoto(...) diff --git a/docs/api/methods/remove_chat_verification.rst b/docs/api/methods/remove_chat_verification.rst new file mode 100644 index 00000000..068ea302 --- /dev/null +++ b/docs/api/methods/remove_chat_verification.rst @@ -0,0 +1,45 @@ +###################### +removeChatVerification +###################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.remove_chat_verification + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.remove_chat_verification(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.remove_chat_verification import RemoveChatVerification` +- alias: :code:`from aiogram.methods import RemoveChatVerification` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(RemoveChatVerification(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return RemoveChatVerification(...) diff --git a/docs/api/methods/remove_my_profile_photo.rst b/docs/api/methods/remove_my_profile_photo.rst new file mode 100644 index 00000000..19d0d251 --- /dev/null +++ b/docs/api/methods/remove_my_profile_photo.rst @@ -0,0 +1,45 @@ +#################### +removeMyProfilePhoto +#################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.remove_my_profile_photo + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.remove_my_profile_photo(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.remove_my_profile_photo import RemoveMyProfilePhoto` +- alias: :code:`from aiogram.methods import RemoveMyProfilePhoto` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(RemoveMyProfilePhoto(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return RemoveMyProfilePhoto(...) diff --git a/docs/api/methods/remove_user_verification.rst b/docs/api/methods/remove_user_verification.rst new file mode 100644 index 00000000..a122abab --- /dev/null +++ b/docs/api/methods/remove_user_verification.rst @@ -0,0 +1,45 @@ +###################### +removeUserVerification +###################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.remove_user_verification + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.remove_user_verification(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.remove_user_verification import RemoveUserVerification` +- alias: :code:`from aiogram.methods import RemoveUserVerification` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(RemoveUserVerification(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return RemoveUserVerification(...) diff --git a/docs/api/methods/replace_managed_bot_token.rst b/docs/api/methods/replace_managed_bot_token.rst new file mode 100644 index 00000000..97b2bc1b --- /dev/null +++ b/docs/api/methods/replace_managed_bot_token.rst @@ -0,0 +1,45 @@ +###################### +replaceManagedBotToken +###################### + +Returns: :obj:`str` + +.. automodule:: aiogram.methods.replace_managed_bot_token + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: str = await bot.replace_managed_bot_token(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.replace_managed_bot_token import ReplaceManagedBotToken` +- alias: :code:`from aiogram.methods import ReplaceManagedBotToken` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: str = await bot(ReplaceManagedBotToken(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return ReplaceManagedBotToken(...) diff --git a/docs/api/methods/repost_story.rst b/docs/api/methods/repost_story.rst new file mode 100644 index 00000000..c5a55d84 --- /dev/null +++ b/docs/api/methods/repost_story.rst @@ -0,0 +1,45 @@ +########### +repostStory +########### + +Returns: :obj:`Story` + +.. automodule:: aiogram.methods.repost_story + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: Story = await bot.repost_story(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.repost_story import RepostStory` +- alias: :code:`from aiogram.methods import RepostStory` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: Story = await bot(RepostStory(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return RepostStory(...) diff --git a/docs/api/methods/save_prepared_inline_message.rst b/docs/api/methods/save_prepared_inline_message.rst new file mode 100644 index 00000000..143fa6da --- /dev/null +++ b/docs/api/methods/save_prepared_inline_message.rst @@ -0,0 +1,45 @@ +######################### +savePreparedInlineMessage +######################### + +Returns: :obj:`PreparedInlineMessage` + +.. automodule:: aiogram.methods.save_prepared_inline_message + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: PreparedInlineMessage = await bot.save_prepared_inline_message(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.save_prepared_inline_message import SavePreparedInlineMessage` +- alias: :code:`from aiogram.methods import SavePreparedInlineMessage` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: PreparedInlineMessage = await bot(SavePreparedInlineMessage(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SavePreparedInlineMessage(...) diff --git a/docs/api/methods/save_prepared_keyboard_button.rst b/docs/api/methods/save_prepared_keyboard_button.rst new file mode 100644 index 00000000..3a8ff2fb --- /dev/null +++ b/docs/api/methods/save_prepared_keyboard_button.rst @@ -0,0 +1,45 @@ +########################## +savePreparedKeyboardButton +########################## + +Returns: :obj:`PreparedKeyboardButton` + +.. automodule:: aiogram.methods.save_prepared_keyboard_button + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: PreparedKeyboardButton = await bot.save_prepared_keyboard_button(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.save_prepared_keyboard_button import SavePreparedKeyboardButton` +- alias: :code:`from aiogram.methods import SavePreparedKeyboardButton` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: PreparedKeyboardButton = await bot(SavePreparedKeyboardButton(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SavePreparedKeyboardButton(...) diff --git a/docs/api/methods/send_animation.rst b/docs/api/methods/send_animation.rst index 5c6782cb..5ca79893 100644 --- a/docs/api/methods/send_animation.rst +++ b/docs/api/methods/send_animation.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_animation` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation` diff --git a/docs/api/methods/send_audio.rst b/docs/api/methods/send_audio.rst index 2dbde591..0f6c16a6 100644 --- a/docs/api/methods/send_audio.rst +++ b/docs/api/methods/send_audio.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_audio` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio` diff --git a/docs/api/methods/send_checklist.rst b/docs/api/methods/send_checklist.rst new file mode 100644 index 00000000..371a0a42 --- /dev/null +++ b/docs/api/methods/send_checklist.rst @@ -0,0 +1,45 @@ +############# +sendChecklist +############# + +Returns: :obj:`Message` + +.. automodule:: aiogram.methods.send_checklist + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: Message = await bot.send_checklist(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.send_checklist import SendChecklist` +- alias: :code:`from aiogram.methods import SendChecklist` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: Message = await bot(SendChecklist(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SendChecklist(...) diff --git a/docs/api/methods/send_contact.rst b/docs/api/methods/send_contact.rst index 460a7702..7c30d2b8 100644 --- a/docs/api/methods/send_contact.rst +++ b/docs/api/methods/send_contact.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_contact` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact` diff --git a/docs/api/methods/send_dice.rst b/docs/api/methods/send_dice.rst index aa665be9..ad4e4d20 100644 --- a/docs/api/methods/send_dice.rst +++ b/docs/api/methods/send_dice.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_dice` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice` diff --git a/docs/api/methods/send_document.rst b/docs/api/methods/send_document.rst index 5b979c56..2d3c358d 100644 --- a/docs/api/methods/send_document.rst +++ b/docs/api/methods/send_document.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_document` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_document` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_document` diff --git a/docs/api/methods/send_game.rst b/docs/api/methods/send_game.rst index 9015b3f4..da31edaa 100644 --- a/docs/api/methods/send_game.rst +++ b/docs/api/methods/send_game.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_game` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_game` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_game` diff --git a/docs/api/methods/send_gift.rst b/docs/api/methods/send_gift.rst new file mode 100644 index 00000000..fa53c274 --- /dev/null +++ b/docs/api/methods/send_gift.rst @@ -0,0 +1,45 @@ +######## +sendGift +######## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.send_gift + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.send_gift(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.send_gift import SendGift` +- alias: :code:`from aiogram.methods import SendGift` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SendGift(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SendGift(...) diff --git a/docs/api/methods/send_invoice.rst b/docs/api/methods/send_invoice.rst index 7737f402..00e2e745 100644 --- a/docs/api/methods/send_invoice.rst +++ b/docs/api/methods/send_invoice.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice` diff --git a/docs/api/methods/send_location.rst b/docs/api/methods/send_location.rst index 4bea6902..8a73ac80 100644 --- a/docs/api/methods/send_location.rst +++ b/docs/api/methods/send_location.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_location` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_location` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_location` diff --git a/docs/api/methods/send_media_group.rst b/docs/api/methods/send_media_group.rst index 21823573..069d50be 100644 --- a/docs/api/methods/send_media_group.rst +++ b/docs/api/methods/send_media_group.rst @@ -2,7 +2,7 @@ sendMediaGroup ############## -Returns: :obj:`List[Message]` +Returns: :obj:`list[Message]` .. automodule:: aiogram.methods.send_media_group :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: List[Message] = await bot.send_media_group(...) + result: list[Message] = await bot.send_media_group(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: List[Message] = await bot(SendMediaGroup(...)) + result: list[Message] = await bot(SendMediaGroup(...)) As reply into Webhook in handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group` diff --git a/docs/api/methods/send_message.rst b/docs/api/methods/send_message.rst index fee3bfa5..7596c28d 100644 --- a/docs/api/methods/send_message.rst +++ b/docs/api/methods/send_message.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply` diff --git a/docs/api/methods/send_message_draft.rst b/docs/api/methods/send_message_draft.rst new file mode 100644 index 00000000..6519674a --- /dev/null +++ b/docs/api/methods/send_message_draft.rst @@ -0,0 +1,45 @@ +################ +sendMessageDraft +################ + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.send_message_draft + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.send_message_draft(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.send_message_draft import SendMessageDraft` +- alias: :code:`from aiogram.methods import SendMessageDraft` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SendMessageDraft(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SendMessageDraft(...) diff --git a/docs/api/methods/send_paid_media.rst b/docs/api/methods/send_paid_media.rst index 1916511d..fe380a8f 100644 --- a/docs/api/methods/send_paid_media.rst +++ b/docs/api/methods/send_paid_media.rst @@ -49,3 +49,6 @@ As shortcut from received object -------------------------------- - :meth:`aiogram.types.message.Message.answer_paid_media` +- :meth:`aiogram.types.message.Message.reply_paid_media` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media` diff --git a/docs/api/methods/send_photo.rst b/docs/api/methods/send_photo.rst index c9797fc0..1470274c 100644 --- a/docs/api/methods/send_photo.rst +++ b/docs/api/methods/send_photo.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_photo` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo` diff --git a/docs/api/methods/send_poll.rst b/docs/api/methods/send_poll.rst index d81f042c..b37cd9e8 100644 --- a/docs/api/methods/send_poll.rst +++ b/docs/api/methods/send_poll.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_poll` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll` diff --git a/docs/api/methods/send_sticker.rst b/docs/api/methods/send_sticker.rst index 9399b7e1..4b22c805 100644 --- a/docs/api/methods/send_sticker.rst +++ b/docs/api/methods/send_sticker.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker` diff --git a/docs/api/methods/send_venue.rst b/docs/api/methods/send_venue.rst index ec42e991..de53528e 100644 --- a/docs/api/methods/send_venue.rst +++ b/docs/api/methods/send_venue.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_venue` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue` diff --git a/docs/api/methods/send_video.rst b/docs/api/methods/send_video.rst index db454359..87731278 100644 --- a/docs/api/methods/send_video.rst +++ b/docs/api/methods/send_video.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_video` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_video` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_video` diff --git a/docs/api/methods/send_video_note.rst b/docs/api/methods/send_video_note.rst index 6bc89b09..78255cc8 100644 --- a/docs/api/methods/send_video_note.rst +++ b/docs/api/methods/send_video_note.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note` diff --git a/docs/api/methods/send_voice.rst b/docs/api/methods/send_voice.rst index 2e4ffc72..3b4bb0c9 100644 --- a/docs/api/methods/send_voice.rst +++ b/docs/api/methods/send_voice.rst @@ -53,3 +53,5 @@ As shortcut from received object - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_voice` - :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm` - :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice` +- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice` diff --git a/docs/api/methods/set_business_account_bio.rst b/docs/api/methods/set_business_account_bio.rst new file mode 100644 index 00000000..9628d7c1 --- /dev/null +++ b/docs/api/methods/set_business_account_bio.rst @@ -0,0 +1,45 @@ +##################### +setBusinessAccountBio +##################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_business_account_bio + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_business_account_bio(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_business_account_bio import SetBusinessAccountBio` +- alias: :code:`from aiogram.methods import SetBusinessAccountBio` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetBusinessAccountBio(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetBusinessAccountBio(...) diff --git a/docs/api/methods/set_business_account_gift_settings.rst b/docs/api/methods/set_business_account_gift_settings.rst new file mode 100644 index 00000000..b3b3c4b0 --- /dev/null +++ b/docs/api/methods/set_business_account_gift_settings.rst @@ -0,0 +1,45 @@ +############################## +setBusinessAccountGiftSettings +############################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_business_account_gift_settings + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_business_account_gift_settings(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_business_account_gift_settings import SetBusinessAccountGiftSettings` +- alias: :code:`from aiogram.methods import SetBusinessAccountGiftSettings` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetBusinessAccountGiftSettings(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetBusinessAccountGiftSettings(...) diff --git a/docs/api/methods/set_business_account_name.rst b/docs/api/methods/set_business_account_name.rst new file mode 100644 index 00000000..36e2b480 --- /dev/null +++ b/docs/api/methods/set_business_account_name.rst @@ -0,0 +1,45 @@ +###################### +setBusinessAccountName +###################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_business_account_name + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_business_account_name(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_business_account_name import SetBusinessAccountName` +- alias: :code:`from aiogram.methods import SetBusinessAccountName` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetBusinessAccountName(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetBusinessAccountName(...) diff --git a/docs/api/methods/set_business_account_profile_photo.rst b/docs/api/methods/set_business_account_profile_photo.rst new file mode 100644 index 00000000..c2671825 --- /dev/null +++ b/docs/api/methods/set_business_account_profile_photo.rst @@ -0,0 +1,45 @@ +############################## +setBusinessAccountProfilePhoto +############################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_business_account_profile_photo + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_business_account_profile_photo(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_business_account_profile_photo import SetBusinessAccountProfilePhoto` +- alias: :code:`from aiogram.methods import SetBusinessAccountProfilePhoto` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetBusinessAccountProfilePhoto(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetBusinessAccountProfilePhoto(...) diff --git a/docs/api/methods/set_business_account_username.rst b/docs/api/methods/set_business_account_username.rst new file mode 100644 index 00000000..ee462f57 --- /dev/null +++ b/docs/api/methods/set_business_account_username.rst @@ -0,0 +1,45 @@ +########################## +setBusinessAccountUsername +########################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_business_account_username + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_business_account_username(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_business_account_username import SetBusinessAccountUsername` +- alias: :code:`from aiogram.methods import SetBusinessAccountUsername` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetBusinessAccountUsername(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetBusinessAccountUsername(...) diff --git a/docs/api/methods/set_chat_member_tag.rst b/docs/api/methods/set_chat_member_tag.rst new file mode 100644 index 00000000..1890810d --- /dev/null +++ b/docs/api/methods/set_chat_member_tag.rst @@ -0,0 +1,51 @@ +################ +setChatMemberTag +################ + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_chat_member_tag + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_chat_member_tag(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_chat_member_tag import SetChatMemberTag` +- alias: :code:`from aiogram.methods import SetChatMemberTag` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetChatMemberTag(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetChatMemberTag(...) + + +As shortcut from received object +-------------------------------- + +- :meth:`aiogram.types.chat.Chat.set_member_tag` diff --git a/docs/api/methods/set_game_score.rst b/docs/api/methods/set_game_score.rst index 6a227095..73dae21a 100644 --- a/docs/api/methods/set_game_score.rst +++ b/docs/api/methods/set_game_score.rst @@ -2,7 +2,7 @@ setGameScore ############ -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.set_game_score :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: Union[Message, bool] = await bot.set_game_score(...) + result: Message | bool = await bot.set_game_score(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: Union[Message, bool] = await bot(SetGameScore(...)) + result: Message | bool = await bot(SetGameScore(...)) As reply into Webhook in handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/set_my_profile_photo.rst b/docs/api/methods/set_my_profile_photo.rst new file mode 100644 index 00000000..c2290414 --- /dev/null +++ b/docs/api/methods/set_my_profile_photo.rst @@ -0,0 +1,45 @@ +################# +setMyProfilePhoto +################# + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_my_profile_photo + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_my_profile_photo(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_my_profile_photo import SetMyProfilePhoto` +- alias: :code:`from aiogram.methods import SetMyProfilePhoto` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetMyProfilePhoto(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetMyProfilePhoto(...) diff --git a/docs/api/methods/set_user_emoji_status.rst b/docs/api/methods/set_user_emoji_status.rst new file mode 100644 index 00000000..fb207aed --- /dev/null +++ b/docs/api/methods/set_user_emoji_status.rst @@ -0,0 +1,45 @@ +################## +setUserEmojiStatus +################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_user_emoji_status + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_user_emoji_status(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_user_emoji_status import SetUserEmojiStatus` +- alias: :code:`from aiogram.methods import SetUserEmojiStatus` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetUserEmojiStatus(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetUserEmojiStatus(...) diff --git a/docs/api/methods/stop_message_live_location.rst b/docs/api/methods/stop_message_live_location.rst index 568d41cc..d71c1cb0 100644 --- a/docs/api/methods/stop_message_live_location.rst +++ b/docs/api/methods/stop_message_live_location.rst @@ -2,7 +2,7 @@ stopMessageLiveLocation ####################### -Returns: :obj:`Union[Message, bool]` +Returns: :obj:`Message | bool` .. automodule:: aiogram.methods.stop_message_live_location :members: @@ -19,7 +19,7 @@ As bot method .. code-block:: - result: Union[Message, bool] = await bot.stop_message_live_location(...) + result: Message | bool = await bot.stop_message_live_location(...) Method as object @@ -35,7 +35,7 @@ With specific bot .. code-block:: python - result: Union[Message, bool] = await bot(StopMessageLiveLocation(...)) + result: Message | bool = await bot(StopMessageLiveLocation(...)) As reply into Webhook in handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/transfer_business_account_stars.rst b/docs/api/methods/transfer_business_account_stars.rst new file mode 100644 index 00000000..99535b67 --- /dev/null +++ b/docs/api/methods/transfer_business_account_stars.rst @@ -0,0 +1,45 @@ +############################ +transferBusinessAccountStars +############################ + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.transfer_business_account_stars + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.transfer_business_account_stars(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.transfer_business_account_stars import TransferBusinessAccountStars` +- alias: :code:`from aiogram.methods import TransferBusinessAccountStars` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(TransferBusinessAccountStars(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return TransferBusinessAccountStars(...) diff --git a/docs/api/methods/transfer_gift.rst b/docs/api/methods/transfer_gift.rst new file mode 100644 index 00000000..31154448 --- /dev/null +++ b/docs/api/methods/transfer_gift.rst @@ -0,0 +1,45 @@ +############ +transferGift +############ + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.transfer_gift + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.transfer_gift(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.transfer_gift import TransferGift` +- alias: :code:`from aiogram.methods import TransferGift` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(TransferGift(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return TransferGift(...) diff --git a/docs/api/methods/upgrade_gift.rst b/docs/api/methods/upgrade_gift.rst new file mode 100644 index 00000000..7749a158 --- /dev/null +++ b/docs/api/methods/upgrade_gift.rst @@ -0,0 +1,45 @@ +########### +upgradeGift +########### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.upgrade_gift + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.upgrade_gift(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.upgrade_gift import UpgradeGift` +- alias: :code:`from aiogram.methods import UpgradeGift` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(UpgradeGift(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return UpgradeGift(...) diff --git a/docs/api/methods/verify_chat.rst b/docs/api/methods/verify_chat.rst new file mode 100644 index 00000000..e60a130a --- /dev/null +++ b/docs/api/methods/verify_chat.rst @@ -0,0 +1,45 @@ +########## +verifyChat +########## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.verify_chat + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.verify_chat(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.verify_chat import VerifyChat` +- alias: :code:`from aiogram.methods import VerifyChat` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(VerifyChat(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return VerifyChat(...) diff --git a/docs/api/methods/verify_user.rst b/docs/api/methods/verify_user.rst new file mode 100644 index 00000000..12aa6e3e --- /dev/null +++ b/docs/api/methods/verify_user.rst @@ -0,0 +1,45 @@ +########## +verifyUser +########## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.verify_user + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.verify_user(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.verify_user import VerifyUser` +- alias: :code:`from aiogram.methods import VerifyUser` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(VerifyUser(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return VerifyUser(...) diff --git a/docs/api/types/accepted_gift_types.rst b/docs/api/types/accepted_gift_types.rst new file mode 100644 index 00000000..67a0b962 --- /dev/null +++ b/docs/api/types/accepted_gift_types.rst @@ -0,0 +1,10 @@ +################# +AcceptedGiftTypes +################# + + +.. automodule:: aiogram.types.accepted_gift_types + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/affiliate_info.rst b/docs/api/types/affiliate_info.rst new file mode 100644 index 00000000..0fe145e9 --- /dev/null +++ b/docs/api/types/affiliate_info.rst @@ -0,0 +1,10 @@ +############# +AffiliateInfo +############# + + +.. automodule:: aiogram.types.affiliate_info + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/business_bot_rights.rst b/docs/api/types/business_bot_rights.rst new file mode 100644 index 00000000..c98ef3dd --- /dev/null +++ b/docs/api/types/business_bot_rights.rst @@ -0,0 +1,10 @@ +################# +BusinessBotRights +################# + + +.. automodule:: aiogram.types.business_bot_rights + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_owner_changed.rst b/docs/api/types/chat_owner_changed.rst new file mode 100644 index 00000000..b87b0f84 --- /dev/null +++ b/docs/api/types/chat_owner_changed.rst @@ -0,0 +1,10 @@ +################ +ChatOwnerChanged +################ + + +.. automodule:: aiogram.types.chat_owner_changed + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/chat_owner_left.rst b/docs/api/types/chat_owner_left.rst new file mode 100644 index 00000000..1cca68c3 --- /dev/null +++ b/docs/api/types/chat_owner_left.rst @@ -0,0 +1,10 @@ +############# +ChatOwnerLeft +############# + + +.. automodule:: aiogram.types.chat_owner_left + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/checklist.rst b/docs/api/types/checklist.rst new file mode 100644 index 00000000..9f7c9fa1 --- /dev/null +++ b/docs/api/types/checklist.rst @@ -0,0 +1,10 @@ +######### +Checklist +######### + + +.. automodule:: aiogram.types.checklist + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/checklist_task.rst b/docs/api/types/checklist_task.rst new file mode 100644 index 00000000..3a8c2eb5 --- /dev/null +++ b/docs/api/types/checklist_task.rst @@ -0,0 +1,10 @@ +############# +ChecklistTask +############# + + +.. automodule:: aiogram.types.checklist_task + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/checklist_tasks_added.rst b/docs/api/types/checklist_tasks_added.rst new file mode 100644 index 00000000..2cda87bb --- /dev/null +++ b/docs/api/types/checklist_tasks_added.rst @@ -0,0 +1,10 @@ +################### +ChecklistTasksAdded +################### + + +.. automodule:: aiogram.types.checklist_tasks_added + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/checklist_tasks_done.rst b/docs/api/types/checklist_tasks_done.rst new file mode 100644 index 00000000..42d6485f --- /dev/null +++ b/docs/api/types/checklist_tasks_done.rst @@ -0,0 +1,10 @@ +################## +ChecklistTasksDone +################## + + +.. automodule:: aiogram.types.checklist_tasks_done + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/copy_text_button.rst b/docs/api/types/copy_text_button.rst new file mode 100644 index 00000000..779ebc25 --- /dev/null +++ b/docs/api/types/copy_text_button.rst @@ -0,0 +1,10 @@ +############## +CopyTextButton +############## + + +.. automodule:: aiogram.types.copy_text_button + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/direct_message_price_changed.rst b/docs/api/types/direct_message_price_changed.rst new file mode 100644 index 00000000..909ead18 --- /dev/null +++ b/docs/api/types/direct_message_price_changed.rst @@ -0,0 +1,10 @@ +######################### +DirectMessagePriceChanged +######################### + + +.. automodule:: aiogram.types.direct_message_price_changed + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields 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/gift.rst b/docs/api/types/gift.rst new file mode 100644 index 00000000..6b3daf5b --- /dev/null +++ b/docs/api/types/gift.rst @@ -0,0 +1,10 @@ +#### +Gift +#### + + +.. automodule:: aiogram.types.gift + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/gift_background.rst b/docs/api/types/gift_background.rst new file mode 100644 index 00000000..6ac9c31e --- /dev/null +++ b/docs/api/types/gift_background.rst @@ -0,0 +1,10 @@ +############## +GiftBackground +############## + + +.. automodule:: aiogram.types.gift_background + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/gift_info.rst b/docs/api/types/gift_info.rst new file mode 100644 index 00000000..5c51b8a3 --- /dev/null +++ b/docs/api/types/gift_info.rst @@ -0,0 +1,10 @@ +######## +GiftInfo +######## + + +.. automodule:: aiogram.types.gift_info + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/gifts.rst b/docs/api/types/gifts.rst new file mode 100644 index 00000000..f2be33f7 --- /dev/null +++ b/docs/api/types/gifts.rst @@ -0,0 +1,10 @@ +##### +Gifts +##### + + +.. automodule:: aiogram.types.gifts + :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 a007b354..24fe694c 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -11,6 +11,7 @@ Available types .. toctree:: :maxdepth: 1 + accepted_gift_types animation audio background_fill @@ -35,6 +36,7 @@ Available types bot_description bot_name bot_short_description + business_bot_rights business_connection business_intro business_location @@ -65,11 +67,20 @@ Available types chat_member_owner chat_member_restricted chat_member_updated + chat_owner_changed + chat_owner_left chat_permissions chat_photo chat_shared + checklist + checklist_task + checklist_tasks_added + checklist_tasks_done contact + copy_text_button dice + direct_message_price_changed + direct_messages_topic document external_reply_info file @@ -81,6 +92,10 @@ Available types forum_topic_reopened general_forum_topic_hidden general_forum_topic_unhidden + gift + gift_background + gift_info + gifts giveaway giveaway_completed giveaway_created @@ -88,6 +103,8 @@ Available types inaccessible_message inline_keyboard_button inline_keyboard_markup + input_checklist + input_checklist_task input_file input_media input_media_animation @@ -99,14 +116,24 @@ Available types input_paid_media_photo input_paid_media_video input_poll_option + input_profile_photo + input_profile_photo_animated + input_profile_photo_static + input_story_content + input_story_content_photo + input_story_content_video keyboard_button keyboard_button_poll_type keyboard_button_request_chat + keyboard_button_request_managed_bot keyboard_button_request_user keyboard_button_request_users link_preview_options location + location_address login_url + managed_bot_created + managed_bot_updated maybe_inaccessible_message menu_button menu_button_commands @@ -123,31 +150,68 @@ Available types message_origin_user message_reaction_count_updated message_reaction_updated + owned_gift + owned_gift_regular + owned_gift_unique + owned_gifts paid_media paid_media_info paid_media_photo paid_media_preview paid_media_video + paid_message_price_changed photo_size poll poll_answer poll_option + poll_option_added + poll_option_deleted + prepared_inline_message + prepared_keyboard_button proximity_alert_triggered reaction_count reaction_type reaction_type_custom_emoji reaction_type_emoji + reaction_type_paid reply_keyboard_markup reply_keyboard_remove reply_parameters response_parameters + sent_web_app_message shared_user + star_amount story + story_area + story_area_position + story_area_type + story_area_type_link + story_area_type_location + 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 + unique_gift_backdrop + unique_gift_backdrop_colors + unique_gift_colors + unique_gift_info + unique_gift_model + unique_gift_symbol user user_chat_boosts + user_profile_audios user_profile_photos + user_rating user_shared users_shared venue @@ -157,6 +221,7 @@ Available types video_chat_scheduled video_chat_started video_note + video_quality voice web_app_data web_app_info @@ -198,7 +263,38 @@ Inline mode input_message_content input_text_message_content input_venue_message_content - sent_web_app_message + +Payments +======== + +.. toctree:: + :maxdepth: 1 + + affiliate_info + invoice + labeled_price + order_info + paid_media_purchased + pre_checkout_query + refunded_payment + revenue_withdrawal_state + revenue_withdrawal_state_failed + revenue_withdrawal_state_pending + revenue_withdrawal_state_succeeded + shipping_address + shipping_option + shipping_query + star_transaction + star_transactions + successful_payment + transaction_partner + transaction_partner_affiliate_program + transaction_partner_chat + transaction_partner_fragment + transaction_partner_other + transaction_partner_telegram_ads + transaction_partner_telegram_api + transaction_partner_user Stickers ======== @@ -232,32 +328,6 @@ Telegram Passport passport_element_error_unspecified passport_file -Payments -======== - -.. toctree:: - :maxdepth: 1 - - invoice - labeled_price - order_info - pre_checkout_query - revenue_withdrawal_state - revenue_withdrawal_state_failed - revenue_withdrawal_state_pending - revenue_withdrawal_state_succeeded - shipping_address - shipping_option - shipping_query - star_transaction - star_transactions - successful_payment - transaction_partner - transaction_partner_fragment - transaction_partner_other - transaction_partner_telegram_ads - transaction_partner_user - Getting updates =============== diff --git a/docs/api/types/input_checklist.rst b/docs/api/types/input_checklist.rst new file mode 100644 index 00000000..4a591b74 --- /dev/null +++ b/docs/api/types/input_checklist.rst @@ -0,0 +1,10 @@ +############## +InputChecklist +############## + + +.. automodule:: aiogram.types.input_checklist + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_checklist_task.rst b/docs/api/types/input_checklist_task.rst new file mode 100644 index 00000000..8bbc80a7 --- /dev/null +++ b/docs/api/types/input_checklist_task.rst @@ -0,0 +1,10 @@ +################## +InputChecklistTask +################## + + +.. automodule:: aiogram.types.input_checklist_task + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_profile_photo.rst b/docs/api/types/input_profile_photo.rst new file mode 100644 index 00000000..4b721710 --- /dev/null +++ b/docs/api/types/input_profile_photo.rst @@ -0,0 +1,10 @@ +################# +InputProfilePhoto +################# + + +.. automodule:: aiogram.types.input_profile_photo + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_profile_photo_animated.rst b/docs/api/types/input_profile_photo_animated.rst new file mode 100644 index 00000000..9d436b67 --- /dev/null +++ b/docs/api/types/input_profile_photo_animated.rst @@ -0,0 +1,10 @@ +######################### +InputProfilePhotoAnimated +######################### + + +.. automodule:: aiogram.types.input_profile_photo_animated + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_profile_photo_static.rst b/docs/api/types/input_profile_photo_static.rst new file mode 100644 index 00000000..408f4b9d --- /dev/null +++ b/docs/api/types/input_profile_photo_static.rst @@ -0,0 +1,10 @@ +####################### +InputProfilePhotoStatic +####################### + + +.. automodule:: aiogram.types.input_profile_photo_static + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_story_content.rst b/docs/api/types/input_story_content.rst new file mode 100644 index 00000000..b625d7b2 --- /dev/null +++ b/docs/api/types/input_story_content.rst @@ -0,0 +1,10 @@ +################# +InputStoryContent +################# + + +.. automodule:: aiogram.types.input_story_content + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_story_content_photo.rst b/docs/api/types/input_story_content_photo.rst new file mode 100644 index 00000000..bbdc17f2 --- /dev/null +++ b/docs/api/types/input_story_content_photo.rst @@ -0,0 +1,10 @@ +###################### +InputStoryContentPhoto +###################### + + +.. automodule:: aiogram.types.input_story_content_photo + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/input_story_content_video.rst b/docs/api/types/input_story_content_video.rst new file mode 100644 index 00000000..22fe0739 --- /dev/null +++ b/docs/api/types/input_story_content_video.rst @@ -0,0 +1,10 @@ +###################### +InputStoryContentVideo +###################### + + +.. automodule:: aiogram.types.input_story_content_video + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/keyboard_button_request_managed_bot.rst b/docs/api/types/keyboard_button_request_managed_bot.rst new file mode 100644 index 00000000..baddbea6 --- /dev/null +++ b/docs/api/types/keyboard_button_request_managed_bot.rst @@ -0,0 +1,10 @@ +############################### +KeyboardButtonRequestManagedBot +############################### + + +.. automodule:: aiogram.types.keyboard_button_request_managed_bot + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/location_address.rst b/docs/api/types/location_address.rst new file mode 100644 index 00000000..1bef507f --- /dev/null +++ b/docs/api/types/location_address.rst @@ -0,0 +1,10 @@ +############### +LocationAddress +############### + + +.. automodule:: aiogram.types.location_address + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/managed_bot_created.rst b/docs/api/types/managed_bot_created.rst new file mode 100644 index 00000000..8912801e --- /dev/null +++ b/docs/api/types/managed_bot_created.rst @@ -0,0 +1,10 @@ +################# +ManagedBotCreated +################# + + +.. automodule:: aiogram.types.managed_bot_created + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/managed_bot_updated.rst b/docs/api/types/managed_bot_updated.rst new file mode 100644 index 00000000..8794dbc4 --- /dev/null +++ b/docs/api/types/managed_bot_updated.rst @@ -0,0 +1,10 @@ +################# +ManagedBotUpdated +################# + + +.. automodule:: aiogram.types.managed_bot_updated + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/owned_gift.rst b/docs/api/types/owned_gift.rst new file mode 100644 index 00000000..27e5d9ea --- /dev/null +++ b/docs/api/types/owned_gift.rst @@ -0,0 +1,10 @@ +######### +OwnedGift +######### + + +.. automodule:: aiogram.types.owned_gift + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/owned_gift_regular.rst b/docs/api/types/owned_gift_regular.rst new file mode 100644 index 00000000..c3b15686 --- /dev/null +++ b/docs/api/types/owned_gift_regular.rst @@ -0,0 +1,10 @@ +################ +OwnedGiftRegular +################ + + +.. automodule:: aiogram.types.owned_gift_regular + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/owned_gift_unique.rst b/docs/api/types/owned_gift_unique.rst new file mode 100644 index 00000000..1c67137c --- /dev/null +++ b/docs/api/types/owned_gift_unique.rst @@ -0,0 +1,10 @@ +############### +OwnedGiftUnique +############### + + +.. automodule:: aiogram.types.owned_gift_unique + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/owned_gifts.rst b/docs/api/types/owned_gifts.rst new file mode 100644 index 00000000..ba852b8e --- /dev/null +++ b/docs/api/types/owned_gifts.rst @@ -0,0 +1,10 @@ +########## +OwnedGifts +########## + + +.. automodule:: aiogram.types.owned_gifts + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/paid_media_purchased.rst b/docs/api/types/paid_media_purchased.rst new file mode 100644 index 00000000..5af1f9e2 --- /dev/null +++ b/docs/api/types/paid_media_purchased.rst @@ -0,0 +1,10 @@ +################## +PaidMediaPurchased +################## + + +.. automodule:: aiogram.types.paid_media_purchased + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/paid_message_price_changed.rst b/docs/api/types/paid_message_price_changed.rst new file mode 100644 index 00000000..31924bc8 --- /dev/null +++ b/docs/api/types/paid_message_price_changed.rst @@ -0,0 +1,10 @@ +####################### +PaidMessagePriceChanged +####################### + + +.. automodule:: aiogram.types.paid_message_price_changed + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/poll_option_added.rst b/docs/api/types/poll_option_added.rst new file mode 100644 index 00000000..688def81 --- /dev/null +++ b/docs/api/types/poll_option_added.rst @@ -0,0 +1,10 @@ +############### +PollOptionAdded +############### + + +.. automodule:: aiogram.types.poll_option_added + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/poll_option_deleted.rst b/docs/api/types/poll_option_deleted.rst new file mode 100644 index 00000000..b4655292 --- /dev/null +++ b/docs/api/types/poll_option_deleted.rst @@ -0,0 +1,10 @@ +################# +PollOptionDeleted +################# + + +.. automodule:: aiogram.types.poll_option_deleted + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/prepared_inline_message.rst b/docs/api/types/prepared_inline_message.rst new file mode 100644 index 00000000..edfe4a63 --- /dev/null +++ b/docs/api/types/prepared_inline_message.rst @@ -0,0 +1,10 @@ +##################### +PreparedInlineMessage +##################### + + +.. automodule:: aiogram.types.prepared_inline_message + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/prepared_keyboard_button.rst b/docs/api/types/prepared_keyboard_button.rst new file mode 100644 index 00000000..2972ad6b --- /dev/null +++ b/docs/api/types/prepared_keyboard_button.rst @@ -0,0 +1,10 @@ +###################### +PreparedKeyboardButton +###################### + + +.. automodule:: aiogram.types.prepared_keyboard_button + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/reaction_type_paid.rst b/docs/api/types/reaction_type_paid.rst new file mode 100644 index 00000000..58a7d058 --- /dev/null +++ b/docs/api/types/reaction_type_paid.rst @@ -0,0 +1,10 @@ +################ +ReactionTypePaid +################ + + +.. automodule:: aiogram.types.reaction_type_paid + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/refunded_payment.rst b/docs/api/types/refunded_payment.rst new file mode 100644 index 00000000..fce07322 --- /dev/null +++ b/docs/api/types/refunded_payment.rst @@ -0,0 +1,10 @@ +############### +RefundedPayment +############### + + +.. automodule:: aiogram.types.refunded_payment + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/star_amount.rst b/docs/api/types/star_amount.rst new file mode 100644 index 00000000..40a64730 --- /dev/null +++ b/docs/api/types/star_amount.rst @@ -0,0 +1,10 @@ +########## +StarAmount +########## + + +.. automodule:: aiogram.types.star_amount + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/story_area.rst b/docs/api/types/story_area.rst new file mode 100644 index 00000000..fb3df191 --- /dev/null +++ b/docs/api/types/story_area.rst @@ -0,0 +1,10 @@ +######### +StoryArea +######### + + +.. automodule:: aiogram.types.story_area + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/story_area_position.rst b/docs/api/types/story_area_position.rst new file mode 100644 index 00000000..72ac3c0d --- /dev/null +++ b/docs/api/types/story_area_position.rst @@ -0,0 +1,10 @@ +################# +StoryAreaPosition +################# + + +.. automodule:: aiogram.types.story_area_position + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/story_area_type.rst b/docs/api/types/story_area_type.rst new file mode 100644 index 00000000..de72be51 --- /dev/null +++ b/docs/api/types/story_area_type.rst @@ -0,0 +1,10 @@ +############# +StoryAreaType +############# + + +.. automodule:: aiogram.types.story_area_type + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/story_area_type_link.rst b/docs/api/types/story_area_type_link.rst new file mode 100644 index 00000000..03153b08 --- /dev/null +++ b/docs/api/types/story_area_type_link.rst @@ -0,0 +1,10 @@ +################# +StoryAreaTypeLink +################# + + +.. automodule:: aiogram.types.story_area_type_link + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/story_area_type_location.rst b/docs/api/types/story_area_type_location.rst new file mode 100644 index 00000000..98a52fe3 --- /dev/null +++ b/docs/api/types/story_area_type_location.rst @@ -0,0 +1,10 @@ +##################### +StoryAreaTypeLocation +##################### + + +.. automodule:: aiogram.types.story_area_type_location + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/story_area_type_suggested_reaction.rst b/docs/api/types/story_area_type_suggested_reaction.rst new file mode 100644 index 00000000..ad152917 --- /dev/null +++ b/docs/api/types/story_area_type_suggested_reaction.rst @@ -0,0 +1,10 @@ +############################## +StoryAreaTypeSuggestedReaction +############################## + + +.. automodule:: aiogram.types.story_area_type_suggested_reaction + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/story_area_type_unique_gift.rst b/docs/api/types/story_area_type_unique_gift.rst new file mode 100644 index 00000000..0da53467 --- /dev/null +++ b/docs/api/types/story_area_type_unique_gift.rst @@ -0,0 +1,10 @@ +####################### +StoryAreaTypeUniqueGift +####################### + + +.. automodule:: aiogram.types.story_area_type_unique_gift + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/story_area_type_weather.rst b/docs/api/types/story_area_type_weather.rst new file mode 100644 index 00000000..1c1b3ffd --- /dev/null +++ b/docs/api/types/story_area_type_weather.rst @@ -0,0 +1,10 @@ +#################### +StoryAreaTypeWeather +#################### + + +.. automodule:: aiogram.types.story_area_type_weather + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields 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/docs/api/types/transaction_partner_affiliate_program.rst b/docs/api/types/transaction_partner_affiliate_program.rst new file mode 100644 index 00000000..f20b2e62 --- /dev/null +++ b/docs/api/types/transaction_partner_affiliate_program.rst @@ -0,0 +1,10 @@ +################################## +TransactionPartnerAffiliateProgram +################################## + + +.. automodule:: aiogram.types.transaction_partner_affiliate_program + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/transaction_partner_chat.rst b/docs/api/types/transaction_partner_chat.rst new file mode 100644 index 00000000..5558cb1c --- /dev/null +++ b/docs/api/types/transaction_partner_chat.rst @@ -0,0 +1,10 @@ +###################### +TransactionPartnerChat +###################### + + +.. automodule:: aiogram.types.transaction_partner_chat + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/transaction_partner_telegram_api.rst b/docs/api/types/transaction_partner_telegram_api.rst new file mode 100644 index 00000000..c9168272 --- /dev/null +++ b/docs/api/types/transaction_partner_telegram_api.rst @@ -0,0 +1,10 @@ +############################# +TransactionPartnerTelegramApi +############################# + + +.. automodule:: aiogram.types.transaction_partner_telegram_api + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/unique_gift.rst b/docs/api/types/unique_gift.rst new file mode 100644 index 00000000..9891c91a --- /dev/null +++ b/docs/api/types/unique_gift.rst @@ -0,0 +1,10 @@ +########## +UniqueGift +########## + + +.. automodule:: aiogram.types.unique_gift + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/unique_gift_backdrop.rst b/docs/api/types/unique_gift_backdrop.rst new file mode 100644 index 00000000..26b1765c --- /dev/null +++ b/docs/api/types/unique_gift_backdrop.rst @@ -0,0 +1,10 @@ +################## +UniqueGiftBackdrop +################## + + +.. automodule:: aiogram.types.unique_gift_backdrop + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/unique_gift_backdrop_colors.rst b/docs/api/types/unique_gift_backdrop_colors.rst new file mode 100644 index 00000000..031d24bc --- /dev/null +++ b/docs/api/types/unique_gift_backdrop_colors.rst @@ -0,0 +1,10 @@ +######################## +UniqueGiftBackdropColors +######################## + + +.. automodule:: aiogram.types.unique_gift_backdrop_colors + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/unique_gift_colors.rst b/docs/api/types/unique_gift_colors.rst new file mode 100644 index 00000000..8cab2a79 --- /dev/null +++ b/docs/api/types/unique_gift_colors.rst @@ -0,0 +1,10 @@ +################ +UniqueGiftColors +################ + + +.. automodule:: aiogram.types.unique_gift_colors + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/unique_gift_info.rst b/docs/api/types/unique_gift_info.rst new file mode 100644 index 00000000..464d57ad --- /dev/null +++ b/docs/api/types/unique_gift_info.rst @@ -0,0 +1,10 @@ +############## +UniqueGiftInfo +############## + + +.. automodule:: aiogram.types.unique_gift_info + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/unique_gift_model.rst b/docs/api/types/unique_gift_model.rst new file mode 100644 index 00000000..37b02e81 --- /dev/null +++ b/docs/api/types/unique_gift_model.rst @@ -0,0 +1,10 @@ +############### +UniqueGiftModel +############### + + +.. automodule:: aiogram.types.unique_gift_model + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/unique_gift_symbol.rst b/docs/api/types/unique_gift_symbol.rst new file mode 100644 index 00000000..fe022740 --- /dev/null +++ b/docs/api/types/unique_gift_symbol.rst @@ -0,0 +1,10 @@ +################ +UniqueGiftSymbol +################ + + +.. automodule:: aiogram.types.unique_gift_symbol + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/user_profile_audios.rst b/docs/api/types/user_profile_audios.rst new file mode 100644 index 00000000..2c4b12e0 --- /dev/null +++ b/docs/api/types/user_profile_audios.rst @@ -0,0 +1,10 @@ +################# +UserProfileAudios +################# + + +.. automodule:: aiogram.types.user_profile_audios + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/user_rating.rst b/docs/api/types/user_rating.rst new file mode 100644 index 00000000..c313ca2c --- /dev/null +++ b/docs/api/types/user_rating.rst @@ -0,0 +1,10 @@ +########## +UserRating +########## + + +.. automodule:: aiogram.types.user_rating + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/api/types/video_quality.rst b/docs/api/types/video_quality.rst new file mode 100644 index 00000000..a77a9cf3 --- /dev/null +++ b/docs/api/types/video_quality.rst @@ -0,0 +1,10 @@ +############ +VideoQuality +############ + + +.. automodule:: aiogram.types.video_quality + :members: + :member-order: bysource + :undoc-members: True + :exclude-members: model_config,model_fields diff --git a/docs/conf.py b/docs/conf.py index 583a1922..3fa07d02 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,7 +30,7 @@ extensions = [ "sphinx.ext.intersphinx", "sphinx_substitution_extensions", "sphinx_copybutton", - "sphinxcontrib.towncrier.ext", + # "sphinxcontrib.towncrier.ext", # Temporary disabled due to bug in the extension https://github.com/sphinx-contrib/sphinxcontrib-towncrier/issues/92 ] rst_prolog = f""" @@ -69,3 +69,14 @@ texinfo_documents = [ towncrier_draft_autoversion_mode = "draft" towncrier_draft_include_empty = False towncrier_draft_working_directory = Path(__file__).parent.parent + + +def skip_model_prefixed_members(app, what, name, obj, skip, options): + # Skip any member whose name starts with "model_" + if name.startswith("model_"): + return True + return skip + + +def setup(app): + app.connect("autodoc-skip-member", skip_model_prefixed_members) diff --git a/docs/contributing.rst b/docs/contributing.rst index c68480b0..4b9f6c1f 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -88,6 +88,88 @@ Windows: It will install :code:`aiogram` in editable mode into your virtual environment and all dependencies. +Alternative: Using uv (Modern Approach) +---------------------------------------- + +As an alternative to the traditional :code:`pip` and :code:`venv` workflow, you can use `uv `_ - +a modern, fast Python package manager that handles virtual environments, dependency resolution, and package installation. + +**Benefits of using uv:** + +- 10-100x faster dependency resolution than pip +- Automatic virtual environment management +- Reproducible builds with lockfile +- Single tool for all package management needs + +**Installing uv:** + +Linux / macOS: + +.. code-block:: bash + + curl -LsSf https://astral.sh/uv/install.sh | sh + +Windows: + +.. code-block:: powershell + + powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" + +Or using pip: + +.. code-block:: bash + + pip install uv + +**Setup project with uv:** + +Instead of manually creating and activating a virtual environment, :code:`uv` handles this automatically: + +.. code-block:: bash + + # Clone the repository + git clone https://github.com/aiogram/aiogram.git + cd aiogram + + # Install all dependencies (creates .venv automatically) + uv sync --all-extras --group dev --group test + + # Install pre-commit hooks + uv run pre-commit install + +That's it! The :code:`uv sync` command creates a virtual environment in :code:`.venv/`, +installs all dependencies including optional extras and development tools, and generates +a :code:`uv.lock` file for reproducible builds. + +**Running commands with uv:** + +When using :code:`uv`, prefix commands with :code:`uv run` to execute them in the managed environment: + +.. code-block:: bash + + # Format code + uv run ruff format aiogram tests scripts examples + uv run ruff check --fix aiogram tests scripts examples + + # Run tests + uv run pytest tests + + # Run linting + uv run ruff check aiogram examples + uv run mypy aiogram + + # Start documentation server + uv run sphinx-autobuild --watch aiogram/ docs/ docs/_build/ + +Or use the Makefile commands which now support :code:`uv`: + +.. code-block:: bash + + make install # Uses uv sync + make lint # Uses uv run + make reformat # Uses uv run + make test # Uses uv run + Making changes in code ---------------------- @@ -98,13 +180,28 @@ implementing new features or experimenting. Format the code (code-style) ---------------------------- -Note that this project is Black-formatted, so you should follow that code-style, -too be sure You're correctly doing this let's reformat the code automatically: +Note that this project uses Ruff for formatting and linting, so you should follow that code-style. +To be sure you're correctly doing this, let's reformat the code automatically: + +Using traditional approach: .. code-block:: bash - black aiogram tests examples - isort aiogram tests examples + ruff format aiogram tests scripts examples + ruff check --fix aiogram tests scripts examples + +Or with uv: + +.. code-block:: bash + + uv run ruff format aiogram tests scripts examples + uv run ruff check --fix aiogram tests scripts examples + +Or simply use Makefile: + +.. code-block:: bash + + make reformat Run tests @@ -112,27 +209,63 @@ Run tests All changes should be tested: +Using traditional approach: + .. code-block:: bash pytest tests +Or with uv: + +.. code-block:: bash + + uv run pytest tests + +Or use Makefile: + +.. code-block:: bash + + make test + Also if you are doing something with Redis-storage or/and MongoDB-storage, you will need to test everything works with Redis or/and MongoDB: +Using traditional approach: + .. code-block:: bash pytest --redis redis://:/ --mongo mongodb://:@: tests +Or with uv: + +.. code-block:: bash + + uv run pytest --redis redis://:/ --mongo mongodb://:@: tests + Docs ---- We are using `Sphinx` to render docs in different languages, all sources located in `docs` directory, you can change the sources and to test it you can start live-preview server and look what you are doing: +Using traditional approach: + .. code-block:: bash sphinx-autobuild --watch aiogram/ docs/ docs/_build/ +Or with uv: + +.. code-block:: bash + + uv run --extra docs sphinx-autobuild --watch aiogram/ docs/ docs/_build/ + +Or use Makefile: + +.. code-block:: bash + + make docs-serve + Docs translations ----------------- @@ -143,12 +276,27 @@ into different languages. Before start, let's up to date all texts: +Using traditional approach: + .. code-block:: bash cd docs make gettext sphinx-intl update -p _build/gettext -l +Or with uv: + +.. code-block:: bash + + uv run --extra docs bash -c 'cd docs && make gettext' + uv run --extra docs bash -c 'cd docs && sphinx-intl update -p _build/gettext -l ' + +Or use Makefile: + +.. code-block:: bash + + make docs-gettext + Change the :code:`` in example below to the target language code, after that you can modify texts inside :code:`docs/locale//LC_MESSAGES` as :code:`*.po` files by using any text-editor or specialized utilites for GNU Gettext, @@ -156,10 +304,18 @@ for example via `poedit `_. To view results: +Using traditional approach: + .. code-block:: bash sphinx-autobuild --watch aiogram/ docs/ docs/_build/ -D language= +Or with uv: + +.. code-block:: bash + + uv run --extra docs sphinx-autobuild --watch aiogram/ docs/ docs/_build/ -D language= + Describe changes ---------------- diff --git a/docs/dispatcher/class_based_handlers/base.rst b/docs/dispatcher/class_based_handlers/base.rst index 8c694d4f..72b06e33 100644 --- a/docs/dispatcher/class_based_handlers/base.rst +++ b/docs/dispatcher/class_based_handlers/base.rst @@ -12,7 +12,7 @@ By default you will need to override only method :code:`async def handle(self) - This class also has a default initializer and you don't need to change it. The initializer accepts the incoming event and all contextual data, which -can be accessed from the handler through attributes: :code:`event: TelegramEvent` and :code:`data: Dict[Any, str]` +can be accessed from the handler through attributes: :code:`event: TelegramEvent` and :code:`data: Dict[str, Any]` If an instance of the bot is specified in context data or current context it can be accessed through *bot* class attribute. diff --git a/docs/dispatcher/dependency_injection.rst b/docs/dispatcher/dependency_injection.rst index 0e7af388..3c6a3821 100644 --- a/docs/dispatcher/dependency_injection.rst +++ b/docs/dispatcher/dependency_injection.rst @@ -70,3 +70,61 @@ The last way is to return a dictionary from the filter: .. literalinclude:: ../../examples/context_addition_from_filter.py ...or using :ref:`MagicFilter ` with :code:`.as_(...)` method. + + +Using type hints +================ + +.. note:: + + Type-hinting middleware data is optional and is not required for the correct operation of the dispatcher. + However, it is recommended to use it to improve the readability of the code. + +You can use type hints to specify the type of the context data in the middlewares, filters and handlers. + +The default middleware data typed dict can be found in :class:`aiogram.dispatcher.middlewares.data.MiddlewareData`. + +In case when you have extended the context data, you can use the :class:`aiogram.dispatcher.middlewares.data.MiddlewareData` as a base class and specify the type hints for the new fields. + +.. warning:: + + If you using type checking tools like mypy, you can experience warnings about that this type hint against Liskov substitution principle in due stricter type is not a subclass of :code:`dict[str, Any]`. + This is a known issue and it is not a bug. You can ignore this warning or use :code:`# type: ignore` comment. + +Example of using type hints: + +.. code-block:: python + + from aiogram.dispatcher.middlewares.data import MiddlewareData + + + class MyMiddlewareData(MiddlewareData, total=False): + my_custom_value: int + + + class MyMessageMiddleware(BaseMiddleware): + async def __call__( + self, + handler: Callable[[Message, MyMiddlewareData], Awaitable[Any]], + event: Message, + data: MyMiddlewareData, + ) -> Any: + bot = data["bot"] # <-- IDE will show you that data has `bot` key and its type is `Bot` + + data["my_custom_value"] = bot.id * 42 # <-- IDE will show you that you can set `my_custom_value` key with int value and warn you if you try to set it with other type + return await handler(event, data) + + +Available context data type helpers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autoclass:: aiogram.dispatcher.middlewares.data.MiddlewareData + :members: + :undoc-members: + :member-order: bysource + + +.. autoclass:: aiogram.dispatcher.middlewares.data.I18nData + :members: + :undoc-members: + :member-order: bysource diff --git a/docs/dispatcher/finite_state_machine/index.rst b/docs/dispatcher/finite_state_machine/index.rst index d14f282f..91cca40a 100644 --- a/docs/dispatcher/finite_state_machine/index.rst +++ b/docs/dispatcher/finite_state_machine/index.rst @@ -89,12 +89,44 @@ Complete example :linenos: +Changing state for another user +------------------------------- + +In some cases, you might need to change the state for a user other than the one who triggered the current handler. +For example, you might want to change the state of a user based on an admin's command. + +To do this, you can use the ``get_context`` method of the FSM middleware through the dispatcher: + +.. code-block:: python + + @example_router.message(Command("example")) + async def command_example(message: Message, dispatcher: Dispatcher, bot: Bot): + user_id = ... # Get the user ID in the way that you need + state = await dispatcher.fsm.get_context( + bot=bot, + chat_id=user_id, + user_id=user_id, + ) + + # Now you can use the state context to change the state for the specified user + await state.set_state(YourState.some_state) + + # Or store data in the state + await state.update_data(some_key="some_value") + + # Or clear the state + await state.clear() + +This allows you to manage the state of any user in your bot, not just the one who triggered the current handler. + + Read more ========= .. toctree:: storages + strategy scene diff --git a/docs/dispatcher/finite_state_machine/scene.rst b/docs/dispatcher/finite_state_machine/scene.rst index 0c385e78..20d98421 100644 --- a/docs/dispatcher/finite_state_machine/scene.rst +++ b/docs/dispatcher/finite_state_machine/scene.rst @@ -30,7 +30,7 @@ They allow you to control and manage the flow of the conversation in a more orga Scene Lifecycle --------------- -Each Scene can be "entered", "left" of "exited", allowing for clear transitions between different +Each Scene can be "entered", "left" or "exited", allowing for clear transitions between different stages of the conversation. For instance, in a multi-step form filling interaction, each step could be a Scene - the bot guides the user from one Scene to the next as they provide the required information. @@ -242,3 +242,74 @@ Scene has only three points for transitions: - enter point - when user enters to the scene - leave point - when user leaves the scene and the enter another scene - exit point - when user exits from the scene + +How to enter the scene +---------------------- + +There are several ways to enter a scene in aiogram. Each approach has specific use cases and advantages + +1. **Directly using the scene's entry point as a handler:** + + You can convert a scene's entry point to a handler and register it like any other handler: + + .. code-block:: python + + router.message.register(SettingsScene.as_handler(), Command("settings")) + +2. **From a regular handler using ScenesManager:** + + Enter a scene from any regular handler by using the ScenesManager: + + .. note:: + + When using ScenesManager, you need to explicitly pass all dependencies required by the scene's + entry point handler as arguments to the enter method. + + .. code-block:: python + + @router.message(Command("settings")) + async def settings_handler(message: Message, scenes: ScenesManager): + await scenes.enter(SettingsScene, some_data="data") # pass additional arguments to the scene + +3. **From another scene using After.goto marker:** + + Transition to another scene after a handler is executed using the After marker: + + .. code-block:: python + + class MyScene(Scene, state="my_scene"): + + ... + + @on.message(F.text.startswith("🚀"), after=After.goto(AnotherScene)) + async def on_message(self, message: Message, some_repo: SomeRepository, db: AsyncSession): + # Persist some data before going to another scene + await some_repo.save(user_id=message.from_user.id, value=message.text) + await db.commit() + + ... + +4. **Using explicit transition with wizard.goto:** + + For more control over the transition, use the wizard.goto method from within a scene handler: + + .. note:: + + Dependencies will be injected into the handler normally and then extended with + the arguments specified in the goto method. + + .. code-block:: python + + class MyScene(Scene, state="my_scene"): + ... + + @on.message(F.text.startswith("🚀")) + async def on_message(self, message: Message): + # Direct control over when and how to transition + await self.wizard.goto(AnotherScene, value=message.text) + + ... + + +Each method offers different levels of control and integration with your application's architecture. +Choose the approach that best fits your specific use case and coding style. diff --git a/docs/dispatcher/finite_state_machine/storages.rst b/docs/dispatcher/finite_state_machine/storages.rst index 3795d2f1..ef39c4c3 100644 --- a/docs/dispatcher/finite_state_machine/storages.rst +++ b/docs/dispatcher/finite_state_machine/storages.rst @@ -22,6 +22,10 @@ RedisStorage MongoStorage ------------ +.. autoclass:: aiogram.fsm.storage.pymongo.PyMongoStorage + :members: __init__, from_url + :member-order: bysource + .. autoclass:: aiogram.fsm.storage.mongo.MongoStorage :members: __init__, from_url :member-order: bysource diff --git a/docs/dispatcher/finite_state_machine/strategy.rst b/docs/dispatcher/finite_state_machine/strategy.rst new file mode 100644 index 00000000..3dcc4050 --- /dev/null +++ b/docs/dispatcher/finite_state_machine/strategy.rst @@ -0,0 +1,9 @@ +======== +Strategy +======== + +This module provides the `FSMStrategy` enumeration which is used to define the strategy of the finite state machine. + + +.. autoclass:: aiogram.fsm.strategy.FSMStrategy + :members: diff --git a/docs/dispatcher/index.rst b/docs/dispatcher/index.rst index daf7e1e5..6832380c 100644 --- a/docs/dispatcher/index.rst +++ b/docs/dispatcher/index.rst @@ -29,9 +29,9 @@ So, you can use both of them with *aiogram*. dependency_injection filters/index long_polling - webhook finite_state_machine/index middlewares errors flags + webhook class_based_handlers/index diff --git a/docs/dispatcher/router.rst b/docs/dispatcher/router.rst index 9f59492a..317f4e8d 100644 --- a/docs/dispatcher/router.rst +++ b/docs/dispatcher/router.rst @@ -232,7 +232,7 @@ Example: .. code-block:: python :caption: module_1.py -:name: module_1 + :name: module_1 router2 = Router() @@ -242,7 +242,7 @@ Example: .. code-block:: python :caption: module_2.py -:name: module_2 + :name: module_2 from module_2 import router2 diff --git a/docs/dispatcher/webhook.rst b/docs/dispatcher/webhook.rst index ec2612ff..26c58f36 100644 --- a/docs/dispatcher/webhook.rst +++ b/docs/dispatcher/webhook.rst @@ -66,6 +66,19 @@ It can be acy using firewall rules or nginx configuration or middleware on appli So, aiogram has an implementation of the IP filtering middleware for aiohttp. +`aiogram` IP filtering middleware reads the left-most IP address from `X-Forwarded-For`. + +.. warning:: + + `X-Forwarded-For` is trustworthy only if all webhook traffic goes through a trusted reverse proxy that rewrites this header. + If your application is directly reachable from the Internet, this header can be forged. + +For production deployments, use defense in depth: + +- Always set and verify :code:`X-Telegram-Bot-Api-Secret-Token` +- Restrict network access to the webhook endpoint (firewall, security groups, ACL) +- Ensure the backend app is not publicly reachable and accepts requests only from the trusted proxy + .. autofunction:: aiogram.webhook.aiohttp_server.ip_filter_middleware .. autoclass:: aiogram.webhook.security.IPFilter @@ -115,7 +128,7 @@ or :meth:`aiogram.dispatcher.dispatcher.Dispatcher.feed_update` methods. .. code-block:: python update = Update.model_validate(await request.json(), context={"bot": bot}) - await dispatcher.feed_update(update) + await dispatcher.feed_update(bot, update) .. note:: diff --git a/docs/install.rst b/docs/install.rst index 71a71705..5559c181 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -12,19 +12,14 @@ From PyPI From Arch Linux Repository -------------------------- +.. warning:: Package in this repository may be outdated. Use PyPI package for the latest version. + .. code-block:: bash pacman -S python-aiogram -Development build (3.x) -======================= - -From PyPI ------------------------ - -.. code-block:: bash - - pip install -U aiogram +Development build +================= From GitHub ----------- diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/bot.po b/docs/locale/uk_UA/LC_MESSAGES/api/bot.po index b2c57a26..648499eb 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/bot.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/bot.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -54,8 +54,7 @@ msgstr "" msgid "Bot class" msgstr "" -#: aiogram.client.bot.Bot.__init__ aiogram.client.bot.Bot.context -#: aiogram.client.bot.Bot.download aiogram.client.bot.Bot.download_file of +#: ../../api/bot.rst msgid "Parameters" msgstr "" @@ -71,33 +70,15 @@ msgstr "" #: aiogram.client.bot.Bot.__init__:6 of msgid "" -"Default parse mode. If specified it will be propagated into the API " -"methods at runtime." -msgstr "" - -#: aiogram.client.bot.Bot.__init__:8 of -msgid "" -"Default disable_web_page_preview mode. If specified it will be propagated" -" into the API methods at runtime." -msgstr "" - -#: aiogram.client.bot.Bot.__init__:10 of -msgid "" -"Default protect_content mode. If specified it will be propagated into the" -" API methods at runtime." -msgstr "" - -#: aiogram.client.bot.Bot.__init__:12 of -msgid "" "Default bot properties. If specified it will be propagated into the API " "methods at runtime." msgstr "" -#: aiogram.client.bot.Bot.__init__ of +#: ../../api/bot.rst msgid "Raises" msgstr "" -#: aiogram.client.bot.Bot.__init__:14 of +#: aiogram.client.bot.Bot.__init__:8 of msgid "When token has invalid format this exception will be raised" msgstr "" @@ -105,8 +86,7 @@ msgstr "" msgid "Get bot ID from token" msgstr "" -#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.id -#: aiogram.client.bot.Bot.me of +#: ../../api/bot.rst msgid "Returns" msgstr "" @@ -166,3 +146,21 @@ msgstr "" #: aiogram.client.bot.Bot.download:6 of msgid "file_id or Downloadable object" msgstr "" + +#~ msgid "" +#~ "Default parse mode. If specified it " +#~ "will be propagated into the API " +#~ "methods at runtime." +#~ msgstr "" + +#~ msgid "" +#~ "Default disable_web_page_preview mode. If " +#~ "specified it will be propagated into " +#~ "the API methods at runtime." +#~ msgstr "" + +#~ msgid "" +#~ "Default protect_content mode. If specified " +#~ "it will be propagated into the API" +#~ " methods at runtime." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/defaults.po b/docs/locale/uk_UA/LC_MESSAGES/api/defaults.po new file mode 100644 index 00000000..7be0af14 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/defaults.po @@ -0,0 +1,183 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/defaults.rst:3 +msgid "Global defaults" +msgstr "Глобальні налаштування" + +#: ../../api/defaults.rst:5 +msgid "" +"aiogram provides mechanism to set some global defaults for all requests " +"to Telegram Bot API in your application using " +":class:`aiogram.client.default.DefaultBotProperties` class." +msgstr "" +"aiogram надає механізм для встановлення деяких глобальних налаштувань для " +"всіх запитів до Telegram Bot API у вашому додатку, використовуючи клас " +":class:`aiogram.client.default.DefaultBotProperties`." + +#: ../../api/defaults.rst:8 +msgid "There are some properties that can be set:" +msgstr "Можна встановити деякі властивості:" + +#: aiogram.client.default.DefaultBotProperties:1 of +msgid "Default bot properties." +msgstr "Стандартні властивості бота." + +#: ../../docstring aiogram.client.default.DefaultBotProperties.parse_mode:1 of +msgid "Default parse mode for messages." +msgstr "Стандартний режим розбору для повідомлень." + +#: ../../docstring +#: aiogram.client.default.DefaultBotProperties.disable_notification:1 of +msgid "" +"Sends the message silently. Users will receive a notification with no " +"sound." +msgstr "" +"Відправляє повідомлення без звуку. Користувачі отримають сповіщення без " +"звукового сигналу." + +#: ../../docstring +#: aiogram.client.default.DefaultBotProperties.protect_content:1 of +msgid "Protects content from copying." +msgstr "Захищає вміст від копіювання." + +#: ../../docstring +#: aiogram.client.default.DefaultBotProperties.allow_sending_without_reply:1 of +msgid "Allows to send messages without reply." +msgstr "Дозволяє надсилати повідомлення без відповіді." + +#: ../../docstring aiogram.client.default.DefaultBotProperties.link_preview:1 +#: of +msgid "Link preview settings." +msgstr "Налаштування попереднього перегляду посилань." + +#: ../../docstring +#: aiogram.client.default.DefaultBotProperties.link_preview_is_disabled:1 of +msgid "Disables link preview." +msgstr "Вимикає попередній перегляд посилань." + +#: ../../docstring +#: aiogram.client.default.DefaultBotProperties.link_preview_prefer_small_media:1 +#: of +msgid "Prefer small media in link preview." +msgstr "Віддавати перевагу малим медіафайлам у попередньому перегляді посилань." + +#: ../../docstring +#: aiogram.client.default.DefaultBotProperties.link_preview_prefer_large_media:1 +#: of +msgid "Prefer large media in link preview." +msgstr "Віддавати перевагу великим медіафайлам у попередньому перегляді посилань." + +#: ../../docstring +#: aiogram.client.default.DefaultBotProperties.link_preview_show_above_text:1 +#: of +msgid "Show link preview above text." +msgstr "Показувати попередній перегляд посилання над текстом." + +#: ../../docstring +#: aiogram.client.default.DefaultBotProperties.show_caption_above_media:1 of +msgid "Show caption above media." +msgstr "Показувати підпис над медіафайлом." + +#: ../../api/defaults.rst:17 +msgid "" +"If you need to override default properties for some requests, you should " +"use `aiogram.client.default.DefaultBotProperties` only for properties " +"that you want to set as defaults and pass explicit values for other " +"properties." +msgstr "" +"Якщо вам потрібно змінити стандартні властивості для деяких запитів, слід " +"використовувати `aiogram.client.default.DefaultBotProperties` лише для " +"властивостей, які ви хочете встановити за замовчуванням, і передавати " +"явні значення для інших властивостей." + +#: ../../api/defaults.rst:22 +msgid "" +"If you upgrading from aiogram 3.0-3.6 to 3.7, you should update your code" +" to use `aiogram.client.default.DefaultBotProperties`." +msgstr "" +"Якщо ви оновлюєтеся з версії aiogram 3.0-3.6 до 3.7, вам потрібно " +"оновити свій код для використання `aiogram.client.default.DefaultBotProperties`." + +#: ../../api/defaults.rst:26 +msgid "Example" +msgstr "Приклад" + +#: ../../api/defaults.rst:28 +msgid "" +"Here is an example of setting default parse mode for all requests to " +"Telegram Bot API:" +msgstr "" +"Ось приклад встановлення стандартного режиму розбору для всіх запитів до " +"Telegram Bot API:" + +#: ../../api/defaults.rst:39 +msgid "" +"In this case all messages sent by this bot will be parsed as HTML, so you" +" don't need to specify `parse_mode` in every message you send." +msgstr "" +"У цьому випадку всі повідомлення, надіслані цим ботом, будуть " +"розбиратися як HTML, тому вам не потрібно вказувати `parse_mode` у кожному " +"повідомленні, що ви надсилаєте." + +#: ../../api/defaults.rst:42 +msgid "Instead of" +msgstr "Замість" + +#: ../../api/defaults.rst:48 +msgid "you can use" +msgstr "ви можете використовувати" + +#: ../../api/defaults.rst:54 +msgid "and the message will be sent with HTML parse mode." +msgstr "і повідомлення буде надіслано в режимі розбору HTML." + +#: ../../api/defaults.rst:56 +msgid "" +"In some cases you may want to override default properties for some " +"requests. You can do it by passing explicit values to the method:" +msgstr "" +"У деяких випадках ви можете захотіти змінити стандартні властивості для " +"деяких запитів. Ви можете зробити це, передаючи явні значення в метод:" + +#: ../../api/defaults.rst:63 +msgid "" +"In this case the message will be sent with Markdown parse mode instead of" +" default HTML." +msgstr "" +"У цьому випадку повідомлення буде надіслано в режимі Markdown замість " +"стандартного HTML." + +#: ../../api/defaults.rst:65 +msgid "Another example of overriding default properties:" +msgstr "Ще один приклад перевизначення стандартних властивостей:" + +#: ../../api/defaults.rst:71 +msgid "" +"In this case the message will be send withoout parse mode, even if " +"default parse mode is set it may be useful if you want to send message " +"with plain text or :ref:`aiogram.types.message_entity.MessageEntity`." +msgstr "" +"У цьому випадку повідомлення буде надіслано без режиму розбору, навіть якщо " +"встановлено стандартний режим розбору. Це може бути корисним, якщо ви хочете " +"надіслати повідомлення у вигляді звичайного тексту або " +":ref:`aiogram.types.message_entity.MessageEntity`." diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/input_paid_media_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/input_paid_media_type.po new file mode 100644 index 00000000..2d957b09 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/input_paid_media_type.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/enums/input_paid_media_type.rst:3 +msgid "InputPaidMediaType" +msgstr "" + +#: aiogram.enums.input_paid_media_type.InputPaidMediaType:1 of +msgid "This object represents the type of a media in a paid message." +msgstr "" + +#: aiogram.enums.input_paid_media_type.InputPaidMediaType:3 of +msgid "Source: https://core.telegram.org/bots/api#inputpaidmedia" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/paid_media_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/paid_media_type.po new file mode 100644 index 00000000..6f8a9dac --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/paid_media_type.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/enums/paid_media_type.rst:3 +msgid "PaidMediaType" +msgstr "" + +#: aiogram.enums.paid_media_type.PaidMediaType:1 of +msgid "This object represents the type of a media in a paid message." +msgstr "" + +#: aiogram.enums.paid_media_type.PaidMediaType:3 of +msgid "Source: https://core.telegram.org/bots/api#paidmedia" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/revenue_withdrawal_state_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/revenue_withdrawal_state_type.po new file mode 100644 index 00000000..d6e2c13f --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/revenue_withdrawal_state_type.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/enums/revenue_withdrawal_state_type.rst:3 +msgid "RevenueWithdrawalStateType" +msgstr "" + +#: aiogram.enums.revenue_withdrawal_state_type.RevenueWithdrawalStateType:1 of +msgid "This object represents a revenue withdrawal state type" +msgstr "" + +#: aiogram.enums.revenue_withdrawal_state_type.RevenueWithdrawalStateType:3 of +msgid "Source: https://core.telegram.org/bots/api#revenuewithdrawalstate" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/topic_icon_color.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/topic_icon_color.po index 636bf54a..62b9ba19 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/topic_icon_color.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/topic_icon_color.po @@ -32,4 +32,3 @@ msgid "" msgstr "" "Джерело: " "https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56" - diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/transaction_partner_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/transaction_partner_type.po new file mode 100644 index 00000000..30c0f3d1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/transaction_partner_type.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/enums/transaction_partner_type.rst:3 +msgid "TransactionPartnerType" +msgstr "" + +#: aiogram.enums.transaction_partner_type.TransactionPartnerType:1 of +msgid "This object represents a type of transaction partner." +msgstr "" + +#: aiogram.enums.transaction_partner_type.TransactionPartnerType:3 of +msgid "Source: https://core.telegram.org/bots/api#transactionpartner" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/add_sticker_to_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/add_sticker_to_set.po index 483b44cd..bd805c10 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/add_sticker_to_set.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/add_sticker_to_set.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.11.0\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/add_sticker_to_set.rst:3 msgid "addStickerToSet" @@ -27,11 +27,9 @@ msgstr "" #: aiogram.methods.add_sticker_to_set.AddStickerToSet:1 of msgid "" -"Use this method to add a new sticker to a set created by the bot. The " -"format of the added sticker must match the format of the other stickers " -"in the set. Emoji sticker sets can have up to 200 stickers. Animated and " -"video sticker sets can have up to 50 stickers. Static sticker sets can " -"have up to 120 stickers. Returns :code:`True` on success." +"Use this method to add a new sticker to a set created by the bot. Emoji " +"sticker sets can have up to 200 stickers. Other sticker sets can have up " +"to 120 stickers. Returns :code:`True` on success." msgstr "" #: aiogram.methods.add_sticker_to_set.AddStickerToSet:3 of @@ -55,35 +53,35 @@ msgid "" "isn't changed." msgstr "" -#: ../../api/methods/add_sticker_to_set.rst:14 +#: ../../api/methods/add_sticker_to_set.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/add_sticker_to_set.rst:17 +#: ../../api/methods/add_sticker_to_set.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/add_sticker_to_set.rst:25 +#: ../../api/methods/add_sticker_to_set.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/add_sticker_to_set.rst:27 +#: ../../api/methods/add_sticker_to_set.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/add_sticker_to_set.rst:29 +#: ../../api/methods/add_sticker_to_set.rst:30 msgid ":code:`from aiogram.methods.add_sticker_to_set import AddStickerToSet`" msgstr "" -#: ../../api/methods/add_sticker_to_set.rst:30 +#: ../../api/methods/add_sticker_to_set.rst:31 msgid "alias: :code:`from aiogram.methods import AddStickerToSet`" msgstr "" -#: ../../api/methods/add_sticker_to_set.rst:33 +#: ../../api/methods/add_sticker_to_set.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/add_sticker_to_set.rst:40 +#: ../../api/methods/add_sticker_to_set.rst:41 msgid "As reply into Webhook in handler" msgstr "" @@ -147,3 +145,17 @@ msgstr "" #~ " where the mask should be placed " #~ "on faces" #~ msgstr "" + +#~ msgid "" +#~ "Use this method to add a new " +#~ "sticker to a set created by the" +#~ " bot. The format of the added " +#~ "sticker must match the format of " +#~ "the other stickers in the set. " +#~ "Emoji sticker sets can have up to" +#~ " 200 stickers. Animated and video " +#~ "sticker sets can have up to 50 " +#~ "stickers. Static sticker sets can have" +#~ " up to 120 stickers. Returns " +#~ ":code:`True` on success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_shipping_query.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_shipping_query.po index 418b9c67..2994cd5c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_shipping_query.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/answer_shipping_query.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-06 16:52+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/answer_shipping_query.rst:3 msgid "answerShippingQuery" @@ -64,7 +64,7 @@ msgstr "" #: aiogram.methods.answer_shipping_query.AnswerShippingQuery.error_message:1 of msgid "" "Required if *ok* is :code:`False`. Error message in human readable form " -"that explains why it is impossible to complete the order (e.g. \"Sorry, " +"that explains why it is impossible to complete the order (e.g. 'Sorry, " "delivery to your desired address is unavailable'). Telegram will display " "this message to the user." msgstr "" @@ -110,3 +110,13 @@ msgstr "" #: ../../api/methods/answer_shipping_query.rst:51 msgid ":meth:`aiogram.types.shipping_query.ShippingQuery.answer`" msgstr "" + +#~ msgid "" +#~ "Required if *ok* is :code:`False`. Error" +#~ " message in human readable form that" +#~ " explains why it is impossible to " +#~ "complete the order (e.g. \"Sorry, " +#~ "delivery to your desired address is " +#~ "unavailable'). Telegram will display this " +#~ "message to the user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/copy_message.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/copy_message.po index 7db672a4..8239d253 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/copy_message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/copy_message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,11 +27,11 @@ msgstr "" #: aiogram.methods.copy_message.CopyMessage:1 of msgid "" -"Use this method to copy messages of any kind. Service messages, giveaway " -"messages, giveaway winners messages, and invoice messages can't be " -"copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if " -"the value of the field *correct_option_id* is known to the bot. The " -"method is analogous to the method " +"Use this method to copy messages of any kind. Service messages, paid " +"media messages, giveaway messages, giveaway winners messages, and invoice" +" messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can " +"be copied only if the value of the field *correct_option_id* is known to " +"the bot. The method is analogous to the method " ":class:`aiogram.methods.forward_message.ForwardMessage`, but the copied " "message doesn't have a link to the original message. Returns the " ":class:`aiogram.types.message_id.MessageId` of the sent message on " @@ -65,6 +65,11 @@ msgid "" " forum supergroups only" msgstr "" +#: ../../docstring +#: aiogram.methods.copy_message.CopyMessage.video_start_timestamp:1 of +msgid "New start timestamp for the copied video in the message" +msgstr "" + #: ../../docstring aiogram.methods.copy_message.CopyMessage.caption:1 of msgid "" "New caption for media, 0-1024 characters after entities parsing. If not " @@ -85,6 +90,13 @@ msgid "" "caption, which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.methods.copy_message.CopyMessage.show_caption_above_media:1 of +msgid "" +"Pass :code:`True`, if the caption must be shown above the message media. " +"Ignored if a new caption isn't specified." +msgstr "" + #: ../../docstring #: aiogram.methods.copy_message.CopyMessage.disable_notification:1 of msgid "" @@ -97,6 +109,16 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring +#: aiogram.methods.copy_message.CopyMessage.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + #: ../../docstring aiogram.methods.copy_message.CopyMessage.reply_parameters:1 #: of msgid "Description of the message to reply to" @@ -108,7 +130,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -195,3 +217,31 @@ msgstr "" #~ " the :class:`aiogram.types.message_id.MessageId` of " #~ "the sent message on success." #~ msgstr "" + +#~ msgid "" +#~ "Use this method to copy messages " +#~ "of any kind. Service messages, giveaway" +#~ " messages, giveaway winners messages, and" +#~ " invoice messages can't be copied. A" +#~ " quiz :class:`aiogram.methods.poll.Poll` can be" +#~ " copied only if the value of " +#~ "the field *correct_option_id* is known " +#~ "to the bot. The method is " +#~ "analogous to the method " +#~ ":class:`aiogram.methods.forward_message.ForwardMessage`, but " +#~ "the copied message doesn't have a " +#~ "link to the original message. Returns" +#~ " the :class:`aiogram.types.message_id.MessageId` of " +#~ "the sent message on success." +#~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/copy_messages.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/copy_messages.po index 540c2bbb..1958cf78 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/copy_messages.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/copy_messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -25,20 +25,20 @@ msgid "copyMessages" msgstr "" #: ../../api/methods/copy_messages.rst:5 -msgid "Returns: :obj:`List[MessageId]`" +msgid "Returns: :obj:`list[MessageId]`" msgstr "" #: aiogram.methods.copy_messages.CopyMessages:1 of msgid "" "Use this method to copy messages of any kind. If some of the specified " "messages can't be found or copied, they are skipped. Service messages, " -"giveaway messages, giveaway winners messages, and invoice messages can't " -"be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only " -"if the value of the field *correct_option_id* is known to the bot. The " -"method is analogous to the method " -":class:`aiogram.methods.forward_messages.ForwardMessages`, but the copied" -" messages don't have a link to the original message. Album grouping is " -"kept for copied messages. On success, an array of " +"paid media messages, giveaway messages, giveaway winners messages, and " +"invoice messages can't be copied. A quiz " +":class:`aiogram.methods.poll.Poll` can be copied only if the value of the" +" field *correct_option_id* is known to the bot. The method is analogous " +"to the method :class:`aiogram.methods.forward_messages.ForwardMessages`, " +"but the copied messages don't have a link to the original message. Album " +"grouping is kept for copied messages. On success, an array of " ":class:`aiogram.types.message_id.MessageId` of the sent messages is " "returned." msgstr "" @@ -61,8 +61,9 @@ msgstr "" #: ../../docstring aiogram.methods.copy_messages.CopyMessages.message_ids:1 of msgid "" -"Identifiers of 1-100 messages in the chat *from_chat_id* to copy. The " -"identifiers must be specified in a strictly increasing order." +"A JSON-serialized list of 1-100 identifiers of messages in the chat " +"*from_chat_id* to copy. The identifiers must be specified in a strictly " +"increasing order." msgstr "" #: ../../docstring @@ -120,3 +121,35 @@ msgstr "" #: ../../api/methods/copy_messages.rst:41 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "Returns: :obj:`List[MessageId]`" +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to copy messages " +#~ "of any kind. If some of the " +#~ "specified messages can't be found or " +#~ "copied, they are skipped. Service " +#~ "messages, giveaway messages, giveaway winners" +#~ " messages, and invoice messages can't " +#~ "be copied. A quiz " +#~ ":class:`aiogram.methods.poll.Poll` can be copied " +#~ "only if the value of the field " +#~ "*correct_option_id* is known to the bot." +#~ " The method is analogous to the " +#~ "method " +#~ ":class:`aiogram.methods.forward_messages.ForwardMessages`, but" +#~ " the copied messages don't have a " +#~ "link to the original message. Album " +#~ "grouping is kept for copied messages." +#~ " On success, an array of " +#~ ":class:`aiogram.types.message_id.MessageId` of the " +#~ "sent messages is returned." +#~ msgstr "" + +#~ msgid "" +#~ "Identifiers of 1-100 messages in the " +#~ "chat *from_chat_id* to copy. The " +#~ "identifiers must be specified in a " +#~ "strictly increasing order." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_chat_subscription_invite_link.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_chat_subscription_invite_link.po new file mode 100644 index 00000000..21e737f1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_chat_subscription_invite_link.po @@ -0,0 +1,117 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/create_chat_subscription_invite_link.rst:3 +msgid "createChatSubscriptionInviteLink" +msgstr "" + +#: ../../api/methods/create_chat_subscription_invite_link.rst:5 +msgid "Returns: :obj:`ChatInviteLink`" +msgstr "" + +#: aiogram.methods.create_chat_subscription_invite_link.CreateChatSubscriptionInviteLink:1 +#: of +msgid "" +"Use this method to create a `subscription invite link " +"`_ for a channel chat. The bot must have the " +"*can_invite_users* administrator rights. The link can be edited using the" +" method " +":class:`aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink`" +" or revoked using the method " +":class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. " +"Returns the new invite link as a " +":class:`aiogram.types.chat_invite_link.ChatInviteLink` object." +msgstr "" + +#: aiogram.methods.create_chat_subscription_invite_link.CreateChatSubscriptionInviteLink:3 +#: of +msgid "" +"Source: " +"https://core.telegram.org/bots/api#createchatsubscriptioninvitelink" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_chat_subscription_invite_link.CreateChatSubscriptionInviteLink.chat_id:1 +#: of +msgid "" +"Unique identifier for the target channel chat or username of the target " +"channel (in the format :code:`@channelusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_chat_subscription_invite_link.CreateChatSubscriptionInviteLink.subscription_period:1 +#: of +msgid "" +"The number of seconds the subscription will be active for before the next" +" payment. Currently, it must always be 2592000 (30 days)." +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_chat_subscription_invite_link.CreateChatSubscriptionInviteLink.subscription_price:1 +#: of +msgid "" +"The amount of Telegram Stars a user must pay initially and after each " +"subsequent subscription period to be a member of the chat; 1-2500" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_chat_subscription_invite_link.CreateChatSubscriptionInviteLink.name:1 +#: of +msgid "Invite link name; 0-32 characters" +msgstr "" + +#: ../../api/methods/create_chat_subscription_invite_link.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/create_chat_subscription_invite_link.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/create_chat_subscription_invite_link.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/create_chat_subscription_invite_link.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/create_chat_subscription_invite_link.rst:30 +msgid "" +":code:`from aiogram.methods.create_chat_subscription_invite_link import " +"CreateChatSubscriptionInviteLink`" +msgstr "" + +#: ../../api/methods/create_chat_subscription_invite_link.rst:31 +msgid "" +"alias: :code:`from aiogram.methods import " +"CreateChatSubscriptionInviteLink`" +msgstr "" + +#: ../../api/methods/create_chat_subscription_invite_link.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/create_chat_subscription_invite_link.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_invoice_link.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_invoice_link.po index ca18a308..07acfa33 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_invoice_link.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_invoice_link.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/create_invoice_link.rst:3 msgid "createInvoiceLink" @@ -49,26 +49,53 @@ msgstr "" #: aiogram.methods.create_invoice_link.CreateInvoiceLink.payload:1 of msgid "" "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to " -"the user, use for your internal processes." -msgstr "" - -#: ../../docstring -#: aiogram.methods.create_invoice_link.CreateInvoiceLink.provider_token:1 of -msgid "Payment provider token, obtained via `BotFather `_" +"the user, use it for your internal processes." msgstr "" #: ../../docstring #: aiogram.methods.create_invoice_link.CreateInvoiceLink.currency:1 of msgid "" "Three-letter ISO 4217 currency code, see `more on currencies " -"`_" +"`_. Pass " +"'XTR' for payments in `Telegram Stars `_." msgstr "" #: ../../docstring #: aiogram.methods.create_invoice_link.CreateInvoiceLink.prices:1 of msgid "" "Price breakdown, a JSON-serialized list of components (e.g. product " -"price, tax, discount, delivery cost, delivery tax, bonus, etc.)" +"price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must " +"contain exactly one item for payments in `Telegram Stars " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.business_connection_id:1 +#: of +msgid "" +"Unique identifier of the business connection on behalf of which the link " +"will be created. For payments in `Telegram Stars " +"`_ only." +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.provider_token:1 of +msgid "" +"Payment provider token, obtained via `@BotFather " +"`_. Pass an empty string for payments in " +"`Telegram Stars `_." +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_invoice_link.CreateInvoiceLink.subscription_period:1 +#: of +msgid "" +"The number of seconds the subscription will be active for before the next" +" payment. The currency must be set to 'XTR' (Telegram Stars) if the " +"parameter is used. Currently, it must always be 2592000 (30 days) if " +"specified. Any number of subscriptions can be active for a given bot at " +"the same time, including multiple concurrent subscriptions from the same " +"user. Subscription price must no exceed 2500 Telegram Stars." msgstr "" #: ../../docstring @@ -80,7 +107,8 @@ msgid "" "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" +"majority of currencies). Defaults to 0. Not supported for payments in " +"`Telegram Stars `_." msgstr "" #: ../../docstring @@ -128,21 +156,24 @@ msgstr "" #: aiogram.methods.create_invoice_link.CreateInvoiceLink.need_name:1 of msgid "" "Pass :code:`True` if you require the user's full name to complete the " -"order" +"order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring #: aiogram.methods.create_invoice_link.CreateInvoiceLink.need_phone_number:1 of msgid "" "Pass :code:`True` if you require the user's phone number to complete the " -"order" +"order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring #: aiogram.methods.create_invoice_link.CreateInvoiceLink.need_email:1 of msgid "" "Pass :code:`True` if you require the user's email address to complete the" -" order" +" order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring @@ -150,7 +181,8 @@ msgstr "" #: of msgid "" "Pass :code:`True` if you require the user's shipping address to complete " -"the order" +"the order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring @@ -158,7 +190,8 @@ msgstr "" #: of msgid "" "Pass :code:`True` if the user's phone number should be sent to the " -"provider" +"provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring @@ -166,42 +199,124 @@ msgstr "" #: of msgid "" "Pass :code:`True` if the user's email address should be sent to the " -"provider" +"provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring #: aiogram.methods.create_invoice_link.CreateInvoiceLink.is_flexible:1 of -msgid "Pass :code:`True` if the final price depends on the shipping method" +msgid "" +"Pass :code:`True` if the final price depends on the shipping method. " +"Ignored for payments in `Telegram Stars `_." msgstr "" -#: ../../api/methods/create_invoice_link.rst:14 +#: ../../api/methods/create_invoice_link.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/create_invoice_link.rst:17 +#: ../../api/methods/create_invoice_link.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/create_invoice_link.rst:25 +#: ../../api/methods/create_invoice_link.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/create_invoice_link.rst:27 +#: ../../api/methods/create_invoice_link.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/create_invoice_link.rst:29 +#: ../../api/methods/create_invoice_link.rst:30 msgid ":code:`from aiogram.methods.create_invoice_link import CreateInvoiceLink`" msgstr "" -#: ../../api/methods/create_invoice_link.rst:30 +#: ../../api/methods/create_invoice_link.rst:31 msgid "alias: :code:`from aiogram.methods import CreateInvoiceLink`" msgstr "" -#: ../../api/methods/create_invoice_link.rst:33 +#: ../../api/methods/create_invoice_link.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/create_invoice_link.rst:40 +#: ../../api/methods/create_invoice_link.rst:41 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "Bot-defined invoice payload, 1-128 " +#~ "bytes. This will not be displayed " +#~ "to the user, use for your internal" +#~ " processes." +#~ msgstr "" + +#~ msgid "" +#~ "Payment provider token, obtained via " +#~ "`BotFather `_" +#~ msgstr "" + +#~ msgid "" +#~ "Three-letter ISO 4217 currency code, " +#~ "see `more on currencies " +#~ "`_" +#~ msgstr "" + +#~ msgid "" +#~ "Price breakdown, a JSON-serialized list" +#~ " of components (e.g. product price, " +#~ "tax, discount, delivery cost, delivery " +#~ "tax, bonus, etc.)" +#~ msgstr "" + +#~ msgid "" +#~ "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" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's full name to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's phone number to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's email address to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's shipping address to complete the" +#~ " order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the user's phone" +#~ " number should be sent to the " +#~ "provider" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the user's email" +#~ " address should be sent to the " +#~ "provider" +#~ msgstr "" + +#~ msgid "Pass :code:`True` if the final price depends on the shipping method" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_new_sticker_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_new_sticker_set.po index 045ca8f0..b1e1e2b6 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_new_sticker_set.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_new_sticker_set.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.11.0\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/create_new_sticker_set.rst:3 msgid "createNewStickerSet" @@ -63,14 +63,6 @@ msgid "" "sticker set" msgstr "" -#: ../../docstring -#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.sticker_format:1 -#: of -msgid "" -"Format of stickers in the set, must be one of 'static', 'animated', " -"'video'" -msgstr "" - #: ../../docstring #: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.sticker_type:1 of msgid "" @@ -88,37 +80,51 @@ msgid "" "context; for custom emoji sticker sets only" msgstr "" -#: ../../api/methods/create_new_sticker_set.rst:14 +#: ../../docstring +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.sticker_format:1 +#: of +msgid "" +"Format of stickers in the set, must be one of 'static', 'animated', " +"'video'" +msgstr "" + +#: ../../docstring +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.sticker_format:3 +#: of +msgid "https://core.telegram.org/bots/api-changelog#march-31-2024" +msgstr "" + +#: ../../api/methods/create_new_sticker_set.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/create_new_sticker_set.rst:17 +#: ../../api/methods/create_new_sticker_set.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/create_new_sticker_set.rst:25 +#: ../../api/methods/create_new_sticker_set.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/create_new_sticker_set.rst:27 +#: ../../api/methods/create_new_sticker_set.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/create_new_sticker_set.rst:29 +#: ../../api/methods/create_new_sticker_set.rst:30 msgid "" ":code:`from aiogram.methods.create_new_sticker_set import " "CreateNewStickerSet`" msgstr "" -#: ../../api/methods/create_new_sticker_set.rst:30 +#: ../../api/methods/create_new_sticker_set.rst:31 msgid "alias: :code:`from aiogram.methods import CreateNewStickerSet`" msgstr "" -#: ../../api/methods/create_new_sticker_set.rst:33 +#: ../../api/methods/create_new_sticker_set.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/create_new_sticker_set.rst:40 +#: ../../api/methods/create_new_sticker_set.rst:41 msgid "As reply into Webhook in handler" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_messages.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_messages.po index f752f998..bc9ece9f 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_messages.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -48,7 +48,7 @@ msgstr "" #: ../../docstring aiogram.methods.delete_messages.DeleteMessages.message_ids:1 #: of msgid "" -"Identifiers of 1-100 messages to delete. See " +"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" msgstr "" @@ -84,3 +84,10 @@ msgstr "" #: ../../api/methods/delete_messages.rst:41 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "Identifiers of 1-100 messages to delete." +#~ " See :class:`aiogram.methods.delete_message.DeleteMessage`" +#~ " for limitations on which messages " +#~ "can be deleted" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_chat_subscription_invite_link.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_chat_subscription_invite_link.po new file mode 100644 index 00000000..4398522a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_chat_subscription_invite_link.po @@ -0,0 +1,97 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/edit_chat_subscription_invite_link.rst:3 +msgid "editChatSubscriptionInviteLink" +msgstr "" + +#: ../../api/methods/edit_chat_subscription_invite_link.rst:5 +msgid "Returns: :obj:`ChatInviteLink`" +msgstr "" + +#: aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink:1 +#: of +msgid "" +"Use this method to edit a subscription invite link created by the bot. " +"The bot must have the *can_invite_users* administrator rights. Returns " +"the edited invite link as a " +":class:`aiogram.types.chat_invite_link.ChatInviteLink` object." +msgstr "" + +#: aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#editchatsubscriptioninvitelink" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target channel " +"(in the format :code:`@channelusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink.invite_link:1 +#: of +msgid "The invite link to edit" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink.name:1 +#: of +msgid "Invite link name; 0-32 characters" +msgstr "" + +#: ../../api/methods/edit_chat_subscription_invite_link.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_chat_subscription_invite_link.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_chat_subscription_invite_link.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_chat_subscription_invite_link.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/edit_chat_subscription_invite_link.rst:30 +msgid "" +":code:`from aiogram.methods.edit_chat_subscription_invite_link import " +"EditChatSubscriptionInviteLink`" +msgstr "" + +#: ../../api/methods/edit_chat_subscription_invite_link.rst:31 +msgid "alias: :code:`from aiogram.methods import EditChatSubscriptionInviteLink`" +msgstr "" + +#: ../../api/methods/edit_chat_subscription_invite_link.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/edit_chat_subscription_invite_link.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po index bf582c84..53da9563 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-07 23:01+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/edit_forum_topic.rst:3 msgid "editForumTopic" @@ -29,7 +29,7 @@ msgstr "" msgid "" "Use this method to edit name and icon of a topic in a forum supergroup " "chat. The bot must be an administrator in the chat for this to work and " -"must have *can_manage_topics* administrator rights, unless it is the " +"must have the *can_manage_topics* administrator rights, unless it is the " "creator of the topic. Returns :code:`True` on success." msgstr "" @@ -63,34 +63,45 @@ msgid "" "remove the icon. If not specified, the current icon will be kept" msgstr "" -#: ../../api/methods/edit_forum_topic.rst:14 +#: ../../api/methods/edit_forum_topic.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/edit_forum_topic.rst:17 +#: ../../api/methods/edit_forum_topic.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/edit_forum_topic.rst:25 +#: ../../api/methods/edit_forum_topic.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/edit_forum_topic.rst:27 +#: ../../api/methods/edit_forum_topic.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/edit_forum_topic.rst:29 +#: ../../api/methods/edit_forum_topic.rst:30 msgid ":code:`from aiogram.methods.edit_forum_topic import EditForumTopic`" msgstr "" -#: ../../api/methods/edit_forum_topic.rst:30 +#: ../../api/methods/edit_forum_topic.rst:31 msgid "alias: :code:`from aiogram.methods import EditForumTopic`" msgstr "" -#: ../../api/methods/edit_forum_topic.rst:33 +#: ../../api/methods/edit_forum_topic.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/edit_forum_topic.rst:40 +#: ../../api/methods/edit_forum_topic.rst:41 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "Use this method to edit name and" +#~ " icon of a topic in a forum " +#~ "supergroup chat. The bot must be " +#~ "an administrator in the chat for " +#~ "this to work and must have " +#~ "*can_manage_topics* administrator rights, unless " +#~ "it is the creator of the topic." +#~ " Returns :code:`True` on success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_general_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_general_forum_topic.po index 75700ab7..28e36aed 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_general_forum_topic.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_general_forum_topic.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/edit_general_forum_topic.rst:3 msgid "editGeneralForumTopic" @@ -29,8 +29,8 @@ msgstr "" msgid "" "Use this method to edit the name of the 'General' topic in a forum " "supergroup chat. The bot must be an administrator in the chat for this to" -" work and must have *can_manage_topics* administrator rights. Returns " -":code:`True` on success." +" work and must have the *can_manage_topics* administrator rights. Returns" +" :code:`True` on success." msgstr "" #: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic:3 of @@ -49,36 +49,46 @@ msgstr "" msgid "New topic name, 1-128 characters" msgstr "" -#: ../../api/methods/edit_general_forum_topic.rst:14 +#: ../../api/methods/edit_general_forum_topic.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/edit_general_forum_topic.rst:17 +#: ../../api/methods/edit_general_forum_topic.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/edit_general_forum_topic.rst:25 +#: ../../api/methods/edit_general_forum_topic.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/edit_general_forum_topic.rst:27 +#: ../../api/methods/edit_general_forum_topic.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/edit_general_forum_topic.rst:29 +#: ../../api/methods/edit_general_forum_topic.rst:30 msgid "" ":code:`from aiogram.methods.edit_general_forum_topic import " "EditGeneralForumTopic`" msgstr "" -#: ../../api/methods/edit_general_forum_topic.rst:30 +#: ../../api/methods/edit_general_forum_topic.rst:31 msgid "alias: :code:`from aiogram.methods import EditGeneralForumTopic`" msgstr "" -#: ../../api/methods/edit_general_forum_topic.rst:33 +#: ../../api/methods/edit_general_forum_topic.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/edit_general_forum_topic.rst:40 +#: ../../api/methods/edit_general_forum_topic.rst:41 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "Use this method to edit the name" +#~ " of the 'General' topic in a " +#~ "forum supergroup chat. The bot must " +#~ "be an administrator in the chat " +#~ "for this to work and must have " +#~ "*can_manage_topics* administrator rights. Returns" +#~ " :code:`True` on success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_caption.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_caption.po index a566ee5e..a509fa97 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_caption.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_caption.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/edit_message_caption.rst:3 msgid "editMessageCaption" @@ -30,13 +30,23 @@ msgid "" "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." +":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." msgstr "" #: aiogram.methods.edit_message_caption.EditMessageCaption:3 of msgid "Source: https://core.telegram.org/bots/api#editmessagecaption" msgstr "" +#: ../../docstring +#: aiogram.methods.edit_message_caption.EditMessageCaption.business_connection_id:1 +#: of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message to be edited was sent" +msgstr "" + #: ../../docstring #: aiogram.methods.edit_message_caption.EditMessageCaption.chat_id:1 of msgid "" @@ -81,6 +91,14 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.methods.edit_message_caption.EditMessageCaption.show_caption_above_media:1 +#: of +msgid "" +"Pass :code:`True`, if the caption must be shown above the message media. " +"Supported only for animation, photo and video messages." +msgstr "" + #: ../../docstring #: aiogram.methods.edit_message_caption.EditMessageCaption.reply_markup:1 of msgid "" @@ -88,45 +106,45 @@ msgid "" "`_." msgstr "" -#: ../../api/methods/edit_message_caption.rst:14 +#: ../../api/methods/edit_message_caption.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/edit_message_caption.rst:17 +#: ../../api/methods/edit_message_caption.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/edit_message_caption.rst:25 +#: ../../api/methods/edit_message_caption.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/edit_message_caption.rst:27 +#: ../../api/methods/edit_message_caption.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/edit_message_caption.rst:29 +#: ../../api/methods/edit_message_caption.rst:30 msgid "" ":code:`from aiogram.methods.edit_message_caption import " "EditMessageCaption`" msgstr "" -#: ../../api/methods/edit_message_caption.rst:30 +#: ../../api/methods/edit_message_caption.rst:31 msgid "alias: :code:`from aiogram.methods import EditMessageCaption`" msgstr "" -#: ../../api/methods/edit_message_caption.rst:33 +#: ../../api/methods/edit_message_caption.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/edit_message_caption.rst:40 +#: ../../api/methods/edit_message_caption.rst:41 msgid "As reply into Webhook in handler" msgstr "" -#: ../../api/methods/edit_message_caption.rst:48 +#: ../../api/methods/edit_message_caption.rst:49 msgid "As shortcut from received object" msgstr "" -#: ../../api/methods/edit_message_caption.rst:50 +#: ../../api/methods/edit_message_caption.rst:51 msgid ":meth:`aiogram.types.message.Message.edit_caption`" msgstr "" @@ -136,3 +154,12 @@ msgstr "" #~ "#inline-keyboards-and-on-the-fly-" #~ "updating>`_." #~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_live_location.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_live_location.po index 2e129074..46f82076 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_live_location.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_live_location.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/edit_message_live_location.rst:3 msgid "editMessageLiveLocation" @@ -52,6 +52,14 @@ msgstr "" msgid "Longitude of new location" msgstr "" +#: ../../docstring +#: aiogram.methods.edit_message_live_location.EditMessageLiveLocation.business_connection_id:1 +#: of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message to be edited was sent" +msgstr "" + #: ../../docstring #: aiogram.methods.edit_message_live_location.EditMessageLiveLocation.chat_id:1 #: of @@ -77,6 +85,18 @@ msgid "" "the inline message" msgstr "" +#: ../../docstring +#: aiogram.methods.edit_message_live_location.EditMessageLiveLocation.live_period:1 +#: of +msgid "" +"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" +msgstr "" + #: ../../docstring #: aiogram.methods.edit_message_live_location.EditMessageLiveLocation.horizontal_accuracy:1 #: of @@ -107,45 +127,45 @@ msgid "" "`_." msgstr "" -#: ../../api/methods/edit_message_live_location.rst:14 +#: ../../api/methods/edit_message_live_location.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/edit_message_live_location.rst:17 +#: ../../api/methods/edit_message_live_location.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/edit_message_live_location.rst:25 +#: ../../api/methods/edit_message_live_location.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/edit_message_live_location.rst:27 +#: ../../api/methods/edit_message_live_location.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/edit_message_live_location.rst:29 +#: ../../api/methods/edit_message_live_location.rst:30 msgid "" ":code:`from aiogram.methods.edit_message_live_location import " "EditMessageLiveLocation`" msgstr "" -#: ../../api/methods/edit_message_live_location.rst:30 +#: ../../api/methods/edit_message_live_location.rst:31 msgid "alias: :code:`from aiogram.methods import EditMessageLiveLocation`" msgstr "" -#: ../../api/methods/edit_message_live_location.rst:33 +#: ../../api/methods/edit_message_live_location.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/edit_message_live_location.rst:40 +#: ../../api/methods/edit_message_live_location.rst:41 msgid "As reply into Webhook in handler" msgstr "" -#: ../../api/methods/edit_message_live_location.rst:48 +#: ../../api/methods/edit_message_live_location.rst:49 msgid "As shortcut from received object" msgstr "" -#: ../../api/methods/edit_message_live_location.rst:50 +#: ../../api/methods/edit_message_live_location.rst:51 msgid ":meth:`aiogram.types.message.Message.edit_live_location`" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_media.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_media.po index afb32662..33f724d6 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_media.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_media.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/edit_message_media.rst:3 msgid "editMessageMedia" @@ -28,13 +28,16 @@ msgstr "" #: aiogram.methods.edit_message_media.EditMessageMedia:1 of msgid "" "Use this method to edit animation, audio, document, photo, or video " -"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." +"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." msgstr "" #: aiogram.methods.edit_message_media.EditMessageMedia:3 of @@ -46,6 +49,14 @@ msgstr "" msgid "A JSON-serialized object for a new media content of the message" msgstr "" +#: ../../docstring +#: aiogram.methods.edit_message_media.EditMessageMedia.business_connection_id:1 +#: of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message to be edited was sent" +msgstr "" + #: ../../docstring #: aiogram.methods.edit_message_media.EditMessageMedia.chat_id:1 of msgid "" @@ -75,43 +86,43 @@ msgid "" "`_." msgstr "" -#: ../../api/methods/edit_message_media.rst:14 +#: ../../api/methods/edit_message_media.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/edit_message_media.rst:17 +#: ../../api/methods/edit_message_media.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/edit_message_media.rst:25 +#: ../../api/methods/edit_message_media.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/edit_message_media.rst:27 +#: ../../api/methods/edit_message_media.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/edit_message_media.rst:29 +#: ../../api/methods/edit_message_media.rst:30 msgid ":code:`from aiogram.methods.edit_message_media import EditMessageMedia`" msgstr "" -#: ../../api/methods/edit_message_media.rst:30 +#: ../../api/methods/edit_message_media.rst:31 msgid "alias: :code:`from aiogram.methods import EditMessageMedia`" msgstr "" -#: ../../api/methods/edit_message_media.rst:33 +#: ../../api/methods/edit_message_media.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/edit_message_media.rst:40 +#: ../../api/methods/edit_message_media.rst:41 msgid "As reply into Webhook in handler" msgstr "" -#: ../../api/methods/edit_message_media.rst:48 +#: ../../api/methods/edit_message_media.rst:49 msgid "As shortcut from received object" msgstr "" -#: ../../api/methods/edit_message_media.rst:50 +#: ../../api/methods/edit_message_media.rst:51 msgid ":meth:`aiogram.types.message.Message.edit_media`" msgstr "" @@ -124,3 +135,22 @@ msgstr "" #~ msgid "As message method" #~ msgstr "" + +#~ msgid "" +#~ "Use this method to edit animation, " +#~ "audio, document, photo, or video " +#~ "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." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_reply_markup.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_reply_markup.po index b704dd6d..c6a1aafb 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_reply_markup.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_reply_markup.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-06 16:52+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/edit_message_reply_markup.rst:3 msgid "editMessageReplyMarkup" @@ -30,13 +30,23 @@ msgid "" "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." +":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." msgstr "" #: aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup:3 of msgid "Source: https://core.telegram.org/bots/api#editmessagereplymarkup" msgstr "" +#: ../../docstring +#: aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup.business_connection_id:1 +#: of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message to be edited was sent" +msgstr "" + #: ../../docstring #: aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup.chat_id:1 #: of @@ -122,3 +132,12 @@ msgstr "" #~ "#inline-keyboards-and-on-the-fly-" #~ "updating>`_." #~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_text.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_text.po index 369d81ce..7f70442b 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_text.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_message_text.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -31,7 +31,9 @@ msgid "" "`_ 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." +":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." msgstr "" #: aiogram.methods.edit_message_text.EditMessageText:3 of @@ -42,6 +44,14 @@ msgstr "" msgid "New text of the message, 1-4096 characters after entities parsing" msgstr "" +#: ../../docstring +#: aiogram.methods.edit_message_text.EditMessageText.business_connection_id:1 +#: of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message to be edited was sent" +msgstr "" + #: ../../docstring aiogram.methods.edit_message_text.EditMessageText.chat_id:1 #: of msgid "" @@ -149,3 +159,13 @@ msgstr "" #~ "#inline-keyboards-and-on-the-fly-" #~ "updating>`_." #~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_user_star_subscription.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_user_star_subscription.po new file mode 100644 index 00000000..92d9591e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_user_star_subscription.po @@ -0,0 +1,95 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/edit_user_star_subscription.rst:3 +msgid "editUserStarSubscription" +msgstr "" + +#: ../../api/methods/edit_user_star_subscription.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.edit_user_star_subscription.EditUserStarSubscription:1 of +msgid "" +"Allows the bot to cancel or re-enable extension of a subscription paid in" +" Telegram Stars. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.edit_user_star_subscription.EditUserStarSubscription:3 of +msgid "Source: https://core.telegram.org/bots/api#edituserstarsubscription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_user_star_subscription.EditUserStarSubscription.user_id:1 +#: of +msgid "Identifier of the user whose subscription will be edited" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_user_star_subscription.EditUserStarSubscription.telegram_payment_charge_id:1 +#: of +msgid "Telegram payment identifier for the subscription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_user_star_subscription.EditUserStarSubscription.is_canceled:1 +#: of +msgid "" +"Pass :code:`True` to cancel extension of the user subscription; the " +"subscription must be active up to the end of the current subscription " +"period. Pass :code:`False` to allow the user to re-enable a subscription " +"that was previously canceled by the bot." +msgstr "" + +#: ../../api/methods/edit_user_star_subscription.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_user_star_subscription.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_user_star_subscription.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_user_star_subscription.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/edit_user_star_subscription.rst:30 +msgid "" +":code:`from aiogram.methods.edit_user_star_subscription import " +"EditUserStarSubscription`" +msgstr "" + +#: ../../api/methods/edit_user_star_subscription.rst:31 +msgid "alias: :code:`from aiogram.methods import EditUserStarSubscription`" +msgstr "" + +#: ../../api/methods/edit_user_star_subscription.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/edit_user_star_subscription.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/forward_message.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/forward_message.po index d8188e72..66b3e9ac 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/forward_message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/forward_message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -61,6 +61,11 @@ msgid "" " forum supergroups only" msgstr "" +#: ../../docstring +#: aiogram.methods.forward_message.ForwardMessage.video_start_timestamp:1 of +msgid "New start timestamp for the forwarded video in the message" +msgstr "" + #: ../../docstring #: aiogram.methods.forward_message.ForwardMessage.disable_notification:1 of msgid "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/forward_messages.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/forward_messages.po index 3f6b79eb..f83918c4 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/forward_messages.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/forward_messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -25,7 +25,7 @@ msgid "forwardMessages" msgstr "" #: ../../api/methods/forward_messages.rst:5 -msgid "Returns: :obj:`List[MessageId]`" +msgid "Returns: :obj:`list[MessageId]`" msgstr "" #: aiogram.methods.forward_messages.ForwardMessages:1 of @@ -59,8 +59,9 @@ msgstr "" #: ../../docstring #: aiogram.methods.forward_messages.ForwardMessages.message_ids:1 of msgid "" -"Identifiers of 1-100 messages in the chat *from_chat_id* to forward. The " -"identifiers must be specified in a strictly increasing order." +"A JSON-serialized list of 1-100 identifiers of messages in the chat " +"*from_chat_id* to forward. The identifiers must be specified in a " +"strictly increasing order." msgstr "" #: ../../docstring @@ -113,3 +114,13 @@ msgstr "" #: ../../api/methods/forward_messages.rst:41 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "Returns: :obj:`List[MessageId]`" +#~ msgstr "" + +#~ msgid "" +#~ "Identifiers of 1-100 messages in the " +#~ "chat *from_chat_id* to forward. The " +#~ "identifiers must be specified in a " +#~ "strictly increasing order." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_available_gifts.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_available_gifts.po new file mode 100644 index 00000000..886d2762 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_available_gifts.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/get_available_gifts.rst:3 +msgid "getAvailableGifts" +msgstr "" + +#: ../../api/methods/get_available_gifts.rst:5 +msgid "Returns: :obj:`Gifts`" +msgstr "" + +#: aiogram.methods.get_available_gifts.GetAvailableGifts:1 of +msgid "" +"Returns the list of gifts that can be sent by the bot to users and " +"channel chats. Requires no parameters. Returns a " +":class:`aiogram.types.gifts.Gifts` object." +msgstr "" + +#: aiogram.methods.get_available_gifts.GetAvailableGifts:3 of +msgid "Source: https://core.telegram.org/bots/api#getavailablegifts" +msgstr "" + +#: ../../api/methods/get_available_gifts.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_available_gifts.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_available_gifts.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_available_gifts.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_available_gifts.rst:30 +msgid ":code:`from aiogram.methods.get_available_gifts import GetAvailableGifts`" +msgstr "" + +#: ../../api/methods/get_available_gifts.rst:31 +msgid "alias: :code:`from aiogram.methods import GetAvailableGifts`" +msgstr "" + +#: ../../api/methods/get_available_gifts.rst:34 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_business_connection.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_business_connection.po new file mode 100644 index 00000000..c23aa841 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_business_connection.po @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/get_business_connection.rst:3 +msgid "getBusinessConnection" +msgstr "" + +#: ../../api/methods/get_business_connection.rst:5 +msgid "Returns: :obj:`BusinessConnection`" +msgstr "" + +#: aiogram.methods.get_business_connection.GetBusinessConnection:1 of +msgid "" +"Use this method to get information about the connection of the bot with a" +" business account. Returns a " +":class:`aiogram.types.business_connection.BusinessConnection` object on " +"success." +msgstr "" + +#: aiogram.methods.get_business_connection.GetBusinessConnection:3 of +msgid "Source: https://core.telegram.org/bots/api#getbusinessconnection" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_business_connection.GetBusinessConnection.business_connection_id:1 +#: of +msgid "Unique identifier of the business connection" +msgstr "" + +#: ../../api/methods/get_business_connection.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_business_connection.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_business_connection.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_business_connection.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_business_connection.rst:30 +msgid "" +":code:`from aiogram.methods.get_business_connection import " +"GetBusinessConnection`" +msgstr "" + +#: ../../api/methods/get_business_connection.rst:31 +msgid "alias: :code:`from aiogram.methods import GetBusinessConnection`" +msgstr "" + +#: ../../api/methods/get_business_connection.rst:34 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat.po index 7b5cefe9..0e3004cd 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,13 +22,13 @@ msgid "getChat" msgstr "" #: ../../api/methods/get_chat.rst:5 -msgid "Returns: :obj:`Chat`" +msgid "Returns: :obj:`ChatFullInfo`" msgstr "" #: aiogram.methods.get_chat.GetChat:1 of msgid "" -"Use this method to get up to date information about the chat. Returns a " -":class:`aiogram.types.chat.Chat` object on success." +"Use this method to get up-to-date information about the chat. Returns a " +":class:`aiogram.types.chat_full_info.ChatFullInfo` object on success." msgstr "" #: aiogram.methods.get_chat.GetChat:3 of @@ -78,3 +78,13 @@ msgstr "" #~ "Returns a :class:`aiogram.types.chat.Chat` object" #~ " on success." #~ msgstr "" + +#~ msgid "Returns: :obj:`Chat`" +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to get up to " +#~ "date information about the chat. Returns" +#~ " a :class:`aiogram.types.chat.Chat` object on " +#~ "success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_administrators.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_administrators.po index 7700abdc..fbff4913 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_administrators.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_administrators.po @@ -8,24 +8,21 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/get_chat_administrators.rst:3 msgid "getChatAdministrators" msgstr "" #: ../../api/methods/get_chat_administrators.rst:5 -msgid "" -"Returns: :obj:`List[Union[ChatMemberOwner, ChatMemberAdministrator, " -"ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, " -"ChatMemberBanned]]`" +msgid "Returns: :obj:`list[ResultChatMemberUnion]`" msgstr "" #: aiogram.methods.get_chat_administrators.GetChatAdministrators:1 of @@ -46,40 +43,46 @@ msgid "" "supergroup or channel (in the format :code:`@channelusername`)" msgstr "" -#: ../../api/methods/get_chat_administrators.rst:14 +#: ../../api/methods/get_chat_administrators.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/get_chat_administrators.rst:17 +#: ../../api/methods/get_chat_administrators.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/get_chat_administrators.rst:25 +#: ../../api/methods/get_chat_administrators.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/get_chat_administrators.rst:27 +#: ../../api/methods/get_chat_administrators.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/get_chat_administrators.rst:29 +#: ../../api/methods/get_chat_administrators.rst:30 msgid "" ":code:`from aiogram.methods.get_chat_administrators import " "GetChatAdministrators`" msgstr "" -#: ../../api/methods/get_chat_administrators.rst:30 +#: ../../api/methods/get_chat_administrators.rst:31 msgid "alias: :code:`from aiogram.methods import GetChatAdministrators`" msgstr "" -#: ../../api/methods/get_chat_administrators.rst:33 +#: ../../api/methods/get_chat_administrators.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/get_chat_administrators.rst:43 +#: ../../api/methods/get_chat_administrators.rst:44 msgid "As shortcut from received object" msgstr "" -#: ../../api/methods/get_chat_administrators.rst:45 +#: ../../api/methods/get_chat_administrators.rst:46 msgid ":meth:`aiogram.types.chat.Chat.get_administrators`" msgstr "" + +#~ msgid "" +#~ "Returns: :obj:`List[Union[ChatMemberOwner, " +#~ "ChatMemberAdministrator, ChatMemberMember, " +#~ "ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]]`" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po index d3bff554..f30482e6 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po @@ -8,24 +8,21 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-12 00:22+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.9.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/get_chat_member.rst:3 msgid "getChatMember" msgstr "" #: ../../api/methods/get_chat_member.rst:5 -msgid "" -"Returns: :obj:`Union[ChatMemberOwner, ChatMemberAdministrator, " -"ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, " -"ChatMemberBanned]`" +msgid "Returns: :obj:`ResultChatMemberUnion`" msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:1 of @@ -50,39 +47,39 @@ msgstr "" msgid "Unique identifier of the target user" msgstr "" -#: ../../api/methods/get_chat_member.rst:14 +#: ../../api/methods/get_chat_member.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/get_chat_member.rst:17 +#: ../../api/methods/get_chat_member.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/get_chat_member.rst:25 +#: ../../api/methods/get_chat_member.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/get_chat_member.rst:27 +#: ../../api/methods/get_chat_member.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/get_chat_member.rst:29 +#: ../../api/methods/get_chat_member.rst:30 msgid ":code:`from aiogram.methods.get_chat_member import GetChatMember`" msgstr "" -#: ../../api/methods/get_chat_member.rst:30 +#: ../../api/methods/get_chat_member.rst:31 msgid "alias: :code:`from aiogram.methods import GetChatMember`" msgstr "" -#: ../../api/methods/get_chat_member.rst:33 +#: ../../api/methods/get_chat_member.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/get_chat_member.rst:43 +#: ../../api/methods/get_chat_member.rst:44 msgid "As shortcut from received object" msgstr "" -#: ../../api/methods/get_chat_member.rst:45 +#: ../../api/methods/get_chat_member.rst:46 msgid ":meth:`aiogram.types.chat.Chat.get_member`" msgstr "" @@ -96,3 +93,8 @@ msgstr "" #~ " object on success." #~ msgstr "" +#~ msgid "" +#~ "Returns: :obj:`Union[ChatMemberOwner, " +#~ "ChatMemberAdministrator, ChatMemberMember, " +#~ "ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]`" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_menu_button.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_menu_button.po index 0f5e608b..25d977f4 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_menu_button.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_menu_button.po @@ -8,23 +8,21 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/get_chat_menu_button.rst:3 msgid "getChatMenuButton" msgstr "" #: ../../api/methods/get_chat_menu_button.rst:5 -msgid "" -"Returns: :obj:`Union[MenuButtonDefault, MenuButtonWebApp, " -"MenuButtonCommands]`" +msgid "Returns: :obj:`ResultMenuButtonUnion`" msgstr "" #: aiogram.methods.get_chat_menu_button.GetChatMenuButton:1 of @@ -45,33 +43,38 @@ msgid "" "bot's menu button will be returned" msgstr "" -#: ../../api/methods/get_chat_menu_button.rst:14 +#: ../../api/methods/get_chat_menu_button.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/get_chat_menu_button.rst:17 +#: ../../api/methods/get_chat_menu_button.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/get_chat_menu_button.rst:25 +#: ../../api/methods/get_chat_menu_button.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/get_chat_menu_button.rst:27 +#: ../../api/methods/get_chat_menu_button.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/get_chat_menu_button.rst:29 +#: ../../api/methods/get_chat_menu_button.rst:30 msgid ":code:`from aiogram.methods.get_chat_menu_button import GetChatMenuButton`" msgstr "" -#: ../../api/methods/get_chat_menu_button.rst:30 +#: ../../api/methods/get_chat_menu_button.rst:31 msgid "alias: :code:`from aiogram.methods import GetChatMenuButton`" msgstr "" -#: ../../api/methods/get_chat_menu_button.rst:33 +#: ../../api/methods/get_chat_menu_button.rst:34 msgid "With specific bot" msgstr "" #~ msgid "Returns: :obj:`MenuButton`" #~ msgstr "" + +#~ msgid "" +#~ "Returns: :obj:`Union[MenuButtonDefault, MenuButtonWebApp," +#~ " MenuButtonCommands]`" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_custom_emoji_stickers.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_custom_emoji_stickers.po index 421e077e..8dccedec 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_custom_emoji_stickers.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_custom_emoji_stickers.po @@ -8,21 +8,21 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/get_custom_emoji_stickers.rst:3 msgid "getCustomEmojiStickers" msgstr "" #: ../../api/methods/get_custom_emoji_stickers.rst:5 -msgid "Returns: :obj:`List[Sticker]`" +msgid "Returns: :obj:`list[Sticker]`" msgstr "" #: aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers:1 of @@ -40,36 +40,45 @@ msgstr "" #: aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers.custom_emoji_ids:1 #: of msgid "" -"List of custom emoji identifiers. At most 200 custom emoji identifiers " -"can be specified." +"A JSON-serialized list of custom emoji identifiers. At most 200 custom " +"emoji identifiers can be specified." msgstr "" -#: ../../api/methods/get_custom_emoji_stickers.rst:14 +#: ../../api/methods/get_custom_emoji_stickers.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/get_custom_emoji_stickers.rst:17 +#: ../../api/methods/get_custom_emoji_stickers.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/get_custom_emoji_stickers.rst:25 +#: ../../api/methods/get_custom_emoji_stickers.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/get_custom_emoji_stickers.rst:27 +#: ../../api/methods/get_custom_emoji_stickers.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/get_custom_emoji_stickers.rst:29 +#: ../../api/methods/get_custom_emoji_stickers.rst:30 msgid "" ":code:`from aiogram.methods.get_custom_emoji_stickers import " "GetCustomEmojiStickers`" msgstr "" -#: ../../api/methods/get_custom_emoji_stickers.rst:30 +#: ../../api/methods/get_custom_emoji_stickers.rst:31 msgid "alias: :code:`from aiogram.methods import GetCustomEmojiStickers`" msgstr "" -#: ../../api/methods/get_custom_emoji_stickers.rst:33 +#: ../../api/methods/get_custom_emoji_stickers.rst:34 msgid "With specific bot" msgstr "" + +#~ msgid "Returns: :obj:`List[Sticker]`" +#~ msgstr "" + +#~ msgid "" +#~ "List of custom emoji identifiers. At " +#~ "most 200 custom emoji identifiers can" +#~ " be specified." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_forum_topic_icon_stickers.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_forum_topic_icon_stickers.po index 7719981e..adc14b9d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_forum_topic_icon_stickers.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_forum_topic_icon_stickers.po @@ -8,21 +8,21 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/get_forum_topic_icon_stickers.rst:3 msgid "getForumTopicIconStickers" msgstr "" #: ../../api/methods/get_forum_topic_icon_stickers.rst:5 -msgid "Returns: :obj:`List[Sticker]`" +msgid "Returns: :obj:`list[Sticker]`" msgstr "" #: aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers:1 of @@ -36,32 +36,35 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#getforumtopiciconstickers" msgstr "" -#: ../../api/methods/get_forum_topic_icon_stickers.rst:14 +#: ../../api/methods/get_forum_topic_icon_stickers.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/get_forum_topic_icon_stickers.rst:17 +#: ../../api/methods/get_forum_topic_icon_stickers.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/get_forum_topic_icon_stickers.rst:25 +#: ../../api/methods/get_forum_topic_icon_stickers.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/get_forum_topic_icon_stickers.rst:27 +#: ../../api/methods/get_forum_topic_icon_stickers.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/get_forum_topic_icon_stickers.rst:29 +#: ../../api/methods/get_forum_topic_icon_stickers.rst:30 msgid "" ":code:`from aiogram.methods.get_forum_topic_icon_stickers import " "GetForumTopicIconStickers`" msgstr "" -#: ../../api/methods/get_forum_topic_icon_stickers.rst:30 +#: ../../api/methods/get_forum_topic_icon_stickers.rst:31 msgid "alias: :code:`from aiogram.methods import GetForumTopicIconStickers`" msgstr "" -#: ../../api/methods/get_forum_topic_icon_stickers.rst:33 +#: ../../api/methods/get_forum_topic_icon_stickers.rst:34 msgid "With specific bot" msgstr "" + +#~ msgid "Returns: :obj:`List[Sticker]`" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_game_high_scores.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_game_high_scores.po index 192b0486..b879e1ca 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_game_high_scores.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_game_high_scores.po @@ -8,21 +8,21 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/get_game_high_scores.rst:3 msgid "getGameHighScores" msgstr "" #: ../../api/methods/get_game_high_scores.rst:5 -msgid "Returns: :obj:`List[GameHighScore]`" +msgid "Returns: :obj:`list[GameHighScore]`" msgstr "" #: aiogram.methods.get_game_high_scores.GetGameHighScores:1 of @@ -71,30 +71,33 @@ msgid "" "the inline message" msgstr "" -#: ../../api/methods/get_game_high_scores.rst:14 +#: ../../api/methods/get_game_high_scores.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/get_game_high_scores.rst:17 +#: ../../api/methods/get_game_high_scores.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/get_game_high_scores.rst:25 +#: ../../api/methods/get_game_high_scores.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/get_game_high_scores.rst:27 +#: ../../api/methods/get_game_high_scores.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/get_game_high_scores.rst:29 +#: ../../api/methods/get_game_high_scores.rst:30 msgid ":code:`from aiogram.methods.get_game_high_scores import GetGameHighScores`" msgstr "" -#: ../../api/methods/get_game_high_scores.rst:30 +#: ../../api/methods/get_game_high_scores.rst:31 msgid "alias: :code:`from aiogram.methods import GetGameHighScores`" msgstr "" -#: ../../api/methods/get_game_high_scores.rst:33 +#: ../../api/methods/get_game_high_scores.rst:34 msgid "With specific bot" msgstr "" + +#~ msgid "Returns: :obj:`List[GameHighScore]`" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_commands.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_commands.po index 1f59318d..f1d5cc1b 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_commands.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_commands.po @@ -8,21 +8,21 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/get_my_commands.rst:3 msgid "getMyCommands" msgstr "" #: ../../api/methods/get_my_commands.rst:5 -msgid "Returns: :obj:`List[BotCommand]`" +msgid "Returns: :obj:`list[BotCommand]`" msgstr "" #: aiogram.methods.get_my_commands.GetMyCommands:1 of @@ -48,30 +48,33 @@ msgstr "" msgid "A two-letter ISO 639-1 language code or an empty string" msgstr "" -#: ../../api/methods/get_my_commands.rst:14 +#: ../../api/methods/get_my_commands.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/get_my_commands.rst:17 +#: ../../api/methods/get_my_commands.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/get_my_commands.rst:25 +#: ../../api/methods/get_my_commands.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/get_my_commands.rst:27 +#: ../../api/methods/get_my_commands.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/get_my_commands.rst:29 +#: ../../api/methods/get_my_commands.rst:30 msgid ":code:`from aiogram.methods.get_my_commands import GetMyCommands`" msgstr "" -#: ../../api/methods/get_my_commands.rst:30 +#: ../../api/methods/get_my_commands.rst:31 msgid "alias: :code:`from aiogram.methods import GetMyCommands`" msgstr "" -#: ../../api/methods/get_my_commands.rst:33 +#: ../../api/methods/get_my_commands.rst:34 msgid "With specific bot" msgstr "" + +#~ msgid "Returns: :obj:`List[BotCommand]`" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_star_transactions.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_star_transactions.po new file mode 100644 index 00000000..61005386 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_star_transactions.po @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/get_star_transactions.rst:3 +msgid "getStarTransactions" +msgstr "" + +#: ../../api/methods/get_star_transactions.rst:5 +msgid "Returns: :obj:`StarTransactions`" +msgstr "" + +#: aiogram.methods.get_star_transactions.GetStarTransactions:1 of +msgid "" +"Returns the bot's Telegram Star transactions in chronological order. On " +"success, returns a " +":class:`aiogram.types.star_transactions.StarTransactions` object." +msgstr "" + +#: aiogram.methods.get_star_transactions.GetStarTransactions:3 of +msgid "Source: https://core.telegram.org/bots/api#getstartransactions" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_star_transactions.GetStarTransactions.offset:1 of +msgid "Number of transactions to skip in the response" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_star_transactions.GetStarTransactions.limit:1 of +msgid "" +"The maximum number of transactions to be retrieved. Values between 1-100 " +"are accepted. Defaults to 100." +msgstr "" + +#: ../../api/methods/get_star_transactions.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_star_transactions.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_star_transactions.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_star_transactions.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_star_transactions.rst:30 +msgid "" +":code:`from aiogram.methods.get_star_transactions import " +"GetStarTransactions`" +msgstr "" + +#: ../../api/methods/get_star_transactions.rst:31 +msgid "alias: :code:`from aiogram.methods import GetStarTransactions`" +msgstr "" + +#: ../../api/methods/get_star_transactions.rst:34 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_updates.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_updates.po index 31206de3..d662c7a0 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_updates.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_updates.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,7 +22,7 @@ msgid "getUpdates" msgstr "" #: ../../api/methods/get_updates.rst:5 -msgid "Returns: :obj:`List[Update]`" +msgid "Returns: :obj:`list[Update]`" msgstr "" #: aiogram.methods.get_updates.GetUpdates:1 of @@ -160,3 +160,6 @@ msgstr "" #~ "(default). If not specified, the " #~ "previous setting will be used." #~ msgstr "" + +#~ msgid "Returns: :obj:`List[Update]`" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/pin_chat_message.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/pin_chat_message.po index 9a1e84e4..99a25088 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/pin_chat_message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/pin_chat_message.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/pin_chat_message.rst:3 msgid "pinChatMessage" @@ -49,6 +49,13 @@ msgstr "" msgid "Identifier of a message to pin" msgstr "" +#: ../../docstring +#: aiogram.methods.pin_chat_message.PinChatMessage.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be pinned" +msgstr "" + #: ../../docstring #: aiogram.methods.pin_chat_message.PinChatMessage.disable_notification:1 of msgid "" @@ -57,49 +64,49 @@ msgid "" "disabled in channels and private chats." msgstr "" -#: ../../api/methods/pin_chat_message.rst:14 +#: ../../api/methods/pin_chat_message.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/pin_chat_message.rst:17 +#: ../../api/methods/pin_chat_message.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/pin_chat_message.rst:25 +#: ../../api/methods/pin_chat_message.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/pin_chat_message.rst:27 +#: ../../api/methods/pin_chat_message.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/pin_chat_message.rst:29 +#: ../../api/methods/pin_chat_message.rst:30 msgid ":code:`from aiogram.methods.pin_chat_message import PinChatMessage`" msgstr "" -#: ../../api/methods/pin_chat_message.rst:30 +#: ../../api/methods/pin_chat_message.rst:31 msgid "alias: :code:`from aiogram.methods import PinChatMessage`" msgstr "" -#: ../../api/methods/pin_chat_message.rst:33 +#: ../../api/methods/pin_chat_message.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/pin_chat_message.rst:40 +#: ../../api/methods/pin_chat_message.rst:41 msgid "As reply into Webhook in handler" msgstr "" -#: ../../api/methods/pin_chat_message.rst:48 +#: ../../api/methods/pin_chat_message.rst:49 msgid "As shortcut from received object" msgstr "" -#: ../../api/methods/pin_chat_message.rst:50 -msgid ":meth:`aiogram.types.message.Message.pin`" -msgstr "" - #: ../../api/methods/pin_chat_message.rst:51 msgid ":meth:`aiogram.types.chat.Chat.pin_message`" msgstr "" +#: ../../api/methods/pin_chat_message.rst:52 +msgid ":meth:`aiogram.types.message.Message.pin`" +msgstr "" + #~ msgid "As message method" #~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/promote_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/promote_chat_member.po index def69532..e7afbfd6 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/promote_chat_member.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/promote_chat_member.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-29 02:16+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -57,10 +57,10 @@ msgstr "" #: ../../docstring #: aiogram.methods.promote_chat_member.PromoteChatMember.can_manage_chat:1 of msgid "" -"Pass :code:`True` if the administrator can access the chat event log, " -"boost list in channels, see channel members, report spam messages, see " -"anonymous administrators in supergroups and ignore slow mode. Implied by " -"any other administrator privilege" +"Pass :code:`True` if the administrator can access the chat event log, get" +" boost list, see hidden supergroup and channel members, report spam " +"messages and ignore slow mode. Implied by any other administrator " +"privilege." msgstr "" #: ../../docstring @@ -105,37 +105,17 @@ msgstr "" msgid "Pass :code:`True` if the administrator can invite new users to the chat" msgstr "" -#: ../../docstring -#: aiogram.methods.promote_chat_member.PromoteChatMember.can_post_messages:1 of -msgid "" -"Pass :code:`True` if the administrator can post messages in the channel, " -"or access channel statistics; channels only" -msgstr "" - -#: ../../docstring -#: aiogram.methods.promote_chat_member.PromoteChatMember.can_edit_messages:1 of -msgid "" -"Pass :code:`True` if the administrator can edit messages of other users " -"and can pin messages; channels only" -msgstr "" - -#: ../../docstring -#: aiogram.methods.promote_chat_member.PromoteChatMember.can_pin_messages:1 of -msgid "Pass :code:`True` if the administrator can pin messages, supergroups only" -msgstr "" - #: ../../docstring #: aiogram.methods.promote_chat_member.PromoteChatMember.can_post_stories:1 of -msgid "" -"Pass :code:`True` if the administrator can post stories in the channel; " -"channels only" +msgid "Pass :code:`True` if the administrator can post stories to the chat" msgstr "" #: ../../docstring #: aiogram.methods.promote_chat_member.PromoteChatMember.can_edit_stories:1 of msgid "" "Pass :code:`True` if the administrator can edit stories posted by other " -"users; channels only" +"users, post stories to the chat page, pin chat stories, and access the " +"chat's story archive" msgstr "" #: ../../docstring @@ -143,14 +123,35 @@ msgstr "" #: of msgid "" "Pass :code:`True` if the administrator can delete stories posted by other" -" users; channels only" +" users" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.can_post_messages:1 of +msgid "" +"Pass :code:`True` if the administrator can post messages in the channel, " +"or access channel statistics; for channels only" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.can_edit_messages:1 of +msgid "" +"Pass :code:`True` if the administrator can edit messages of other users " +"and can pin messages; for channels only" +msgstr "" + +#: ../../docstring +#: aiogram.methods.promote_chat_member.PromoteChatMember.can_pin_messages:1 of +msgid "" +"Pass :code:`True` if the administrator can pin messages; for supergroups " +"only" msgstr "" #: ../../docstring #: aiogram.methods.promote_chat_member.PromoteChatMember.can_manage_topics:1 of msgid "" "Pass :code:`True` if the user is allowed to create, rename, close, and " -"reopen forum topics, supergroups only" +"reopen forum topics; for supergroups only" msgstr "" #: ../../api/methods/promote_chat_member.rst:15 @@ -229,3 +230,55 @@ msgstr "" #~ "can restrict, ban or unban chat " #~ "members" #~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can access the chat event log, " +#~ "boost list in channels, see channel " +#~ "members, report spam messages, see " +#~ "anonymous administrators in supergroups and" +#~ " ignore slow mode. Implied by any " +#~ "other administrator privilege" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can post messages in the channel, " +#~ "or access channel statistics; channels " +#~ "only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can edit messages of other users " +#~ "and can pin messages; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can pin messages, supergroups only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can post stories in the channel; " +#~ "channels only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can edit stories posted by other " +#~ "users; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can delete stories posted by other " +#~ "users; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the user is " +#~ "allowed to create, rename, close, and" +#~ " reopen forum topics, supergroups only" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/refund_star_payment.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/refund_star_payment.po new file mode 100644 index 00000000..f804cf14 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/refund_star_payment.po @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/refund_star_payment.rst:3 +msgid "refundStarPayment" +msgstr "" + +#: ../../api/methods/refund_star_payment.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.refund_star_payment.RefundStarPayment:1 of +msgid "" +"Refunds a successful payment in `Telegram Stars " +"`_. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.refund_star_payment.RefundStarPayment:3 of +msgid "Source: https://core.telegram.org/bots/api#refundstarpayment" +msgstr "" + +#: ../../docstring +#: aiogram.methods.refund_star_payment.RefundStarPayment.user_id:1 of +msgid "Identifier of the user whose payment will be refunded" +msgstr "" + +#: ../../docstring +#: aiogram.methods.refund_star_payment.RefundStarPayment.telegram_payment_charge_id:1 +#: of +msgid "Telegram payment identifier" +msgstr "" + +#: ../../api/methods/refund_star_payment.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/refund_star_payment.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/refund_star_payment.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/refund_star_payment.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/refund_star_payment.rst:30 +msgid ":code:`from aiogram.methods.refund_star_payment import RefundStarPayment`" +msgstr "" + +#: ../../api/methods/refund_star_payment.rst:31 +msgid "alias: :code:`from aiogram.methods import RefundStarPayment`" +msgstr "" + +#: ../../api/methods/refund_star_payment.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/refund_star_payment.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/remove_chat_verification.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/remove_chat_verification.po new file mode 100644 index 00000000..faa65d98 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/remove_chat_verification.po @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/remove_chat_verification.rst:3 +msgid "removeChatVerification" +msgstr "" + +#: ../../api/methods/remove_chat_verification.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.remove_chat_verification.RemoveChatVerification:1 of +msgid "" +"Removes verification from a chat that is currently verified `on behalf of" +" the organization `_ represented by the bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.remove_chat_verification.RemoveChatVerification:3 of +msgid "Source: https://core.telegram.org/bots/api#removechatverification" +msgstr "" + +#: ../../docstring +#: aiogram.methods.remove_chat_verification.RemoveChatVerification.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target channel " +"(in the format :code:`@channelusername`)" +msgstr "" + +#: ../../api/methods/remove_chat_verification.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/remove_chat_verification.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/remove_chat_verification.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/remove_chat_verification.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/remove_chat_verification.rst:30 +msgid "" +":code:`from aiogram.methods.remove_chat_verification import " +"RemoveChatVerification`" +msgstr "" + +#: ../../api/methods/remove_chat_verification.rst:31 +msgid "alias: :code:`from aiogram.methods import RemoveChatVerification`" +msgstr "" + +#: ../../api/methods/remove_chat_verification.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/remove_chat_verification.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/remove_user_verification.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/remove_user_verification.po new file mode 100644 index 00000000..bf17b590 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/remove_user_verification.po @@ -0,0 +1,79 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/remove_user_verification.rst:3 +msgid "removeUserVerification" +msgstr "" + +#: ../../api/methods/remove_user_verification.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.remove_user_verification.RemoveUserVerification:1 of +msgid "" +"Removes verification from a user who is currently verified `on behalf of " +"the organization `_" +" represented by the bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.remove_user_verification.RemoveUserVerification:3 of +msgid "Source: https://core.telegram.org/bots/api#removeuserverification" +msgstr "" + +#: ../../docstring +#: aiogram.methods.remove_user_verification.RemoveUserVerification.user_id:1 of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../api/methods/remove_user_verification.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/remove_user_verification.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/remove_user_verification.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/remove_user_verification.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/remove_user_verification.rst:30 +msgid "" +":code:`from aiogram.methods.remove_user_verification import " +"RemoveUserVerification`" +msgstr "" + +#: ../../api/methods/remove_user_verification.rst:31 +msgid "alias: :code:`from aiogram.methods import RemoveUserVerification`" +msgstr "" + +#: ../../api/methods/remove_user_verification.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/remove_user_verification.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/replace_sticker_in_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/replace_sticker_in_set.po new file mode 100644 index 00000000..2482079e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/replace_sticker_in_set.po @@ -0,0 +1,100 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/replace_sticker_in_set.rst:3 +msgid "replaceStickerInSet" +msgstr "" + +#: ../../api/methods/replace_sticker_in_set.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet:1 of +msgid "" +"Use this method to replace an existing sticker in a sticker set with a " +"new one. The method is equivalent to calling " +":class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet`, " +"then :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, then " +":class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet`." +" Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet:3 of +msgid "Source: https://core.telegram.org/bots/api#replacestickerinset" +msgstr "" + +#: ../../docstring +#: aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet.user_id:1 of +msgid "User identifier of the sticker set owner" +msgstr "" + +#: ../../docstring +#: aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet.name:1 of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring +#: aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet.old_sticker:1 of +msgid "File identifier of the replaced sticker" +msgstr "" + +#: ../../docstring +#: aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet.sticker:1 of +msgid "" +"A JSON-serialized object with information about the added sticker. If " +"exactly the same sticker had already been added to the set, then the set " +"remains unchanged." +msgstr "" + +#: ../../api/methods/replace_sticker_in_set.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/replace_sticker_in_set.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/replace_sticker_in_set.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/replace_sticker_in_set.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/replace_sticker_in_set.rst:30 +msgid "" +":code:`from aiogram.methods.replace_sticker_in_set import " +"ReplaceStickerInSet`" +msgstr "" + +#: ../../api/methods/replace_sticker_in_set.rst:31 +msgid "alias: :code:`from aiogram.methods import ReplaceStickerInSet`" +msgstr "" + +#: ../../api/methods/replace_sticker_in_set.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/replace_sticker_in_set.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/save_prepared_inline_message.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/save_prepared_inline_message.po new file mode 100644 index 00000000..587b8605 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/save_prepared_inline_message.po @@ -0,0 +1,110 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/save_prepared_inline_message.rst:3 +msgid "savePreparedInlineMessage" +msgstr "" + +#: ../../api/methods/save_prepared_inline_message.rst:5 +msgid "Returns: :obj:`PreparedInlineMessage`" +msgstr "" + +#: aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage:1 of +msgid "" +"Stores a message that can be sent by a user of a Mini App. Returns a " +":class:`aiogram.types.prepared_inline_message.PreparedInlineMessage` " +"object." +msgstr "" + +#: aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage:3 of +msgid "Source: https://core.telegram.org/bots/api#savepreparedinlinemessage" +msgstr "" + +#: ../../docstring +#: aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage.user_id:1 +#: of +msgid "Unique identifier of the target user that can use the prepared message" +msgstr "" + +#: ../../docstring +#: aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage.result:1 +#: of +msgid "A JSON-serialized object describing the message to be sent" +msgstr "" + +#: ../../docstring +#: aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage.allow_user_chats:1 +#: of +msgid "Pass :code:`True` if the message can be sent to private chats with users" +msgstr "" + +#: ../../docstring +#: aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage.allow_bot_chats:1 +#: of +msgid "Pass :code:`True` if the message can be sent to private chats with bots" +msgstr "" + +#: ../../docstring +#: aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage.allow_group_chats:1 +#: of +msgid "Pass :code:`True` if the message can be sent to group and supergroup chats" +msgstr "" + +#: ../../docstring +#: aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage.allow_channel_chats:1 +#: of +msgid "Pass :code:`True` if the message can be sent to channel chats" +msgstr "" + +#: ../../api/methods/save_prepared_inline_message.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/save_prepared_inline_message.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/save_prepared_inline_message.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/save_prepared_inline_message.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/save_prepared_inline_message.rst:30 +msgid "" +":code:`from aiogram.methods.save_prepared_inline_message import " +"SavePreparedInlineMessage`" +msgstr "" + +#: ../../api/methods/save_prepared_inline_message.rst:31 +msgid "alias: :code:`from aiogram.methods import SavePreparedInlineMessage`" +msgstr "" + +#: ../../api/methods/save_prepared_inline_message.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/save_prepared_inline_message.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po index 58e3e4f9..1a021d25 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -53,6 +53,13 @@ msgid "" "Sending Files » `" msgstr "" +#: ../../docstring +#: aiogram.methods.send_animation.SendAnimation.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring #: aiogram.methods.send_animation.SendAnimation.message_thread_id:1 of msgid "" @@ -104,6 +111,11 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.methods.send_animation.SendAnimation.show_caption_above_media:1 of +msgid "Pass :code:`True`, if the caption must be shown above the message media" +msgstr "" + #: ../../docstring aiogram.methods.send_animation.SendAnimation.has_spoiler:1 #: of msgid "" @@ -123,6 +135,23 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring +#: aiogram.methods.send_animation.SendAnimation.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_animation.SendAnimation.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring #: aiogram.methods.send_animation.SendAnimation.reply_parameters:1 of msgid "Description of the message to reply to" @@ -135,7 +164,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -213,6 +242,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation`" msgstr "" +#: ../../api/methods/send_animation.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation`" +msgstr "" + +#: ../../api/methods/send_animation.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -223,3 +260,14 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_audio.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_audio.po index a0415dbd..06a45597 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_audio.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_audio.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -54,6 +54,13 @@ msgid "" "Files » `" msgstr "" +#: ../../docstring +#: aiogram.methods.send_audio.SendAudio.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring aiogram.methods.send_audio.SendAudio.message_thread_id:1 of msgid "" "Unique identifier for the target message thread (topic) of the forum; for" @@ -112,6 +119,22 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring aiogram.methods.send_audio.SendAudio.allow_paid_broadcast:1 +#: of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_audio.SendAudio.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_audio.SendAudio.reply_parameters:1 of msgid "Description of the message to reply to" msgstr "" @@ -122,7 +145,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -199,6 +222,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio`" msgstr "" +#: ../../api/methods/send_audio.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio`" +msgstr "" + +#: ../../api/methods/send_audio.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -209,3 +240,14 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po index b379f03c..2577ab74 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/send_chat_action.rst:3 msgid "sendChatAction" @@ -77,46 +77,56 @@ msgid "" msgstr "" #: ../../docstring -#: aiogram.methods.send_chat_action.SendChatAction.message_thread_id:1 of -msgid "Unique identifier for the target message thread; supergroups only" +#: aiogram.methods.send_chat_action.SendChatAction.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"action will be sent" msgstr "" -#: ../../api/methods/send_chat_action.rst:14 +#: ../../docstring +#: aiogram.methods.send_chat_action.SendChatAction.message_thread_id:1 of +msgid "Unique identifier for the target message thread; for supergroups only" +msgstr "" + +#: ../../api/methods/send_chat_action.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/send_chat_action.rst:17 +#: ../../api/methods/send_chat_action.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/send_chat_action.rst:25 +#: ../../api/methods/send_chat_action.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/send_chat_action.rst:27 +#: ../../api/methods/send_chat_action.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/send_chat_action.rst:29 +#: ../../api/methods/send_chat_action.rst:30 msgid ":code:`from aiogram.methods.send_chat_action import SendChatAction`" msgstr "" -#: ../../api/methods/send_chat_action.rst:30 +#: ../../api/methods/send_chat_action.rst:31 msgid "alias: :code:`from aiogram.methods import SendChatAction`" msgstr "" -#: ../../api/methods/send_chat_action.rst:33 +#: ../../api/methods/send_chat_action.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/send_chat_action.rst:40 +#: ../../api/methods/send_chat_action.rst:41 msgid "As reply into Webhook in handler" msgstr "" -#: ../../api/methods/send_chat_action.rst:48 +#: ../../api/methods/send_chat_action.rst:49 msgid "As shortcut from received object" msgstr "" -#: ../../api/methods/send_chat_action.rst:50 +#: ../../api/methods/send_chat_action.rst:51 msgid ":meth:`aiogram.types.chat.Chat.do`" msgstr "" + +#~ msgid "Unique identifier for the target message thread; supergroups only" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_contact.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_contact.po index 126afc23..2a81ebd9 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_contact.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_contact.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -49,6 +49,13 @@ msgstr "" msgid "Contact's first name" msgstr "" +#: ../../docstring +#: aiogram.methods.send_contact.SendContact.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring aiogram.methods.send_contact.SendContact.message_thread_id:1 #: of msgid "" @@ -78,6 +85,23 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring +#: aiogram.methods.send_contact.SendContact.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_contact.SendContact.message_effect_id:1 +#: of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_contact.SendContact.reply_parameters:1 #: of msgid "Description of the message to reply to" @@ -89,7 +113,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -166,6 +190,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact`" msgstr "" +#: ../../api/methods/send_contact.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact`" +msgstr "" + +#: ../../api/methods/send_contact.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -176,3 +208,14 @@ msgstr "" #~ "to remove keyboard or to force a" #~ " reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_dice.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_dice.po index c3f46936..aa7b7808 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_dice.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_dice.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,6 +42,13 @@ msgid "" "(in the format :code:`@channelusername`)" msgstr "" +#: ../../docstring aiogram.methods.send_dice.SendDice.business_connection_id:1 +#: of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring aiogram.methods.send_dice.SendDice.message_thread_id:1 of msgid "" "Unique identifier for the target message thread (topic) of the forum; for" @@ -66,6 +73,21 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding" msgstr "" +#: ../../docstring aiogram.methods.send_dice.SendDice.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_dice.SendDice.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_dice.SendDice.reply_parameters:1 of msgid "Description of the message to reply to" msgstr "" @@ -76,7 +98,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -151,3 +173,22 @@ msgstr "" #: ../../api/methods/send_dice.rst:55 msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice`" msgstr "" + +#: ../../api/methods/send_dice.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice`" +msgstr "" + +#: ../../api/methods/send_dice.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice`" +msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_document.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_document.po index 09b6ca22..267cb594 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_document.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_document.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -51,6 +51,13 @@ msgid "" "/form-data. :ref:`More information on Sending Files » `" msgstr "" +#: ../../docstring +#: aiogram.methods.send_document.SendDocument.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring #: aiogram.methods.send_document.SendDocument.message_thread_id:1 of msgid "" @@ -110,6 +117,23 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring +#: aiogram.methods.send_document.SendDocument.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_document.SendDocument.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring #: aiogram.methods.send_document.SendDocument.reply_parameters:1 of msgid "Description of the message to reply to" @@ -121,7 +145,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -198,6 +222,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document`" msgstr "" +#: ../../api/methods/send_document.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_document`" +msgstr "" + +#: ../../api/methods/send_document.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_document`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -208,3 +240,14 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_game.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_game.po index b4fa3a5a..0d2188a6 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_game.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_game.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,6 +45,13 @@ msgid "" " up your games via `@BotFather `_." msgstr "" +#: ../../docstring aiogram.methods.send_game.SendGame.business_connection_id:1 +#: of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring aiogram.methods.send_game.SendGame.message_thread_id:1 of msgid "" "Unique identifier for the target message thread (topic) of the forum; for" @@ -61,6 +68,21 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring aiogram.methods.send_game.SendGame.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_game.SendGame.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_game.SendGame.reply_parameters:1 of msgid "Description of the message to reply to" msgstr "" @@ -146,6 +168,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game`" msgstr "" +#: ../../api/methods/send_game.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_game`" +msgstr "" + +#: ../../api/methods/send_game.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_game`" +msgstr "" + #~ msgid "" #~ "A JSON-serialized object for an " #~ "`inline keyboard , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/send_gift.rst:3 +msgid "sendGift" +msgstr "" + +#: ../../api/methods/send_gift.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.send_gift.SendGift:1 of +msgid "" +"Sends a gift to the given user or channel chat. The gift can't be " +"converted to Telegram Stars by the receiver. Returns :code:`True` on " +"success." +msgstr "" + +#: aiogram.methods.send_gift.SendGift:3 of +msgid "Source: https://core.telegram.org/bots/api#sendgift" +msgstr "" + +#: ../../docstring aiogram.methods.send_gift.SendGift.gift_id:1 of +msgid "Identifier of the gift" +msgstr "" + +#: ../../docstring aiogram.methods.send_gift.SendGift.user_id:1 of +msgid "" +"Required if *chat_id* is not specified. Unique identifier of the target " +"user who will receive the gift." +msgstr "" + +#: ../../docstring aiogram.methods.send_gift.SendGift.chat_id:1 of +msgid "" +"Required if *user_id* is not specified. Unique identifier for the chat or" +" username of the channel (in the format :code:`@channelusername`) that " +"will receive the gift." +msgstr "" + +#: ../../docstring aiogram.methods.send_gift.SendGift.pay_for_upgrade:1 of +msgid "" +"Pass :code:`True` to pay for the gift upgrade from the bot's balance, " +"thereby making the upgrade free for the receiver" +msgstr "" + +#: ../../docstring aiogram.methods.send_gift.SendGift.text:1 of +msgid "Text that will be shown along with the gift; 0-255 characters" +msgstr "" + +#: ../../docstring aiogram.methods.send_gift.SendGift.text_parse_mode:1 of +msgid "" +"Mode for parsing entities in the text. See `formatting options " +"`_ for more " +"details. Entities other than 'bold', 'italic', 'underline', " +"'strikethrough', 'spoiler', and 'custom_emoji' are ignored." +msgstr "" + +#: ../../docstring aiogram.methods.send_gift.SendGift.text_entities:1 of +msgid "" +"A JSON-serialized list of special entities that appear in the gift text. " +"It can be specified instead of *text_parse_mode*. Entities other than " +"'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and " +"'custom_emoji' are ignored." +msgstr "" + +#: ../../api/methods/send_gift.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_gift.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_gift.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_gift.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_gift.rst:30 +msgid ":code:`from aiogram.methods.send_gift import SendGift`" +msgstr "" + +#: ../../api/methods/send_gift.rst:31 +msgid "alias: :code:`from aiogram.methods import SendGift`" +msgstr "" + +#: ../../api/methods/send_gift.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_gift.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_invoice.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_invoice.po index 649c9bf4..5ec56610 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_invoice.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_invoice.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -52,25 +52,22 @@ msgstr "" #: ../../docstring aiogram.methods.send_invoice.SendInvoice.payload:1 of msgid "" "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to " -"the user, use for your internal processes." -msgstr "" - -#: ../../docstring aiogram.methods.send_invoice.SendInvoice.provider_token:1 of -msgid "" -"Payment provider token, obtained via `@BotFather " -"`_" +"the user, use it for your internal processes." msgstr "" #: ../../docstring aiogram.methods.send_invoice.SendInvoice.currency:1 of msgid "" "Three-letter ISO 4217 currency code, see `more on currencies " -"`_" +"`_. Pass " +"'XTR' for payments in `Telegram Stars `_." msgstr "" #: ../../docstring aiogram.methods.send_invoice.SendInvoice.prices:1 of msgid "" "Price breakdown, a JSON-serialized list of components (e.g. product " -"price, tax, discount, delivery cost, delivery tax, bonus, etc.)" +"price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must " +"contain exactly one item for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring aiogram.methods.send_invoice.SendInvoice.message_thread_id:1 @@ -80,6 +77,13 @@ msgid "" " forum supergroups only" msgstr "" +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.provider_token:1 of +msgid "" +"Payment provider token, obtained via `@BotFather " +"`_. Pass an empty string for payments in " +"`Telegram Stars `_." +msgstr "" + #: ../../docstring aiogram.methods.send_invoice.SendInvoice.max_tip_amount:1 of msgid "" "The maximum accepted amount for tips in the *smallest units* of the " @@ -88,7 +92,8 @@ msgid "" "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" +"majority of currencies). Defaults to 0. Not supported for payments in " +"`Telegram Stars `_." msgstr "" #: ../../docstring @@ -141,41 +146,53 @@ msgstr "" #: ../../docstring aiogram.methods.send_invoice.SendInvoice.need_name:1 of msgid "" "Pass :code:`True` if you require the user's full name to complete the " -"order" +"order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring aiogram.methods.send_invoice.SendInvoice.need_phone_number:1 #: of msgid "" "Pass :code:`True` if you require the user's phone number to complete the " -"order" +"order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring aiogram.methods.send_invoice.SendInvoice.need_email:1 of msgid "" "Pass :code:`True` if you require the user's email address to complete the" -" order" +" order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring #: aiogram.methods.send_invoice.SendInvoice.need_shipping_address:1 of msgid "" "Pass :code:`True` if you require the user's shipping address to complete " -"the order" +"the order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring #: aiogram.methods.send_invoice.SendInvoice.send_phone_number_to_provider:1 of -msgid "Pass :code:`True` if the user's phone number should be sent to provider" +msgid "" +"Pass :code:`True` if the user's phone number should be sent to the " +"provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring #: aiogram.methods.send_invoice.SendInvoice.send_email_to_provider:1 of -msgid "Pass :code:`True` if the user's email address should be sent to provider" +msgid "" +"Pass :code:`True` if the user's email address should be sent to the " +"provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring aiogram.methods.send_invoice.SendInvoice.is_flexible:1 of -msgid "Pass :code:`True` if the final price depends on the shipping method" +msgid "" +"Pass :code:`True` if the final price depends on the shipping method. " +"Ignored for payments in `Telegram Stars `_." msgstr "" #: ../../docstring @@ -190,6 +207,23 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring +#: aiogram.methods.send_invoice.SendInvoice.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_invoice.SendInvoice.message_effect_id:1 +#: of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_invoice.SendInvoice.reply_parameters:1 #: of msgid "Description of the message to reply to" @@ -277,6 +311,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice`" msgstr "" +#: ../../api/methods/send_invoice.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice`" +msgstr "" + +#: ../../api/methods/send_invoice.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice`" +msgstr "" + #~ msgid "" #~ "A JSON-serialized object for an " #~ "`inline keyboard `_" +#~ msgstr "" + +#~ msgid "" +#~ "Three-letter ISO 4217 currency code, " +#~ "see `more on currencies " +#~ "`_" +#~ msgstr "" + +#~ msgid "" +#~ "Price breakdown, a JSON-serialized list" +#~ " of components (e.g. product price, " +#~ "tax, discount, delivery cost, delivery " +#~ "tax, bonus, etc.)" +#~ msgstr "" + +#~ msgid "" +#~ "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" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's full name to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's phone number to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's email address to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's shipping address to complete the" +#~ " order" +#~ msgstr "" + +#~ msgid "Pass :code:`True` if the user's phone number should be sent to provider" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the user's email" +#~ " address should be sent to provider" +#~ msgstr "" + +#~ msgid "Pass :code:`True` if the final price depends on the shipping method" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_location.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_location.po index 3a927369..ae398456 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_location.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_location.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -49,6 +49,13 @@ msgstr "" msgid "Longitude of the location" msgstr "" +#: ../../docstring +#: aiogram.methods.send_location.SendLocation.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring #: aiogram.methods.send_location.SendLocation.message_thread_id:1 of msgid "" @@ -63,9 +70,10 @@ msgstr "" #: ../../docstring aiogram.methods.send_location.SendLocation.live_period:1 of msgid "" -"Period in seconds for which the location will be updated (see `Live " +"Period in seconds during which the location will be updated (see `Live " "Locations `_, should be between" -" 60 and 86400." +" 60 and 86400, or 0x7FFFFFFF for live locations that can be edited " +"indefinitely." msgstr "" #: ../../docstring aiogram.methods.send_location.SendLocation.heading:1 of @@ -94,6 +102,23 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring +#: aiogram.methods.send_location.SendLocation.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_location.SendLocation.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring #: aiogram.methods.send_location.SendLocation.reply_parameters:1 of msgid "Description of the message to reply to" @@ -105,7 +130,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -182,6 +207,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location`" msgstr "" +#: ../../api/methods/send_location.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_location`" +msgstr "" + +#: ../../api/methods/send_location.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_location`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -192,3 +225,21 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "Period in seconds for which the " +#~ "location will be updated (see `Live " +#~ "Locations `_," +#~ " should be between 60 and 86400." +#~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_media_group.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_media_group.po index 236a48b3..f03a00a3 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_media_group.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_media_group.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,7 +22,7 @@ msgid "sendMediaGroup" msgstr "" #: ../../api/methods/send_media_group.rst:5 -msgid "Returns: :obj:`List[Message]`" +msgid "Returns: :obj:`list[Message]`" msgstr "" #: aiogram.methods.send_media_group.SendMediaGroup:1 of @@ -50,6 +50,13 @@ msgid "" " items" msgstr "" +#: ../../docstring +#: aiogram.methods.send_media_group.SendMediaGroup.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring #: aiogram.methods.send_media_group.SendMediaGroup.message_thread_id:1 of msgid "" @@ -69,6 +76,23 @@ msgstr "" msgid "Protects the contents of the sent messages from forwarding and saving" msgstr "" +#: ../../docstring +#: aiogram.methods.send_media_group.SendMediaGroup.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_media_group.SendMediaGroup.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring #: aiogram.methods.send_media_group.SendMediaGroup.reply_parameters:1 of msgid "Description of the message to reply to" @@ -148,3 +172,14 @@ msgstr "" #: ../../api/methods/send_media_group.rst:55 msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group`" msgstr "" + +#: ../../api/methods/send_media_group.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group`" +msgstr "" + +#: ../../api/methods/send_media_group.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group`" +msgstr "" + +#~ msgid "Returns: :obj:`List[Message]`" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_message.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_message.po index 043615d3..f4550d78 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,6 +45,13 @@ msgstr "" msgid "Text of the message to be sent, 1-4096 characters after entities parsing" msgstr "" +#: ../../docstring +#: aiogram.methods.send_message.SendMessage.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring aiogram.methods.send_message.SendMessage.message_thread_id:1 #: of msgid "" @@ -82,6 +89,23 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring +#: aiogram.methods.send_message.SendMessage.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_message.SendMessage.message_effect_id:1 +#: of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_message.SendMessage.reply_parameters:1 #: of msgid "Description of the message to reply to" @@ -93,7 +117,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -176,6 +200,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer`" msgstr "" +#: ../../api/methods/send_message.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer`" +msgstr "" + +#: ../../api/methods/send_message.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -186,3 +218,14 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_paid_media.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_paid_media.po new file mode 100644 index 00000000..6dcc8925 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_paid_media.po @@ -0,0 +1,184 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/send_paid_media.rst:3 +msgid "sendPaidMedia" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:5 +msgid "Returns: :obj:`Message`" +msgstr "" + +#: aiogram.methods.send_paid_media.SendPaidMedia:1 of +msgid "" +"Use this method to send paid media. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.methods.send_paid_media.SendPaidMedia:3 of +msgid "Source: https://core.telegram.org/bots/api#sendpaidmedia" +msgstr "" + +#: ../../docstring aiogram.methods.send_paid_media.SendPaidMedia.chat_id:1 of +msgid "" +"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." +msgstr "" + +#: ../../docstring aiogram.methods.send_paid_media.SendPaidMedia.star_count:1 +#: of +msgid "" +"The number of Telegram Stars that must be paid to buy access to the " +"media; 1-2500" +msgstr "" + +#: ../../docstring aiogram.methods.send_paid_media.SendPaidMedia.media:1 of +msgid "A JSON-serialized array describing the media to be sent; up to 10 items" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_paid_media.SendPaidMedia.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + +#: ../../docstring aiogram.methods.send_paid_media.SendPaidMedia.payload:1 of +msgid "" +"Bot-defined paid media payload, 0-128 bytes. This will not be displayed " +"to the user, use it for your internal processes." +msgstr "" + +#: ../../docstring aiogram.methods.send_paid_media.SendPaidMedia.caption:1 of +msgid "Media caption, 0-1024 characters after entities parsing" +msgstr "" + +#: ../../docstring aiogram.methods.send_paid_media.SendPaidMedia.parse_mode:1 +#: of +msgid "" +"Mode for parsing entities in the media caption. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_paid_media.SendPaidMedia.caption_entities:1 of +msgid "" +"A JSON-serialized list of special entities that appear in the caption, " +"which can be specified instead of *parse_mode*" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_paid_media.SendPaidMedia.show_caption_above_media:1 of +msgid "Pass :code:`True`, if the caption must be shown above the message media" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_paid_media.SendPaidMedia.disable_notification:1 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_paid_media.SendPaidMedia.protect_content:1 of +msgid "Protects the contents of the sent message from forwarding and saving" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_paid_media.SendPaidMedia.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_paid_media.SendPaidMedia.reply_parameters:1 of +msgid "Description of the message to reply to" +msgstr "" + +#: ../../docstring aiogram.methods.send_paid_media.SendPaidMedia.reply_markup:1 +#: of +msgid "" +"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" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:30 +msgid ":code:`from aiogram.methods.send_paid_media import SendPaidMedia`" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:31 +msgid "alias: :code:`from aiogram.methods import SendPaidMedia`" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:49 +msgid "As shortcut from received object" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:51 +msgid ":meth:`aiogram.types.message.Message.answer_paid_media`" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:52 +msgid ":meth:`aiogram.types.message.Message.reply_paid_media`" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:53 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media`" +msgstr "" + +#: ../../api/methods/send_paid_media.rst:54 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po index 1b3e7420..c24e0fea 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -52,6 +52,13 @@ msgid "" "files>`" msgstr "" +#: ../../docstring +#: aiogram.methods.send_photo.SendPhoto.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring aiogram.methods.send_photo.SendPhoto.message_thread_id:1 of msgid "" "Unique identifier for the target message thread (topic) of the forum; for" @@ -77,6 +84,11 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.methods.send_photo.SendPhoto.show_caption_above_media:1 of +msgid "Pass :code:`True`, if the caption must be shown above the message media" +msgstr "" + #: ../../docstring aiogram.methods.send_photo.SendPhoto.has_spoiler:1 of msgid "" "Pass :code:`True` if the photo needs to be covered with a spoiler " @@ -94,6 +106,22 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring aiogram.methods.send_photo.SendPhoto.allow_paid_broadcast:1 +#: of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_photo.SendPhoto.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_photo.SendPhoto.reply_parameters:1 of msgid "Description of the message to reply to" msgstr "" @@ -104,7 +132,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -180,3 +208,22 @@ msgstr "" #: ../../api/methods/send_photo.rst:55 msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo`" msgstr "" + +#: ../../api/methods/send_photo.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo`" +msgstr "" + +#: ../../api/methods/send_photo.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo`" +msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_poll.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_poll.po index c78425d4..844a4b13 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_poll.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_poll.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -46,9 +46,14 @@ msgid "Poll question, 1-300 characters" msgstr "" #: ../../docstring aiogram.methods.send_poll.SendPoll.options:1 of +msgid "A JSON-serialized list of 2-10 answer options" +msgstr "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.business_connection_id:1 +#: of msgid "" -"A JSON-serialized list of answer options, 2-10 strings 1-100 characters " -"each" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" msgstr "" #: ../../docstring aiogram.methods.send_poll.SendPoll.message_thread_id:1 of @@ -57,6 +62,19 @@ msgid "" " forum supergroups only" msgstr "" +#: ../../docstring aiogram.methods.send_poll.SendPoll.question_parse_mode:1 of +msgid "" +"Mode for parsing entities in the question. See `formatting options " +"`_ for more " +"details. Currently, only custom emoji entities are allowed" +msgstr "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.question_entities:1 of +msgid "" +"A JSON-serialized list of special entities that appear in the poll " +"question. It can be specified instead of *question_parse_mode*" +msgstr "" + #: ../../docstring aiogram.methods.send_poll.SendPoll.is_anonymous:1 of msgid ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`" msgstr "" @@ -96,7 +114,7 @@ msgstr "" #: ../../docstring aiogram.methods.send_poll.SendPoll.explanation_entities:1 of msgid "" "A JSON-serialized list of special entities that appear in the poll " -"explanation, which can be specified instead of *parse_mode*" +"explanation. It can be specified instead of *explanation_parse_mode*" msgstr "" #: ../../docstring aiogram.methods.send_poll.SendPoll.open_period:1 of @@ -128,6 +146,21 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring aiogram.methods.send_poll.SendPoll.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_poll.SendPoll.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_poll.SendPoll.reply_parameters:1 of msgid "Description of the message to reply to" msgstr "" @@ -138,7 +171,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -214,6 +247,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll`" msgstr "" +#: ../../api/methods/send_poll.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll`" +msgstr "" + +#: ../../api/methods/send_poll.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -224,3 +265,27 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized list of answer " +#~ "options, 2-10 strings 1-100 characters " +#~ "each" +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized list of special " +#~ "entities that appear in the poll " +#~ "explanation, which can be specified " +#~ "instead of *parse_mode*" +#~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_sticker.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_sticker.po index e821e146..c1326c45 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_sticker.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_sticker.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -48,10 +48,17 @@ msgstr "" msgid "" "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 " -"or .TGS sticker using multipart/form-data. :ref:`More information on " -"Sending Files » `. Video stickers can only be sent by a " -"file_id. Animated stickers can't be sent via an HTTP URL." +"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." +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_sticker.SendSticker.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" msgstr "" #: ../../docstring aiogram.methods.send_sticker.SendSticker.message_thread_id:1 @@ -77,6 +84,23 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring +#: aiogram.methods.send_sticker.SendSticker.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_sticker.SendSticker.message_effect_id:1 +#: of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_sticker.SendSticker.reply_parameters:1 #: of msgid "Description of the message to reply to" @@ -88,7 +112,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -165,6 +189,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker`" msgstr "" +#: ../../api/methods/send_sticker.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker`" +msgstr "" + +#: ../../api/methods/send_sticker.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -187,3 +219,30 @@ msgstr "" #~ "/form-data. :ref:`More information on " #~ "Sending Files » `" #~ msgstr "" + +#~ msgid "" +#~ "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 or .TGS sticker" +#~ " using multipart/form-data. :ref:`More " +#~ "information on Sending Files » " +#~ "`. Video stickers can only" +#~ " be sent by a file_id. Animated " +#~ "stickers can't be sent via an HTTP" +#~ " URL." +#~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_venue.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_venue.po index 52bbcb3f..458e9390 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_venue.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_venue.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -57,6 +57,13 @@ msgstr "" msgid "Address of the venue" msgstr "" +#: ../../docstring +#: aiogram.methods.send_venue.SendVenue.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring aiogram.methods.send_venue.SendVenue.message_thread_id:1 of msgid "" "Unique identifier for the target message thread (topic) of the forum; for" @@ -95,6 +102,22 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring aiogram.methods.send_venue.SendVenue.allow_paid_broadcast:1 +#: of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_venue.SendVenue.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_venue.SendVenue.reply_parameters:1 of msgid "Description of the message to reply to" msgstr "" @@ -105,7 +128,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -182,6 +205,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue`" msgstr "" +#: ../../api/methods/send_venue.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue`" +msgstr "" + +#: ../../api/methods/send_venue.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -192,3 +223,14 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po index 56983047..45d99121 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -54,6 +54,13 @@ msgid "" "files>`" msgstr "" +#: ../../docstring +#: aiogram.methods.send_video.SendVideo.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring aiogram.methods.send_video.SendVideo.message_thread_id:1 of msgid "" "Unique identifier for the target message thread (topic) of the forum; for" @@ -84,6 +91,20 @@ msgid "" "information on Sending Files » `" msgstr "" +#: ../../docstring aiogram.methods.send_video.SendVideo.cover:1 of +msgid "" +"Cover for the video in the message. Pass a file_id to send a file that " +"exists on the Telegram servers (recommended), pass an HTTP URL for " +"Telegram to get a file from the Internet, or pass " +"'attach://' to upload a new one using multipart/form-" +"data under name. :ref:`More information on Sending " +"Files » `" +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.start_timestamp:1 of +msgid "Start timestamp for the video in the message" +msgstr "" + #: ../../docstring aiogram.methods.send_video.SendVideo.caption:1 of msgid "" "Video caption (may also be used when resending videos by *file_id*), " @@ -103,6 +124,11 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.methods.send_video.SendVideo.show_caption_above_media:1 of +msgid "Pass :code:`True`, if the caption must be shown above the message media" +msgstr "" + #: ../../docstring aiogram.methods.send_video.SendVideo.has_spoiler:1 of msgid "" "Pass :code:`True` if the video needs to be covered with a spoiler " @@ -124,6 +150,22 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring aiogram.methods.send_video.SendVideo.allow_paid_broadcast:1 +#: of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_video.SendVideo.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_video.SendVideo.reply_parameters:1 of msgid "Description of the message to reply to" msgstr "" @@ -134,7 +176,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -211,6 +253,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video`" msgstr "" +#: ../../api/methods/send_video.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_video`" +msgstr "" + +#: ../../api/methods/send_video.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_video`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -221,3 +271,14 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video_note.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video_note.po index 241b6bf8..8495ce62 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video_note.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video_note.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -52,6 +52,13 @@ msgid "" "files>`. Sending video notes by a URL is currently unsupported" msgstr "" +#: ../../docstring +#: aiogram.methods.send_video_note.SendVideoNote.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring #: aiogram.methods.send_video_note.SendVideoNote.message_thread_id:1 of msgid "" @@ -91,6 +98,23 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring +#: aiogram.methods.send_video_note.SendVideoNote.allow_paid_broadcast:1 of +msgid "" +"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" +msgstr "" + +#: ../../docstring +#: aiogram.methods.send_video_note.SendVideoNote.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring #: aiogram.methods.send_video_note.SendVideoNote.reply_parameters:1 of msgid "Description of the message to reply to" @@ -103,7 +127,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -181,6 +205,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note`" msgstr "" +#: ../../api/methods/send_video_note.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note`" +msgstr "" + +#: ../../api/methods/send_video_note.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -191,3 +223,14 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_voice.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_voice.po index 358a1615..a053c60e 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_voice.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_voice.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,8 +29,9 @@ msgstr "" msgid "" "Use this method to send audio files, if you want Telegram clients to " "display the file as a playable voice message. For this to work, your " -"audio must be in an .OGG file encoded with OPUS (other formats may be " -"sent as :class:`aiogram.types.audio.Audio` or " +"audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in" +" .M4A format (other formats may be sent as " +":class:`aiogram.types.audio.Audio` or " ":class:`aiogram.types.document.Document`). On success, the sent " ":class:`aiogram.types.message.Message` is returned. Bots can currently " "send voice messages of up to 50 MB in size, this limit may be changed in " @@ -56,6 +57,13 @@ msgid "" "files>`" msgstr "" +#: ../../docstring +#: aiogram.methods.send_voice.SendVoice.business_connection_id:1 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + #: ../../docstring aiogram.methods.send_voice.SendVoice.message_thread_id:1 of msgid "" "Unique identifier for the target message thread (topic) of the forum; for" @@ -94,6 +102,22 @@ msgstr "" msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" +#: ../../docstring aiogram.methods.send_voice.SendVoice.allow_paid_broadcast:1 +#: of +msgid "" +"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" +msgstr "" + +#: ../../docstring aiogram.methods.send_voice.SendVoice.message_effect_id:1 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + #: ../../docstring aiogram.methods.send_voice.SendVoice.reply_parameters:1 of msgid "Description of the message to reply to" msgstr "" @@ -104,7 +128,7 @@ msgid "" "keyboard `_, " "`custom reply keyboard " "`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"remove a reply keyboard or to force a reply from the user" msgstr "" #: ../../docstring @@ -181,6 +205,14 @@ msgstr "" msgid ":meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice`" msgstr "" +#: ../../api/methods/send_voice.rst:56 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice`" +msgstr "" + +#: ../../api/methods/send_voice.rst:57 +msgid ":meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice`" +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -191,3 +223,31 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "Use this method to send audio " +#~ "files, if you want Telegram clients " +#~ "to display the file as a playable" +#~ " voice message. For this to work, " +#~ "your audio must be in an .OGG " +#~ "file encoded with OPUS (other formats" +#~ " may be sent as " +#~ ":class:`aiogram.types.audio.Audio` or " +#~ ":class:`aiogram.types.document.Document`). On success, " +#~ "the sent :class:`aiogram.types.message.Message` is" +#~ " returned. Bots can currently send " +#~ "voice messages of up to 50 MB " +#~ "in size, this limit may be changed" +#~ " in the future." +#~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_permissions.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_permissions.po index 84b5a8aa..b4f95788 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_permissions.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_permissions.po @@ -103,4 +103,3 @@ msgstr "" #: ../../api/methods/set_chat_permissions.rst:50 msgid ":meth:`aiogram.types.chat.Chat.set_permissions`" msgstr "" - diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_message_reaction.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_message_reaction.po index 6f00ce61..748073fa 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_message_reaction.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_message_reaction.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -31,9 +31,10 @@ msgstr "" #: aiogram.methods.set_message_reaction.SetMessageReaction:1 of msgid "" "Use this method to change the chosen reactions on a message. Service " -"messages can't be reacted to. Automatically forwarded messages from a " -"channel to its discussion group have the same available reactions as " -"messages in the channel. Returns :code:`True` on success." +"messages of some types can't be reacted to. Automatically forwarded " +"messages from a channel to its discussion group have the same available " +"reactions as messages in the channel. Bots can't use paid reactions. " +"Returns :code:`True` on success." msgstr "" #: aiogram.methods.set_message_reaction.SetMessageReaction:3 of @@ -58,10 +59,11 @@ msgstr "" #: ../../docstring #: aiogram.methods.set_message_reaction.SetMessageReaction.reaction:1 of msgid "" -"New list of reaction types to set on the message. Currently, as non-" -"premium users, bots can set up to one reaction per message. A custom " -"emoji reaction can be used if it is either already present on the message" -" or explicitly allowed by chat administrators." +"A JSON-serialized list of reaction types to set on the message. " +"Currently, as non-premium users, bots can set up to one reaction per " +"message. A custom emoji reaction can be used if it is either already " +"present on the message or explicitly allowed by chat administrators. Paid" +" reactions can't be used by bots." msgstr "" #: ../../docstring @@ -110,3 +112,25 @@ msgstr "" #: ../../api/methods/set_message_reaction.rst:51 msgid ":meth:`aiogram.types.message.Message.react`" msgstr "" + +#~ msgid "" +#~ "Use this method to change the " +#~ "chosen reactions on a message. Service" +#~ " messages can't be reacted to. " +#~ "Automatically forwarded messages from a " +#~ "channel to its discussion group have " +#~ "the same available reactions as messages" +#~ " in the channel. Returns :code:`True` " +#~ "on success." +#~ msgstr "" + +#~ msgid "" +#~ "New list of reaction types to set" +#~ " on the message. Currently, as " +#~ "non-premium users, bots can set up" +#~ " to one reaction per message. A " +#~ "custom emoji reaction can be used " +#~ "if it is either already present on" +#~ " the message or explicitly allowed by" +#~ " chat administrators." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po index c0d9b5ee..875a35cb 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.11.0\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/set_sticker_set_thumbnail.rst:3 msgid "setStickerSetThumbnail" @@ -47,6 +47,14 @@ msgstr "" msgid "User identifier of the sticker set owner" msgstr "" +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail.format:1 of +msgid "" +"Format of the thumbnail, must be one of 'static' for a **.WEBP** or " +"**.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a " +"**.WEBM** video" +msgstr "" + #: ../../docstring #: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail.thumbnail:1 #: of @@ -54,55 +62,93 @@ msgid "" "A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 " "kilobytes in size and have a width and height of exactly 100px, or a " "**.TGS** animation with a thumbnail up to 32 kilobytes in size (see " -"`https://core.telegram.org/stickers#animated-sticker-requirements " -"`_`https://core.telegram.org/stickers#animated-sticker-" -"requirements `_ for animated sticker technical requirements), or a " -"**WEBM** video with the thumbnail up to 32 kilobytes in size; see " -"`https://core.telegram.org/stickers#video-sticker-requirements " -"`_`https://core.telegram.org/stickers#video-sticker-" -"requirements `_ for video sticker technical requirements. Pass a " -"*file_id* as a String to send a file that already exists on the Telegram " -"servers, 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 » `. Animated and video " -"sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then " -"the thumbnail is dropped and the first sticker is used as the thumbnail." +"`https://core.telegram.org/stickers#animation-requirements " +"`_`https://core.telegram.org/stickers#animation-requirements" +" `_ for " +"animated sticker technical requirements), or a **.WEBM** video with the " +"thumbnail up to 32 kilobytes in size; see " +"`https://core.telegram.org/stickers#video-requirements " +"`_`https://core.telegram.org/stickers#video-requirements " +"`_ for video " +"sticker technical requirements. Pass a *file_id* as a String to send a " +"file that already exists on the Telegram servers, 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 » " +"`. Animated and video sticker set thumbnails can't be " +"uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the " +"first sticker is used as the thumbnail." msgstr "" -#: ../../api/methods/set_sticker_set_thumbnail.rst:14 +#: ../../api/methods/set_sticker_set_thumbnail.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/set_sticker_set_thumbnail.rst:17 +#: ../../api/methods/set_sticker_set_thumbnail.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/set_sticker_set_thumbnail.rst:25 +#: ../../api/methods/set_sticker_set_thumbnail.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/set_sticker_set_thumbnail.rst:27 +#: ../../api/methods/set_sticker_set_thumbnail.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/set_sticker_set_thumbnail.rst:29 +#: ../../api/methods/set_sticker_set_thumbnail.rst:30 msgid "" ":code:`from aiogram.methods.set_sticker_set_thumbnail import " "SetStickerSetThumbnail`" msgstr "" -#: ../../api/methods/set_sticker_set_thumbnail.rst:30 +#: ../../api/methods/set_sticker_set_thumbnail.rst:31 msgid "alias: :code:`from aiogram.methods import SetStickerSetThumbnail`" msgstr "" -#: ../../api/methods/set_sticker_set_thumbnail.rst:33 +#: ../../api/methods/set_sticker_set_thumbnail.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/set_sticker_set_thumbnail.rst:40 +#: ../../api/methods/set_sticker_set_thumbnail.rst:41 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "A **.WEBP** or **.PNG** image with " +#~ "the thumbnail, must be up to 128" +#~ " kilobytes in size and have a " +#~ "width and height of exactly 100px, " +#~ "or a **.TGS** animation with a " +#~ "thumbnail up to 32 kilobytes in " +#~ "size (see `https://core.telegram.org/stickers#animated-" +#~ "sticker-requirements `_`https://core.telegram.org/stickers#animated-" +#~ "sticker-requirements `_ for animated" +#~ " sticker technical requirements), or a " +#~ "**WEBM** video with the thumbnail up " +#~ "to 32 kilobytes in size; see " +#~ "`https://core.telegram.org/stickers#video-sticker-" +#~ "requirements `_`https://core.telegram.org/stickers" +#~ "#video-sticker-requirements " +#~ "`_ for video sticker technical" +#~ " requirements. Pass a *file_id* as a" +#~ " String to send a file that " +#~ "already exists on the Telegram servers," +#~ " 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 » " +#~ "`. Animated and video " +#~ "sticker set thumbnails can't be uploaded" +#~ " via HTTP URL. If omitted, then " +#~ "the thumbnail is dropped and the " +#~ "first sticker is used as the " +#~ "thumbnail." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_user_emoji_status.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_user_emoji_status.po new file mode 100644 index 00000000..41373ae7 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_user_emoji_status.po @@ -0,0 +1,94 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/set_user_emoji_status.rst:3 +msgid "setUserEmojiStatus" +msgstr "" + +#: ../../api/methods/set_user_emoji_status.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_user_emoji_status.SetUserEmojiStatus:1 of +msgid "" +"Changes the emoji status for a given user that previously allowed the bot" +" to manage their emoji status via the Mini App method " +"`requestEmojiStatusAccess `_. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_user_emoji_status.SetUserEmojiStatus:3 of +msgid "Source: https://core.telegram.org/bots/api#setuseremojistatus" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_user_emoji_status.SetUserEmojiStatus.user_id:1 of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_user_emoji_status.SetUserEmojiStatus.emoji_status_custom_emoji_id:1 +#: of +msgid "" +"Custom emoji identifier of the emoji status to set. Pass an empty string " +"to remove the status." +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_user_emoji_status.SetUserEmojiStatus.emoji_status_expiration_date:1 +#: of +msgid "Expiration date of the emoji status, if any" +msgstr "" + +#: ../../api/methods/set_user_emoji_status.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_user_emoji_status.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_user_emoji_status.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_user_emoji_status.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_user_emoji_status.rst:30 +msgid "" +":code:`from aiogram.methods.set_user_emoji_status import " +"SetUserEmojiStatus`" +msgstr "" + +#: ../../api/methods/set_user_emoji_status.rst:31 +msgid "alias: :code:`from aiogram.methods import SetUserEmojiStatus`" +msgstr "" + +#: ../../api/methods/set_user_emoji_status.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_user_emoji_status.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_webhook.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_webhook.po index 39f13696..be21c6bd 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_webhook.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_webhook.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,12 +30,15 @@ msgid "" "Use this method to specify a URL and receive incoming updates via an " "outgoing webhook. Whenever there is an update for the bot, we will send " "an HTTPS POST request to the specified URL, containing a JSON-serialized " -":class:`aiogram.types.update.Update`. In case of an unsuccessful request," -" we will give up after a reasonable amount of attempts. Returns " -":code:`True` on success. If you'd like to make sure that the webhook was " -"set by you, you can specify secret data in the parameter *secret_token*. " -"If specified, the request will contain a header 'X-Telegram-Bot-Api-" -"Secret-Token' with the secret token as content." +":class:`aiogram.types.update.Update`. In case of an unsuccessful request " +"(a request with response `HTTP status code " +"`_ different " +"from :code:`2XY`), we will repeat the request and give up after a " +"reasonable amount of attempts. Returns :code:`True` on success. If you'd " +"like to make sure that the webhook was set by you, you can specify secret" +" data in the parameter *secret_token*. If specified, the request will " +"contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token " +"as content." msgstr "" #: aiogram.methods.set_webhook.SetWebhook:4 of @@ -179,3 +182,24 @@ msgstr "" #~ "(default). If not specified, the " #~ "previous setting will be used." #~ msgstr "" + +#~ msgid "" +#~ "Use this method to specify a URL" +#~ " and receive incoming updates via an" +#~ " outgoing webhook. Whenever there is " +#~ "an update for the bot, we will " +#~ "send an HTTPS POST request to the" +#~ " specified URL, containing a JSON-" +#~ "serialized :class:`aiogram.types.update.Update`. In " +#~ "case of an unsuccessful request, we " +#~ "will give up after a reasonable " +#~ "amount of attempts. Returns :code:`True` " +#~ "on success. If you'd like to make" +#~ " sure that the webhook was set " +#~ "by you, you can specify secret " +#~ "data in the parameter *secret_token*. If" +#~ " specified, the request will contain " +#~ "a header 'X-Telegram-Bot-Api-Secret-" +#~ "Token' with the secret token as " +#~ "content." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/stop_message_live_location.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/stop_message_live_location.po index e15b616d..f4cec80d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/stop_message_live_location.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/stop_message_live_location.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/stop_message_live_location.rst:3 msgid "stopMessageLiveLocation" @@ -37,6 +37,14 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#stopmessagelivelocation" msgstr "" +#: ../../docstring +#: aiogram.methods.stop_message_live_location.StopMessageLiveLocation.business_connection_id:1 +#: of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message to be edited was sent" +msgstr "" + #: ../../docstring #: aiogram.methods.stop_message_live_location.StopMessageLiveLocation.chat_id:1 #: of @@ -70,45 +78,45 @@ msgid "" "`_." msgstr "" -#: ../../api/methods/stop_message_live_location.rst:14 +#: ../../api/methods/stop_message_live_location.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/stop_message_live_location.rst:17 +#: ../../api/methods/stop_message_live_location.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/stop_message_live_location.rst:25 +#: ../../api/methods/stop_message_live_location.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/stop_message_live_location.rst:27 +#: ../../api/methods/stop_message_live_location.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/stop_message_live_location.rst:29 +#: ../../api/methods/stop_message_live_location.rst:30 msgid "" ":code:`from aiogram.methods.stop_message_live_location import " "StopMessageLiveLocation`" msgstr "" -#: ../../api/methods/stop_message_live_location.rst:30 +#: ../../api/methods/stop_message_live_location.rst:31 msgid "alias: :code:`from aiogram.methods import StopMessageLiveLocation`" msgstr "" -#: ../../api/methods/stop_message_live_location.rst:33 +#: ../../api/methods/stop_message_live_location.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/stop_message_live_location.rst:40 +#: ../../api/methods/stop_message_live_location.rst:41 msgid "As reply into Webhook in handler" msgstr "" -#: ../../api/methods/stop_message_live_location.rst:48 +#: ../../api/methods/stop_message_live_location.rst:49 msgid "As shortcut from received object" msgstr "" -#: ../../api/methods/stop_message_live_location.rst:50 +#: ../../api/methods/stop_message_live_location.rst:51 msgid ":meth:`aiogram.types.message.Message.stop_live_location`" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/stop_poll.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/stop_poll.po index d0315d1d..ee32a02e 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/stop_poll.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/stop_poll.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/stop_poll.rst:3 msgid "stopPoll" @@ -45,40 +45,47 @@ msgstr "" msgid "Identifier of the original message with the poll" msgstr "" +#: ../../docstring aiogram.methods.stop_poll.StopPoll.business_connection_id:1 +#: of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message to be edited was sent" +msgstr "" + #: ../../docstring aiogram.methods.stop_poll.StopPoll.reply_markup:1 of msgid "" "A JSON-serialized object for a new message `inline keyboard " "`_." msgstr "" -#: ../../api/methods/stop_poll.rst:14 +#: ../../api/methods/stop_poll.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/stop_poll.rst:17 +#: ../../api/methods/stop_poll.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/stop_poll.rst:25 +#: ../../api/methods/stop_poll.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/stop_poll.rst:27 +#: ../../api/methods/stop_poll.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/stop_poll.rst:29 +#: ../../api/methods/stop_poll.rst:30 msgid ":code:`from aiogram.methods.stop_poll import StopPoll`" msgstr "" -#: ../../api/methods/stop_poll.rst:30 +#: ../../api/methods/stop_poll.rst:31 msgid "alias: :code:`from aiogram.methods import StopPoll`" msgstr "" -#: ../../api/methods/stop_poll.rst:33 +#: ../../api/methods/stop_poll.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/stop_poll.rst:40 +#: ../../api/methods/stop_poll.rst:41 msgid "As reply into Webhook in handler" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_chat_message.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_chat_message.po index e184084b..b31a1397 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_chat_message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unpin_chat_message.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/unpin_chat_message.rst:3 msgid "unpinChatMessage" @@ -47,55 +47,71 @@ msgid "" msgstr "" #: ../../docstring -#: aiogram.methods.unpin_chat_message.UnpinChatMessage.message_id:1 of +#: aiogram.methods.unpin_chat_message.UnpinChatMessage.business_connection_id:1 +#: of msgid "" -"Identifier of a message to unpin. If not specified, the most recent " -"pinned message (by sending date) will be unpinned." +"Unique identifier of the business connection on behalf of which the " +"message will be unpinned" msgstr "" -#: ../../api/methods/unpin_chat_message.rst:14 +#: ../../docstring +#: aiogram.methods.unpin_chat_message.UnpinChatMessage.message_id:1 of +msgid "" +"Identifier of the message to unpin. Required if *business_connection_id* " +"is specified. If not specified, the most recent pinned message (by " +"sending date) will be unpinned." +msgstr "" + +#: ../../api/methods/unpin_chat_message.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/unpin_chat_message.rst:17 +#: ../../api/methods/unpin_chat_message.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/unpin_chat_message.rst:25 +#: ../../api/methods/unpin_chat_message.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/unpin_chat_message.rst:27 +#: ../../api/methods/unpin_chat_message.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/unpin_chat_message.rst:29 +#: ../../api/methods/unpin_chat_message.rst:30 msgid ":code:`from aiogram.methods.unpin_chat_message import UnpinChatMessage`" msgstr "" -#: ../../api/methods/unpin_chat_message.rst:30 +#: ../../api/methods/unpin_chat_message.rst:31 msgid "alias: :code:`from aiogram.methods import UnpinChatMessage`" msgstr "" -#: ../../api/methods/unpin_chat_message.rst:33 +#: ../../api/methods/unpin_chat_message.rst:34 msgid "With specific bot" msgstr "" -#: ../../api/methods/unpin_chat_message.rst:40 +#: ../../api/methods/unpin_chat_message.rst:41 msgid "As reply into Webhook in handler" msgstr "" -#: ../../api/methods/unpin_chat_message.rst:48 +#: ../../api/methods/unpin_chat_message.rst:49 msgid "As shortcut from received object" msgstr "" -#: ../../api/methods/unpin_chat_message.rst:50 -msgid ":meth:`aiogram.types.message.Message.unpin`" -msgstr "" - #: ../../api/methods/unpin_chat_message.rst:51 msgid ":meth:`aiogram.types.chat.Chat.unpin_message`" msgstr "" +#: ../../api/methods/unpin_chat_message.rst:52 +msgid ":meth:`aiogram.types.message.Message.unpin`" +msgstr "" + #~ msgid "As message method" #~ msgstr "" + +#~ msgid "" +#~ "Identifier of a message to unpin. " +#~ "If not specified, the most recent " +#~ "pinned message (by sending date) will" +#~ " be unpinned." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/upload_sticker_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/upload_sticker_file.po index 4e909bd1..78c391b1 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/upload_sticker_file.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/upload_sticker_file.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.11.0\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/methods/upload_sticker_file.rst:3 msgid "uploadStickerFile" @@ -28,9 +28,10 @@ msgstr "" #: aiogram.methods.upload_sticker_file.UploadStickerFile:1 of msgid "" "Use this method to upload a file with a sticker for later use in the " -":class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and " -":class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the " -"file can be used multiple times). Returns the uploaded " +":class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet`, " +":class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, or " +":class:`aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet` " +"methods (the file can be used multiple times). Returns the uploaded " ":class:`aiogram.types.file.File` on success." msgstr "" @@ -58,31 +59,31 @@ msgstr "" msgid "Format of the sticker, must be one of 'static', 'animated', 'video'" msgstr "" -#: ../../api/methods/upload_sticker_file.rst:14 +#: ../../api/methods/upload_sticker_file.rst:15 msgid "Usage" msgstr "" -#: ../../api/methods/upload_sticker_file.rst:17 +#: ../../api/methods/upload_sticker_file.rst:18 msgid "As bot method" msgstr "" -#: ../../api/methods/upload_sticker_file.rst:25 +#: ../../api/methods/upload_sticker_file.rst:26 msgid "Method as object" msgstr "" -#: ../../api/methods/upload_sticker_file.rst:27 +#: ../../api/methods/upload_sticker_file.rst:28 msgid "Imports:" msgstr "" -#: ../../api/methods/upload_sticker_file.rst:29 +#: ../../api/methods/upload_sticker_file.rst:30 msgid ":code:`from aiogram.methods.upload_sticker_file import UploadStickerFile`" msgstr "" -#: ../../api/methods/upload_sticker_file.rst:30 +#: ../../api/methods/upload_sticker_file.rst:31 msgid "alias: :code:`from aiogram.methods import UploadStickerFile`" msgstr "" -#: ../../api/methods/upload_sticker_file.rst:33 +#: ../../api/methods/upload_sticker_file.rst:34 msgid "With specific bot" msgstr "" @@ -103,3 +104,15 @@ msgstr "" #~ " exactly 512px. :ref:`More information on" #~ " Sending Files » `" #~ msgstr "" + +#~ msgid "" +#~ "Use this method to upload a file" +#~ " with a sticker for later use " +#~ "in the " +#~ ":class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet`" +#~ " and " +#~ ":class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` " +#~ "methods (the file can be used " +#~ "multiple times). Returns the uploaded " +#~ ":class:`aiogram.types.file.File` on success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/verify_chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/verify_chat.po new file mode 100644 index 00000000..b3953337 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/verify_chat.po @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/verify_chat.rst:3 +msgid "verifyChat" +msgstr "" + +#: ../../api/methods/verify_chat.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.verify_chat.VerifyChat:1 of +msgid "" +"Verifies a chat `on behalf of the organization " +"`_ which is " +"represented by the bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.verify_chat.VerifyChat:3 of +msgid "Source: https://core.telegram.org/bots/api#verifychat" +msgstr "" + +#: ../../docstring aiogram.methods.verify_chat.VerifyChat.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target channel " +"(in the format :code:`@channelusername`)" +msgstr "" + +#: ../../docstring aiogram.methods.verify_chat.VerifyChat.custom_description:1 +#: of +msgid "" +"Custom description for the verification; 0-70 characters. Must be empty " +"if the organization isn't allowed to provide a custom verification " +"description." +msgstr "" + +#: ../../api/methods/verify_chat.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/verify_chat.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/verify_chat.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/verify_chat.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/verify_chat.rst:30 +msgid ":code:`from aiogram.methods.verify_chat import VerifyChat`" +msgstr "" + +#: ../../api/methods/verify_chat.rst:31 +msgid "alias: :code:`from aiogram.methods import VerifyChat`" +msgstr "" + +#: ../../api/methods/verify_chat.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/verify_chat.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/verify_user.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/verify_user.po new file mode 100644 index 00000000..d4c8163d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/verify_user.po @@ -0,0 +1,84 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/methods/verify_user.rst:3 +msgid "verifyUser" +msgstr "" + +#: ../../api/methods/verify_user.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.verify_user.VerifyUser:1 of +msgid "" +"Verifies a user `on behalf of the organization " +"`_ which is " +"represented by the bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.verify_user.VerifyUser:3 of +msgid "Source: https://core.telegram.org/bots/api#verifyuser" +msgstr "" + +#: ../../docstring aiogram.methods.verify_user.VerifyUser.user_id:1 of +msgid "Unique identifier of the target user" +msgstr "" + +#: ../../docstring aiogram.methods.verify_user.VerifyUser.custom_description:1 +#: of +msgid "" +"Custom description for the verification; 0-70 characters. Must be empty " +"if the organization isn't allowed to provide a custom verification " +"description." +msgstr "" + +#: ../../api/methods/verify_user.rst:15 +msgid "Usage" +msgstr "" + +#: ../../api/methods/verify_user.rst:18 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/verify_user.rst:26 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/verify_user.rst:28 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/verify_user.rst:30 +msgid ":code:`from aiogram.methods.verify_user import VerifyUser`" +msgstr "" + +#: ../../api/methods/verify_user.rst:31 +msgid "alias: :code:`from aiogram.methods import VerifyUser`" +msgstr "" + +#: ../../api/methods/verify_user.rst:34 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/verify_user.rst:41 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/affiliate_info.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/affiliate_info.po new file mode 100644 index 00000000..ba6f2052 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/affiliate_info.po @@ -0,0 +1,70 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/affiliate_info.rst:3 +msgid "AffiliateInfo" +msgstr "" + +#: aiogram.types.affiliate_info.AffiliateInfo:1 of +msgid "" +"Contains information about the affiliate that received a commission via " +"this transaction." +msgstr "" + +#: aiogram.types.affiliate_info.AffiliateInfo:3 of +msgid "Source: https://core.telegram.org/bots/api#affiliateinfo" +msgstr "" + +#: ../../docstring +#: aiogram.types.affiliate_info.AffiliateInfo.commission_per_mille:1 of +msgid "" +"The number of Telegram Stars received by the affiliate for each 1000 " +"Telegram Stars received by the bot from referred users" +msgstr "" + +#: ../../docstring aiogram.types.affiliate_info.AffiliateInfo.amount:1 of +msgid "" +"Integer amount of Telegram Stars received by the affiliate from the " +"transaction, rounded to 0; can be negative for refunds" +msgstr "" + +#: ../../docstring aiogram.types.affiliate_info.AffiliateInfo.affiliate_user:1 +#: of +msgid "" +"*Optional*. The bot or the user that received an affiliate commission if " +"it was received by a bot or a user" +msgstr "" + +#: ../../docstring aiogram.types.affiliate_info.AffiliateInfo.affiliate_chat:1 +#: of +msgid "" +"*Optional*. The chat that received an affiliate commission if it was " +"received by a chat" +msgstr "" + +#: ../../docstring aiogram.types.affiliate_info.AffiliateInfo.nanostar_amount:1 +#: of +msgid "" +"*Optional*. The number of 1/1000000000 shares of Telegram Stars received " +"by the affiliate; from -999999999 to 999999999; can be negative for " +"refunds" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/animation.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/animation.po index df976078..0b113fe6 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/animation.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/animation.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/animation.rst:3 msgid "Animation" @@ -42,27 +42,27 @@ msgid "" msgstr "" #: ../../docstring aiogram.types.animation.Animation.width:1 of -msgid "Video width as defined by sender" +msgid "Video width as defined by the sender" msgstr "" #: ../../docstring aiogram.types.animation.Animation.height:1 of -msgid "Video height as defined by sender" +msgid "Video height as defined by the sender" msgstr "" #: ../../docstring aiogram.types.animation.Animation.duration:1 of -msgid "Duration of the video in seconds as defined by sender" +msgid "Duration of the video in seconds as defined by the sender" msgstr "" -#: ../../docstring aiogram.types.animation.Animation.thumb:1 of -msgid "*Optional*. Animation thumbnail as defined by sender" +#: ../../docstring aiogram.types.animation.Animation.thumbnail:1 of +msgid "*Optional*. Animation thumbnail as defined by the sender" msgstr "" #: ../../docstring aiogram.types.animation.Animation.file_name:1 of -msgid "*Optional*. Original animation filename as defined by sender" +msgid "*Optional*. Original animation filename as defined by the sender" msgstr "" #: ../../docstring aiogram.types.animation.Animation.mime_type:1 of -msgid "*Optional*. MIME type of the file as defined by sender" +msgid "*Optional*. MIME type of the file as defined by the sender" msgstr "" #: ../../docstring aiogram.types.animation.Animation.file_size:1 of @@ -72,3 +72,21 @@ msgid "" "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 value." msgstr "" + +#~ msgid "Video width as defined by sender" +#~ msgstr "" + +#~ msgid "Video height as defined by sender" +#~ msgstr "" + +#~ msgid "Duration of the video in seconds as defined by sender" +#~ msgstr "" + +#~ msgid "*Optional*. Animation thumbnail as defined by sender" +#~ msgstr "" + +#~ msgid "*Optional*. Original animation filename as defined by sender" +#~ msgstr "" + +#~ msgid "*Optional*. MIME type of the file as defined by sender" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/audio.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/audio.po index 81579c4c..22f46b2d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/audio.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/audio.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/audio.rst:3 msgid "Audio" @@ -42,23 +42,25 @@ msgid "" msgstr "" #: ../../docstring aiogram.types.audio.Audio.duration:1 of -msgid "Duration of the audio in seconds as defined by sender" +msgid "Duration of the audio in seconds as defined by the sender" msgstr "" #: ../../docstring aiogram.types.audio.Audio.performer:1 of -msgid "*Optional*. Performer of the audio as defined by sender or by audio tags" +msgid "" +"*Optional*. Performer of the audio as defined by the sender or by audio " +"tags" msgstr "" #: ../../docstring aiogram.types.audio.Audio.title:1 of -msgid "*Optional*. Title of the audio as defined by sender or by audio tags" +msgid "*Optional*. Title of the audio as defined by the sender or by audio tags" msgstr "" #: ../../docstring aiogram.types.audio.Audio.file_name:1 of -msgid "*Optional*. Original filename as defined by sender" +msgid "*Optional*. Original filename as defined by the sender" msgstr "" #: ../../docstring aiogram.types.audio.Audio.mime_type:1 of -msgid "*Optional*. MIME type of the file as defined by sender" +msgid "*Optional*. MIME type of the file as defined by the sender" msgstr "" #: ../../docstring aiogram.types.audio.Audio.file_size:1 of @@ -69,6 +71,24 @@ msgid "" " double-precision float type are safe for storing this value." msgstr "" -#: ../../docstring aiogram.types.audio.Audio.thumb:1 of +#: ../../docstring aiogram.types.audio.Audio.thumbnail:1 of msgid "*Optional*. Thumbnail of the album cover to which the music file belongs" msgstr "" + +#~ msgid "Duration of the audio in seconds as defined by sender" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Performer of the audio as" +#~ " defined by sender or by audio " +#~ "tags" +#~ msgstr "" + +#~ msgid "*Optional*. Title of the audio as defined by sender or by audio tags" +#~ msgstr "" + +#~ msgid "*Optional*. Original filename as defined by sender" +#~ msgstr "" + +#~ msgid "*Optional*. MIME type of the file as defined by sender" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill.po new file mode 100644 index 00000000..7b390dc8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/background_fill.rst:3 +msgid "BackgroundFill" +msgstr "" + +#: aiogram.types.background_fill.BackgroundFill:1 of +msgid "" +"This object describes the way a background is filled based on the " +"selected colors. Currently, it can be one of" +msgstr "" + +#: aiogram.types.background_fill.BackgroundFill:3 of +msgid ":class:`aiogram.types.background_fill_solid.BackgroundFillSolid`" +msgstr "" + +#: aiogram.types.background_fill.BackgroundFill:4 of +msgid ":class:`aiogram.types.background_fill_gradient.BackgroundFillGradient`" +msgstr "" + +#: aiogram.types.background_fill.BackgroundFill:5 of +msgid ":class:`aiogram.types.background_fill_freeform_gradient.BackgroundFillFreeformGradient`" +msgstr "" + +#: aiogram.types.background_fill.BackgroundFill:7 of +msgid "Source: https://core.telegram.org/bots/api#backgroundfill" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill_freeform_gradient.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill_freeform_gradient.po new file mode 100644 index 00000000..d63ab298 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill_freeform_gradient.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/background_fill_freeform_gradient.rst:3 +msgid "BackgroundFillFreeformGradient" +msgstr "" + +#: aiogram.types.background_fill_freeform_gradient.BackgroundFillFreeformGradient:1 +#: of +msgid "" +"The background is a freeform gradient that rotates after every message in" +" the chat." +msgstr "" + +#: aiogram.types.background_fill_freeform_gradient.BackgroundFillFreeformGradient:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#backgroundfillfreeformgradient" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_fill_freeform_gradient.BackgroundFillFreeformGradient.type:1 +#: of +msgid "Type of the background fill, always 'freeform_gradient'" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_fill_freeform_gradient.BackgroundFillFreeformGradient.colors:1 +#: of +msgid "" +"A list of the 3 or 4 base colors that are used to generate the freeform " +"gradient in the RGB24 format" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill_gradient.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill_gradient.po new file mode 100644 index 00000000..bea475cd --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill_gradient.po @@ -0,0 +1,55 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/background_fill_gradient.rst:3 +msgid "BackgroundFillGradient" +msgstr "" + +#: aiogram.types.background_fill_gradient.BackgroundFillGradient:1 of +msgid "The background is a gradient fill." +msgstr "" + +#: aiogram.types.background_fill_gradient.BackgroundFillGradient:3 of +msgid "Source: https://core.telegram.org/bots/api#backgroundfillgradient" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_fill_gradient.BackgroundFillGradient.type:1 of +msgid "Type of the background fill, always 'gradient'" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_fill_gradient.BackgroundFillGradient.top_color:1 of +msgid "Top color of the gradient in the RGB24 format" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_fill_gradient.BackgroundFillGradient.bottom_color:1 +#: of +msgid "Bottom color of the gradient in the RGB24 format" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_fill_gradient.BackgroundFillGradient.rotation_angle:1 +#: of +msgid "Clockwise rotation angle of the background fill in degrees; 0-359" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill_solid.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill_solid.po new file mode 100644 index 00000000..bdd22651 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_fill_solid.po @@ -0,0 +1,43 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/background_fill_solid.rst:3 +msgid "BackgroundFillSolid" +msgstr "" + +#: aiogram.types.background_fill_solid.BackgroundFillSolid:1 of +msgid "The background is filled using the selected color." +msgstr "" + +#: aiogram.types.background_fill_solid.BackgroundFillSolid:3 of +msgid "Source: https://core.telegram.org/bots/api#backgroundfillsolid" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_fill_solid.BackgroundFillSolid.type:1 of +msgid "Type of the background fill, always 'solid'" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_fill_solid.BackgroundFillSolid.color:1 of +msgid "The color of the background fill in the RGB24 format" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type.po new file mode 100644 index 00000000..20a012ca --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/background_type.rst:3 +msgid "BackgroundType" +msgstr "" + +#: aiogram.types.background_type.BackgroundType:1 of +msgid "" +"This object describes the type of a background. Currently, it can be one " +"of" +msgstr "" + +#: aiogram.types.background_type.BackgroundType:3 of +msgid ":class:`aiogram.types.background_type_fill.BackgroundTypeFill`" +msgstr "" + +#: aiogram.types.background_type.BackgroundType:4 of +msgid ":class:`aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper`" +msgstr "" + +#: aiogram.types.background_type.BackgroundType:5 of +msgid ":class:`aiogram.types.background_type_pattern.BackgroundTypePattern`" +msgstr "" + +#: aiogram.types.background_type.BackgroundType:6 of +msgid ":class:`aiogram.types.background_type_chat_theme.BackgroundTypeChatTheme`" +msgstr "" + +#: aiogram.types.background_type.BackgroundType:8 of +msgid "Source: https://core.telegram.org/bots/api#backgroundtype" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_chat_theme.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_chat_theme.po new file mode 100644 index 00000000..dbf27c8c --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_chat_theme.po @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/background_type_chat_theme.rst:3 +msgid "BackgroundTypeChatTheme" +msgstr "" + +#: aiogram.types.background_type_chat_theme.BackgroundTypeChatTheme:1 of +msgid "The background is taken directly from a built-in chat theme." +msgstr "" + +#: aiogram.types.background_type_chat_theme.BackgroundTypeChatTheme:3 of +msgid "Source: https://core.telegram.org/bots/api#backgroundtypechattheme" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_chat_theme.BackgroundTypeChatTheme.type:1 of +msgid "Type of the background, always 'chat_theme'" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_chat_theme.BackgroundTypeChatTheme.theme_name:1 +#: of +msgid "Name of the chat theme, which is usually an emoji" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_fill.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_fill.po new file mode 100644 index 00000000..7547dd3e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_fill.po @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/background_type_fill.rst:3 +msgid "BackgroundTypeFill" +msgstr "" + +#: aiogram.types.background_type_fill.BackgroundTypeFill:1 of +msgid "The background is automatically filled based on the selected colors." +msgstr "" + +#: aiogram.types.background_type_fill.BackgroundTypeFill:3 of +msgid "Source: https://core.telegram.org/bots/api#backgroundtypefill" +msgstr "" + +#: ../../docstring aiogram.types.background_type_fill.BackgroundTypeFill.type:1 +#: of +msgid "Type of the background, always 'fill'" +msgstr "" + +#: ../../docstring aiogram.types.background_type_fill.BackgroundTypeFill.fill:1 +#: of +msgid "The background fill" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_fill.BackgroundTypeFill.dark_theme_dimming:1 +#: of +msgid "Dimming of the background in dark themes, as a percentage; 0-100" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_pattern.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_pattern.po new file mode 100644 index 00000000..ef58445a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_pattern.po @@ -0,0 +1,73 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/background_type_pattern.rst:3 +msgid "BackgroundTypePattern" +msgstr "" + +#: aiogram.types.background_type_pattern.BackgroundTypePattern:1 of +msgid "" +"The background is a .PNG or .TGV (gzipped subset of SVG with MIME type " +"'application/x-tgwallpattern') pattern to be combined with the background" +" fill chosen by the user." +msgstr "" + +#: aiogram.types.background_type_pattern.BackgroundTypePattern:3 of +msgid "Source: https://core.telegram.org/bots/api#backgroundtypepattern" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_pattern.BackgroundTypePattern.type:1 of +msgid "Type of the background, always 'pattern'" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_pattern.BackgroundTypePattern.document:1 of +msgid "Document with the pattern" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_pattern.BackgroundTypePattern.fill:1 of +msgid "The background fill that is combined with the pattern" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_pattern.BackgroundTypePattern.intensity:1 of +msgid "" +"Intensity of the pattern when it is shown above the filled background; " +"0-100" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_pattern.BackgroundTypePattern.is_inverted:1 of +msgid "" +"*Optional*. :code:`True`, if the background fill must be applied only to " +"the pattern itself. All other pixels are black in this case. For dark " +"themes only" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_pattern.BackgroundTypePattern.is_moving:1 of +msgid "" +"*Optional*. :code:`True`, if the background moves slightly when the " +"device is tilted" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_wallpaper.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_wallpaper.po new file mode 100644 index 00000000..b7223a5d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/background_type_wallpaper.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/background_type_wallpaper.rst:3 +msgid "BackgroundTypeWallpaper" +msgstr "" + +#: aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper:1 of +msgid "The background is a wallpaper in the JPEG format." +msgstr "" + +#: aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper:3 of +msgid "Source: https://core.telegram.org/bots/api#backgroundtypewallpaper" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper.type:1 of +msgid "Type of the background, always 'wallpaper'" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper.document:1 +#: of +msgid "Document with the wallpaper" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper.dark_theme_dimming:1 +#: of +msgid "Dimming of the background in dark themes, as a percentage; 0-100" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper.is_blurred:1 +#: of +msgid "" +"*Optional*. :code:`True`, if the wallpaper is downscaled to fit in a " +"450x450 square and then box-blurred with radius 12" +msgstr "" + +#: ../../docstring +#: aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper.is_moving:1 +#: of +msgid "" +"*Optional*. :code:`True`, if the background moves slightly when the " +"device is tilted" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/birthdate.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/birthdate.po new file mode 100644 index 00000000..687d7a1a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/birthdate.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/birthdate.rst:3 +msgid "Birthdate" +msgstr "" + +#: aiogram.types.birthdate.Birthdate:1 of +msgid "Describes the birthdate of a user." +msgstr "" + +#: aiogram.types.birthdate.Birthdate:3 of +msgid "Source: https://core.telegram.org/bots/api#birthdate" +msgstr "" + +#: ../../docstring aiogram.types.birthdate.Birthdate.day:1 of +msgid "Day of the user's birth; 1-31" +msgstr "" + +#: ../../docstring aiogram.types.birthdate.Birthdate.month:1 of +msgid "Month of the user's birth; 1-12" +msgstr "" + +#: ../../docstring aiogram.types.birthdate.Birthdate.year:1 of +msgid "*Optional*. Year of the user's birth" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/business_connection.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_connection.po new file mode 100644 index 00000000..663dd56e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_connection.po @@ -0,0 +1,69 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/business_connection.rst:3 +msgid "BusinessConnection" +msgstr "" + +#: aiogram.types.business_connection.BusinessConnection:1 of +msgid "Describes the connection of the bot with a business account." +msgstr "" + +#: aiogram.types.business_connection.BusinessConnection:3 of +msgid "Source: https://core.telegram.org/bots/api#businessconnection" +msgstr "" + +#: ../../docstring aiogram.types.business_connection.BusinessConnection.id:1 of +msgid "Unique identifier of the business connection" +msgstr "" + +#: ../../docstring aiogram.types.business_connection.BusinessConnection.user:1 +#: of +msgid "Business account user that created the business connection" +msgstr "" + +#: ../../docstring +#: aiogram.types.business_connection.BusinessConnection.user_chat_id:1 of +msgid "" +"Identifier of a private chat with the user who created the business " +"connection. This number may have more than 32 significant bits and some " +"programming languages may have difficulty/silent defects in interpreting " +"it. But it has at most 52 significant bits, so a 64-bit integer or " +"double-precision float type are safe for storing this identifier." +msgstr "" + +#: ../../docstring aiogram.types.business_connection.BusinessConnection.date:1 +#: of +msgid "Date the connection was established in Unix time" +msgstr "" + +#: ../../docstring +#: aiogram.types.business_connection.BusinessConnection.can_reply:1 of +msgid "" +"True, if the bot can act on behalf of the business account in chats that " +"were active in the last 24 hours" +msgstr "" + +#: ../../docstring +#: aiogram.types.business_connection.BusinessConnection.is_enabled:1 of +msgid "True, if the connection is active" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/business_intro.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_intro.po new file mode 100644 index 00000000..437ac415 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_intro.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/business_intro.rst:3 +msgid "BusinessIntro" +msgstr "" + +#: aiogram.types.business_intro.BusinessIntro:1 of +msgid "" +"Contains information about the start page settings of a Telegram Business" +" account." +msgstr "" + +#: aiogram.types.business_intro.BusinessIntro:3 of +msgid "Source: https://core.telegram.org/bots/api#businessintro" +msgstr "" + +#: ../../docstring aiogram.types.business_intro.BusinessIntro.title:1 of +msgid "*Optional*. Title text of the business intro" +msgstr "" + +#: ../../docstring aiogram.types.business_intro.BusinessIntro.message:1 of +msgid "*Optional*. Message text of the business intro" +msgstr "" + +#: ../../docstring aiogram.types.business_intro.BusinessIntro.sticker:1 of +msgid "*Optional*. Sticker of the business intro" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/business_location.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_location.po new file mode 100644 index 00000000..e5fb383e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_location.po @@ -0,0 +1,43 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/business_location.rst:3 +msgid "BusinessLocation" +msgstr "" + +#: aiogram.types.business_location.BusinessLocation:1 of +msgid "Contains information about the location of a Telegram Business account." +msgstr "" + +#: aiogram.types.business_location.BusinessLocation:3 of +msgid "Source: https://core.telegram.org/bots/api#businesslocation" +msgstr "" + +#: ../../docstring aiogram.types.business_location.BusinessLocation.address:1 +#: of +msgid "Address of the business" +msgstr "" + +#: ../../docstring aiogram.types.business_location.BusinessLocation.location:1 +#: of +msgid "*Optional*. Location of the business" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/business_messages_deleted.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_messages_deleted.po new file mode 100644 index 00000000..e0a1e981 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_messages_deleted.po @@ -0,0 +1,56 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/business_messages_deleted.rst:3 +msgid "BusinessMessagesDeleted" +msgstr "" + +#: aiogram.types.business_messages_deleted.BusinessMessagesDeleted:1 of +msgid "" +"This object is received when messages are deleted from a connected " +"business account." +msgstr "" + +#: aiogram.types.business_messages_deleted.BusinessMessagesDeleted:3 of +msgid "Source: https://core.telegram.org/bots/api#businessmessagesdeleted" +msgstr "" + +#: ../../docstring +#: aiogram.types.business_messages_deleted.BusinessMessagesDeleted.business_connection_id:1 +#: of +msgid "Unique identifier of the business connection" +msgstr "" + +#: ../../docstring +#: aiogram.types.business_messages_deleted.BusinessMessagesDeleted.chat:1 of +msgid "" +"Information about a chat in the business account. The bot may not have " +"access to the chat or the corresponding user." +msgstr "" + +#: ../../docstring +#: aiogram.types.business_messages_deleted.BusinessMessagesDeleted.message_ids:1 +#: of +msgid "" +"The list of identifiers of deleted messages in the chat of the business " +"account" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/business_opening_hours.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_opening_hours.po new file mode 100644 index 00000000..f28fc1d2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_opening_hours.po @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/business_opening_hours.rst:3 +msgid "BusinessOpeningHours" +msgstr "" + +#: aiogram.types.business_opening_hours.BusinessOpeningHours:1 of +msgid "Describes the opening hours of a business." +msgstr "" + +#: aiogram.types.business_opening_hours.BusinessOpeningHours:3 of +msgid "Source: https://core.telegram.org/bots/api#businessopeninghours" +msgstr "" + +#: ../../docstring +#: aiogram.types.business_opening_hours.BusinessOpeningHours.time_zone_name:1 +#: of +msgid "Unique name of the time zone for which the opening hours are defined" +msgstr "" + +#: ../../docstring +#: aiogram.types.business_opening_hours.BusinessOpeningHours.opening_hours:1 of +msgid "List of time intervals describing business opening hours" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/business_opening_hours_interval.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_opening_hours_interval.po new file mode 100644 index 00000000..37e19eb3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/business_opening_hours_interval.po @@ -0,0 +1,53 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/business_opening_hours_interval.rst:3 +msgid "BusinessOpeningHoursInterval" +msgstr "" + +#: aiogram.types.business_opening_hours_interval.BusinessOpeningHoursInterval:1 +#: of +msgid "Describes an interval of time during which a business is open." +msgstr "" + +#: aiogram.types.business_opening_hours_interval.BusinessOpeningHoursInterval:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#businessopeninghoursinterval" +msgstr "" + +#: ../../docstring +#: aiogram.types.business_opening_hours_interval.BusinessOpeningHoursInterval.opening_minute:1 +#: of +msgid "" +"The minute's sequence number in a week, starting on Monday, marking the " +"start of the time interval during which the business is open; 0 - 7 * 24 " +"* 60" +msgstr "" + +#: ../../docstring +#: aiogram.types.business_opening_hours_interval.BusinessOpeningHoursInterval.closing_minute:1 +#: of +msgid "" +"The minute's sequence number in a week, starting on Monday, marking the " +"end of the time interval during which the business is open; 0 - 8 * 24 * " +"60" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po index afa46ec2..b12fe62a 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -39,7 +39,9 @@ msgid "" msgstr "" #: ../../docstring aiogram.types.chat.Chat.type:1 of -msgid "Type of chat, can be either 'private', 'group', 'supergroup' or 'channel'" +msgid "" +"Type of the chat, can be either 'private', 'group', 'supergroup' or " +"'channel'" msgstr "" #: ../../docstring aiogram.types.chat.Chat.title:1 of @@ -67,10 +69,48 @@ msgid "" "in-groups>`_ enabled)" msgstr "" -#: ../../docstring aiogram.types.chat.Chat.photo:1 of +#: ../../docstring aiogram.types.chat.Chat.accent_color_id:1 of msgid "" -"*Optional*. Chat photo. Returned only in " -":class:`aiogram.methods.get_chat.GetChat`." +"*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`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.accent_color_id:3 +#: aiogram.types.chat.Chat.active_usernames:3 +#: aiogram.types.chat.Chat.available_reactions:3 +#: aiogram.types.chat.Chat.background_custom_emoji_id:3 +#: aiogram.types.chat.Chat.bio:3 aiogram.types.chat.Chat.birthdate:3 +#: aiogram.types.chat.Chat.business_intro:3 +#: aiogram.types.chat.Chat.business_location:3 +#: aiogram.types.chat.Chat.business_opening_hours:3 +#: aiogram.types.chat.Chat.can_set_sticker_set:3 +#: aiogram.types.chat.Chat.custom_emoji_sticker_set_name:3 +#: aiogram.types.chat.Chat.description:3 +#: aiogram.types.chat.Chat.emoji_status_custom_emoji_id:3 +#: aiogram.types.chat.Chat.emoji_status_expiration_date:3 +#: aiogram.types.chat.Chat.has_aggressive_anti_spam_enabled:3 +#: aiogram.types.chat.Chat.has_hidden_members:3 +#: aiogram.types.chat.Chat.has_private_forwards:3 +#: aiogram.types.chat.Chat.has_protected_content:3 +#: aiogram.types.chat.Chat.has_restricted_voice_and_video_messages:3 +#: aiogram.types.chat.Chat.has_visible_history:3 +#: aiogram.types.chat.Chat.invite_link:3 +#: aiogram.types.chat.Chat.join_by_request:3 +#: aiogram.types.chat.Chat.join_to_send_messages:3 +#: aiogram.types.chat.Chat.linked_chat_id:3 aiogram.types.chat.Chat.location:3 +#: aiogram.types.chat.Chat.message_auto_delete_time:3 +#: aiogram.types.chat.Chat.permissions:3 +#: aiogram.types.chat.Chat.personal_chat:3 aiogram.types.chat.Chat.photo:3 +#: aiogram.types.chat.Chat.pinned_message:3 +#: aiogram.types.chat.Chat.profile_accent_color_id:3 +#: aiogram.types.chat.Chat.profile_background_custom_emoji_id:3 +#: aiogram.types.chat.Chat.slow_mode_delay:3 +#: aiogram.types.chat.Chat.sticker_set_name:3 +#: aiogram.types.chat.Chat.unrestrict_boost_count:3 of +msgid "https://core.telegram.org/bots/api-changelog#may-6-2024" msgstr "" #: ../../docstring aiogram.types.chat.Chat.active_usernames:1 of @@ -89,15 +129,6 @@ msgid "" "Returned only in :class:`aiogram.methods.get_chat.GetChat`." msgstr "" -#: ../../docstring aiogram.types.chat.Chat.accent_color_id:1 of -msgid "" -"*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`." -msgstr "" - #: ../../docstring aiogram.types.chat.Chat.background_custom_emoji_id:1 of msgid "" "*Optional*. Custom emoji identifier of emoji chosen by the chat for the " @@ -105,22 +136,56 @@ msgid "" ":class:`aiogram.methods.get_chat.GetChat`." msgstr "" -#: ../../docstring aiogram.types.chat.Chat.profile_accent_color_id:1 of +#: ../../docstring aiogram.types.chat.Chat.bio:1 of msgid "" -"*Optional*. Identifier of the accent color for the chat's profile " -"background. See `profile accent colors " -"`_ for more " -"details. Returned only in :class:`aiogram.methods.get_chat.GetChat`." +"*Optional*. Bio of the other party in a private chat. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." msgstr "" -#: ../../docstring aiogram.types.chat.Chat.profile_background_custom_emoji_id:1 -#: of +#: ../../docstring aiogram.types.chat.Chat.birthdate:1 of msgid "" -"*Optional*. Custom emoji identifier of the emoji chosen by the chat for " -"its profile background. Returned only in " +"*Optional*. For private chats, the date of birth of the user. Returned " +"only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.business_intro:1 of +msgid "" +"*Optional*. For private chats with business accounts, the intro of the " +"business. Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.business_location:1 of +msgid "" +"*Optional*. For private chats with business accounts, the location of the" +" business. Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.business_opening_hours:1 of +msgid "" +"*Optional*. For private chats with business accounts, the opening hours " +"of the business. Returned only in " ":class:`aiogram.methods.get_chat.GetChat`." msgstr "" +#: ../../docstring aiogram.types.chat.Chat.can_set_sticker_set:1 of +msgid "" +"*Optional*. :code:`True`, if the bot can change the group sticker set. " +"Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.custom_emoji_sticker_set_name:1 of +msgid "" +"*Optional*. For supergroups, the name of the group's custom emoji sticker" +" set. Custom emoji from this set can be used by all users and bots in the" +" group. Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.description:1 of +msgid "" +"*Optional*. Description, for groups, supergroups and channel chats. " +"Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + #: ../../docstring aiogram.types.chat.Chat.emoji_status_custom_emoji_id:1 of msgid "" "*Optional*. Custom emoji identifier of the emoji status of the chat or " @@ -135,80 +200,6 @@ msgid "" ":class:`aiogram.methods.get_chat.GetChat`." msgstr "" -#: ../../docstring aiogram.types.chat.Chat.bio:1 of -msgid "" -"*Optional*. Bio of the other party in a private chat. Returned only in " -":class:`aiogram.methods.get_chat.GetChat`." -msgstr "" - -#: ../../docstring aiogram.types.chat.Chat.has_private_forwards:1 of -msgid "" -"*Optional*. :code:`True`, if privacy settings of the other party in the " -"private chat allows to use :code:`tg://user?id=` links only in " -"chats with the user. Returned only in " -":class:`aiogram.methods.get_chat.GetChat`." -msgstr "" - -#: ../../docstring -#: aiogram.types.chat.Chat.has_restricted_voice_and_video_messages:1 of -msgid "" -"*Optional*. :code:`True`, if the privacy settings of the other party " -"restrict sending voice and video note messages in the private chat. " -"Returned only in :class:`aiogram.methods.get_chat.GetChat`." -msgstr "" - -#: ../../docstring aiogram.types.chat.Chat.join_to_send_messages:1 of -msgid "" -"*Optional*. :code:`True`, if users need to join the supergroup before " -"they can send messages. Returned only in " -":class:`aiogram.methods.get_chat.GetChat`." -msgstr "" - -#: ../../docstring aiogram.types.chat.Chat.join_by_request:1 of -msgid "" -"*Optional*. :code:`True`, if all users directly joining the supergroup " -"need to be approved by supergroup administrators. Returned only in " -":class:`aiogram.methods.get_chat.GetChat`." -msgstr "" - -#: ../../docstring aiogram.types.chat.Chat.description:1 of -msgid "" -"*Optional*. Description, for groups, supergroups and channel chats. " -"Returned only in :class:`aiogram.methods.get_chat.GetChat`." -msgstr "" - -#: ../../docstring aiogram.types.chat.Chat.invite_link:1 of -msgid "" -"*Optional*. Primary invite link, for groups, supergroups and channel " -"chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`." -msgstr "" - -#: ../../docstring aiogram.types.chat.Chat.pinned_message:1 of -msgid "" -"*Optional*. The most recent pinned message (by sending date). Returned " -"only in :class:`aiogram.methods.get_chat.GetChat`." -msgstr "" - -#: ../../docstring aiogram.types.chat.Chat.permissions:1 of -msgid "" -"*Optional*. Default chat member permissions, for groups and supergroups. " -"Returned only in :class:`aiogram.methods.get_chat.GetChat`." -msgstr "" - -#: ../../docstring aiogram.types.chat.Chat.slow_mode_delay:1 of -msgid "" -"*Optional*. For supergroups, the minimum allowed delay between " -"consecutive messages sent by each unpriviledged user; in seconds. " -"Returned only in :class:`aiogram.methods.get_chat.GetChat`." -msgstr "" - -#: ../../docstring aiogram.types.chat.Chat.message_auto_delete_time:1 of -msgid "" -"*Optional*. The time after which all messages sent to the chat will be " -"automatically deleted; in seconds. Returned only in " -":class:`aiogram.methods.get_chat.GetChat`." -msgstr "" - #: ../../docstring aiogram.types.chat.Chat.has_aggressive_anti_spam_enabled:1 #: of msgid "" @@ -224,12 +215,28 @@ msgid "" ":class:`aiogram.methods.get_chat.GetChat`." msgstr "" +#: ../../docstring aiogram.types.chat.Chat.has_private_forwards:1 of +msgid "" +"*Optional*. :code:`True`, if privacy settings of the other party in the " +"private chat allows to use :code:`tg://user?id=` links only in " +"chats with the user. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + #: ../../docstring aiogram.types.chat.Chat.has_protected_content:1 of msgid "" "*Optional*. :code:`True`, if messages from the chat can't be forwarded to" " other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`." msgstr "" +#: ../../docstring +#: aiogram.types.chat.Chat.has_restricted_voice_and_video_messages:1 of +msgid "" +"*Optional*. :code:`True`, if the privacy settings of the other party " +"restrict sending voice and video note messages in the private chat. " +"Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + #: ../../docstring aiogram.types.chat.Chat.has_visible_history:1 of msgid "" "*Optional*. :code:`True`, if new chat members will have access to old " @@ -237,16 +244,24 @@ msgid "" ":class:`aiogram.methods.get_chat.GetChat`." msgstr "" -#: ../../docstring aiogram.types.chat.Chat.sticker_set_name:1 of +#: ../../docstring aiogram.types.chat.Chat.invite_link:1 of msgid "" -"*Optional*. For supergroups, name of group sticker set. Returned only in " +"*Optional*. Primary invite link, for groups, supergroups and channel " +"chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.join_by_request:1 of +msgid "" +"*Optional*. :code:`True`, if all users directly joining the supergroup " +"need to be approved by supergroup administrators. Returned only in " ":class:`aiogram.methods.get_chat.GetChat`." msgstr "" -#: ../../docstring aiogram.types.chat.Chat.can_set_sticker_set:1 of +#: ../../docstring aiogram.types.chat.Chat.join_to_send_messages:1 of msgid "" -"*Optional*. :code:`True`, if the bot can change the group sticker set. " -"Returned only in :class:`aiogram.methods.get_chat.GetChat`." +"*Optional*. :code:`True`, if users need to join the supergroup before " +"they can send messages. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." msgstr "" #: ../../docstring aiogram.types.chat.Chat.linked_chat_id:1 of @@ -266,6 +281,73 @@ msgid "" "connected. Returned only in :class:`aiogram.methods.get_chat.GetChat`." msgstr "" +#: ../../docstring aiogram.types.chat.Chat.message_auto_delete_time:1 of +msgid "" +"*Optional*. The time after which all messages sent to the chat will be " +"automatically deleted; in seconds. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.permissions:1 of +msgid "" +"*Optional*. Default chat member permissions, for groups and supergroups. " +"Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.personal_chat:1 of +msgid "" +"*Optional*. For private chats, the personal channel of the user. Returned" +" only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.photo:1 of +msgid "" +"*Optional*. Chat photo. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.pinned_message:1 of +msgid "" +"*Optional*. The most recent pinned message (by sending date). Returned " +"only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.profile_accent_color_id:1 of +msgid "" +"*Optional*. Identifier of the accent color for the chat's profile " +"background. See `profile accent colors " +"`_ for more " +"details. Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.profile_background_custom_emoji_id:1 +#: of +msgid "" +"*Optional*. Custom emoji identifier of the emoji chosen by the chat for " +"its profile background. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.slow_mode_delay:1 of +msgid "" +"*Optional*. For supergroups, the minimum allowed delay between " +"consecutive messages sent by each unprivileged user; in seconds. Returned" +" only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.sticker_set_name:1 of +msgid "" +"*Optional*. For supergroups, name of group sticker set. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.unrestrict_boost_count:1 of +msgid "" +"*Optional*. For supergroups, the minimum number of boosts that a non-" +"administrator user needs to add in order to ignore slow mode and chat " +"permissions. Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + #: aiogram.types.chat.Chat.shifted_id:1 of msgid "" "Returns shifted chat ID (positive and without \"-100\" prefix). Mostly " @@ -339,18 +421,7 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#banchatsenderchat" msgstr "" -#: aiogram.types.chat.Chat.ban aiogram.types.chat.Chat.ban_sender_chat -#: aiogram.types.chat.Chat.create_invite_link -#: aiogram.types.chat.Chat.delete_message aiogram.types.chat.Chat.do -#: aiogram.types.chat.Chat.edit_invite_link aiogram.types.chat.Chat.get_member -#: aiogram.types.chat.Chat.pin_message aiogram.types.chat.Chat.promote -#: aiogram.types.chat.Chat.restrict aiogram.types.chat.Chat.revoke_invite_link -#: aiogram.types.chat.Chat.set_administrator_custom_title -#: aiogram.types.chat.Chat.set_description -#: aiogram.types.chat.Chat.set_permissions aiogram.types.chat.Chat.set_photo -#: aiogram.types.chat.Chat.set_sticker_set aiogram.types.chat.Chat.set_title -#: aiogram.types.chat.Chat.unban aiogram.types.chat.Chat.unban_sender_chat -#: aiogram.types.chat.Chat.unpin_message of +#: ../../api/types/chat.rst msgid "Parameters" msgstr "" @@ -359,25 +430,7 @@ msgstr "" msgid "Unique identifier of the target sender chat" msgstr "" -#: aiogram.types.chat.Chat.ban aiogram.types.chat.Chat.ban_sender_chat -#: aiogram.types.chat.Chat.create_invite_link -#: aiogram.types.chat.Chat.delete_message aiogram.types.chat.Chat.delete_photo -#: aiogram.types.chat.Chat.delete_sticker_set aiogram.types.chat.Chat.do -#: aiogram.types.chat.Chat.edit_invite_link -#: aiogram.types.chat.Chat.export_invite_link -#: aiogram.types.chat.Chat.get_administrators -#: aiogram.types.chat.Chat.get_member aiogram.types.chat.Chat.get_member_count -#: aiogram.types.chat.Chat.leave aiogram.types.chat.Chat.pin_message -#: aiogram.types.chat.Chat.promote aiogram.types.chat.Chat.restrict -#: aiogram.types.chat.Chat.revoke_invite_link -#: aiogram.types.chat.Chat.set_administrator_custom_title -#: aiogram.types.chat.Chat.set_description -#: aiogram.types.chat.Chat.set_permissions aiogram.types.chat.Chat.set_photo -#: aiogram.types.chat.Chat.set_sticker_set aiogram.types.chat.Chat.set_title -#: aiogram.types.chat.Chat.unban aiogram.types.chat.Chat.unban_sender_chat -#: aiogram.types.chat.Chat.unpin_all_general_forum_topic_messages -#: aiogram.types.chat.Chat.unpin_all_messages -#: aiogram.types.chat.Chat.unpin_message of +#: ../../api/types/chat.rst msgid "Returns" msgstr "" @@ -712,10 +765,16 @@ msgid "" msgstr "" #: aiogram.types.chat.Chat.do:15 of -msgid "Unique identifier for the target message thread; supergroups only" +msgid "" +"Unique identifier of the business connection on behalf of which the " +"action will be sent" msgstr "" #: aiogram.types.chat.Chat.do:16 of +msgid "Unique identifier for the target message thread; for supergroups only" +msgstr "" + +#: aiogram.types.chat.Chat.do:17 of msgid "" "instance of method " ":class:`aiogram.methods.send_chat_action.SendChatAction`" @@ -901,12 +960,19 @@ msgstr "" #: aiogram.types.chat.Chat.unpin_message:10 of msgid "" -"Identifier of a message to unpin. If not specified, the most recent " -"pinned message (by sending date) will be unpinned." +"Unique identifier of the business connection on behalf of which the " +"message will be unpinned" msgstr "" #: aiogram.types.chat.Chat.unpin_message:11 of msgid "" +"Identifier of the message to unpin. Required if *business_connection_id* " +"is specified. If not specified, the most recent pinned message (by " +"sending date) will be unpinned." +msgstr "" + +#: aiogram.types.chat.Chat.unpin_message:12 of +msgid "" "instance of method " ":class:`aiogram.methods.unpin_chat_message.UnpinChatMessage`" msgstr "" @@ -937,12 +1003,18 @@ msgstr "" #: aiogram.types.chat.Chat.pin_message:11 of msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be pinned" +msgstr "" + +#: aiogram.types.chat.Chat.pin_message:12 of +msgid "" "Pass :code:`True` if it is not necessary to send a notification to all " "chat members about the new pinned message. Notifications are always " "disabled in channels and private chats." msgstr "" -#: aiogram.types.chat.Chat.pin_message:12 of +#: aiogram.types.chat.Chat.pin_message:13 of msgid "" "instance of method " ":class:`aiogram.methods.pin_chat_message.PinChatMessage`" @@ -1043,10 +1115,10 @@ msgstr "" #: aiogram.types.chat.Chat.promote:12 of msgid "" -"Pass :code:`True` if the administrator can access the chat event log, " -"boost list in channels, see channel members, report spam messages, see " -"anonymous administrators in supergroups and ignore slow mode. Implied by " -"any other administrator privilege" +"Pass :code:`True` if the administrator can access the chat event log, get" +" boost list, see hidden supergroup and channel members, report spam " +"messages and ignore slow mode. Implied by any other administrator " +"privilege." msgstr "" #: aiogram.types.chat.Chat.promote:13 of @@ -1082,43 +1154,44 @@ msgid "Pass :code:`True` if the administrator can invite new users to the chat" msgstr "" #: aiogram.types.chat.Chat.promote:19 of -msgid "" -"Pass :code:`True` if the administrator can post messages in the channel, " -"or access channel statistics; channels only" +msgid "Pass :code:`True` if the administrator can post stories to the chat" msgstr "" #: aiogram.types.chat.Chat.promote:20 of msgid "" -"Pass :code:`True` if the administrator can edit messages of other users " -"and can pin messages; channels only" +"Pass :code:`True` if the administrator can edit stories posted by other " +"users, post stories to the chat page, pin chat stories, and access the " +"chat's story archive" msgstr "" #: aiogram.types.chat.Chat.promote:21 of -msgid "Pass :code:`True` if the administrator can pin messages, supergroups only" +msgid "" +"Pass :code:`True` if the administrator can delete stories posted by other" +" users" msgstr "" #: aiogram.types.chat.Chat.promote:22 of msgid "" -"Pass :code:`True` if the administrator can post stories in the channel; " -"channels only" +"Pass :code:`True` if the administrator can post messages in the channel, " +"or access channel statistics; for channels only" msgstr "" #: aiogram.types.chat.Chat.promote:23 of msgid "" -"Pass :code:`True` if the administrator can edit stories posted by other " -"users; channels only" +"Pass :code:`True` if the administrator can edit messages of other users " +"and can pin messages; for channels only" msgstr "" #: aiogram.types.chat.Chat.promote:24 of msgid "" -"Pass :code:`True` if the administrator can delete stories posted by other" -" users; channels only" +"Pass :code:`True` if the administrator can pin messages; for supergroups " +"only" msgstr "" #: aiogram.types.chat.Chat.promote:25 of msgid "" "Pass :code:`True` if the user is allowed to create, rename, close, and " -"reopen forum topics, supergroups only" +"reopen forum topics; for supergroups only" msgstr "" #: aiogram.types.chat.Chat.promote:26 of @@ -1457,3 +1530,78 @@ msgstr "" #~ "any. Returned only in " #~ ":class:`aiogram.methods.get_chat.GetChat`." #~ msgstr "" + +#~ msgid "" +#~ "Type of chat, can be either " +#~ "'private', 'group', 'supergroup' or 'channel'" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. For supergroups, the minimum " +#~ "allowed delay between consecutive messages " +#~ "sent by each unpriviledged user; in " +#~ "seconds. Returned only in " +#~ ":class:`aiogram.methods.get_chat.GetChat`." +#~ msgstr "" + +#~ msgid "Unique identifier for the target message thread; supergroups only" +#~ msgstr "" + +#~ msgid "" +#~ "Identifier of a message to unpin. " +#~ "If not specified, the most recent " +#~ "pinned message (by sending date) will" +#~ " be unpinned." +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can access the chat event log, " +#~ "boost list in channels, see channel " +#~ "members, report spam messages, see " +#~ "anonymous administrators in supergroups and" +#~ " ignore slow mode. Implied by any " +#~ "other administrator privilege" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can post messages in the channel, " +#~ "or access channel statistics; channels " +#~ "only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can edit messages of other users " +#~ "and can pin messages; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can pin messages, supergroups only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can post stories in the channel; " +#~ "channels only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can edit stories posted by other " +#~ "users; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the administrator " +#~ "can delete stories posted by other " +#~ "users; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the user is " +#~ "allowed to create, rename, close, and" +#~ " reopen forum topics, supergroups only" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_administrator_rights.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_administrator_rights.po index 2ddb6393..c20f2860 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_administrator_rights.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_administrator_rights.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-29 02:16+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -39,10 +39,10 @@ msgstr "" #: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_manage_chat:1 #: of msgid "" -":code:`True`, if the administrator can access the chat event log, boost " -"list in channels, see channel members, report spam messages, see " -"anonymous administrators in supergroups and ignore slow mode. Implied by " -"any other administrator privilege" +":code:`True`, if the administrator can access the chat event log, get " +"boost list, see hidden supergroup and channel members, report spam " +"messages and ignore slow mode. Implied by any other administrator " +"privilege." msgstr "" #: ../../docstring @@ -89,12 +89,35 @@ msgstr "" msgid ":code:`True`, if the user is allowed to invite new users to the chat" msgstr "" +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_post_stories:1 +#: of +msgid ":code:`True`, if the administrator can post stories to the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_edit_stories:1 +#: of +msgid "" +":code:`True`, if the administrator can edit stories posted by other " +"users, post stories to the chat page, pin chat stories, and access the " +"chat's story archive" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_delete_stories:1 +#: of +msgid "" +":code:`True`, if the administrator can delete stories posted by other " +"users" +msgstr "" + #: ../../docstring #: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_post_messages:1 #: of msgid "" "*Optional*. :code:`True`, if the administrator can post messages in the " -"channel, or access channel statistics; channels only" +"channel, or access channel statistics; for channels only" msgstr "" #: ../../docstring @@ -102,39 +125,15 @@ msgstr "" #: of msgid "" "*Optional*. :code:`True`, if the administrator can edit messages of other" -" users and can pin messages; channels only" +" users and can pin messages; for channels only" msgstr "" #: ../../docstring #: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_pin_messages:1 #: of msgid "" -"*Optional*. :code:`True`, if the user is allowed to pin messages; groups " -"and supergroups only" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_post_stories:1 -#: of -msgid "" -"*Optional*. :code:`True`, if the administrator can post stories in the " -"channel; channels only" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_edit_stories:1 -#: of -msgid "" -"*Optional*. :code:`True`, if the administrator can edit stories posted by" -" other users; channels only" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_administrator_rights.ChatAdministratorRights.can_delete_stories:1 -#: of -msgid "" -"*Optional*. :code:`True`, if the administrator can delete stories posted " -"by other users; channels only" +"*Optional*. :code:`True`, if the user is allowed to pin messages; for " +"groups and supergroups only" msgstr "" #: ../../docstring @@ -142,7 +141,7 @@ msgstr "" #: of msgid "" "*Optional*. :code:`True`, if the user is allowed to create, rename, " -"close, and reopen forum topics; supergroups only" +"close, and reopen forum topics; for supergroups only" msgstr "" #~ msgid "" @@ -198,3 +197,57 @@ msgstr "" #~ " can delete stories posted by other" #~ " users" #~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the administrator can " +#~ "access the chat event log, boost " +#~ "list in channels, see channel members," +#~ " report spam messages, see anonymous " +#~ "administrators in supergroups and ignore " +#~ "slow mode. Implied by any other " +#~ "administrator privilege" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can post messages in the channel," +#~ " or access channel statistics; channels " +#~ "only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can edit messages of other users " +#~ "and can pin messages; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to pin messages; groups and" +#~ " supergroups only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can post stories in the channel; " +#~ "channels only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can edit stories posted by other " +#~ "users; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can delete stories posted by other" +#~ " users; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to create, rename, close, " +#~ "and reopen forum topics; supergroups " +#~ "only" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_background.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_background.po new file mode 100644 index 00000000..67fb78e8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_background.po @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/chat_background.rst:3 +msgid "ChatBackground" +msgstr "" + +#: aiogram.types.chat_background.ChatBackground:1 of +msgid "This object represents a chat background." +msgstr "" + +#: aiogram.types.chat_background.ChatBackground:3 of +msgid "Source: https://core.telegram.org/bots/api#chatbackground" +msgstr "" + +#: ../../docstring aiogram.types.chat_background.ChatBackground.type:1 of +msgid "Type of the background" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_added.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_added.po index 7f121477..49a5920d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_added.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_added.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -23,3 +23,16 @@ msgstr "" #: ../../api/types/chat_boost_added.rst:3 msgid "ChatBoostAdded" msgstr "" + +#: aiogram.types.chat_boost_added.ChatBoostAdded:1 of +msgid "This object represents a service message about a user boosting a chat." +msgstr "" + +#: aiogram.types.chat_boost_added.ChatBoostAdded:3 of +msgid "Source: https://core.telegram.org/bots/api#chatboostadded" +msgstr "" + +#: ../../docstring aiogram.types.chat_boost_added.ChatBoostAdded.boost_count:1 +#: of +msgid "Number of boosts added by the user" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source_giveaway.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source_giveaway.po index 9072670a..8b6784b9 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source_giveaway.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_source_giveaway.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -26,9 +26,11 @@ msgstr "" #: aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway:1 of msgid "" -"The boost was obtained by the creation of a Telegram Premium giveaway. " -"This boosts the chat 4 times for the duration of the corresponding " -"Telegram Premium subscription." +"The boost was obtained by the creation of a Telegram Premium or a " +"Telegram Star giveaway. This boosts the chat 4 times for the duration of " +"the corresponding Telegram Premium subscription for Telegram Premium " +"giveaways and *prize_star_count* / 500 times for one year for Telegram " +"Star giveaways." msgstr "" #: aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway:3 of @@ -50,7 +52,17 @@ msgstr "" #: ../../docstring #: aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway.user:1 of -msgid "*Optional*. User that won the prize in the giveaway if any" +msgid "" +"*Optional*. User that won the prize in the giveaway if any; for Telegram " +"Premium giveaways only" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway.prize_star_count:1 +#: of +msgid "" +"*Optional*. The number of Telegram Stars to be split between giveaway " +"winners; for Telegram Star giveaways only" msgstr "" #: ../../docstring @@ -60,3 +72,14 @@ msgid "" "*Optional*. True, if the giveaway was completed, but there was no user to" " win the prize" msgstr "" + +#~ msgid "" +#~ "The boost was obtained by the " +#~ "creation of a Telegram Premium giveaway." +#~ " This boosts the chat 4 times " +#~ "for the duration of the corresponding" +#~ " Telegram Premium subscription." +#~ msgstr "" + +#~ msgid "*Optional*. User that won the prize in the giveaway if any" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_updated.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_updated.po index 4ff2e4cd..570bf8c2 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_updated.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_boost_updated.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -37,5 +37,8 @@ msgid "Chat which was boosted" msgstr "" #: ../../docstring aiogram.types.chat_boost_updated.ChatBoostUpdated.boost:1 of -msgid "Infomation about the chat boost" +msgid "Information about the chat boost" msgstr "" + +#~ msgid "Infomation about the chat boost" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_full_info.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_full_info.po new file mode 100644 index 00000000..fdecd584 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_full_info.po @@ -0,0 +1,322 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/chat_full_info.rst:3 +msgid "ChatFullInfo" +msgstr "" + +#: aiogram.types.chat_full_info.ChatFullInfo:1 of +msgid "This object contains full information about a chat." +msgstr "" + +#: aiogram.types.chat_full_info.ChatFullInfo:3 of +msgid "Source: https://core.telegram.org/bots/api#chatfullinfo" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.id:1 of +msgid "" +"Unique identifier for this chat. 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." +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.type:1 of +msgid "" +"Type of the chat, can be either 'private', 'group', 'supergroup' or " +"'channel'" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.accent_color_id:1 +#: of +msgid "" +"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." +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.max_reaction_count:1 of +msgid "The maximum number of reactions that can be set on a message in the chat" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.title:1 of +msgid "*Optional*. Title, for supergroups, channels and group chats" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.username:1 of +msgid "" +"*Optional*. Username, for private chats, supergroups and channels if " +"available" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.first_name:1 of +msgid "*Optional*. First name of the other party in a private chat" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.last_name:1 of +msgid "*Optional*. Last name of the other party in a private chat" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.is_forum:1 of +msgid "" +"*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics " +"`_ enabled)" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.photo:1 of +msgid "*Optional*. Chat photo" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.active_usernames:1 +#: of +msgid "" +"*Optional*. If non-empty, the list of all `active chat usernames " +"`_; for private chats, supergroups and channels" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.birthdate:1 of +msgid "*Optional*. For private chats, the date of birth of the user" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.business_intro:1 +#: of +msgid "" +"*Optional*. For private chats with business accounts, the intro of the " +"business" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.business_location:1 of +msgid "" +"*Optional*. For private chats with business accounts, the location of the" +" business" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.business_opening_hours:1 of +msgid "" +"*Optional*. For private chats with business accounts, the opening hours " +"of the business" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.personal_chat:1 of +msgid "*Optional*. For private chats, the personal channel of the user" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.available_reactions:1 of +msgid "" +"*Optional*. List of available reactions allowed in the chat. If omitted, " +"then all `emoji reactions " +"`_ are allowed." +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.background_custom_emoji_id:1 of +msgid "" +"*Optional*. Custom emoji identifier of the emoji chosen by the chat for " +"the reply header and link preview background" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.profile_accent_color_id:1 of +msgid "" +"*Optional*. Identifier of the accent color for the chat's profile " +"background. See `profile accent colors " +"`_ for more " +"details." +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.profile_background_custom_emoji_id:1 +#: of +msgid "" +"*Optional*. Custom emoji identifier of the emoji chosen by the chat for " +"its profile background" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.emoji_status_custom_emoji_id:1 of +msgid "" +"*Optional*. Custom emoji identifier of the emoji status of the chat or " +"the other party in a private chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.emoji_status_expiration_date:1 of +msgid "" +"*Optional*. Expiration date of the emoji status of the chat or the other " +"party in a private chat, in Unix time, if any" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.bio:1 of +msgid "*Optional*. Bio of the other party in a private chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.has_private_forwards:1 of +msgid "" +"*Optional*. :code:`True`, if privacy settings of the other party in the " +"private chat allows to use :code:`tg://user?id=` links only in " +"chats with the user" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.has_restricted_voice_and_video_messages:1 +#: of +msgid "" +"*Optional*. :code:`True`, if the privacy settings of the other party " +"restrict sending voice and video note messages in the private chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.join_to_send_messages:1 of +msgid "" +"*Optional*. :code:`True`, if users need to join the supergroup before " +"they can send messages" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.join_by_request:1 +#: of +msgid "" +"*Optional*. :code:`True`, if all users directly joining the supergroup " +"without using an invite link need to be approved by supergroup " +"administrators" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.description:1 of +msgid "*Optional*. Description, for groups, supergroups and channel chats" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.invite_link:1 of +msgid "*Optional*. Primary invite link, for groups, supergroups and channel chats" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.pinned_message:1 +#: of +msgid "*Optional*. The most recent pinned message (by sending date)" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.permissions:1 of +msgid "*Optional*. Default chat member permissions, for groups and supergroups" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.can_send_gift:1 of +msgid "*Optional*. :code:`True`, if gifts can be sent to the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.can_send_paid_media:1 of +msgid "" +"*Optional*. :code:`True`, if paid media messages can be sent or forwarded" +" to the channel chat. The field is available only for channel chats." +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.slow_mode_delay:1 +#: of +msgid "" +"*Optional*. For supergroups, the minimum allowed delay between " +"consecutive messages sent by each unprivileged user; in seconds" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.unrestrict_boost_count:1 of +msgid "" +"*Optional*. For supergroups, the minimum number of boosts that a non-" +"administrator user needs to add in order to ignore slow mode and chat " +"permissions" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.message_auto_delete_time:1 of +msgid "" +"*Optional*. The time after which all messages sent to the chat will be " +"automatically deleted; in seconds" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.has_aggressive_anti_spam_enabled:1 +#: of +msgid "" +"*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in " +"the supergroup. The field is only available to chat administrators." +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.has_hidden_members:1 of +msgid "" +"*Optional*. :code:`True`, if non-administrators can only get the list of " +"bots and administrators in the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.has_protected_content:1 of +msgid "" +"*Optional*. :code:`True`, if messages from the chat can't be forwarded to" +" other chats" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.has_visible_history:1 of +msgid "" +"*Optional*. :code:`True`, if new chat members will have access to old " +"messages; available only to chat administrators" +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.sticker_set_name:1 +#: of +msgid "*Optional*. For supergroups, name of the group sticker set" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.can_set_sticker_set:1 of +msgid "*Optional*. :code:`True`, if the bot can change the group sticker set" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_full_info.ChatFullInfo.custom_emoji_sticker_set_name:1 of +msgid "" +"*Optional*. For supergroups, the name of the group's custom emoji sticker" +" set. Custom emoji from this set can be used by all users and bots in the" +" group." +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.linked_chat_id:1 +#: of +msgid "" +"*Optional*. Unique identifier for the linked chat, i.e. the discussion " +"group identifier for a channel and vice versa; for supergroups and " +"channel chats. This identifier may be greater than 32 bits and some " +"programming languages may have difficulty/silent defects in interpreting " +"it. But it is smaller than 52 bits, so a signed 64 bit integer or double-" +"precision float type are safe for storing this identifier." +msgstr "" + +#: ../../docstring aiogram.types.chat_full_info.ChatFullInfo.location:1 of +msgid "" +"*Optional*. For supergroups, the location to which the supergroup is " +"connected" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_invite_link.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_invite_link.po index 15c1a9e0..3d3d05e4 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_invite_link.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_invite_link.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/chat_invite_link.rst:3 msgid "ChatInviteLink" @@ -80,3 +80,18 @@ msgstr "" #: of msgid "*Optional*. Number of pending join requests created using this link" msgstr "" + +#: ../../docstring +#: aiogram.types.chat_invite_link.ChatInviteLink.subscription_period:1 of +msgid "" +"*Optional*. The number of seconds the subscription will be active for " +"before the next payment" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_invite_link.ChatInviteLink.subscription_price:1 of +msgid "" +"*Optional*. The amount of Telegram Stars a user must pay initially and " +"after each subsequent subscription period to be a member of the chat " +"using the link" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_join_request.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_join_request.po index 58499cd0..14043885 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_join_request.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_join_request.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -127,42 +127,7 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#approvechatjoinrequest" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.approve -#: aiogram.types.chat_join_request.ChatJoinRequest.decline of +#: ../../api/types/chat_join_request.rst msgid "Returns" msgstr "" @@ -215,40 +180,7 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#sendmessage" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm of +#: ../../api/types/chat_join_request.rst msgid "Parameters" msgstr "" @@ -270,8 +202,6 @@ msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:11 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:11 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:11 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:16 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:12 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:12 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:11 @@ -292,140 +222,142 @@ msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:11 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:11 of msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:11 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:12 of +msgid "" "Unique identifier for the target message thread (topic) of the forum; for" " forum supergroups only" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:12 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:13 of msgid "" "Mode for parsing entities in the message text. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:13 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:14 of msgid "" "A JSON-serialized list of special entities that appear in message text, " "which can be specified instead of *parse_mode*" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:14 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:15 of msgid "Link preview generation options for the message" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:13 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:32 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:32 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:23 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:23 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:16 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:17 of msgid "" "Sends the message `silently `_. Users will receive a notification with no sound." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:33 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:33 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:24 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:24 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:22 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:22 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:17 of -msgid "Protects the contents of the sent message from forwarding and saving" -msgstr "" - #: aiogram.types.chat_join_request.ChatJoinRequest.answer:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:22 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:23 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:22 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:22 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:17 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:14 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:19 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:19 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:14 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:34 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:34 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:33 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:33 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:19 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:19 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:25 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:27 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:27 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:15 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:15 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:21 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:26 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:17 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:26 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:18 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:18 of -msgid "Description of the message to reply to" +msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:23 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:24 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:23 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:23 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:18 @@ -434,34 +366,40 @@ msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:15 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:20 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:34 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:34 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:20 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:20 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:26 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:28 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:28 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:16 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:16 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:22 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:22 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:27 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:18 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:27 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:19 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:19 of msgid "" -"Additional interface options. A JSON-serialized object for an `inline " -"keyboard `_, " -"`custom reply keyboard " -"`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"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" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:24 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:25 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:24 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:24 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:19 @@ -472,40 +410,35 @@ msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:21 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:16 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:36 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:36 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:35 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:35 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:21 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:21 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:27 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:27 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:29 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:29 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:17 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:17 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:23 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:23 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:28 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:19 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:28 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:20 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:20 of msgid "" -"Pass :code:`True` if the message should be sent even if the specified " -"replied-to message is not found" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:20 of -msgid "Disables link previews for links in this message" -msgstr "" - -#: aiogram.types.chat_join_request.ChatJoinRequest.answer:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:25 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:26 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:25 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:25 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:20 @@ -516,30 +449,147 @@ msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:22 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:17 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:37 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:37 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:36 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:36 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:22 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:22 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:28 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:28 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:30 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:30 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:18 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:18 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:24 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:24 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:29 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:20 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:29 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:21 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:21 of -msgid "If the message is a reply, ID of the original message" +msgid "Description of the message to reply to" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:27 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:27 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:31 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:31 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:30 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:30 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:22 of +msgid "" +"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" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer:22 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:22 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:28 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:28 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:27 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:27 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:38 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:38 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:32 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:32 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:31 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:31 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:23 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:23 of +msgid "Disables link previews for links in this message" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:29 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:29 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:28 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:28 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:39 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:39 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:33 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:33 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:27 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:27 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:32 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:32 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:24 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_pm:25 of msgid "instance of method :class:`aiogram.methods.send_message.SendMessage`" msgstr "" @@ -575,31 +625,31 @@ msgid "" "Sending Files » `" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:12 of -msgid "Duration of sent animation in seconds" -msgstr "" - #: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:13 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:13 of -msgid "Animation width" +msgid "Duration of sent animation in seconds" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:14 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:14 of -msgid "Animation height" +msgid "Animation width" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:15 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:15 of +msgid "Animation height" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:16 of msgid "" "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" @@ -611,47 +661,56 @@ msgid "" "information on Sending Files » `" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:16 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:17 of msgid "" "Animation caption (may also be used when resending animation by " "*file_id*), 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:17 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:18 of msgid "" "Mode for parsing entities in the animation caption. See `formatting " "options `_ for " "more details." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:14 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:15 of msgid "" "A JSON-serialized list of special entities that appear in the caption, " "which can be specified instead of *parse_mode*" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:19 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:22 of +msgid "Pass :code:`True`, if the caption must be shown above the message media" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:21 of msgid "" "Pass :code:`True` if the animation needs to be covered with a spoiler " "animation" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:26 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:26 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation:30 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_animation_pm:30 of msgid "instance of method :class:`aiogram.methods.send_animation.SendAnimation`" msgstr "" @@ -688,36 +747,36 @@ msgid "" "Files » `" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:13 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:14 of msgid "Audio caption, 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:14 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:15 of msgid "" "Mode for parsing entities in the audio caption. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:16 of -msgid "Duration of the audio in seconds" -msgstr "" - #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:17 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:17 of -msgid "Performer" +msgid "Duration of the audio in seconds" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:18 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:18 of +msgid "Performer" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:19 of msgid "Track name" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:26 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:26 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio:29 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_audio_pm:29 of msgid "instance of method :class:`aiogram.methods.send_audio.SendAudio`" msgstr "" @@ -750,20 +809,20 @@ msgstr "" msgid "Contact's first name" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:13 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:14 of msgid "Contact's last name" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:14 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:15 of msgid "" "Additional data about the contact in the form of a `vCard " "`_, 0-2048 bytes" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:21 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_contact_pm:24 of msgid "instance of method :class:`aiogram.methods.send_contact.SendContact`" msgstr "" @@ -797,30 +856,30 @@ msgid "" "/form-data. :ref:`More information on Sending Files » `" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:13 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:14 of msgid "" "Document caption (may also be used when resending documents by " "*file_id*), 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:14 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:14 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:15 of msgid "" "Mode for parsing entities in the document caption. See `formatting " "options `_ for " "more details." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:16 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:17 of msgid "" "Disables automatic server-side content type detection for files uploaded " "using multipart/form-data" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:23 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:23 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_document_pm:26 of msgid "instance of method :class:`aiogram.methods.send_document.SendDocument`" msgstr "" @@ -850,8 +909,8 @@ msgid "" " up your games via `@BotFather `_." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:15 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:18 of msgid "" "A JSON-serialized object for an `inline keyboard " "`_. If empty, " @@ -859,8 +918,8 @@ msgid "" "button must launch the game." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:18 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_game_pm:21 of msgid "instance of method :class:`aiogram.methods.send_game.SendGame`" msgstr "" @@ -897,28 +956,32 @@ msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:12 of msgid "" "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to " -"the user, use for your internal processes." +"the user, use it for your internal processes." msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:13 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:13 of msgid "" -"Payment provider token, obtained via `@BotFather " -"`_" +"Three-letter ISO 4217 currency code, see `more on currencies " +"`_. Pass " +"'XTR' for payments in `Telegram Stars `_." msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:14 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:14 of msgid "" -"Three-letter ISO 4217 currency code, see `more on currencies " -"`_" +"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 " +"`_." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:15 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:16 of msgid "" -"Price breakdown, a JSON-serialized list of components (e.g. product " -"price, tax, discount, delivery cost, delivery tax, bonus, etc.)" +"Payment provider token, obtained via `@BotFather " +"`_. Pass an empty string for payments in " +"`Telegram Stars `_." msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:17 @@ -930,7 +993,8 @@ msgid "" "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" +"majority of currencies). Defaults to 0. Not supported for payments in " +"`Telegram Stars `_." msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:18 @@ -989,47 +1053,59 @@ msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:25 of msgid "" "Pass :code:`True` if you require the user's full name to complete the " -"order" +"order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:26 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:26 of msgid "" "Pass :code:`True` if you require the user's phone number to complete the " -"order" +"order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:27 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:27 of msgid "" "Pass :code:`True` if you require the user's email address to complete the" -" order" +" order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:28 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:28 of msgid "" "Pass :code:`True` if you require the user's shipping address to complete " -"the order" +"the order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:29 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:29 of -msgid "Pass :code:`True` if the user's phone number should be sent to provider" +msgid "" +"Pass :code:`True` if the user's phone number should be sent to the " +"provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:30 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:30 of -msgid "Pass :code:`True` if the user's email address should be sent to provider" +msgid "" +"Pass :code:`True` if the user's email address should be sent to the " +"provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:31 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:31 of -msgid "Pass :code:`True` if the final price depends on the shipping method" +msgid "" +"Pass :code:`True` if the final price depends on the shipping method. " +"Ignored for payments in `Telegram Stars `_." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:35 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:35 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:37 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:37 of msgid "" "A JSON-serialized object for an `inline keyboard " "`_. If empty, " @@ -1037,8 +1113,8 @@ msgid "" "first button must be a Pay button." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:38 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:38 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice:40 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_invoice_pm:40 of msgid "instance of method :class:`aiogram.methods.send_invoice.SendInvoice`" msgstr "" @@ -1071,36 +1147,37 @@ msgstr "" msgid "Longitude of the location" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:13 of -msgid "The radius of uncertainty for the location, measured in meters; 0-1500" -msgstr "" - #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:14 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:14 of -msgid "" -"Period in seconds for which the location will be updated (see `Live " -"Locations `_, should be between" -" 60 and 86400." +msgid "The radius of uncertainty for the location, measured in meters; 0-1500" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:15 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:15 of msgid "" -"For live locations, a direction in which the user is moving, in degrees. " -"Must be between 1 and 360 if specified." +"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." msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:16 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:16 of msgid "" +"For live locations, a direction in which the user is moving, in degrees. " +"Must be between 1 and 360 if specified." +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:17 of +msgid "" "For live locations, a maximum distance for proximity alerts about " "approaching another chat member, in meters. Must be between 1 and 100000 " "if specified." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:23 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:23 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_location_pm:26 of msgid "instance of method :class:`aiogram.methods.send_location.SendLocation`" msgstr "" @@ -1134,25 +1211,25 @@ msgid "" " items" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:12 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:13 of msgid "" "Sends messages `silently `_. Users will receive a notification with no sound." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:13 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:14 of msgid "Protects the contents of the sent messages from forwarding and saving" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:16 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:19 of msgid "If the messages are a reply, ID of the original message" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:17 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_media_group_pm:20 of msgid "" "instance of method " ":class:`aiogram.methods.send_media_group.SendMediaGroup`" @@ -1189,30 +1266,30 @@ msgid "" "files>`" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:12 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:13 of msgid "" "Photo caption (may also be used when resending photos by *file_id*), " "0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:13 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:14 of msgid "" "Mode for parsing entities in the photo caption. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:15 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:17 of msgid "" "Pass :code:`True` if the photo needs to be covered with a spoiler " "animation" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:22 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:22 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo:26 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_photo_pm:26 of msgid "instance of method :class:`aiogram.methods.send_photo.SendPhoto`" msgstr "" @@ -1242,82 +1319,95 @@ msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:11 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:11 of -msgid "" -"A JSON-serialized list of answer options, 2-10 strings 1-100 characters " -"each" -msgstr "" - -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:13 of -msgid ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`" +msgid "A JSON-serialized list of 2-10 answer options" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:14 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:14 of -msgid "Poll type, 'quiz' or 'regular', defaults to 'regular'" +msgid "" +"Mode for parsing entities in the question. See `formatting options " +"`_ for more " +"details. Currently, only custom emoji entities are allowed" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:15 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:15 of msgid "" -":code:`True`, if the poll allows multiple answers, ignored for polls in " -"quiz mode, defaults to :code:`False`" +"A JSON-serialized list of special entities that appear in the poll " +"question. It can be specified instead of *question_parse_mode*" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:16 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:16 of +msgid ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:17 of +msgid "Poll type, 'quiz' or 'regular', defaults to 'regular'" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:18 of +msgid "" +":code:`True`, if the poll allows multiple answers, ignored for polls in " +"quiz mode, defaults to :code:`False`" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:19 of msgid "" "0-based identifier of the correct answer option, required for polls in " "quiz mode" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:17 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:20 of msgid "" "Text that is shown when a user chooses an incorrect answer or taps on the" " lamp icon in a quiz-style poll, 0-200 characters with at most 2 line " "feeds after entities parsing" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:18 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:21 of msgid "" "Mode for parsing entities in the explanation. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:19 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:22 of msgid "" "A JSON-serialized list of special entities that appear in the poll " -"explanation, which can be specified instead of *parse_mode*" +"explanation. It can be specified instead of *explanation_parse_mode*" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:20 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:23 of msgid "" "Amount of time in seconds the poll will be active after creation, 5-600. " "Can't be used together with *close_date*." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:21 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:24 of msgid "" "Point in time (Unix timestamp) when the poll will be automatically " "closed. Must be at least 5 and no more than 600 seconds in the future. " "Can't be used together with *open_period*." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:22 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:22 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:25 of msgid "" "Pass :code:`True` if the poll needs to be immediately closed. This can be" " useful for poll preview." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:29 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:29 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll:34 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm:34 of msgid "instance of method :class:`aiogram.methods.send_poll.SendPoll`" msgstr "" @@ -1341,8 +1431,8 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#senddice" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:11 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:11 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:12 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:12 of msgid "" "Emoji on which the dice throw animation is based. Currently, must be one " "of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯'" @@ -1350,13 +1440,13 @@ msgid "" "to '🎲'" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:13 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:14 of msgid "Protects the contents of the sent message from forwarding" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:18 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice:21 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_dice_pm:21 of msgid "instance of method :class:`aiogram.methods.send_dice.SendDice`" msgstr "" @@ -1387,19 +1477,19 @@ msgstr "" msgid "" "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 " -"or .TGS sticker using multipart/form-data. :ref:`More information on " -"Sending Files » `. Video stickers can only be sent by a " -"file_id. Animated stickers can't be sent via an HTTP URL." +"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." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:12 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:13 of msgid "Emoji associated with the sticker; only for just uploaded stickers" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:19 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker:22 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_sticker_pm:22 of msgid "instance of method :class:`aiogram.methods.send_sticker.SendSticker`" msgstr "" @@ -1442,33 +1532,33 @@ msgstr "" msgid "Address of the venue" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:15 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:16 of msgid "Foursquare identifier of the venue" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:16 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:17 of msgid "" "Foursquare type of the venue, if known. (For example, " "'arts_entertainment/default', 'arts_entertainment/aquarium' or " "'food/icecream'.)" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:17 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:18 of msgid "Google Places identifier of the venue" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:18 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:18 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:19 of msgid "" "Google Places type of the venue. (See `supported types " "`_.)" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:25 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:25 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue:28 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_venue_pm:28 of msgid "instance of method :class:`aiogram.methods.send_venue.SendVenue`" msgstr "" @@ -1505,52 +1595,68 @@ msgid "" "files>`" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:12 of -msgid "Duration of sent video in seconds" -msgstr "" - #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:13 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:13 of -msgid "Video width" +msgid "Duration of sent video in seconds" msgstr "" #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:14 #: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:14 of +msgid "Video width" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:15 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:15 of msgid "Video height" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:16 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:16 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:17 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:17 of +msgid "" +"Cover for the video in the message. Pass a file_id to send a file that " +"exists on the Telegram servers (recommended), pass an HTTP URL for " +"Telegram to get a file from the Internet, or pass " +"'attach://' to upload a new one using multipart/form-" +"data under name. :ref:`More information on Sending " +"Files » `" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:18 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:18 of +msgid "Start timestamp for the video in the message" +msgstr "" + +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:19 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:19 of msgid "" "Video caption (may also be used when resending videos by *file_id*), " "0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:17 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:17 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:20 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:20 of msgid "" "Mode for parsing entities in the video caption. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:19 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:19 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:23 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:23 of msgid "" "Pass :code:`True` if the video needs to be covered with a spoiler " "animation" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:20 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:20 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:24 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:27 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:27 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video:33 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_pm:33 of msgid "instance of method :class:`aiogram.methods.send_video.SendVideo`" msgstr "" @@ -1585,13 +1691,13 @@ msgid "" "files>`. Sending video notes by a URL is currently unsupported" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:13 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:14 of msgid "Video width and height, i.e. diameter of the video message" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:21 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:21 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note:24 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_video_note_pm:24 of msgid "instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`" msgstr "" @@ -1607,8 +1713,9 @@ msgstr "" msgid "" "Use this method to send audio files, if you want Telegram clients to " "display the file as a playable voice message. For this to work, your " -"audio must be in an .OGG file encoded with OPUS (other formats may be " -"sent as :class:`aiogram.types.audio.Audio` or " +"audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in" +" .M4A format (other formats may be sent as " +":class:`aiogram.types.audio.Audio` or " ":class:`aiogram.types.document.Document`). On success, the sent " ":class:`aiogram.types.message.Message` is returned. Bots can currently " "send voice messages of up to 50 MB in size, this limit may be changed in " @@ -1630,26 +1737,26 @@ msgid "" "files>`" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:12 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:12 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:13 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:13 of msgid "Voice message caption, 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:13 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:13 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:14 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:14 of msgid "" "Mode for parsing entities in the voice message caption. See `formatting " "options `_ for " "more details." msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:15 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:15 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:16 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:16 of msgid "Duration of the voice message in seconds" msgstr "" -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:22 -#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:22 of +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice:25 +#: aiogram.types.chat_join_request.ChatJoinRequest.answer_voice_pm:25 of msgid "instance of method :class:`aiogram.methods.send_voice.SendVoice`" msgstr "" @@ -1676,3 +1783,142 @@ msgstr "" #~ "assuming no other administrator contacted " #~ "the user." #~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" + +#~ msgid "" +#~ "Bot-defined invoice payload, 1-128 " +#~ "bytes. This will not be displayed " +#~ "to the user, use for your internal" +#~ " processes." +#~ msgstr "" + +#~ msgid "" +#~ "Payment provider token, obtained via " +#~ "`@BotFather `_" +#~ msgstr "" + +#~ msgid "" +#~ "Three-letter ISO 4217 currency code, " +#~ "see `more on currencies " +#~ "`_" +#~ msgstr "" + +#~ msgid "" +#~ "Price breakdown, a JSON-serialized list" +#~ " of components (e.g. product price, " +#~ "tax, discount, delivery cost, delivery " +#~ "tax, bonus, etc.)" +#~ msgstr "" + +#~ msgid "" +#~ "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" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's full name to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's phone number to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's email address to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's shipping address to complete the" +#~ " order" +#~ msgstr "" + +#~ msgid "Pass :code:`True` if the user's phone number should be sent to provider" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the user's email" +#~ " address should be sent to provider" +#~ msgstr "" + +#~ msgid "Pass :code:`True` if the final price depends on the shipping method" +#~ msgstr "" + +#~ msgid "" +#~ "Period in seconds for which the " +#~ "location will be updated (see `Live " +#~ "Locations `_," +#~ " should be between 60 and 86400." +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized list of answer " +#~ "options, 2-10 strings 1-100 characters " +#~ "each" +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized list of special " +#~ "entities that appear in the poll " +#~ "explanation, which can be specified " +#~ "instead of *parse_mode*" +#~ msgstr "" + +#~ msgid "" +#~ "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 or .TGS sticker" +#~ " using multipart/form-data. :ref:`More " +#~ "information on Sending Files » " +#~ "`. Video stickers can only" +#~ " be sent by a file_id. Animated " +#~ "stickers can't be sent via an HTTP" +#~ " URL." +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to send audio " +#~ "files, if you want Telegram clients " +#~ "to display the file as a playable" +#~ " voice message. For this to work, " +#~ "your audio must be in an .OGG " +#~ "file encoded with OPUS (other formats" +#~ " may be sent as " +#~ ":class:`aiogram.types.audio.Audio` or " +#~ ":class:`aiogram.types.document.Document`). On success, " +#~ "the sent :class:`aiogram.types.message.Message` is" +#~ " returned. Bots can currently send " +#~ "voice messages of up to 50 MB " +#~ "in size, this limit may be changed" +#~ " in the future." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_administrator.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_administrator.po index 77d9edce..cbe6711e 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_administrator.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_administrator.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-29 02:16+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -60,10 +60,10 @@ msgstr "" #: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_manage_chat:1 #: of msgid "" -":code:`True`, if the administrator can access the chat event log, boost " -"list in channels, see channel members, report spam messages, see " -"anonymous administrators in supergroups and ignore slow mode. Implied by " -"any other administrator privilege" +":code:`True`, if the administrator can access the chat event log, get " +"boost list, see hidden supergroup and channel members, report spam " +"messages and ignore slow mode. Implied by any other administrator " +"privilege." msgstr "" #: ../../docstring @@ -110,12 +110,35 @@ msgstr "" msgid ":code:`True`, if the user is allowed to invite new users to the chat" msgstr "" +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_post_stories:1 +#: of +msgid ":code:`True`, if the administrator can post stories to the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_edit_stories:1 +#: of +msgid "" +":code:`True`, if the administrator can edit stories posted by other " +"users, post stories to the chat page, pin chat stories, and access the " +"chat's story archive" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_delete_stories:1 +#: of +msgid "" +":code:`True`, if the administrator can delete stories posted by other " +"users" +msgstr "" + #: ../../docstring #: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_post_messages:1 #: of msgid "" "*Optional*. :code:`True`, if the administrator can post messages in the " -"channel, or access channel statistics; channels only" +"channel, or access channel statistics; for channels only" msgstr "" #: ../../docstring @@ -123,39 +146,15 @@ msgstr "" #: of msgid "" "*Optional*. :code:`True`, if the administrator can edit messages of other" -" users and can pin messages; channels only" +" users and can pin messages; for channels only" msgstr "" #: ../../docstring #: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_pin_messages:1 #: of msgid "" -"*Optional*. :code:`True`, if the user is allowed to pin messages; groups " -"and supergroups only" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_post_stories:1 -#: of -msgid "" -"*Optional*. :code:`True`, if the administrator can post stories in the " -"channel; channels only" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_edit_stories:1 -#: of -msgid "" -"*Optional*. :code:`True`, if the administrator can edit stories posted by" -" other users; channels only" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_member_administrator.ChatMemberAdministrator.can_delete_stories:1 -#: of -msgid "" -"*Optional*. :code:`True`, if the administrator can delete stories posted " -"by other users; channels only" +"*Optional*. :code:`True`, if the user is allowed to pin messages; for " +"groups and supergroups only" msgstr "" #: ../../docstring @@ -163,7 +162,7 @@ msgstr "" #: of msgid "" "*Optional*. :code:`True`, if the user is allowed to create, rename, " -"close, and reopen forum topics; supergroups only" +"close, and reopen forum topics; for supergroups only" msgstr "" #: ../../docstring @@ -225,3 +224,57 @@ msgstr "" #~ " can delete stories posted by other" #~ " users" #~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the administrator can " +#~ "access the chat event log, boost " +#~ "list in channels, see channel members," +#~ " report spam messages, see anonymous " +#~ "administrators in supergroups and ignore " +#~ "slow mode. Implied by any other " +#~ "administrator privilege" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can post messages in the channel," +#~ " or access channel statistics; channels " +#~ "only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can edit messages of other users " +#~ "and can pin messages; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to pin messages; groups and" +#~ " supergroups only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can post stories in the channel; " +#~ "channels only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can edit stories posted by other " +#~ "users; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the administrator" +#~ " can delete stories posted by other" +#~ " users; channels only" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to create, rename, close, " +#~ "and reopen forum topics; supergroups " +#~ "only" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_member.po index 8bc63e6e..4b4f1dd7 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_member.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_member.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/chat_member_member.rst:3 msgid "ChatMemberMember" @@ -40,3 +40,8 @@ msgstr "" #: ../../docstring aiogram.types.chat_member_member.ChatMemberMember.user:1 of msgid "Information about the user" msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_member.ChatMemberMember.until_date:1 of +msgid "*Optional*. Date when the user's subscription will expire; Unix time" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_updated.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_updated.po index d7aa6758..21a36e1e 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_updated.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_updated.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -61,6 +61,14 @@ msgid "" "chat; for joining by invite link events only." msgstr "" +#: ../../docstring +#: aiogram.types.chat_member_updated.ChatMemberUpdated.via_join_request:1 of +msgid "" +"*Optional*. True, if the user joined the chat after sending a direct join" +" request without using an invite link and being approved by an " +"administrator" +msgstr "" + #: ../../docstring #: aiogram.types.chat_member_updated.ChatMemberUpdated.via_chat_folder_invite_link:1 #: of @@ -105,23 +113,7 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#sendmessage" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice of +#: ../../api/types/chat_member_updated.rst msgid "Parameters" msgstr "" @@ -136,7 +128,6 @@ msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:10 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:11 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:11 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:16 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:12 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:11 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:11 @@ -147,174 +138,227 @@ msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:11 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:11 of msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:13 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:13 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:11 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:15 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:13 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:13 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:15 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:12 of +msgid "" "Unique identifier for the target message thread (topic) of the forum; for" " forum supergroups only" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:12 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:13 of msgid "" "Mode for parsing entities in the message text. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:14 of msgid "" "A JSON-serialized list of special entities that appear in message text, " "which can be specified instead of *parse_mode*" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:14 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:15 of msgid "Link preview generation options for the message" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:15 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:20 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:20 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:15 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:12 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:17 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:12 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:16 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:22 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:21 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:16 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:13 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:18 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:13 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:32 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:17 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:16 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:23 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:13 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:19 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:21 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:15 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:16 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:18 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:18 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:26 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:14 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:20 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:25 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:16 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:17 of msgid "" "Sends the message `silently `_. Users will receive a notification with no sound." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:16 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:21 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:21 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:16 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:18 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:13 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:17 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:23 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:22 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:17 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:19 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:14 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:33 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:18 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:17 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:24 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:14 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:20 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:22 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:16 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:17 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:19 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:19 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:27 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:15 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:21 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:26 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:17 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:18 of msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:17 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:22 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:22 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:17 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:14 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:19 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:14 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:34 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:19 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:14 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:18 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:25 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:15 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:21 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:23 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:17 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:18 of -msgid "Description of the message to reply to" -msgstr "" - #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:18 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:23 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:24 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:23 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:18 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:15 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:20 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:15 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:34 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:20 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:19 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:26 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:15 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:20 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:28 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:16 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:22 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:24 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:27 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:18 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:19 of msgid "" -"Additional interface options. A JSON-serialized object for an `inline " -"keyboard `_, " -"`custom reply keyboard " -"`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"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" msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:19 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:24 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:25 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:24 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:19 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:16 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:21 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:16 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:36 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:35 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:21 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:15 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:20 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:27 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:16 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:21 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:29 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:17 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:23 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:25 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:28 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:19 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:20 of msgid "" -"Pass :code:`True` if the message should be sent even if the specified " -"replied-to message is not found" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:20 of -msgid "Disables link previews for links in this message" -msgstr "" - -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:21 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:25 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:20 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:26 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:25 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:20 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:17 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:22 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:17 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:37 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:36 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:22 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:21 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:28 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:17 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:22 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:30 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:18 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:24 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:26 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:29 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:20 #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:21 of +msgid "Description of the message to reply to" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:21 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:27 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:26 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:21 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:18 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:23 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:23 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:23 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:31 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:19 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:25 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:30 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:21 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:22 of +msgid "" +"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" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:22 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:28 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:27 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:22 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:19 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:24 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:19 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:38 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:24 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:18 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:24 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:32 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:20 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:26 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:31 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:22 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:23 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:23 of +msgid "Disables link previews for links in this message" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:24 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:29 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:28 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:23 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:20 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:25 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:20 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:39 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:25 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:25 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:33 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:21 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:27 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:32 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:23 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:24 of msgid "If the message is a reply, ID of the original message" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice of +#: ../../api/types/chat_member_updated.rst msgid "Returns" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:22 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer:25 of msgid "instance of method :class:`aiogram.methods.send_message.SendMessage`" msgstr "" @@ -346,23 +390,23 @@ msgid "" "Sending Files » `" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:12 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:13 of msgid "Duration of sent animation in seconds" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:14 of msgid "Animation width" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:14 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:15 of msgid "Animation height" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:15 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:19 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:12 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:15 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:14 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:16 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:20 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:13 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:16 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:15 of msgid "" "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" @@ -374,37 +418,43 @@ msgid "" "information on Sending Files » `" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:16 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:17 of msgid "" "Animation caption (may also be used when resending animation by " "*file_id*), 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:17 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:18 of msgid "" "Mode for parsing entities in the animation caption. See `formatting " "options `_ for " "more details." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:18 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:15 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:15 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:14 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:18 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:14 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:19 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:16 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:16 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:15 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:21 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:15 of msgid "" "A JSON-serialized list of special entities that appear in the caption, " "which can be specified instead of *parse_mode*" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:19 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:20 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:16 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:22 of +msgid "Pass :code:`True`, if the caption must be shown above the message media" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:21 of msgid "" "Pass :code:`True` if the animation needs to be covered with a spoiler " "animation" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:26 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_animation:30 of msgid "instance of method :class:`aiogram.methods.send_animation.SendAnimation`" msgstr "" @@ -437,30 +487,30 @@ msgid "" "Files » `" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:14 of msgid "Audio caption, 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:14 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:15 of msgid "" "Mode for parsing entities in the audio caption. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:16 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:17 of msgid "Duration of the audio in seconds" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:17 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:18 of msgid "Performer" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:18 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:19 of msgid "Track name" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:26 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_audio:29 of msgid "instance of method :class:`aiogram.methods.send_audio.SendAudio`" msgstr "" @@ -488,17 +538,17 @@ msgstr "" msgid "Contact's first name" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:14 of msgid "Contact's last name" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:14 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:15 of msgid "" "Additional data about the contact in the form of a `vCard " "`_, 0-2048 bytes" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:21 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_contact:24 of msgid "instance of method :class:`aiogram.methods.send_contact.SendContact`" msgstr "" @@ -528,26 +578,26 @@ msgid "" "/form-data. :ref:`More information on Sending Files » `" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:14 of msgid "" "Document caption (may also be used when resending documents by " "*file_id*), 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:14 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:15 of msgid "" "Mode for parsing entities in the document caption. See `formatting " "options `_ for " "more details." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:16 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:17 of msgid "" "Disables automatic server-side content type detection for files uploaded " "using multipart/form-data" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:23 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_document:26 of msgid "instance of method :class:`aiogram.methods.send_document.SendDocument`" msgstr "" @@ -573,7 +623,7 @@ msgid "" " up your games via `@BotFather `_." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:15 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:18 of msgid "" "A JSON-serialized object for an `inline keyboard " "`_. If empty, " @@ -581,7 +631,7 @@ msgid "" "button must launch the game." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:18 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_game:21 of msgid "instance of method :class:`aiogram.methods.send_game.SendGame`" msgstr "" @@ -612,25 +662,29 @@ msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:12 of msgid "" "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to " -"the user, use for your internal processes." +"the user, use it for your internal processes." msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:13 of msgid "" -"Payment provider token, obtained via `@BotFather " -"`_" +"Three-letter ISO 4217 currency code, see `more on currencies " +"`_. Pass " +"'XTR' for payments in `Telegram Stars `_." msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:14 of msgid "" -"Three-letter ISO 4217 currency code, see `more on currencies " -"`_" +"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 " +"`_." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:15 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:16 of msgid "" -"Price breakdown, a JSON-serialized list of components (e.g. product " -"price, tax, discount, delivery cost, delivery tax, bonus, etc.)" +"Payment provider token, obtained via `@BotFather " +"`_. Pass an empty string for payments in " +"`Telegram Stars `_." msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:17 of @@ -641,7 +695,8 @@ msgid "" "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" +"majority of currencies). Defaults to 0. Not supported for payments in " +"`Telegram Stars `_." msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:18 of @@ -692,40 +747,52 @@ msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:25 of msgid "" "Pass :code:`True` if you require the user's full name to complete the " -"order" +"order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:26 of msgid "" "Pass :code:`True` if you require the user's phone number to complete the " -"order" +"order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:27 of msgid "" "Pass :code:`True` if you require the user's email address to complete the" -" order" +" order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:28 of msgid "" "Pass :code:`True` if you require the user's shipping address to complete " -"the order" +"the order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:29 of -msgid "Pass :code:`True` if the user's phone number should be sent to provider" +msgid "" +"Pass :code:`True` if the user's phone number should be sent to the " +"provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:30 of -msgid "Pass :code:`True` if the user's email address should be sent to provider" +msgid "" +"Pass :code:`True` if the user's email address should be sent to the " +"provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:31 of -msgid "Pass :code:`True` if the final price depends on the shipping method" +msgid "" +"Pass :code:`True` if the final price depends on the shipping method. " +"Ignored for payments in `Telegram Stars `_." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:35 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:37 of msgid "" "A JSON-serialized object for an `inline keyboard " "`_. If empty, " @@ -733,7 +800,7 @@ msgid "" "first button must be a Pay button." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:38 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_invoice:40 of msgid "instance of method :class:`aiogram.methods.send_invoice.SendInvoice`" msgstr "" @@ -761,31 +828,32 @@ msgstr "" msgid "Longitude of the location" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:14 of msgid "The radius of uncertainty for the location, measured in meters; 0-1500" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:14 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:15 of msgid "" -"Period in seconds for which the location will be updated (see `Live " +"Period in seconds during which the location will be updated (see `Live " "Locations `_, should be between" -" 60 and 86400." +" 60 and 86400, or 0x7FFFFFFF for live locations that can be edited " +"indefinitely." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:15 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:16 of msgid "" "For live locations, a direction in which the user is moving, in degrees. " "Must be between 1 and 360 if specified." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:16 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:17 of msgid "" "For live locations, a maximum distance for proximity alerts about " "approaching another chat member, in meters. Must be between 1 and 100000 " "if specified." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:23 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_location:26 of msgid "instance of method :class:`aiogram.methods.send_location.SendLocation`" msgstr "" @@ -815,21 +883,21 @@ msgid "" " items" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:12 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:13 of msgid "" "Sends messages `silently `_. Users will receive a notification with no sound." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:14 of msgid "Protects the contents of the sent messages from forwarding and saving" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:16 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:19 of msgid "If the messages are a reply, ID of the original message" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:17 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_media_group:20 of msgid "" "instance of method " ":class:`aiogram.methods.send_media_group.SendMediaGroup`" @@ -862,26 +930,26 @@ msgid "" "files>`" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:12 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:13 of msgid "" "Photo caption (may also be used when resending photos by *file_id*), " "0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:14 of msgid "" "Mode for parsing entities in the photo caption. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:15 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:17 of msgid "" "Pass :code:`True` if the photo needs to be covered with a spoiler " "animation" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:22 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_photo:26 of msgid "instance of method :class:`aiogram.methods.send_photo.SendPhoto`" msgstr "" @@ -906,71 +974,82 @@ msgid "Poll question, 1-300 characters" msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:11 of -msgid "" -"A JSON-serialized list of answer options, 2-10 strings 1-100 characters " -"each" -msgstr "" - -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:13 of -msgid ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`" +msgid "A JSON-serialized list of 2-10 answer options" msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:14 of -msgid "Poll type, 'quiz' or 'regular', defaults to 'regular'" +msgid "" +"Mode for parsing entities in the question. See `formatting options " +"`_ for more " +"details. Currently, only custom emoji entities are allowed" msgstr "" #: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:15 of msgid "" +"A JSON-serialized list of special entities that appear in the poll " +"question. It can be specified instead of *question_parse_mode*" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:16 of +msgid ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:17 of +msgid "Poll type, 'quiz' or 'regular', defaults to 'regular'" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:18 of +msgid "" ":code:`True`, if the poll allows multiple answers, ignored for polls in " "quiz mode, defaults to :code:`False`" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:16 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:19 of msgid "" "0-based identifier of the correct answer option, required for polls in " "quiz mode" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:17 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:20 of msgid "" "Text that is shown when a user chooses an incorrect answer or taps on the" " lamp icon in a quiz-style poll, 0-200 characters with at most 2 line " "feeds after entities parsing" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:18 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:21 of msgid "" "Mode for parsing entities in the explanation. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:19 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:22 of msgid "" "A JSON-serialized list of special entities that appear in the poll " -"explanation, which can be specified instead of *parse_mode*" +"explanation. It can be specified instead of *explanation_parse_mode*" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:20 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:23 of msgid "" "Amount of time in seconds the poll will be active after creation, 5-600. " "Can't be used together with *close_date*." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:21 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:24 of msgid "" "Point in time (Unix timestamp) when the poll will be automatically " "closed. Must be at least 5 and no more than 600 seconds in the future. " "Can't be used together with *open_period*." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:22 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:25 of msgid "" "Pass :code:`True` if the poll needs to be immediately closed. This can be" " useful for poll preview." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:29 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll:34 of msgid "instance of method :class:`aiogram.methods.send_poll.SendPoll`" msgstr "" @@ -991,7 +1070,7 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#senddice" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:11 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:12 of msgid "" "Emoji on which the dice throw animation is based. Currently, must be one " "of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯'" @@ -999,11 +1078,11 @@ msgid "" "to '🎲'" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:14 of msgid "Protects the contents of the sent message from forwarding" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:18 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_dice:21 of msgid "instance of method :class:`aiogram.methods.send_dice.SendDice`" msgstr "" @@ -1030,17 +1109,17 @@ msgstr "" msgid "" "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 " -"or .TGS sticker using multipart/form-data. :ref:`More information on " -"Sending Files » `. Video stickers can only be sent by a " -"file_id. Animated stickers can't be sent via an HTTP URL." +"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." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:12 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:13 of msgid "Emoji associated with the sticker; only for just uploaded stickers" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:19 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_sticker:22 of msgid "instance of method :class:`aiogram.methods.send_sticker.SendSticker`" msgstr "" @@ -1076,28 +1155,28 @@ msgstr "" msgid "Address of the venue" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:15 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:16 of msgid "Foursquare identifier of the venue" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:16 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:17 of msgid "" "Foursquare type of the venue, if known. (For example, " "'arts_entertainment/default', 'arts_entertainment/aquarium' or " "'food/icecream'.)" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:17 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:18 of msgid "Google Places identifier of the venue" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:18 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:19 of msgid "" "Google Places type of the venue. (See `supported types " "`_.)" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:25 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_venue:28 of msgid "instance of method :class:`aiogram.methods.send_venue.SendVenue`" msgstr "" @@ -1130,43 +1209,57 @@ msgid "" "files>`" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:12 -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:12 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:13 +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:13 of msgid "Duration of sent video in seconds" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:14 of msgid "Video width" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:14 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:15 of msgid "Video height" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:16 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:17 of +msgid "" +"Cover for the video in the message. Pass a file_id to send a file that " +"exists on the Telegram servers (recommended), pass an HTTP URL for " +"Telegram to get a file from the Internet, or pass " +"'attach://' to upload a new one using multipart/form-" +"data under name. :ref:`More information on Sending " +"Files » `" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:18 of +msgid "Start timestamp for the video in the message" +msgstr "" + +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:19 of msgid "" "Video caption (may also be used when resending videos by *file_id*), " "0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:17 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:20 of msgid "" "Mode for parsing entities in the video caption. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:19 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:23 of msgid "" "Pass :code:`True` if the video needs to be covered with a spoiler " "animation" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:20 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:24 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:27 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video:33 of msgid "instance of method :class:`aiogram.methods.send_video.SendVideo`" msgstr "" @@ -1197,11 +1290,11 @@ msgid "" "files>`. Sending video notes by a URL is currently unsupported" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:14 of msgid "Video width and height, i.e. diameter of the video message" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:21 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_video_note:24 of msgid "instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`" msgstr "" @@ -1215,8 +1308,9 @@ msgstr "" msgid "" "Use this method to send audio files, if you want Telegram clients to " "display the file as a playable voice message. For this to work, your " -"audio must be in an .OGG file encoded with OPUS (other formats may be " -"sent as :class:`aiogram.types.audio.Audio` or " +"audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in" +" .M4A format (other formats may be sent as " +":class:`aiogram.types.audio.Audio` or " ":class:`aiogram.types.document.Document`). On success, the sent " ":class:`aiogram.types.message.Message` is returned. Bots can currently " "send voice messages of up to 50 MB in size, this limit may be changed in " @@ -1236,21 +1330,160 @@ msgid "" "files>`" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:12 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:13 of msgid "Voice message caption, 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:13 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:14 of msgid "" "Mode for parsing entities in the voice message caption. See `formatting " "options `_ for " "more details." msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:15 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:16 of msgid "Duration of the voice message in seconds" msgstr "" -#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:22 of +#: aiogram.types.chat_member_updated.ChatMemberUpdated.answer_voice:25 of msgid "instance of method :class:`aiogram.methods.send_voice.SendVoice`" msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" + +#~ msgid "" +#~ "Bot-defined invoice payload, 1-128 " +#~ "bytes. This will not be displayed " +#~ "to the user, use for your internal" +#~ " processes." +#~ msgstr "" + +#~ msgid "" +#~ "Payment provider token, obtained via " +#~ "`@BotFather `_" +#~ msgstr "" + +#~ msgid "" +#~ "Three-letter ISO 4217 currency code, " +#~ "see `more on currencies " +#~ "`_" +#~ msgstr "" + +#~ msgid "" +#~ "Price breakdown, a JSON-serialized list" +#~ " of components (e.g. product price, " +#~ "tax, discount, delivery cost, delivery " +#~ "tax, bonus, etc.)" +#~ msgstr "" + +#~ msgid "" +#~ "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" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's full name to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's phone number to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's email address to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's shipping address to complete the" +#~ " order" +#~ msgstr "" + +#~ msgid "Pass :code:`True` if the user's phone number should be sent to provider" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the user's email" +#~ " address should be sent to provider" +#~ msgstr "" + +#~ msgid "Pass :code:`True` if the final price depends on the shipping method" +#~ msgstr "" + +#~ msgid "" +#~ "Period in seconds for which the " +#~ "location will be updated (see `Live " +#~ "Locations `_," +#~ " should be between 60 and 86400." +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized list of answer " +#~ "options, 2-10 strings 1-100 characters " +#~ "each" +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized list of special " +#~ "entities that appear in the poll " +#~ "explanation, which can be specified " +#~ "instead of *parse_mode*" +#~ msgstr "" + +#~ msgid "" +#~ "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 or .TGS sticker" +#~ " using multipart/form-data. :ref:`More " +#~ "information on Sending Files » " +#~ "`. Video stickers can only" +#~ " be sent by a file_id. Animated " +#~ "stickers can't be sent via an HTTP" +#~ " URL." +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to send audio " +#~ "files, if you want Telegram clients " +#~ "to display the file as a playable" +#~ " voice message. For this to work, " +#~ "your audio must be in an .OGG " +#~ "file encoded with OPUS (other formats" +#~ " may be sent as " +#~ ":class:`aiogram.types.audio.Audio` or " +#~ ":class:`aiogram.types.document.Document`). On success, " +#~ "the sent :class:`aiogram.types.message.Message` is" +#~ " returned. Bots can currently send " +#~ "voice messages of up to 50 MB " +#~ "in size, this limit may be changed" +#~ " in the future." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_shared.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_shared.po index 21852254..50d7d5c7 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_shared.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_shared.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-12 00:22+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.9.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/chat_shared.rst:3 msgid "ChatShared" @@ -23,8 +23,8 @@ msgstr "" #: aiogram.types.chat_shared.ChatShared:1 of msgid "" -"This object contains information about the chat whose identifier was " -"shared with the bot using a " +"This object contains information about a chat that was shared with the " +"bot using a " ":class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat`" " button." msgstr "" @@ -48,3 +48,26 @@ msgid "" "known to the bot by some other means." msgstr "" +#: ../../docstring aiogram.types.chat_shared.ChatShared.title:1 of +msgid "*Optional*. Title of the chat, if the title was requested by the bot." +msgstr "" + +#: ../../docstring aiogram.types.chat_shared.ChatShared.username:1 of +msgid "" +"*Optional*. Username of the chat, if the username was requested by the " +"bot and available." +msgstr "" + +#: ../../docstring aiogram.types.chat_shared.ChatShared.photo:1 of +msgid "" +"*Optional*. Available sizes of the chat photo, if the photo was requested" +" by the bot" +msgstr "" + +#~ msgid "" +#~ "This object contains information about " +#~ "the chat whose identifier was shared " +#~ "with the bot using a " +#~ ":class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat`" +#~ " button." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/copy_text_button.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/copy_text_button.po new file mode 100644 index 00000000..6dc7248b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/copy_text_button.po @@ -0,0 +1,39 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/copy_text_button.rst:3 +msgid "CopyTextButton" +msgstr "" + +#: aiogram.types.copy_text_button.CopyTextButton:1 of +msgid "" +"This object represents an inline keyboard button that copies specified " +"text to the clipboard." +msgstr "" + +#: aiogram.types.copy_text_button.CopyTextButton:3 of +msgid "Source: https://core.telegram.org/bots/api#copytextbutton" +msgstr "" + +#: ../../docstring aiogram.types.copy_text_button.CopyTextButton.text:1 of +msgid "The text to be copied to the clipboard; 1-256 characters" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/document.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/document.po index 0295a948..661b1d76 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/document.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/document.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/document.rst:3 msgid "Document" @@ -43,16 +43,16 @@ msgid "" "time and for different bots. Can't be used to download or reuse the file." msgstr "" -#: ../../docstring aiogram.types.document.Document.thumb:1 of -msgid "*Optional*. Document thumbnail as defined by sender" +#: ../../docstring aiogram.types.document.Document.thumbnail:1 of +msgid "*Optional*. Document thumbnail as defined by the sender" msgstr "" #: ../../docstring aiogram.types.document.Document.file_name:1 of -msgid "*Optional*. Original filename as defined by sender" +msgid "*Optional*. Original filename as defined by the sender" msgstr "" #: ../../docstring aiogram.types.document.Document.mime_type:1 of -msgid "*Optional*. MIME type of the file as defined by sender" +msgid "*Optional*. MIME type of the file as defined by the sender" msgstr "" #: ../../docstring aiogram.types.document.Document.file_size:1 of @@ -62,3 +62,12 @@ msgid "" "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 value." msgstr "" + +#~ msgid "*Optional*. Document thumbnail as defined by sender" +#~ msgstr "" + +#~ msgid "*Optional*. Original filename as defined by sender" +#~ msgstr "" + +#~ msgid "*Optional*. MIME type of the file as defined by sender" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/encrypted_passport_element.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/encrypted_passport_element.po index d0a915ce..d8d98b6c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/encrypted_passport_element.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/encrypted_passport_element.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/encrypted_passport_element.rst:3 msgid "EncryptedPassportElement" @@ -51,7 +51,7 @@ msgstr "" #: aiogram.types.encrypted_passport_element.EncryptedPassportElement.data:1 of msgid "" "*Optional*. Base64-encoded encrypted Telegram Passport element data " -"provided by the user, available for 'personal_details', 'passport', " +"provided by the user; available only for 'personal_details', 'passport', " "'driver_license', 'identity_card', 'internal_passport' and 'address' " "types. Can be decrypted and verified using the accompanying " ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." @@ -61,22 +61,22 @@ msgstr "" #: aiogram.types.encrypted_passport_element.EncryptedPassportElement.phone_number:1 #: of msgid "" -"*Optional*. User's verified phone number, available only for " +"*Optional*. User's verified phone number; available only for " "'phone_number' type" msgstr "" #: ../../docstring #: aiogram.types.encrypted_passport_element.EncryptedPassportElement.email:1 of -msgid "*Optional*. User's verified email address, available only for 'email' type" +msgid "*Optional*. User's verified email address; available only for 'email' type" msgstr "" #: ../../docstring #: aiogram.types.encrypted_passport_element.EncryptedPassportElement.files:1 of msgid "" -"*Optional*. Array of encrypted files with documents provided by the user," -" available for 'utility_bill', 'bank_statement', 'rental_agreement', " -"'passport_registration' and 'temporary_registration' types. Files can be " -"decrypted and verified using the accompanying " +"*Optional*. Array of encrypted files with documents provided by the user;" +" available only for 'utility_bill', 'bank_statement', 'rental_agreement'," +" 'passport_registration' and 'temporary_registration' types. Files can be" +" decrypted and verified using the accompanying " ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." msgstr "" @@ -85,9 +85,9 @@ msgstr "" #: of msgid "" "*Optional*. Encrypted file with the front side of the document, provided " -"by the user. Available for 'passport', 'driver_license', 'identity_card' " -"and 'internal_passport'. The file can be decrypted and verified using the" -" accompanying " +"by the user; available only for 'passport', 'driver_license', " +"'identity_card' and 'internal_passport'. The file can be decrypted and " +"verified using the accompanying " ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." msgstr "" @@ -96,8 +96,9 @@ msgstr "" #: of msgid "" "*Optional*. Encrypted file with the reverse side of the document, " -"provided by the user. Available for 'driver_license' and 'identity_card'." -" The file can be decrypted and verified using the accompanying " +"provided by the user; available only for 'driver_license' and " +"'identity_card'. The file can be decrypted and verified using the " +"accompanying " ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." msgstr "" @@ -106,7 +107,7 @@ msgstr "" #: of msgid "" "*Optional*. Encrypted file with the selfie of the user holding a " -"document, provided by the user; available for 'passport', " +"document, provided by the user; available if requested for 'passport', " "'driver_license', 'identity_card' and 'internal_passport'. The file can " "be decrypted and verified using the accompanying " ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." @@ -117,10 +118,87 @@ msgstr "" #: of msgid "" "*Optional*. Array of encrypted files with translated versions of " -"documents provided by the user. Available if requested for 'passport', " +"documents provided by the user; available if requested for 'passport', " "'driver_license', 'identity_card', 'internal_passport', 'utility_bill', " "'bank_statement', 'rental_agreement', 'passport_registration' and " "'temporary_registration' types. Files can be decrypted and verified using" " the accompanying " ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." msgstr "" + +#~ msgid "" +#~ "*Optional*. Base64-encoded encrypted Telegram " +#~ "Passport element data provided by the" +#~ " user, available for 'personal_details', " +#~ "'passport', 'driver_license', 'identity_card', " +#~ "'internal_passport' and 'address' types. Can" +#~ " be decrypted and verified using the" +#~ " accompanying " +#~ ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. User's verified phone number, " +#~ "available only for 'phone_number' type" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. User's verified email address, " +#~ "available only for 'email' type" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Array of encrypted files " +#~ "with documents provided by the user, " +#~ "available for 'utility_bill', 'bank_statement', " +#~ "'rental_agreement', 'passport_registration' and " +#~ "'temporary_registration' types. Files can be" +#~ " decrypted and verified using the " +#~ "accompanying " +#~ ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Encrypted file with the " +#~ "front side of the document, provided " +#~ "by the user. Available for 'passport'," +#~ " 'driver_license', 'identity_card' and " +#~ "'internal_passport'. The file can be " +#~ "decrypted and verified using the " +#~ "accompanying " +#~ ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Encrypted file with the " +#~ "reverse side of the document, provided" +#~ " by the user. Available for " +#~ "'driver_license' and 'identity_card'. The file" +#~ " can be decrypted and verified using" +#~ " the accompanying " +#~ ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Encrypted file with the " +#~ "selfie of the user holding a " +#~ "document, provided by the user; " +#~ "available for 'passport', 'driver_license', " +#~ "'identity_card' and 'internal_passport'. The " +#~ "file can be decrypted and verified " +#~ "using the accompanying " +#~ ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Array of encrypted files " +#~ "with translated versions of documents " +#~ "provided by the user. Available if " +#~ "requested for 'passport', 'driver_license', " +#~ "'identity_card', 'internal_passport', 'utility_bill', " +#~ "'bank_statement', 'rental_agreement', " +#~ "'passport_registration' and 'temporary_registration' " +#~ "types. Files can be decrypted and " +#~ "verified using the accompanying " +#~ ":class:`aiogram.types.encrypted_credentials.EncryptedCredentials`." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/external_reply_info.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/external_reply_info.po index 61e22e29..81228097 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/external_reply_info.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/external_reply_info.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -76,6 +76,11 @@ msgstr "" msgid "*Optional*. Message is a general file, information about the file" msgstr "" +#: ../../docstring +#: aiogram.types.external_reply_info.ExternalReplyInfo.paid_media:1 of +msgid "*Optional*. Message contains paid media; information about the paid media" +msgstr "" + #: ../../docstring aiogram.types.external_reply_info.ExternalReplyInfo.photo:1 #: of msgid "*Optional*. Message is a photo, available sizes of the photo" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/force_reply.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/force_reply.po index 6e408b99..512cee90 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/force_reply.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/force_reply.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/force_reply.rst:3 msgid "ForceReply" @@ -27,7 +27,9 @@ msgid "" "a reply interface to the user (act as if the user has selected the bot's " "message and tapped 'Reply'). This can be extremely useful if you want to " "create user-friendly step-by-step interfaces without having to sacrifice " -"`privacy mode `_." +"`privacy mode `_. " +"Not supported in channels and for messages sent on behalf of a Telegram " +"Business account." msgstr "" #: aiogram.types.force_reply.ForceReply:3 of @@ -81,7 +83,8 @@ msgid "" "*Optional*. Use this parameter if you want to force reply from specific " "users only. Targets: 1) users that are @mentioned in the *text* of the " ":class:`aiogram.types.message.Message` object; 2) if the bot's message is" -" a reply (has *reply_to_message_id*), sender of the original message." +" a reply to a message in the same chat and forum topic, sender of the " +"original message." msgstr "" #~ msgid "" @@ -96,3 +99,27 @@ msgstr "" #~ "to sacrifice `privacy mode " #~ "`_." #~ msgstr "" + +#~ msgid "" +#~ "Upon receiving a message with this " +#~ "object, Telegram clients will display a" +#~ " reply interface to the user (act " +#~ "as if the user has selected the" +#~ " bot's message and tapped 'Reply'). " +#~ "This can be extremely useful if " +#~ "you want to create user-friendly " +#~ "step-by-step interfaces without having " +#~ "to sacrifice `privacy mode " +#~ "`_." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Use this parameter if you" +#~ " want to force reply from specific" +#~ " users only. Targets: 1) users that" +#~ " are @mentioned in the *text* of " +#~ "the :class:`aiogram.types.message.Message` object; " +#~ "2) if the bot's message is a " +#~ "reply (has *reply_to_message_id*), sender of" +#~ " the original message." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/gift.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/gift.po new file mode 100644 index 00000000..77984483 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/gift.po @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/gift.rst:3 +msgid "Gift" +msgstr "" + +#: aiogram.types.gift.Gift:1 of +msgid "This object represents a gift that can be sent by the bot." +msgstr "" + +#: aiogram.types.gift.Gift:3 of +msgid "Source: https://core.telegram.org/bots/api#gift" +msgstr "" + +#: ../../docstring aiogram.types.gift.Gift.id:1 of +msgid "Unique identifier of the gift" +msgstr "" + +#: ../../docstring aiogram.types.gift.Gift.sticker:1 of +msgid "The sticker that represents the gift" +msgstr "" + +#: ../../docstring aiogram.types.gift.Gift.star_count:1 of +msgid "The number of Telegram Stars that must be paid to send the sticker" +msgstr "" + +#: ../../docstring aiogram.types.gift.Gift.upgrade_star_count:1 of +msgid "" +"*Optional*. The number of Telegram Stars that must be paid to upgrade the" +" gift to a unique one" +msgstr "" + +#: ../../docstring aiogram.types.gift.Gift.total_count:1 of +msgid "" +"*Optional*. The total number of the gifts of this type that can be sent; " +"for limited gifts only" +msgstr "" + +#: ../../docstring aiogram.types.gift.Gift.remaining_count:1 of +msgid "" +"*Optional*. The number of remaining gifts of this type that can be sent; " +"for limited gifts only" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/gifts.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/gifts.po new file mode 100644 index 00000000..57b48b37 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/gifts.po @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/gifts.rst:3 +msgid "Gifts" +msgstr "" + +#: aiogram.types.gifts.Gifts:1 of +msgid "This object represent a list of gifts." +msgstr "" + +#: aiogram.types.gifts.Gifts:3 of +msgid "Source: https://core.telegram.org/bots/api#gifts" +msgstr "" + +#: ../../docstring aiogram.types.gifts.Gifts.gifts:1 of +msgid "The list of gifts" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway.po index 6ea4847a..2d36af23 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -74,9 +74,21 @@ msgid "" " giveaways." msgstr "" +#: ../../docstring aiogram.types.giveaway.Giveaway.prize_star_count:1 of +msgid "" +"*Optional*. The number of Telegram Stars to be split between giveaway " +"winners; for Telegram Star giveaways only" +msgstr "" + #: ../../docstring #: aiogram.types.giveaway.Giveaway.premium_subscription_month_count:1 of msgid "" "*Optional*. The number of months the Telegram Premium subscription won " -"from the giveaway will be active for" +"from the giveaway will be active for; for Telegram Premium giveaways only" msgstr "" + +#~ msgid "" +#~ "*Optional*. The number of months the " +#~ "Telegram Premium subscription won from " +#~ "the giveaway will be active for" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_completed.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_completed.po index e9a5963d..1e824a27 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_completed.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_completed.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -51,3 +51,10 @@ msgid "" "*Optional*. Message with the giveaway that was completed, if it wasn't " "deleted" msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_completed.GiveawayCompleted.is_star_giveaway:1 of +msgid "" +"*Optional*. :code:`True`, if the giveaway is a Telegram Star giveaway. " +"Otherwise, currently, the giveaway is a Telegram Premium giveaway." +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_created.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_created.po index 57f7dba7..de1015e1 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_created.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_created.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -27,9 +27,22 @@ msgstr "" #: aiogram.types.giveaway_created.GiveawayCreated:1 of msgid "" "This object represents a service message about the creation of a " -"scheduled giveaway. Currently holds no information." +"scheduled giveaway." msgstr "" #: aiogram.types.giveaway_created.GiveawayCreated:3 of msgid "Source: https://core.telegram.org/bots/api#giveawaycreated" msgstr "" + +#: ../../docstring +#: aiogram.types.giveaway_created.GiveawayCreated.prize_star_count:1 of +msgid "" +"*Optional*. The number of Telegram Stars to be split between giveaway " +"winners; for Telegram Star giveaways only" +msgstr "" + +#~ msgid "" +#~ "This object represents a service message" +#~ " about the creation of a scheduled" +#~ " giveaway. Currently holds no information." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_winners.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_winners.po index 5dbb832c..0f651c73 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_winners.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/giveaway_winners.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -40,7 +40,7 @@ msgstr "" #: ../../docstring #: aiogram.types.giveaway_winners.GiveawayWinners.giveaway_message_id:1 of -msgid "Identifier of the messsage with the giveaway in the chat" +msgid "Identifier of the message with the giveaway in the chat" msgstr "" #: ../../docstring @@ -64,12 +64,19 @@ msgid "" " eligible for the giveaway" msgstr "" +#: ../../docstring +#: aiogram.types.giveaway_winners.GiveawayWinners.prize_star_count:1 of +msgid "" +"*Optional*. The number of Telegram Stars that were split between giveaway" +" winners; for Telegram Star giveaways only" +msgstr "" + #: ../../docstring #: aiogram.types.giveaway_winners.GiveawayWinners.premium_subscription_month_count:1 #: of msgid "" "*Optional*. The number of months the Telegram Premium subscription won " -"from the giveaway will be active for" +"from the giveaway will be active for; for Telegram Premium giveaways only" msgstr "" #: ../../docstring @@ -95,3 +102,12 @@ msgstr "" #: aiogram.types.giveaway_winners.GiveawayWinners.prize_description:1 of msgid "*Optional*. Description of additional giveaway prize" msgstr "" + +#~ msgid "Identifier of the messsage with the giveaway in the chat" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. The number of months the " +#~ "Telegram Premium subscription won from " +#~ "the giveaway will be active for" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inaccessible_message.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inaccessible_message.po index 84f559d0..1a839ba8 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inaccessible_message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inaccessible_message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -50,3 +50,1723 @@ msgid "" "Always 0. The field can be used to differentiate regular and inaccessible" " messages." msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_message.SendMessage` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:4 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:4 of +msgid ":code:`chat_id`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:7 of +msgid "" +"Use this method to send text messages. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:9 of +msgid "Source: https://core.telegram.org/bots/api#sendmessage" +msgstr "" + +#: ../../api/types/inaccessible_message.rst +msgid "Parameters" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:11 of +msgid "Text of the message to be sent, 1-4096 characters after entities parsing" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:12 of +msgid "" +"Unique identifier of the business connection on behalf of which the " +"message will be sent" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:13 of +msgid "" +"Unique identifier for the target message thread (topic) of the forum; for" +" forum supergroups only" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:14 of +msgid "" +"Mode for parsing entities in the message text. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:15 of +msgid "" +"A JSON-serialized list of special entities that appear in message text, " +"which can be specified instead of *parse_mode*" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:16 of +msgid "Link preview generation options for the message" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:32 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:33 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:27 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:18 of +msgid "" +"Sends the message `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:33 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:27 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:34 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:28 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:27 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:19 of +msgid "Protects the contents of the sent message from forwarding and saving" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:34 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:28 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:27 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:35 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:29 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:28 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:20 of +msgid "" +"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" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:35 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:29 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:28 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:36 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:30 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:29 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:21 of +msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:36 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:30 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:29 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:21 of +msgid "Description of the message to reply to" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:27 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:31 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:30 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:27 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:31 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:30 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:22 of +msgid "" +"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" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:28 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:27 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:38 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:32 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:31 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:28 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:27 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:38 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:32 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:31 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:23 of +msgid "" +"Pass :code:`True` if the message should be sent even if the specified " +"replied-to message is not found" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:23 of +msgid "Disables link previews for links in this message" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:29 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:28 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:39 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:33 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:27 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:32 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:24 of +msgid "If the message is a reply, ID of the original message" +msgstr "" + +#: ../../api/types/inaccessible_message.rst +msgid "Returns" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:24 of +msgid "instance of method :class:`aiogram.methods.send_message.SendMessage`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:5 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:5 of +msgid ":code:`reply_parameters`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation`" +" will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:7 of +msgid "" +"Use this method to send animation files (GIF or H.264/MPEG-4 AVC video " +"without sound). On success, the sent " +":class:`aiogram.types.message.Message` is returned. Bots can currently " +"send animation files of up to 50 MB in size, this limit may be changed in" +" the future." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:9 of +msgid "Source: https://core.telegram.org/bots/api#sendanimation" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:11 of +msgid "" +"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 » `" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:14 of +msgid "Duration of sent animation in seconds" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:15 of +msgid "Animation width" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:16 of +msgid "Animation height" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:16 +#: of +msgid "" +"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 » `" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:18 of +msgid "" +"Animation caption (may also be used when resending animation by " +"*file_id*), 0-1024 characters after entities parsing" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:19 of +msgid "" +"Mode for parsing entities in the animation caption. See `formatting " +"options `_ for " +"more details." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:16 of +msgid "" +"A JSON-serialized list of special entities that appear in the caption, " +"which can be specified instead of *parse_mode*" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:23 of +msgid "Pass :code:`True`, if the caption must be shown above the message media" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:22 of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_animation:30 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_animation:29 of +msgid "instance of method :class:`aiogram.methods.send_animation.SendAnimation`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:7 of +msgid "" +"Use this method to send audio files, if you want Telegram clients to " +"display them in the music player. Your audio must be in the .MP3 or .M4A " +"format. On success, the sent :class:`aiogram.types.message.Message` is " +"returned. Bots can currently send audio files of up to 50 MB in size, " +"this limit may be changed in the future. For sending voice messages, use " +"the :class:`aiogram.methods.send_voice.SendVoice` method instead." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:9 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:10 of +msgid "Source: https://core.telegram.org/bots/api#sendaudio" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:12 of +msgid "" +"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 » `" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:15 of +msgid "Audio caption, 0-1024 characters after entities parsing" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:16 of +msgid "" +"Mode for parsing entities in the audio caption. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:18 of +msgid "Duration of the audio in seconds" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:19 of +msgid "Performer" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:20 of +msgid "Track name" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_audio:29 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_audio:28 of +msgid "instance of method :class:`aiogram.methods.send_audio.SendAudio`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_contact.SendContact` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:7 of +msgid "" +"Use this method to send phone contacts. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:9 of +msgid "Source: https://core.telegram.org/bots/api#sendcontact" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:11 of +msgid "Contact's phone number" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:12 of +msgid "Contact's first name" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:15 of +msgid "Contact's last name" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:16 of +msgid "" +"Additional data about the contact in the form of a `vCard " +"`_, 0-2048 bytes" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_contact:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_contact:23 of +msgid "instance of method :class:`aiogram.methods.send_contact.SendContact`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_document.SendDocument` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:7 of +msgid "" +"Use this method to send general files. On success, the sent " +":class:`aiogram.types.message.Message` is returned. Bots can currently " +"send files of any type of up to 50 MB in size, this limit may be changed " +"in the future." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:9 of +msgid "Source: https://core.telegram.org/bots/api#senddocument" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:11 of +msgid "" +"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 » `" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:15 of +msgid "" +"Document caption (may also be used when resending documents by " +"*file_id*), 0-1024 characters after entities parsing" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:16 of +msgid "" +"Mode for parsing entities in the document caption. See `formatting " +"options `_ for " +"more details." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:18 of +msgid "" +"Disables automatic server-side content type detection for files uploaded " +"using multipart/form-data" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_document:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_document:25 of +msgid "instance of method :class:`aiogram.methods.send_document.SendDocument`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_game.SendGame` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:7 of +msgid "" +"Use this method to send a game. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:9 of +msgid "Source: https://core.telegram.org/bots/api#sendgame" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:11 of +msgid "" +"Short name of the game, serves as the unique identifier for the game. Set" +" up your games via `@BotFather `_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:18 of +msgid "" +"A JSON-serialized object for an `inline keyboard " +"`_. If empty, " +"one 'Play game_title' button will be shown. If not empty, the first " +"button must launch the game." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_game:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_game:20 of +msgid "instance of method :class:`aiogram.methods.send_game.SendGame`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:7 of +msgid "" +"Use this method to send invoices. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:9 of +msgid "Source: https://core.telegram.org/bots/api#sendinvoice" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:11 of +msgid "Product name, 1-32 characters" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:12 of +msgid "Product description, 1-255 characters" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:13 of +msgid "" +"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to " +"the user, use it for your internal processes." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:14 of +msgid "" +"Three-letter ISO 4217 currency code, see `more on currencies " +"`_. Pass " +"'XTR' for payments in `Telegram Stars `_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:15 of +msgid "" +"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 " +"`_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:17 of +msgid "" +"Payment provider token, obtained via `@BotFather " +"`_. Pass an empty string for payments in " +"`Telegram Stars `_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:18 of +msgid "" +"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 `_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:19 of +msgid "" +"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*." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:20 of +msgid "" +"Unique deep-linking parameter. If left empty, **forwarded copies** of the" +" sent message will have a *Pay* button, allowing multiple users to pay " +"directly from the forwarded message, using the same invoice. If non-" +"empty, forwarded copies of the sent message will have a *URL* button with" +" a deep link to the bot (instead of a *Pay* button), with the value used " +"as the start parameter" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:21 of +msgid "" +"JSON-serialized data about the invoice, which will be shared with the " +"payment provider. A detailed description of required fields should be " +"provided by the payment provider." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:22 of +msgid "" +"URL of the product photo for the invoice. Can be a photo of the goods or " +"a marketing image for a service. People like it better when they see what" +" they are paying for." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:23 of +msgid "Photo size in bytes" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:24 of +msgid "Photo width" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:25 of +msgid "Photo height" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:26 of +msgid "" +"Pass :code:`True` if you require the user's full name to complete the " +"order. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:27 of +msgid "" +"Pass :code:`True` if you require the user's phone number to complete the " +"order. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:27 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:28 of +msgid "" +"Pass :code:`True` if you require the user's email address to complete the" +" order. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:28 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:29 of +msgid "" +"Pass :code:`True` if you require the user's shipping address to complete " +"the order. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:29 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:30 of +msgid "" +"Pass :code:`True` if the user's phone number should be sent to the " +"provider. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:30 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:31 of +msgid "" +"Pass :code:`True` if the user's email address should be sent to the " +"provider. Ignored for payments in `Telegram Stars " +"`_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:31 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:32 of +msgid "" +"Pass :code:`True` if the final price depends on the shipping method. " +"Ignored for payments in `Telegram Stars `_." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:37 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:37 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_invoice:40 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_invoice:39 of +msgid "instance of method :class:`aiogram.methods.send_invoice.SendInvoice`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_location.SendLocation` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:7 of +msgid "" +"Use this method to send point on the map. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:9 of +msgid "Source: https://core.telegram.org/bots/api#sendlocation" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:11 of +msgid "Latitude of the location" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:12 of +msgid "Longitude of the location" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:15 of +msgid "The radius of uncertainty for the location, measured in meters; 0-1500" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:16 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:17 of +msgid "" +"For live locations, a direction in which the user is moving, in degrees. " +"Must be between 1 and 360 if specified." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:18 of +msgid "" +"For live locations, a maximum distance for proximity alerts about " +"approaching another chat member, in meters. Must be between 1 and 100000 " +"if specified." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_location:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_location:25 of +msgid "instance of method :class:`aiogram.methods.send_location.SendLocation`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:1 +#: of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.send_media_group.SendMediaGroup` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:7 +#: of +msgid "" +"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." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:9 +#: of +msgid "Source: https://core.telegram.org/bots/api#sendmediagroup" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:11 +#: of +msgid "" +"A JSON-serialized array describing messages to be sent, must include 2-10" +" items" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:14 +#: of +msgid "" +"Sends messages `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:15 +#: of +msgid "Protects the contents of the sent messages from forwarding and saving" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:19 +#: of +msgid "If the messages are a reply, ID of the original message" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_media_group:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_media_group:19 +#: of +msgid "" +"instance of method " +":class:`aiogram.methods.send_media_group.SendMediaGroup`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:7 of +msgid "" +"Use this method to send photos. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:9 of +msgid "Source: https://core.telegram.org/bots/api#sendphoto" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:11 of +msgid "" +"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 » `" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:14 of +msgid "" +"Photo caption (may also be used when resending photos by *file_id*), " +"0-1024 characters after entities parsing" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:15 of +msgid "" +"Mode for parsing entities in the photo caption. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:18 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_photo:26 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_photo:25 of +msgid "instance of method :class:`aiogram.methods.send_photo.SendPhoto`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:7 of +msgid "" +"Use this method to send a native poll. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:9 of +msgid "Source: https://core.telegram.org/bots/api#sendpoll" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:11 of +msgid "Poll question, 1-300 characters" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:12 of +msgid "A JSON-serialized list of 2-10 answer options" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:15 of +msgid "" +"Mode for parsing entities in the question. See `formatting options " +"`_ for more " +"details. Currently, only custom emoji entities are allowed" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:16 of +msgid "" +"A JSON-serialized list of special entities that appear in the poll " +"question. It can be specified instead of *question_parse_mode*" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:17 of +msgid ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:18 of +msgid "Poll type, 'quiz' or 'regular', defaults to 'regular'" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:19 of +msgid "" +":code:`True`, if the poll allows multiple answers, ignored for polls in " +"quiz mode, defaults to :code:`False`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:20 of +msgid "" +"0-based identifier of the correct answer option, required for polls in " +"quiz mode" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:21 of +msgid "" +"Text that is shown when a user chooses an incorrect answer or taps on the" +" lamp icon in a quiz-style poll, 0-200 characters with at most 2 line " +"feeds after entities parsing" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:22 of +msgid "" +"Mode for parsing entities in the explanation. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:23 of +msgid "" +"A JSON-serialized list of special entities that appear in the poll " +"explanation. It can be specified instead of *explanation_parse_mode*" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:24 of +msgid "" +"Amount of time in seconds the poll will be active after creation, 5-600. " +"Can't be used together with *close_date*." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:25 of +msgid "" +"Point in time (Unix timestamp) when the poll will be automatically " +"closed. Must be at least 5 and no more than 600 seconds in the future. " +"Can't be used together with *open_period*." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:26 of +msgid "" +"Pass :code:`True` if the poll needs to be immediately closed. This can be" +" useful for poll preview." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll:34 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll:33 of +msgid "instance of method :class:`aiogram.methods.send_poll.SendPoll`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_dice.SendDice` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:7 of +msgid "" +"Use this method to send an animated emoji that will display a random " +"value. On success, the sent :class:`aiogram.types.message.Message` is " +"returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:9 of +msgid "Source: https://core.telegram.org/bots/api#senddice" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:13 of +msgid "" +"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 '🎲'" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:15 of +msgid "Protects the contents of the sent message from forwarding" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_dice:21 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_dice:20 of +msgid "instance of method :class:`aiogram.methods.send_dice.SendDice`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` " +"will automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:7 of +msgid "" +"Use this method to send static .WEBP, `animated " +"`_ .TGS, or `video " +"`_ .WEBM " +"stickers. On success, the sent :class:`aiogram.types.message.Message` is " +"returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:9 of +msgid "Source: https://core.telegram.org/bots/api#sendsticker" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:11 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:14 of +msgid "Emoji associated with the sticker; only for just uploaded stickers" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_sticker:22 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_sticker:21 of +msgid "instance of method :class:`aiogram.methods.send_sticker.SendSticker`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:7 of +msgid "" +"Use this method to send information about a venue. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:9 of +msgid "Source: https://core.telegram.org/bots/api#sendvenue" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:11 of +msgid "Latitude of the venue" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:12 of +msgid "Longitude of the venue" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:12 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:13 of +msgid "Name of the venue" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:14 of +msgid "Address of the venue" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:17 of +msgid "Foursquare identifier of the venue" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:18 of +msgid "" +"Foursquare type of the venue, if known. (For example, " +"'arts_entertainment/default', 'arts_entertainment/aquarium' or " +"'food/icecream'.)" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:19 of +msgid "Google Places identifier of the venue" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:20 of +msgid "" +"Google Places type of the venue. (See `supported types " +"`_.)" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_venue:28 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_venue:27 of +msgid "instance of method :class:`aiogram.methods.send_venue.SendVenue`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_video.SendVideo` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:7 of +msgid "" +"Use this method to send video files, Telegram clients support MPEG4 " +"videos (other formats may be sent as " +":class:`aiogram.types.document.Document`). On success, the sent " +":class:`aiogram.types.message.Message` is returned. Bots can currently " +"send video files of up to 50 MB in size, this limit may be changed in the" +" future." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:9 of +msgid "Source: https://core.telegram.org/bots/api#sendvideo" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:11 of +msgid "" +"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 » `" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:14 +#: of +msgid "Duration of sent video in seconds" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:15 of +msgid "Video width" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:16 of +msgid "Video height" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:17 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:18 of +msgid "" +"Cover for the video in the message. Pass a file_id to send a file that " +"exists on the Telegram servers (recommended), pass an HTTP URL for " +"Telegram to get a file from the Internet, or pass " +"'attach://' to upload a new one using multipart/form-" +"data under name. :ref:`More information on Sending " +"Files » `" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:18 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:19 of +msgid "Start timestamp for the video in the message" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:19 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:20 of +msgid "" +"Video caption (may also be used when resending videos by *file_id*), " +"0-1024 characters after entities parsing" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:20 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:21 of +msgid "" +"Mode for parsing entities in the video caption. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:24 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:25 of +msgid "Pass :code:`True` if the uploaded video is suitable for streaming" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video:33 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video:32 of +msgid "instance of method :class:`aiogram.methods.send_video.SendVideo`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.send_video_note.SendVideoNote` will automatically" +" fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:7 of +msgid "" +"As of `v.4.0 `_, " +"Telegram clients support rounded square MPEG4 videos of up to 1 minute " +"long. Use this method to send video messages. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:9 of +msgid "Source: https://core.telegram.org/bots/api#sendvideonote" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:11 +#: of +msgid "" +"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" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:15 +#: of +msgid "Video width and height, i.e. diameter of the video message" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_video_note:24 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_video_note:23 +#: of +msgid "instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:1 of +msgid "" +"Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` will " +"automatically fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:7 of +msgid "" +"Use this method to send audio files, if you want Telegram clients to " +"display the file as a playable voice message. For this to work, your " +"audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in" +" .M4A format (other formats may be sent as " +":class:`aiogram.types.audio.Audio` or " +":class:`aiogram.types.document.Document`). On success, the sent " +":class:`aiogram.types.message.Message` is returned. Bots can currently " +"send voice messages of up to 50 MB in size, this limit may be changed in " +"the future." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:9 of +msgid "Source: https://core.telegram.org/bots/api#sendvoice" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:11 of +msgid "" +"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 » `" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:14 of +msgid "Voice message caption, 0-1024 characters after entities parsing" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:15 of +msgid "" +"Mode for parsing entities in the voice message caption. See `formatting " +"options `_ for " +"more details." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:16 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:17 of +msgid "Duration of the voice message in seconds" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_voice:25 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_voice:24 of +msgid "instance of method :class:`aiogram.methods.send_voice.SendVoice`" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:1 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.send_paid_media.SendPaidMedia` will automatically" +" fill method attributes:" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:6 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:7 of +msgid "" +"Use this method to send paid media. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:8 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:9 of +msgid "Source: https://core.telegram.org/bots/api#sendpaidmedia" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:10 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:11 +#: of +msgid "" +"The number of Telegram Stars that must be paid to buy access to the " +"media; 1-2500" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:11 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:12 +#: of +msgid "A JSON-serialized array describing the media to be sent; up to 10 items" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:13 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:14 +#: of +msgid "" +"Bot-defined paid media payload, 0-128 bytes. This will not be displayed " +"to the user, use it for your internal processes." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:14 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:15 +#: of +msgid "Media caption, 0-1024 characters after entities parsing" +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:15 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:16 +#: of +msgid "" +"Mode for parsing entities in the media caption. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: aiogram.types.inaccessible_message.InaccessibleMessage.answer_paid_media:23 +#: aiogram.types.inaccessible_message.InaccessibleMessage.reply_paid_media:23 +#: of +msgid "instance of method :class:`aiogram.methods.send_paid_media.SendPaidMedia`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_keyboard_button.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_keyboard_button.po index 3db47e31..727d0185 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_keyboard_button.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_keyboard_button.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-02 15:10+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_keyboard_button.rst:3 msgid "InlineKeyboardButton" @@ -23,8 +23,8 @@ msgstr "" #: aiogram.types.inline_keyboard_button.InlineKeyboardButton:1 of msgid "" -"This object represents one button of an inline keyboard. You **must** use" -" exactly one of the optional fields." +"This object represents one button of an inline keyboard. Exactly one of " +"the optional fields must be used to specify type of the button." msgstr "" #: aiogram.types.inline_keyboard_button.InlineKeyboardButton:3 of @@ -41,15 +41,15 @@ msgstr "" msgid "" "*Optional*. HTTP or tg:// URL to be opened when the button is pressed. " "Links :code:`tg://user?id=` can be used to mention a user by " -"their ID without using a username, if this is allowed by their privacy " -"settings." +"their identifier without using a username, if this is allowed by their " +"privacy settings." msgstr "" #: ../../docstring #: aiogram.types.inline_keyboard_button.InlineKeyboardButton.callback_data:1 of msgid "" "*Optional*. Data to be sent in a `callback query " -"`_ to the bot when " +"`_ to the bot when the " "button is pressed, 1-64 bytes" msgstr "" @@ -61,7 +61,8 @@ msgid "" " user presses the button. The Web App will be able to send an arbitrary " "message on behalf of the user using the method " ":class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. " -"Available only in private chats between a user and the bot." +"Available only in private chats between a user and the bot. Not supported" +" for messages sent on behalf of a Telegram Business account." msgstr "" #: ../../docstring @@ -79,7 +80,8 @@ msgid "" "*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." +"just the bot's username will be inserted. Not supported for messages sent" +" on behalf of a Telegram Business account." msgstr "" #: ../../docstring @@ -97,7 +99,15 @@ msgstr "" msgid "" "*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" +"bot's username and the specified inline query in the input field. Not " +"supported for messages sent on behalf of a Telegram Business account." +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_keyboard_button.InlineKeyboardButton.copy_text:1 of +msgid "" +"*Optional*. Description of the button that copies the specified text to " +"the clipboard." msgstr "" #: ../../docstring @@ -111,5 +121,70 @@ msgstr "" #: aiogram.types.inline_keyboard_button.InlineKeyboardButton.pay:1 of msgid "" "*Optional*. Specify :code:`True`, to send a `Pay button " -"`_." +"`_. Substrings '⭐' and 'XTR'" +" in the buttons's text will be replaced with a Telegram Star icon." msgstr "" + +#~ msgid "" +#~ "This object represents one button of " +#~ "an inline keyboard. You **must** use " +#~ "exactly one of the optional fields." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. HTTP or tg:// URL to " +#~ "be opened when the button is " +#~ "pressed. Links :code:`tg://user?id=` can" +#~ " be used to mention a user by" +#~ " their ID without using a username," +#~ " if this is allowed by their " +#~ "privacy settings." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Data to be sent in a" +#~ " `callback query " +#~ "`_ to " +#~ "the bot when button is pressed, " +#~ "1-64 bytes" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Description of the `Web App" +#~ " `_ that will" +#~ " be launched when the user presses" +#~ " the button. The Web App will " +#~ "be able to send an arbitrary " +#~ "message on behalf of the user " +#~ "using the method " +#~ ":class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. " +#~ "Available only in private chats between" +#~ " a user and the bot." +#~ msgstr "" + +#~ msgid "" +#~ "*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." +#~ msgstr "" + +#~ msgid "" +#~ "*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" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Specify :code:`True`, to send " +#~ "a `Pay button " +#~ "`_." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_keyboard_markup.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_keyboard_markup.po index b516034d..801a8c0e 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_keyboard_markup.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_keyboard_markup.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_keyboard_markup.rst:3 msgid "InlineKeyboardMarkup" @@ -25,12 +25,10 @@ msgstr "" msgid "" "This object represents an `inline keyboard " "`_ that appears" -" right next to the message it belongs to. **Note:** This will only work " -"in Telegram versions released after 9 April, 2016. Older clients will " -"display *unsupported message*." +" right next to the message it belongs to." msgstr "" -#: aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup:4 of +#: aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup:3 of msgid "Source: https://core.telegram.org/bots/api#inlinekeyboardmarkup" msgstr "" @@ -54,3 +52,14 @@ msgstr "" #~ " clients will display *unsupported " #~ "message*." #~ msgstr "" + +#~ msgid "" +#~ "This object represents an `inline " +#~ "keyboard `_ that appears right next to" +#~ " the message it belongs to. **Note:**" +#~ " This will only work in Telegram " +#~ "versions released after 9 April, 2016." +#~ " Older clients will display *unsupported" +#~ " message*." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_article.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_article.po index 6615989c..5a147d57 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_article.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_article.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_article.rst:3 msgid "InlineQueryResultArticle" @@ -64,6 +64,30 @@ msgstr "" msgid "*Optional*. URL of the result" msgstr "" +#: ../../docstring +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.description:1 +#: of +msgid "*Optional*. Short description of the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.thumbnail_url:1 +#: of +msgid "*Optional*. Url of the thumbnail for the result" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.thumbnail_width:1 +#: of +msgid "*Optional*. Thumbnail width" +msgstr "" + +#: ../../docstring +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.thumbnail_height:1 +#: of +msgid "*Optional*. Thumbnail height" +msgstr "" + #: ../../docstring #: aiogram.types.inline_query_result_article.InlineQueryResultArticle.hide_url:1 #: of @@ -73,27 +97,9 @@ msgid "" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.description:1 +#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.hide_url:3 #: of -msgid "*Optional*. Short description of the result" -msgstr "" - -#: ../../docstring -#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.thumb_url:1 -#: of -msgid "*Optional*. Url of the thumbnail for the result" -msgstr "" - -#: ../../docstring -#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.thumb_width:1 -#: of -msgid "*Optional*. Thumbnail width" -msgstr "" - -#: ../../docstring -#: aiogram.types.inline_query_result_article.InlineQueryResultArticle.thumb_height:1 -#: of -msgid "*Optional*. Thumbnail height" +msgid "https://core.telegram.org/bots/api-changelog#january-1-2025" msgstr "" #~ msgid "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_audio.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_audio.po index 9ee8ea87..d404804e 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_audio.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_audio.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_audio.rst:3 msgid "InlineQueryResultAudio" @@ -25,12 +25,10 @@ msgstr "" msgid "" "Represents a link to an MP3 audio file. By default, this audio file will " "be sent by the user. Alternatively, you can use *input_message_content* " -"to send a message with the specified content instead of the audio. " -"**Note:** This will only work in Telegram versions released after 9 " -"April, 2016. Older clients will ignore them." +"to send a message with the specified content instead of the audio." msgstr "" -#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio:4 of +#: aiogram.types.inline_query_result_audio.InlineQueryResultAudio:3 of msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultaudio" msgstr "" @@ -109,3 +107,16 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "" +#~ "Represents a link to an MP3 audio" +#~ " file. By default, this audio file" +#~ " will be sent by the user. " +#~ "Alternatively, you can use " +#~ "*input_message_content* to send a message " +#~ "with the specified content instead of" +#~ " the audio. **Note:** This will only" +#~ " work in Telegram versions released " +#~ "after 9 April, 2016. Older clients " +#~ "will ignore them." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_audio.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_audio.po index 5accdb13..ed5e5a5a 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_audio.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_audio.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_cached_audio.rst:3 msgid "InlineQueryResultCachedAudio" @@ -27,11 +27,10 @@ msgid "" "Represents a link to an MP3 audio file stored on the Telegram servers. By" " default, this audio file will be sent by the user. Alternatively, you " "can use *input_message_content* to send a message with the specified " -"content instead of the audio. **Note:** This will only work in Telegram " -"versions released after 9 April, 2016. Older clients will ignore them." +"content instead of the audio." msgstr "" -#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio:4 +#: aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio:3 #: of msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcachedaudio" msgstr "" @@ -97,3 +96,16 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "" +#~ "Represents a link to an MP3 audio" +#~ " file stored on the Telegram servers." +#~ " By default, this audio file will " +#~ "be sent by the user. Alternatively, " +#~ "you can use *input_message_content* to " +#~ "send a message with the specified " +#~ "content instead of the audio. **Note:**" +#~ " This will only work in Telegram " +#~ "versions released after 9 April, 2016." +#~ " Older clients will ignore them." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_document.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_document.po index eb805a02..864bca28 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_document.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_document.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_cached_document.rst:3 msgid "InlineQueryResultCachedDocument" @@ -27,12 +27,10 @@ msgid "" "Represents a link to a file stored on the Telegram servers. By default, " "this file will be sent by the user with an optional caption. " "Alternatively, you can use *input_message_content* to send a message with" -" the specified content instead of the file. **Note:** This will only work" -" in Telegram versions released after 9 April, 2016. Older clients will " -"ignore them." +" the specified content instead of the file." msgstr "" -#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument:4 +#: aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument:3 #: of msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcacheddocument" msgstr "" @@ -112,3 +110,17 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "" +#~ "Represents a link to a file stored" +#~ " on the Telegram servers. By default," +#~ " this file will be sent by the" +#~ " user with an optional caption. " +#~ "Alternatively, you can use " +#~ "*input_message_content* to send a message " +#~ "with the specified content instead of" +#~ " the file. **Note:** This will only" +#~ " work in Telegram versions released " +#~ "after 9 April, 2016. Older clients " +#~ "will ignore them." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_gif.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_gif.po index ffc4e8f0..69f784b2 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_gif.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_gif.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_cached_gif.rst:3 msgid "InlineQueryResultCachedGif" @@ -82,6 +82,14 @@ msgid "" "can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif.show_caption_above_media:1 +#: of +msgid "" +"*Optional*. Pass :code:`True`, if the caption must be shown above the " +"message media" +msgstr "" + #: ../../docstring #: aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif.reply_markup:1 #: of diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_mpeg4_gif.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_mpeg4_gif.po index 96885946..cd6ee9ea 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_mpeg4_gif.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_mpeg4_gif.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_cached_mpeg4_gif.rst:3 msgid "InlineQueryResultCachedMpeg4Gif" @@ -85,6 +85,14 @@ msgid "" "can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif.show_caption_above_media:1 +#: of +msgid "" +"*Optional*. Pass :code:`True`, if the caption must be shown above the " +"message media" +msgstr "" + #: ../../docstring #: aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif.reply_markup:1 #: of diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_photo.po index 965f8ad7..c3b543c0 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_photo.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_photo.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_cached_photo.rst:3 msgid "InlineQueryResultCachedPhoto" @@ -90,6 +90,14 @@ msgid "" "can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto.show_caption_above_media:1 +#: of +msgid "" +"*Optional*. Pass :code:`True`, if the caption must be shown above the " +"message media" +msgstr "" + #: ../../docstring #: aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto.reply_markup:1 #: of diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_sticker.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_sticker.po index dc79cbca..0ccbf99b 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_sticker.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_sticker.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_cached_sticker.rst:3 msgid "InlineQueryResultCachedSticker" @@ -27,13 +27,10 @@ msgid "" "Represents a link to a sticker stored on the Telegram servers. By " "default, this sticker will be sent by the user. Alternatively, you can " "use *input_message_content* to send a message with the specified content " -"instead of the sticker. **Note:** This will only work in Telegram " -"versions released after 9 April, 2016 for static stickers and after 06 " -"July, 2019 for `animated stickers `_. Older clients will ignore them." +"instead of the sticker." msgstr "" -#: aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker:4 +#: aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker:3 #: of msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcachedsticker" msgstr "" @@ -76,3 +73,19 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "" +#~ "Represents a link to a sticker " +#~ "stored on the Telegram servers. By " +#~ "default, this sticker will be sent " +#~ "by the user. Alternatively, you can " +#~ "use *input_message_content* to send a " +#~ "message with the specified content " +#~ "instead of the sticker. **Note:** This" +#~ " will only work in Telegram versions" +#~ " released after 9 April, 2016 for " +#~ "static stickers and after 06 July, " +#~ "2019 for `animated stickers " +#~ "`_. Older " +#~ "clients will ignore them." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_video.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_video.po index 3836cf30..1a7151f6 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_video.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_video.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_cached_video.rst:3 msgid "InlineQueryResultCachedVideo" @@ -90,6 +90,14 @@ msgid "" "can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo.show_caption_above_media:1 +#: of +msgid "" +"*Optional*. Pass :code:`True`, if the caption must be shown above the " +"message media" +msgstr "" + #: ../../docstring #: aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo.reply_markup:1 #: of diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_voice.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_voice.po index d2bb9f10..b88ad5cd 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_voice.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_cached_voice.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_cached_voice.rst:3 msgid "InlineQueryResultCachedVoice" @@ -27,12 +27,10 @@ msgid "" "Represents a link to a voice message stored on the Telegram servers. By " "default, this voice message will be sent by the user. Alternatively, you " "can use *input_message_content* to send a message with the specified " -"content instead of the voice message. **Note:** This will only work in " -"Telegram versions released after 9 April, 2016. Older clients will ignore" -" them." +"content instead of the voice message." msgstr "" -#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice:4 +#: aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice:3 #: of msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcachedvoice" msgstr "" @@ -104,3 +102,17 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "" +#~ "Represents a link to a voice " +#~ "message stored on the Telegram servers." +#~ " By default, this voice message will" +#~ " be sent by the user. Alternatively," +#~ " you can use *input_message_content* to " +#~ "send a message with the specified " +#~ "content instead of the voice message." +#~ " **Note:** This will only work in " +#~ "Telegram versions released after 9 " +#~ "April, 2016. Older clients will ignore" +#~ " them." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_contact.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_contact.po index d9620a12..4f913bc2 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_contact.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_contact.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_contact.rst:3 msgid "InlineQueryResultContact" @@ -25,12 +25,10 @@ msgstr "" msgid "" "Represents a contact with a phone number. By default, this contact will " "be sent by the user. Alternatively, you can use *input_message_content* " -"to send a message with the specified content instead of the contact. " -"**Note:** This will only work in Telegram versions released after 9 " -"April, 2016. Older clients will ignore them." +"to send a message with the specified content instead of the contact." msgstr "" -#: aiogram.types.inline_query_result_contact.InlineQueryResultContact:4 of +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact:3 of msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultcontact" msgstr "" @@ -85,19 +83,19 @@ msgid "*Optional*. Content of the message to be sent instead of the contact" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.thumb_url:1 +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.thumbnail_url:1 #: of msgid "*Optional*. Url of the thumbnail for the result" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.thumb_width:1 +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.thumbnail_width:1 #: of msgid "*Optional*. Thumbnail width" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.thumb_height:1 +#: aiogram.types.inline_query_result_contact.InlineQueryResultContact.thumbnail_height:1 #: of msgid "*Optional*. Thumbnail height" msgstr "" @@ -108,3 +106,16 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "" +#~ "Represents a contact with a phone " +#~ "number. By default, this contact will" +#~ " be sent by the user. Alternatively," +#~ " you can use *input_message_content* to " +#~ "send a message with the specified " +#~ "content instead of the contact. " +#~ "**Note:** This will only work in " +#~ "Telegram versions released after 9 " +#~ "April, 2016. Older clients will ignore" +#~ " them." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_document.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_document.po index 9931e7ee..677bbac2 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_document.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_document.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_document.rst:3 msgid "InlineQueryResultDocument" @@ -27,11 +27,10 @@ msgid "" "user with an optional caption. Alternatively, you can use " "*input_message_content* to send a message with the specified content " "instead of the file. Currently, only **.PDF** and **.ZIP** files can be " -"sent using this method. **Note:** This will only work in Telegram " -"versions released after 9 April, 2016. Older clients will ignore them." +"sent using this method." msgstr "" -#: aiogram.types.inline_query_result_document.InlineQueryResultDocument:4 of +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument:3 of msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultdocument" msgstr "" @@ -110,19 +109,34 @@ msgid "*Optional*. Content of the message to be sent instead of the file" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.thumb_url:1 +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.thumbnail_url:1 #: of msgid "*Optional*. URL of the thumbnail (JPEG only) for the file" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.thumb_width:1 +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.thumbnail_width:1 #: of msgid "*Optional*. Thumbnail width" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.thumb_height:1 +#: aiogram.types.inline_query_result_document.InlineQueryResultDocument.thumbnail_height:1 #: of msgid "*Optional*. Thumbnail height" msgstr "" + +#~ msgid "" +#~ "Represents a link to a file. By" +#~ " default, this file will be sent " +#~ "by the user with an optional " +#~ "caption. Alternatively, you can use " +#~ "*input_message_content* to send a message " +#~ "with the specified content instead of" +#~ " the file. Currently, only **.PDF** " +#~ "and **.ZIP** files can be sent " +#~ "using this method. **Note:** This will" +#~ " only work in Telegram versions " +#~ "released after 9 April, 2016. Older " +#~ "clients will ignore them." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_game.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_game.po index a82f430f..3f5fd45f 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_game.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_game.po @@ -8,28 +8,24 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_game.rst:3 msgid "InlineQueryResultGame" msgstr "" #: aiogram.types.inline_query_result_game.InlineQueryResultGame:1 of -msgid "" -"Represents a `Game `_. " -"**Note:** This will only work in Telegram versions released after October" -" 1, 2016. Older clients will not display any inline results if a game " -"result is among them." +msgid "Represents a `Game `_." msgstr "" -#: aiogram.types.inline_query_result_game.InlineQueryResultGame:4 of +#: aiogram.types.inline_query_result_game.InlineQueryResultGame:3 of msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultgame" msgstr "" @@ -63,3 +59,13 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "" +#~ "Represents a `Game " +#~ "`_. **Note:** " +#~ "This will only work in Telegram " +#~ "versions released after October 1, 2016." +#~ " Older clients will not display any" +#~ " inline results if a game result " +#~ "is among them." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_gif.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_gif.po index 0e298f7f..54f0197d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_gif.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_gif.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_gif.rst:3 msgid "InlineQueryResultGif" @@ -45,11 +45,12 @@ msgstr "" #: ../../docstring #: aiogram.types.inline_query_result_gif.InlineQueryResultGif.gif_url:1 of -msgid "A valid URL for the GIF file. File size must not exceed 1MB" +msgid "A valid URL for the GIF file" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.thumb_url:1 of +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.thumbnail_url:1 +#: of msgid "" "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the " "result" @@ -71,7 +72,7 @@ msgid "*Optional*. Duration of the GIF in seconds" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.thumb_mime_type:1 +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.thumbnail_mime_type:1 #: of msgid "" "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', " @@ -106,6 +107,14 @@ msgid "" "can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.types.inline_query_result_gif.InlineQueryResultGif.show_caption_above_media:1 +#: of +msgid "" +"*Optional*. Pass :code:`True`, if the caption must be shown above the " +"message media" +msgstr "" + #: ../../docstring #: aiogram.types.inline_query_result_gif.InlineQueryResultGif.reply_markup:1 of msgid "" @@ -125,3 +134,6 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "A valid URL for the GIF file. File size must not exceed 1MB" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_location.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_location.po index aee2b822..6b32e250 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_location.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_location.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_location.rst:3 msgid "InlineQueryResultLocation" @@ -25,12 +25,10 @@ msgstr "" msgid "" "Represents a location on a map. By default, the location will be sent by " "the user. Alternatively, you can use *input_message_content* to send a " -"message with the specified content instead of the location. **Note:** " -"This will only work in Telegram versions released after 9 April, 2016. " -"Older clients will ignore them." +"message with the specified content instead of the location." msgstr "" -#: aiogram.types.inline_query_result_location.InlineQueryResultLocation:4 of +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation:3 of msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultlocation" msgstr "" @@ -75,8 +73,9 @@ msgstr "" #: aiogram.types.inline_query_result_location.InlineQueryResultLocation.live_period:1 #: of msgid "" -"*Optional*. Period in seconds for which the location can be updated, " -"should be between 60 and 86400." +"*Optional*. Period in seconds during which the location can be updated, " +"should be between 60 and 86400, or 0x7FFFFFFF for live locations that can" +" be edited indefinitely." msgstr "" #: ../../docstring @@ -111,19 +110,19 @@ msgid "*Optional*. Content of the message to be sent instead of the location" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.thumb_url:1 +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.thumbnail_url:1 #: of msgid "*Optional*. Url of the thumbnail for the result" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.thumb_width:1 +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.thumbnail_width:1 #: of msgid "*Optional*. Thumbnail width" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.thumb_height:1 +#: aiogram.types.inline_query_result_location.InlineQueryResultLocation.thumbnail_height:1 #: of msgid "*Optional*. Thumbnail height" msgstr "" @@ -134,3 +133,21 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "" +#~ "Represents a location on a map. By" +#~ " default, the location will be sent" +#~ " by the user. Alternatively, you can" +#~ " use *input_message_content* to send a " +#~ "message with the specified content " +#~ "instead of the location. **Note:** This" +#~ " will only work in Telegram versions" +#~ " released after 9 April, 2016. Older" +#~ " clients will ignore them." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Period in seconds for which" +#~ " the location can be updated, should" +#~ " be between 60 and 86400." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_mpeg4_gif.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_mpeg4_gif.po index 56c4da50..c5e9d307 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_mpeg4_gif.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_mpeg4_gif.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_mpeg4_gif.rst:3 msgid "InlineQueryResultMpeg4Gif" @@ -48,11 +48,11 @@ msgstr "" #: ../../docstring #: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.mpeg4_url:1 #: of -msgid "A valid URL for the MPEG4 file. File size must not exceed 1MB" +msgid "A valid URL for the MPEG4 file" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.thumb_url:1 +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.thumbnail_url:1 #: of msgid "" "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the " @@ -78,7 +78,7 @@ msgid "*Optional*. Video duration in seconds" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.thumb_mime_type:1 +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.thumbnail_mime_type:1 #: of msgid "" "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', " @@ -116,6 +116,14 @@ msgid "" "can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.show_caption_above_media:1 +#: of +msgid "" +"*Optional*. Pass :code:`True`, if the caption must be shown above the " +"message media" +msgstr "" + #: ../../docstring #: aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif.reply_markup:1 #: of @@ -138,3 +146,6 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "A valid URL for the MPEG4 file. File size must not exceed 1MB" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_photo.po index 6d189167..207b3e25 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_photo.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_photo.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_photo.rst:3 msgid "InlineQueryResultPhoto" @@ -52,7 +52,7 @@ msgid "" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.thumb_url:1 +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.thumbnail_url:1 #: of msgid "URL of the thumbnail for the photo" msgstr "" @@ -104,6 +104,14 @@ msgid "" "can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.show_caption_above_media:1 +#: of +msgid "" +"*Optional*. Pass :code:`True`, if the caption must be shown above the " +"message media" +msgstr "" + #: ../../docstring #: aiogram.types.inline_query_result_photo.InlineQueryResultPhoto.reply_markup:1 #: of diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_venue.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_venue.po index 2867f687..039c0a6c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_venue.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_venue.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_venue.rst:3 msgid "InlineQueryResultVenue" @@ -25,12 +25,10 @@ msgstr "" msgid "" "Represents a venue. By default, the venue will be sent by the user. " "Alternatively, you can use *input_message_content* to send a message with" -" the specified content instead of the venue. **Note:** This will only " -"work in Telegram versions released after 9 April, 2016. Older clients " -"will ignore them." +" the specified content instead of the venue." msgstr "" -#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue:4 of +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue:3 of msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultvenue" msgstr "" @@ -109,19 +107,19 @@ msgid "*Optional*. Content of the message to be sent instead of the venue" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.thumb_url:1 +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.thumbnail_url:1 #: of msgid "*Optional*. Url of the thumbnail for the result" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.thumb_width:1 +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.thumbnail_width:1 #: of msgid "*Optional*. Thumbnail width" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.thumb_height:1 +#: aiogram.types.inline_query_result_venue.InlineQueryResultVenue.thumbnail_height:1 #: of msgid "*Optional*. Thumbnail height" msgstr "" @@ -132,3 +130,15 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "" +#~ "Represents a venue. By default, the " +#~ "venue will be sent by the user." +#~ " Alternatively, you can use " +#~ "*input_message_content* to send a message " +#~ "with the specified content instead of" +#~ " the venue. **Note:** This will only" +#~ " work in Telegram versions released " +#~ "after 9 April, 2016. Older clients " +#~ "will ignore them." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_video.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_video.po index 379ba6ed..1b71e3a8 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_video.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_video.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_video.rst:3 msgid "InlineQueryResultVideo" @@ -62,7 +62,7 @@ msgid "MIME type of the content of the video URL, 'text/html' or 'video/mp4'" msgstr "" #: ../../docstring -#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.thumb_url:1 +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.thumbnail_url:1 #: of msgid "URL of the thumbnail (JPEG only) for the video" msgstr "" @@ -96,6 +96,14 @@ msgid "" "can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.types.inline_query_result_video.InlineQueryResultVideo.show_caption_above_media:1 +#: of +msgid "" +"*Optional*. Pass :code:`True`, if the caption must be shown above the " +"message media" +msgstr "" + #: ../../docstring #: aiogram.types.inline_query_result_video.InlineQueryResultVideo.video_width:1 #: of diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_voice.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_voice.po index e77d56c1..87cdabf0 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_voice.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/inline_query_result_voice.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/inline_query_result_voice.rst:3 msgid "InlineQueryResultVoice" @@ -26,12 +26,10 @@ msgid "" "Represents a link to a voice recording in an .OGG container encoded with " "OPUS. By default, this voice recording will be sent by the user. " "Alternatively, you can use *input_message_content* to send a message with" -" the specified content instead of the voice message. **Note:** This " -"will only work in Telegram versions released after 9 April, 2016. Older " -"clients will ignore them." +" the specified content instead of the the voice message." msgstr "" -#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice:4 of +#: aiogram.types.inline_query_result_voice.InlineQueryResultVoice:3 of msgid "Source: https://core.telegram.org/bots/api#inlinequeryresultvoice" msgstr "" @@ -106,3 +104,17 @@ msgstr "" #~ "on-the-fly-updating>`_ attached to " #~ "the message" #~ msgstr "" + +#~ msgid "" +#~ "Represents a link to a voice " +#~ "recording in an .OGG container encoded" +#~ " with OPUS. By default, this voice" +#~ " recording will be sent by the " +#~ "user. Alternatively, you can use " +#~ "*input_message_content* to send a message " +#~ "with the specified content instead of" +#~ " the voice message. **Note:** This " +#~ "will only work in Telegram versions " +#~ "released after 9 April, 2016. Older " +#~ "clients will ignore them." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_invoice_message_content.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_invoice_message_content.po index cab32cc6..50cc9b13 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_invoice_message_content.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_invoice_message_content.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/input_invoice_message_content.rst:3 msgid "InputInvoiceMessageContent" @@ -49,15 +49,7 @@ msgstr "" #: of msgid "" "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to " -"the user, use for your internal processes." -msgstr "" - -#: ../../docstring -#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.provider_token:1 -#: of -msgid "" -"Payment provider token, obtained via `@BotFather " -"`_" +"the user, use it for your internal processes." msgstr "" #: ../../docstring @@ -65,7 +57,8 @@ msgstr "" #: of msgid "" "Three-letter ISO 4217 currency code, see `more on currencies " -"`_" +"`_. Pass " +"'XTR' for payments in `Telegram Stars `_." msgstr "" #: ../../docstring @@ -73,7 +66,18 @@ msgstr "" #: of msgid "" "Price breakdown, a JSON-serialized list of components (e.g. product " -"price, tax, discount, delivery cost, delivery tax, bonus, etc.)" +"price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must " +"contain exactly one item for payments in `Telegram Stars " +"`_." +msgstr "" + +#: ../../docstring +#: aiogram.types.input_invoice_message_content.InputInvoiceMessageContent.provider_token:1 +#: of +msgid "" +"*Optional*. Payment provider token, obtained via `@BotFather " +"`_. Pass an empty string for payments in " +"`Telegram Stars `_." msgstr "" #: ../../docstring @@ -86,7 +90,8 @@ msgid "" "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" +"majority of currencies). Defaults to 0. Not supported for payments in " +"`Telegram Stars `_." msgstr "" #: ../../docstring @@ -140,7 +145,8 @@ msgstr "" #: of msgid "" "*Optional*. Pass :code:`True` if you require the user's full name to " -"complete the order" +"complete the order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring @@ -148,7 +154,8 @@ msgstr "" #: of msgid "" "*Optional*. Pass :code:`True` if you require the user's phone number to " -"complete the order" +"complete the order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring @@ -156,7 +163,8 @@ msgstr "" #: of msgid "" "*Optional*. Pass :code:`True` if you require the user's email address to " -"complete the order" +"complete the order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring @@ -164,7 +172,8 @@ msgstr "" #: of msgid "" "*Optional*. Pass :code:`True` if you require the user's shipping address " -"to complete the order" +"to complete the order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring @@ -172,7 +181,8 @@ msgstr "" #: of msgid "" "*Optional*. Pass :code:`True` if the user's phone number should be sent " -"to provider" +"to the provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring @@ -180,7 +190,8 @@ msgstr "" #: of msgid "" "*Optional*. Pass :code:`True` if the user's email address should be sent " -"to provider" +"to the provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: ../../docstring @@ -188,5 +199,88 @@ msgstr "" #: of msgid "" "*Optional*. Pass :code:`True` if the final price depends on the shipping " -"method" +"method. Ignored for payments in `Telegram Stars " +"`_." msgstr "" + +#~ msgid "" +#~ "Bot-defined invoice payload, 1-128 " +#~ "bytes. This will not be displayed " +#~ "to the user, use for your internal" +#~ " processes." +#~ msgstr "" + +#~ msgid "" +#~ "Payment provider token, obtained via " +#~ "`@BotFather `_" +#~ msgstr "" + +#~ msgid "" +#~ "Three-letter ISO 4217 currency code, " +#~ "see `more on currencies " +#~ "`_" +#~ msgstr "" + +#~ msgid "" +#~ "Price breakdown, a JSON-serialized list" +#~ " of components (e.g. product price, " +#~ "tax, discount, delivery cost, delivery " +#~ "tax, bonus, etc.)" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. 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" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Pass :code:`True` if you " +#~ "require the user's full name to " +#~ "complete the order" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Pass :code:`True` if you " +#~ "require the user's phone number to " +#~ "complete the order" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Pass :code:`True` if you " +#~ "require the user's email address to " +#~ "complete the order" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Pass :code:`True` if you " +#~ "require the user's shipping address to" +#~ " complete the order" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Pass :code:`True` if the " +#~ "user's phone number should be sent " +#~ "to provider" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Pass :code:`True` if the " +#~ "user's email address should be sent " +#~ "to provider" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Pass :code:`True` if the " +#~ "final price depends on the shipping " +#~ "method" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_location_message_content.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_location_message_content.po index 63866b93..1fa15b17 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_location_message_content.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_location_message_content.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/input_location_message_content.rst:3 msgid "InputLocationMessageContent" @@ -58,8 +58,9 @@ msgstr "" #: aiogram.types.input_location_message_content.InputLocationMessageContent.live_period:1 #: of msgid "" -"*Optional*. Period in seconds for which the location can be updated, " -"should be between 60 and 86400." +"*Optional*. Period in seconds during which the location can be updated, " +"should be between 60 and 86400, or 0x7FFFFFFF for live locations that can" +" be edited indefinitely." msgstr "" #: ../../docstring @@ -78,3 +79,9 @@ msgid "" "about approaching another chat member, in meters. Must be between 1 and " "100000 if specified." msgstr "" + +#~ msgid "" +#~ "*Optional*. Period in seconds for which" +#~ " the location can be updated, should" +#~ " be between 60 and 86400." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po index e19c352d..5e99da16 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/input_media_animation.rst:3 msgid "InputMediaAnimation" @@ -47,7 +47,7 @@ msgid "" msgstr "" #: ../../docstring -#: aiogram.types.input_media_animation.InputMediaAnimation.thumb:1 of +#: aiogram.types.input_media_animation.InputMediaAnimation.thumbnail:1 of msgid "" "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail " "generation for the file is supported server-side. The thumbnail should be" @@ -83,6 +83,14 @@ msgid "" "can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.show_caption_above_media:1 +#: of +msgid "" +"*Optional*. Pass :code:`True`, if the caption must be shown above the " +"message media" +msgstr "" + #: ../../docstring #: aiogram.types.input_media_animation.InputMediaAnimation.width:1 of msgid "*Optional*. Animation width" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po index 10a634e9..c56de849 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/input_media_photo.rst:3 msgid "InputMediaPhoto" @@ -63,6 +63,14 @@ msgid "" "can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.types.input_media_photo.InputMediaPhoto.show_caption_above_media:1 +#: of +msgid "" +"*Optional*. Pass :code:`True`, if the caption must be shown above the " +"message media" +msgstr "" + #: ../../docstring #: aiogram.types.input_media_photo.InputMediaPhoto.has_spoiler:1 of msgid "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po index eef2e134..d6744e00 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/input_media_video.rst:3 msgid "InputMediaVideo" @@ -42,7 +42,8 @@ msgid "" "information on Sending Files » `" msgstr "" -#: ../../docstring aiogram.types.input_media_video.InputMediaVideo.thumb:1 of +#: ../../docstring aiogram.types.input_media_video.InputMediaVideo.thumbnail:1 +#: of msgid "" "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail " "generation for the file is supported server-side. The thumbnail should be" @@ -55,6 +56,21 @@ msgid "" "files>`" msgstr "" +#: ../../docstring aiogram.types.input_media_video.InputMediaVideo.cover:1 of +msgid "" +"*Optional*. Cover for the video in the message. Pass a file_id to send a " +"file that exists on the Telegram servers (recommended), pass an HTTP URL " +"for Telegram to get a file from the Internet, or pass " +"'attach://' to upload a new one using multipart/form-" +"data under name. :ref:`More information on Sending " +"Files » `" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_video.InputMediaVideo.start_timestamp:1 of +msgid "*Optional*. Start timestamp for the video in the message" +msgstr "" + #: ../../docstring aiogram.types.input_media_video.InputMediaVideo.caption:1 of msgid "" "*Optional*. Caption of the video to be sent, 0-1024 characters after " @@ -76,6 +92,14 @@ msgid "" "can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring +#: aiogram.types.input_media_video.InputMediaVideo.show_caption_above_media:1 +#: of +msgid "" +"*Optional*. Pass :code:`True`, if the caption must be shown above the " +"message media" +msgstr "" + #: ../../docstring aiogram.types.input_media_video.InputMediaVideo.width:1 of msgid "*Optional*. Video width" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_paid_media.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_paid_media.po new file mode 100644 index 00000000..6808673f --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_paid_media.po @@ -0,0 +1,43 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/input_paid_media.rst:3 +msgid "InputPaidMedia" +msgstr "" + +#: aiogram.types.input_paid_media.InputPaidMedia:1 of +msgid "" +"This object describes the paid media to be sent. Currently, it can be one" +" of" +msgstr "" + +#: aiogram.types.input_paid_media.InputPaidMedia:3 of +msgid ":class:`aiogram.types.input_paid_media_photo.InputPaidMediaPhoto`" +msgstr "" + +#: aiogram.types.input_paid_media.InputPaidMedia:4 of +msgid ":class:`aiogram.types.input_paid_media_video.InputPaidMediaVideo`" +msgstr "" + +#: aiogram.types.input_paid_media.InputPaidMedia:6 of +msgid "Source: https://core.telegram.org/bots/api#inputpaidmedia" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_paid_media_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_paid_media_photo.po new file mode 100644 index 00000000..12c1baac --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_paid_media_photo.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/input_paid_media_photo.rst:3 +msgid "InputPaidMediaPhoto" +msgstr "" + +#: aiogram.types.input_paid_media_photo.InputPaidMediaPhoto:1 of +msgid "The paid media to send is a photo." +msgstr "" + +#: aiogram.types.input_paid_media_photo.InputPaidMediaPhoto:3 of +msgid "Source: https://core.telegram.org/bots/api#inputpaidmediaphoto" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_paid_media_photo.InputPaidMediaPhoto.type:1 of +msgid "Type of the media, must be *photo*" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_paid_media_photo.InputPaidMediaPhoto.media:1 of +msgid "" +"File to send. Pass a file_id to send a file that exists on the Telegram " +"servers (recommended), pass an HTTP URL for Telegram to get a file from " +"the Internet, or pass 'attach://' to upload a new one " +"using multipart/form-data under name. :ref:`More " +"information on Sending Files » `" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_paid_media_video.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_paid_media_video.po new file mode 100644 index 00000000..bf584aa5 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_paid_media_video.po @@ -0,0 +1,102 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/input_paid_media_video.rst:3 +msgid "InputPaidMediaVideo" +msgstr "" + +#: aiogram.types.input_paid_media_video.InputPaidMediaVideo:1 of +msgid "The paid media to send is a video." +msgstr "" + +#: aiogram.types.input_paid_media_video.InputPaidMediaVideo:3 of +msgid "Source: https://core.telegram.org/bots/api#inputpaidmediavideo" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_paid_media_video.InputPaidMediaVideo.type:1 of +msgid "Type of the media, must be *video*" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_paid_media_video.InputPaidMediaVideo.media:1 of +msgid "" +"File to send. Pass a file_id to send a file that exists on the Telegram " +"servers (recommended), pass an HTTP URL for Telegram to get a file from " +"the Internet, or pass 'attach://' to upload a new one " +"using multipart/form-data under name. :ref:`More " +"information on Sending Files » `" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_paid_media_video.InputPaidMediaVideo.thumbnail:1 of +msgid "" +"*Optional*. 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 » `" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_paid_media_video.InputPaidMediaVideo.cover:1 of +msgid "" +"*Optional*. Cover for the video in the message. Pass a file_id to send a " +"file that exists on the Telegram servers (recommended), pass an HTTP URL " +"for Telegram to get a file from the Internet, or pass " +"'attach://' to upload a new one using multipart/form-" +"data under name. :ref:`More information on Sending " +"Files » `" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_paid_media_video.InputPaidMediaVideo.start_timestamp:1 +#: of +msgid "*Optional*. Start timestamp for the video in the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_paid_media_video.InputPaidMediaVideo.width:1 of +msgid "*Optional*. Video width" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_paid_media_video.InputPaidMediaVideo.height:1 of +msgid "*Optional*. Video height" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_paid_media_video.InputPaidMediaVideo.duration:1 of +msgid "*Optional*. Video duration in seconds" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_paid_media_video.InputPaidMediaVideo.supports_streaming:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` if the uploaded video is suitable for " +"streaming" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_poll_option.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_poll_option.po new file mode 100644 index 00000000..fb069ea8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_poll_option.po @@ -0,0 +1,54 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/input_poll_option.rst:3 +msgid "InputPollOption" +msgstr "" + +#: aiogram.types.input_poll_option.InputPollOption:1 of +msgid "" +"This object contains information about one answer option in a poll to be " +"sent." +msgstr "" + +#: aiogram.types.input_poll_option.InputPollOption:3 of +msgid "Source: https://core.telegram.org/bots/api#inputpolloption" +msgstr "" + +#: ../../docstring aiogram.types.input_poll_option.InputPollOption.text:1 of +msgid "Option text, 1-100 characters" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_poll_option.InputPollOption.text_parse_mode:1 of +msgid "" +"*Optional*. Mode for parsing entities in the text. See `formatting " +"options `_ for " +"more details. Currently, only custom emoji entities are allowed" +msgstr "" + +#: ../../docstring +#: aiogram.types.input_poll_option.InputPollOption.text_entities:1 of +msgid "" +"*Optional*. A JSON-serialized list of special entities that appear in the" +" poll option text. It can be specified instead of *text_parse_mode*" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_sticker.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_sticker.po index fb2433c4..9884d221 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_sticker.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_sticker.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-02 15:10+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/input_sticker.rst:3 msgid "InputSticker" @@ -40,6 +40,13 @@ msgid "" "information on Sending Files » `" msgstr "" +#: ../../docstring aiogram.types.input_sticker.InputSticker.format:1 of +msgid "" +"Format of the added sticker, must be one of 'static' for a **.WEBP** or " +"**.PNG** image, 'animated' for a **.TGS** animation, 'video' for a " +"**.WEBM** video" +msgstr "" + #: ../../docstring aiogram.types.input_sticker.InputSticker.emoji_list:1 of msgid "List of 1-20 emoji associated with the sticker" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/invoice.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/invoice.po index 85c30c9e..09d4e8a8 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/invoice.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/invoice.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/invoice.rst:3 msgid "Invoice" @@ -46,7 +46,8 @@ msgstr "" #: ../../docstring aiogram.types.invoice.Invoice.currency:1 of msgid "" "Three-letter ISO 4217 `currency `_ code" +"#supported-currencies>`_ code, or 'XTR' for payments in `Telegram Stars " +"`_" msgstr "" #: ../../docstring aiogram.types.invoice.Invoice.total_amount:1 of @@ -58,3 +59,9 @@ msgid "" " number of digits past the decimal point for each currency (2 for the " "majority of currencies)." msgstr "" + +#~ msgid "" +#~ "Three-letter ISO 4217 `currency " +#~ "`_" +#~ " code" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button.po index adbef6ff..3036aa9f 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -23,36 +23,15 @@ msgstr "" #: aiogram.types.keyboard_button.KeyboardButton:1 of msgid "" -"This object represents one button of the reply keyboard. For simple text " -"buttons, *String* can be used instead of this object to specify the " -"button text. The optional fields *web_app*, *request_users*, " -"*request_chat*, *request_contact*, *request_location*, and *request_poll*" -" are mutually exclusive. **Note:** *request_contact* and " -"*request_location* options will only work in Telegram versions released " -"after 9 April, 2016. Older clients will display *unsupported message*." +"This object represents one button of the reply keyboard. At most one of " +"the optional fields must be used to specify type of the button. For " +"simple text buttons, *String* can be used instead of this object to " +"specify the button text. **Note:** *request_users* and *request_chat* " +"options will only work in Telegram versions released after 3 February, " +"2023. Older clients will display *unsupported message*." msgstr "" #: aiogram.types.keyboard_button.KeyboardButton:4 of -msgid "" -"**Note:** *request_poll* option will only work in Telegram versions " -"released after 23 January, 2020. Older clients will display *unsupported " -"message*." -msgstr "" - -#: aiogram.types.keyboard_button.KeyboardButton:6 of -msgid "" -"**Note:** *web_app* option will only work in Telegram versions released " -"after 16 April, 2022. Older clients will display *unsupported message*." -msgstr "" - -#: aiogram.types.keyboard_button.KeyboardButton:8 of -msgid "" -"**Note:** *request_users* and *request_chat* options will only work in " -"Telegram versions released after 3 February, 2023. Older clients will " -"display *unsupported message*." -msgstr "" - -#: aiogram.types.keyboard_button.KeyboardButton:10 of msgid "Source: https://core.telegram.org/bots/api#keyboardbutton" msgstr "" @@ -159,3 +138,41 @@ msgstr "" #~ "2023. Older clients will display " #~ "*unsupported message*." #~ msgstr "" + +#~ msgid "" +#~ "This object represents one button of " +#~ "the reply keyboard. For simple text " +#~ "buttons, *String* can be used instead" +#~ " of this object to specify the " +#~ "button text. The optional fields " +#~ "*web_app*, *request_users*, *request_chat*, " +#~ "*request_contact*, *request_location*, and " +#~ "*request_poll* are mutually exclusive. " +#~ "**Note:** *request_contact* and *request_location*" +#~ " options will only work in Telegram" +#~ " versions released after 9 April, " +#~ "2016. Older clients will display " +#~ "*unsupported message*." +#~ msgstr "" + +#~ msgid "" +#~ "**Note:** *request_poll* option will only " +#~ "work in Telegram versions released after" +#~ " 23 January, 2020. Older clients will" +#~ " display *unsupported message*." +#~ msgstr "" + +#~ msgid "" +#~ "**Note:** *web_app* option will only " +#~ "work in Telegram versions released after" +#~ " 16 April, 2022. Older clients will" +#~ " display *unsupported message*." +#~ msgstr "" + +#~ msgid "" +#~ "**Note:** *request_users* and *request_chat* " +#~ "options will only work in Telegram " +#~ "versions released after 3 February, " +#~ "2023. Older clients will display " +#~ "*unsupported message*." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_chat.po index 2912a3f0..4a258c18 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_chat.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_chat.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-02 15:10+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/keyboard_button_request_chat.rst:3 msgid "KeyboardButtonRequestChat" @@ -23,10 +23,11 @@ msgstr "" #: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat:1 of msgid "" -"This object defines the criteria used to request a suitable chat. The " -"identifier of the selected chat will be shared with the bot when the " -"corresponding button is pressed. `More about requesting chats » " -"`_" +"This object defines the criteria used to request a suitable chat. " +"Information about the selected chat will be shared with the bot when the " +"corresponding button is pressed. The bot will be granted requested rights" +" in the chat if appropriate. `More about requesting chats » " +"`_." msgstr "" #: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat:3 of @@ -104,6 +105,24 @@ msgid "" " Otherwise, no additional restrictions are applied." msgstr "" +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.request_title:1 +#: of +msgid "*Optional*. Pass :code:`True` to request the chat's title" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.request_username:1 +#: of +msgid "*Optional*. Pass :code:`True` to request the chat's username" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.request_photo:1 +#: of +msgid "*Optional*. Pass :code:`True` to request the chat's photo" +msgstr "" + #~ msgid "" #~ "This object defines the criteria used" #~ " to request a suitable chat. The " @@ -111,3 +130,14 @@ msgstr "" #~ "be shared with the bot when the" #~ " corresponding button is pressed." #~ msgstr "" + +#~ msgid "" +#~ "This object defines the criteria used" +#~ " to request a suitable chat. The " +#~ "identifier of the selected chat will " +#~ "be shared with the bot when the" +#~ " corresponding button is pressed. `More " +#~ "about requesting chats » " +#~ "`_" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_users.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_users.po index bbdd7b59..f7717c6a 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_users.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_users.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -26,9 +26,9 @@ msgstr "" #: aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers:1 of msgid "" -"This object defines the criteria used to request suitable users. The " -"identifiers of the selected users will be shared with the bot when the " -"corresponding button is pressed. `More about requesting users » " +"This object defines the criteria used to request suitable users. " +"Information about the selected users will be shared with the bot when the" +" corresponding button is pressed. `More about requesting users » " "`_" msgstr "" @@ -70,3 +70,32 @@ msgid "" "*Optional*. The maximum number of users to be selected; 1-10. Defaults to" " 1." msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers.request_name:1 +#: of +msgid "*Optional*. Pass :code:`True` to request the users' first and last names" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers.request_username:1 +#: of +msgid "*Optional*. Pass :code:`True` to request the users' usernames" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers.request_photo:1 +#: of +msgid "*Optional*. Pass :code:`True` to request the users' photos" +msgstr "" + +#~ msgid "" +#~ "This object defines the criteria used" +#~ " to request suitable users. The " +#~ "identifiers of the selected users will" +#~ " be shared with the bot when " +#~ "the corresponding button is pressed. " +#~ "`More about requesting users » " +#~ "`_" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/link_preview_options.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/link_preview_options.po index fbcb8162..cd4e9c1d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/link_preview_options.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/link_preview_options.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -48,18 +48,18 @@ msgstr "" #: aiogram.types.link_preview_options.LinkPreviewOptions.prefer_small_media:1 #: of msgid "" -"*Optional*. :code:`True`, if the media in the link preview is suppposed " -"to be shrunk; ignored if the URL isn't explicitly specified or media size" -" change isn't supported for the preview" +"*Optional*. :code:`True`, if the media in the link preview is supposed to" +" be shrunk; ignored if the URL isn't explicitly specified or media size " +"change isn't supported for the preview" msgstr "" #: ../../docstring #: aiogram.types.link_preview_options.LinkPreviewOptions.prefer_large_media:1 #: of msgid "" -"*Optional*. :code:`True`, if the media in the link preview is suppposed " -"to be enlarged; ignored if the URL isn't explicitly specified or media " -"size change isn't supported for the preview" +"*Optional*. :code:`True`, if the media in the link preview is supposed to" +" be enlarged; ignored if the URL isn't explicitly specified or media size" +" change isn't supported for the preview" msgstr "" #: ../../docstring @@ -69,3 +69,21 @@ msgid "" "message text; otherwise, the link preview will be shown below the message" " text" msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the media " +#~ "in the link preview is suppposed " +#~ "to be shrunk; ignored if the URL" +#~ " isn't explicitly specified or media " +#~ "size change isn't supported for the " +#~ "preview" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the media " +#~ "in the link preview is suppposed " +#~ "to be enlarged; ignored if the URL" +#~ " isn't explicitly specified or media " +#~ "size change isn't supported for the " +#~ "preview" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/location.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/location.po index c3826725..c8f1f7ff 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/location.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/location.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/location.rst:3 msgid "Location" @@ -29,12 +29,12 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#location" msgstr "" -#: ../../docstring aiogram.types.location.Location.longitude:1 of -msgid "Longitude as defined by sender" +#: ../../docstring aiogram.types.location.Location.latitude:1 of +msgid "Latitude as defined by the sender" msgstr "" -#: ../../docstring aiogram.types.location.Location.latitude:1 of -msgid "Latitude as defined by sender" +#: ../../docstring aiogram.types.location.Location.longitude:1 of +msgid "Longitude as defined by the sender" msgstr "" #: ../../docstring aiogram.types.location.Location.horizontal_accuracy:1 of @@ -60,3 +60,9 @@ msgid "" "*Optional*. The maximum distance for proximity alerts about approaching " "another chat member, in meters. For sent live locations only." msgstr "" + +#~ msgid "Longitude as defined by sender" +#~ msgstr "" + +#~ msgid "Latitude as defined by sender" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button.po index ad862f22..cba4ce0a 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/menu_button.rst:3 msgid "MenuButton" @@ -65,8 +65,21 @@ msgid "" "*Optional*. Description of the Web App that will be launched when the " "user presses the button. The Web App will be able to send an arbitrary " "message on behalf of the user using the method " -":class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`." +":class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. " +"Alternatively, a :code:`t.me` link to a Web App of the bot can be " +"specified in the object instead of the Web App's URL, in which case the " +"Web App will be opened as if the user pressed the link." msgstr "" #~ msgid "..." #~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Description of the Web App" +#~ " that will be launched when the " +#~ "user presses the button. The Web " +#~ "App will be able to send an " +#~ "arbitrary message on behalf of the " +#~ "user using the method " +#~ ":class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button_web_app.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button_web_app.po index 21b08c57..397f85bc 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button_web_app.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/menu_button_web_app.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/menu_button_web_app.rst:3 msgid "MenuButtonWebApp" @@ -45,5 +45,18 @@ msgid "" "Description of the Web App that will be launched when the user presses " "the button. The Web App will be able to send an arbitrary message on " "behalf of the user using the method " -":class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`." +":class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. " +"Alternatively, a :code:`t.me` link to a Web App of the bot can be " +"specified in the object instead of the Web App's URL, in which case the " +"Web App will be opened as if the user pressed the link." msgstr "" + +#~ msgid "" +#~ "Description of the Web App that " +#~ "will be launched when the user " +#~ "presses the button. The Web App " +#~ "will be able to send an arbitrary" +#~ " message on behalf of the user " +#~ "using the method " +#~ ":class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po index 7521cfa6..48540757 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,7 +30,12 @@ msgid "Source: https://core.telegram.org/bots/api#message" msgstr "" #: ../../docstring aiogram.types.message.Message.message_id:1 of -msgid "Unique message identifier inside this chat" +msgid "" +"Unique message identifier inside this chat. In specific instances (e.g., " +"message containing a video sent to a big chat), the server might " +"automatically schedule a message instead of sending it immediately. In " +"such cases, this field will be 0 and the relevant message will be " +"unusable until it is actually sent" msgstr "" #: ../../docstring aiogram.types.message.Message.date:1 of @@ -51,19 +56,40 @@ msgstr "" #: ../../docstring aiogram.types.message.Message.from_user:1 of msgid "" -"*Optional*. Sender of the message; empty for messages sent to channels. " -"For backward compatibility, the field contains a fake sender user in non-" -"channel chats, if the message was sent on behalf of a chat." +"*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" msgstr "" #: ../../docstring aiogram.types.message.Message.sender_chat:1 of msgid "" -"*Optional*. Sender of the message, sent on behalf of a chat. For example," -" the channel itself for channel posts, the supergroup itself for messages" -" from anonymous group administrators, the linked channel for messages " -"automatically forwarded to the discussion group. For backward " -"compatibility, the field *from* contains a fake sender user in non-" -"channel chats, if the message was sent on behalf of a chat." +"*Optional*. Sender of the message when sent on behalf of a chat. For " +"example, the supergroup itself for messages sent by its anonymous " +"administrators or a linked channel for messages automatically forwarded " +"to the channel's discussion group. For backward compatibility, if the " +"message was sent on behalf of a chat, the field *from* contains a fake " +"sender user in non-channel chats." +msgstr "" + +#: ../../docstring aiogram.types.message.Message.sender_boost_count:1 of +msgid "" +"*Optional*. If the sender of the message boosted the chat, the number of " +"boosts added by the user" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.sender_business_bot:1 of +msgid "" +"*Optional*. The bot that actually sent the message on behalf of the " +"business account. Available only for outgoing messages sent on behalf of " +"the connected business account." +msgstr "" + +#: ../../docstring aiogram.types.message.Message.business_connection_id:1 of +msgid "" +"*Optional*. Unique identifier of the business connection from which the " +"message was received. If non-empty, the message belongs to a chat of the " +"corresponding business account that is independent from any potential bot" +" chat which might share the same identifier." msgstr "" #: ../../docstring aiogram.types.message.Message.forward_origin:1 of @@ -99,6 +125,10 @@ msgid "" "quoted part of the message" msgstr "" +#: ../../docstring aiogram.types.message.Message.reply_to_story:1 of +msgid "*Optional*. For replies to a story, the original story" +msgstr "" + #: ../../docstring aiogram.types.message.Message.via_bot:1 of msgid "*Optional*. Bot through which the message was sent" msgstr "" @@ -111,6 +141,13 @@ msgstr "" msgid "*Optional*. :code:`True`, if the message can't be forwarded" msgstr "" +#: ../../docstring aiogram.types.message.Message.is_from_offline:1 of +msgid "" +"*Optional*. 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" +msgstr "" + #: ../../docstring aiogram.types.message.Message.media_group_id:1 of msgid "" "*Optional*. The unique identifier of a media message group this message " @@ -139,6 +176,10 @@ msgid "" "it is a text message and link preview options were changed" msgstr "" +#: ../../docstring aiogram.types.message.Message.effect_id:1 of +msgid "*Optional*. Unique identifier of the message effect added to the message" +msgstr "" + #: ../../docstring aiogram.types.message.Message.animation:1 of msgid "" "*Optional*. Message is an animation, information about the animation. For" @@ -154,6 +195,10 @@ msgstr "" msgid "*Optional*. Message is a general file, information about the file" msgstr "" +#: ../../docstring aiogram.types.message.Message.paid_media:1 of +msgid "*Optional*. Message contains paid media; information about the paid media" +msgstr "" + #: ../../docstring aiogram.types.message.Message.photo:1 of msgid "*Optional*. Message is a photo, available sizes of the photo" msgstr "" @@ -182,8 +227,8 @@ msgstr "" #: ../../docstring aiogram.types.message.Message.caption:1 of msgid "" -"*Optional*. Caption for the animation, audio, document, photo, video or " -"voice" +"*Optional*. Caption for the animation, audio, document, paid media, " +"photo, video or voice" msgstr "" #: ../../docstring aiogram.types.message.Message.caption_entities:1 of @@ -192,6 +237,10 @@ msgid "" " URLs, bot commands, etc. that appear in the caption" msgstr "" +#: ../../docstring aiogram.types.message.Message.show_caption_above_media:1 of +msgid "*Optional*. True, if the caption must be shown above the message media" +msgstr "" + #: ../../docstring aiogram.types.message.Message.has_media_spoiler:1 of msgid "" "*Optional*. :code:`True`, if the message media is covered by a spoiler " @@ -321,6 +370,13 @@ msgid "" "`_" msgstr "" +#: ../../docstring aiogram.types.message.Message.refunded_payment:1 of +msgid "" +"*Optional*. Message is a service message about a refunded payment, " +"information about the payment. `More about payments » " +"`_" +msgstr "" + #: ../../docstring aiogram.types.message.Message.users_shared:1 of msgid "*Optional*. Service message: users were shared with the bot" msgstr "" @@ -355,6 +411,14 @@ msgid "" "proximity alert while sharing Live Location." msgstr "" +#: ../../docstring aiogram.types.message.Message.boost_added:1 of +msgid "*Optional*. Service message: user boosted the chat" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.chat_background_set:1 of +msgid "*Optional*. Service message: chat background set" +msgstr "" + #: ../../docstring aiogram.types.message.Message.forum_topic_created:1 of msgid "*Optional*. Service message: forum topic created" msgstr "" @@ -492,6 +556,7 @@ msgstr "" #: aiogram.types.message.Message.answer_invoice:4 #: aiogram.types.message.Message.answer_location:4 #: aiogram.types.message.Message.answer_media_group:4 +#: aiogram.types.message.Message.answer_paid_media:4 #: aiogram.types.message.Message.answer_photo:4 #: aiogram.types.message.Message.answer_poll:4 #: aiogram.types.message.Message.answer_sticker:4 @@ -517,6 +582,7 @@ msgstr "" #: aiogram.types.message.Message.reply_invoice:4 #: aiogram.types.message.Message.reply_location:4 #: aiogram.types.message.Message.reply_media_group:4 +#: aiogram.types.message.Message.reply_paid_media:4 #: aiogram.types.message.Message.reply_photo:4 #: aiogram.types.message.Message.reply_poll:4 #: aiogram.types.message.Message.reply_sticker:4 @@ -539,6 +605,7 @@ msgstr "" #: aiogram.types.message.Message.answer_invoice:5 #: aiogram.types.message.Message.answer_location:5 #: aiogram.types.message.Message.answer_media_group:5 +#: aiogram.types.message.Message.answer_paid_media:5 #: aiogram.types.message.Message.answer_photo:5 #: aiogram.types.message.Message.answer_poll:5 #: aiogram.types.message.Message.answer_sticker:5 @@ -556,6 +623,7 @@ msgstr "" #: aiogram.types.message.Message.reply_invoice:5 #: aiogram.types.message.Message.reply_location:5 #: aiogram.types.message.Message.reply_media_group:5 +#: aiogram.types.message.Message.reply_paid_media:5 #: aiogram.types.message.Message.reply_photo:5 #: aiogram.types.message.Message.reply_poll:5 #: aiogram.types.message.Message.reply_sticker:5 @@ -566,6 +634,32 @@ msgstr "" msgid ":code:`message_thread_id`" msgstr "" +#: aiogram.types.message.Message.answer:6 +#: aiogram.types.message.Message.answer_animation:6 +#: aiogram.types.message.Message.answer_audio:6 +#: aiogram.types.message.Message.answer_contact:6 +#: aiogram.types.message.Message.answer_dice:6 +#: aiogram.types.message.Message.answer_document:6 +#: aiogram.types.message.Message.answer_game:6 +#: aiogram.types.message.Message.answer_invoice:6 +#: aiogram.types.message.Message.answer_location:6 +#: aiogram.types.message.Message.answer_media_group:6 +#: aiogram.types.message.Message.answer_paid_media:6 +#: aiogram.types.message.Message.answer_photo:6 +#: aiogram.types.message.Message.answer_poll:6 +#: aiogram.types.message.Message.answer_sticker:6 +#: aiogram.types.message.Message.answer_venue:6 +#: aiogram.types.message.Message.answer_video:6 +#: aiogram.types.message.Message.answer_video_note:6 +#: aiogram.types.message.Message.answer_voice:6 +#: aiogram.types.message.Message.delete:6 +#: aiogram.types.message.Message.delete_reply_markup:6 +#: aiogram.types.message.Message.edit_caption:6 +#: aiogram.types.message.Message.edit_live_location:6 +#: aiogram.types.message.Message.edit_media:6 +#: aiogram.types.message.Message.edit_reply_markup:6 +#: aiogram.types.message.Message.edit_text:6 +#: aiogram.types.message.Message.pin:6 aiogram.types.message.Message.react:6 #: aiogram.types.message.Message.reply:6 #: aiogram.types.message.Message.reply_animation:6 #: aiogram.types.message.Message.reply_audio:6 @@ -576,18 +670,42 @@ msgstr "" #: aiogram.types.message.Message.reply_invoice:6 #: aiogram.types.message.Message.reply_location:6 #: aiogram.types.message.Message.reply_media_group:6 +#: aiogram.types.message.Message.reply_paid_media:6 #: aiogram.types.message.Message.reply_photo:6 #: aiogram.types.message.Message.reply_poll:6 #: aiogram.types.message.Message.reply_sticker:6 #: aiogram.types.message.Message.reply_venue:6 #: aiogram.types.message.Message.reply_video:6 #: aiogram.types.message.Message.reply_video_note:6 -#: aiogram.types.message.Message.reply_voice:6 of -msgid ":code:`reply_to_message_id`" +#: aiogram.types.message.Message.reply_voice:6 +#: aiogram.types.message.Message.stop_live_location:6 +#: aiogram.types.message.Message.unpin:6 of +msgid ":code:`business_connection_id`" msgstr "" -#: aiogram.types.message.Message.answer_animation:7 -#: aiogram.types.message.Message.reply_animation:8 of +#: aiogram.types.message.Message.reply:7 +#: aiogram.types.message.Message.reply_animation:7 +#: aiogram.types.message.Message.reply_audio:7 +#: aiogram.types.message.Message.reply_contact:7 +#: aiogram.types.message.Message.reply_dice:7 +#: aiogram.types.message.Message.reply_document:7 +#: aiogram.types.message.Message.reply_game:7 +#: aiogram.types.message.Message.reply_invoice:7 +#: aiogram.types.message.Message.reply_location:7 +#: aiogram.types.message.Message.reply_media_group:7 +#: aiogram.types.message.Message.reply_paid_media:7 +#: aiogram.types.message.Message.reply_photo:7 +#: aiogram.types.message.Message.reply_poll:7 +#: aiogram.types.message.Message.reply_sticker:7 +#: aiogram.types.message.Message.reply_venue:7 +#: aiogram.types.message.Message.reply_video:7 +#: aiogram.types.message.Message.reply_video_note:7 +#: aiogram.types.message.Message.reply_voice:7 of +msgid ":code:`reply_parameters`" +msgstr "" + +#: aiogram.types.message.Message.answer_animation:8 +#: aiogram.types.message.Message.reply_animation:9 of msgid "" "Use this method to send animation files (GIF or H.264/MPEG-4 AVC video " "without sound). On success, the sent " @@ -596,61 +714,17 @@ msgid "" " the future." msgstr "" -#: aiogram.types.message.Message.answer_animation:9 -#: aiogram.types.message.Message.reply_animation:10 of +#: aiogram.types.message.Message.answer_animation:10 +#: aiogram.types.message.Message.reply_animation:11 of msgid "Source: https://core.telegram.org/bots/api#sendanimation" msgstr "" -#: aiogram.types.message.Message.answer -#: aiogram.types.message.Message.answer_animation -#: aiogram.types.message.Message.answer_audio -#: aiogram.types.message.Message.answer_contact -#: aiogram.types.message.Message.answer_dice -#: aiogram.types.message.Message.answer_document -#: aiogram.types.message.Message.answer_game -#: aiogram.types.message.Message.answer_invoice -#: aiogram.types.message.Message.answer_location -#: aiogram.types.message.Message.answer_media_group -#: aiogram.types.message.Message.answer_photo -#: aiogram.types.message.Message.answer_poll -#: aiogram.types.message.Message.answer_sticker -#: aiogram.types.message.Message.answer_venue -#: aiogram.types.message.Message.answer_video -#: aiogram.types.message.Message.answer_video_note -#: aiogram.types.message.Message.answer_voice -#: aiogram.types.message.Message.copy_to -#: aiogram.types.message.Message.delete_reply_markup -#: aiogram.types.message.Message.edit_caption -#: aiogram.types.message.Message.edit_live_location -#: aiogram.types.message.Message.edit_media -#: aiogram.types.message.Message.edit_reply_markup -#: aiogram.types.message.Message.edit_text -#: aiogram.types.message.Message.forward aiogram.types.message.Message.get_url -#: aiogram.types.message.Message.pin aiogram.types.message.Message.react -#: aiogram.types.message.Message.reply -#: aiogram.types.message.Message.reply_animation -#: aiogram.types.message.Message.reply_audio -#: aiogram.types.message.Message.reply_contact -#: aiogram.types.message.Message.reply_dice -#: aiogram.types.message.Message.reply_document -#: aiogram.types.message.Message.reply_game -#: aiogram.types.message.Message.reply_invoice -#: aiogram.types.message.Message.reply_location -#: aiogram.types.message.Message.reply_media_group -#: aiogram.types.message.Message.reply_photo -#: aiogram.types.message.Message.reply_poll -#: aiogram.types.message.Message.reply_sticker -#: aiogram.types.message.Message.reply_venue -#: aiogram.types.message.Message.reply_video -#: aiogram.types.message.Message.reply_video_note -#: aiogram.types.message.Message.reply_voice -#: aiogram.types.message.Message.send_copy -#: aiogram.types.message.Message.stop_live_location of +#: ../../api/types/message.rst msgid "Parameters" msgstr "" -#: aiogram.types.message.Message.answer_animation:11 -#: aiogram.types.message.Message.reply_animation:12 of +#: aiogram.types.message.Message.answer_animation:12 +#: aiogram.types.message.Message.reply_animation:13 of msgid "" "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 " @@ -659,31 +733,31 @@ msgid "" "Sending Files » `" msgstr "" -#: aiogram.types.message.Message.answer_animation:12 -#: aiogram.types.message.Message.reply_animation:13 of -msgid "Duration of sent animation in seconds" -msgstr "" - #: aiogram.types.message.Message.answer_animation:13 #: aiogram.types.message.Message.reply_animation:14 of -msgid "Animation width" +msgid "Duration of sent animation in seconds" msgstr "" #: aiogram.types.message.Message.answer_animation:14 #: aiogram.types.message.Message.reply_animation:15 of -msgid "Animation height" +msgid "Animation width" msgstr "" #: aiogram.types.message.Message.answer_animation:15 -#: aiogram.types.message.Message.answer_audio:19 -#: aiogram.types.message.Message.answer_document:12 -#: aiogram.types.message.Message.answer_video:15 -#: aiogram.types.message.Message.answer_video_note:14 -#: aiogram.types.message.Message.reply_animation:16 -#: aiogram.types.message.Message.reply_audio:20 -#: aiogram.types.message.Message.reply_document:13 -#: aiogram.types.message.Message.reply_video:16 -#: aiogram.types.message.Message.reply_video_note:15 of +#: aiogram.types.message.Message.reply_animation:16 of +msgid "Animation height" +msgstr "" + +#: aiogram.types.message.Message.answer_animation:16 +#: aiogram.types.message.Message.answer_audio:20 +#: aiogram.types.message.Message.answer_document:13 +#: aiogram.types.message.Message.answer_video:16 +#: aiogram.types.message.Message.answer_video_note:15 +#: aiogram.types.message.Message.reply_animation:17 +#: aiogram.types.message.Message.reply_audio:21 +#: aiogram.types.message.Message.reply_document:14 +#: aiogram.types.message.Message.reply_video:17 +#: aiogram.types.message.Message.reply_video_note:16 of msgid "" "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" @@ -695,196 +769,183 @@ msgid "" "information on Sending Files » `" msgstr "" -#: aiogram.types.message.Message.answer_animation:16 -#: aiogram.types.message.Message.reply_animation:17 of +#: aiogram.types.message.Message.answer_animation:17 +#: aiogram.types.message.Message.reply_animation:18 of msgid "" "Animation caption (may also be used when resending animation by " "*file_id*), 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.message.Message.answer_animation:17 -#: aiogram.types.message.Message.reply_animation:18 of +#: aiogram.types.message.Message.answer_animation:18 +#: aiogram.types.message.Message.reply_animation:19 of msgid "" "Mode for parsing entities in the animation caption. See `formatting " "options `_ for " "more details." msgstr "" -#: aiogram.types.message.Message.answer_animation:18 -#: aiogram.types.message.Message.answer_audio:15 -#: aiogram.types.message.Message.answer_document:15 -#: aiogram.types.message.Message.answer_photo:14 -#: aiogram.types.message.Message.answer_video:18 -#: aiogram.types.message.Message.answer_voice:14 -#: aiogram.types.message.Message.edit_caption:14 -#: aiogram.types.message.Message.reply_animation:19 -#: aiogram.types.message.Message.reply_audio:16 -#: aiogram.types.message.Message.reply_document:16 -#: aiogram.types.message.Message.reply_photo:15 -#: aiogram.types.message.Message.reply_video:19 -#: aiogram.types.message.Message.reply_voice:15 of +#: aiogram.types.message.Message.answer_animation:19 +#: aiogram.types.message.Message.answer_audio:16 +#: aiogram.types.message.Message.answer_document:16 +#: aiogram.types.message.Message.answer_paid_media:17 +#: aiogram.types.message.Message.answer_photo:15 +#: aiogram.types.message.Message.answer_video:21 +#: aiogram.types.message.Message.answer_voice:15 +#: aiogram.types.message.Message.edit_caption:15 +#: aiogram.types.message.Message.reply_animation:20 +#: aiogram.types.message.Message.reply_audio:17 +#: aiogram.types.message.Message.reply_document:17 +#: aiogram.types.message.Message.reply_paid_media:18 +#: aiogram.types.message.Message.reply_photo:16 +#: aiogram.types.message.Message.reply_video:22 +#: aiogram.types.message.Message.reply_voice:16 of msgid "" "A JSON-serialized list of special entities that appear in the caption, " "which can be specified instead of *parse_mode*" msgstr "" -#: aiogram.types.message.Message.answer_animation:19 -#: aiogram.types.message.Message.reply_animation:20 of +#: aiogram.types.message.Message.answer_animation:20 +#: aiogram.types.message.Message.answer_paid_media:18 +#: aiogram.types.message.Message.answer_photo:16 +#: aiogram.types.message.Message.answer_video:22 +#: aiogram.types.message.Message.reply_animation:21 +#: aiogram.types.message.Message.reply_paid_media:19 +#: aiogram.types.message.Message.reply_photo:17 +#: aiogram.types.message.Message.reply_video:23 of +msgid "Pass :code:`True`, if the caption must be shown above the message media" +msgstr "" + +#: aiogram.types.message.Message.answer_animation:21 +#: aiogram.types.message.Message.reply_animation:22 of msgid "" "Pass :code:`True` if the animation needs to be covered with a spoiler " "animation" msgstr "" -#: aiogram.types.message.Message.answer:15 -#: aiogram.types.message.Message.answer_animation:20 -#: aiogram.types.message.Message.answer_audio:20 -#: aiogram.types.message.Message.answer_contact:15 -#: aiogram.types.message.Message.answer_dice:12 -#: aiogram.types.message.Message.answer_document:17 -#: aiogram.types.message.Message.answer_game:12 -#: aiogram.types.message.Message.answer_invoice:32 -#: aiogram.types.message.Message.answer_location:17 -#: aiogram.types.message.Message.answer_photo:16 -#: aiogram.types.message.Message.answer_poll:23 -#: aiogram.types.message.Message.answer_sticker:13 -#: aiogram.types.message.Message.answer_venue:19 -#: aiogram.types.message.Message.answer_video:21 -#: aiogram.types.message.Message.answer_video_note:15 -#: aiogram.types.message.Message.answer_voice:16 -#: aiogram.types.message.Message.copy_to:16 -#: aiogram.types.message.Message.forward:13 -#: aiogram.types.message.Message.reply:16 -#: aiogram.types.message.Message.reply_animation:21 -#: aiogram.types.message.Message.reply_audio:21 -#: aiogram.types.message.Message.reply_contact:16 -#: aiogram.types.message.Message.reply_dice:13 -#: aiogram.types.message.Message.reply_document:18 -#: aiogram.types.message.Message.reply_game:13 -#: aiogram.types.message.Message.reply_invoice:33 -#: aiogram.types.message.Message.reply_location:18 -#: aiogram.types.message.Message.reply_photo:17 -#: aiogram.types.message.Message.reply_poll:24 -#: aiogram.types.message.Message.reply_sticker:14 -#: aiogram.types.message.Message.reply_venue:20 -#: aiogram.types.message.Message.reply_video:22 -#: aiogram.types.message.Message.reply_video_note:16 -#: aiogram.types.message.Message.reply_voice:17 of +#: aiogram.types.message.Message.answer:16 +#: aiogram.types.message.Message.answer_animation:22 +#: aiogram.types.message.Message.answer_audio:21 +#: aiogram.types.message.Message.answer_contact:16 +#: aiogram.types.message.Message.answer_dice:13 +#: aiogram.types.message.Message.answer_document:18 +#: aiogram.types.message.Message.answer_game:13 +#: aiogram.types.message.Message.answer_invoice:33 +#: aiogram.types.message.Message.answer_location:18 +#: aiogram.types.message.Message.answer_paid_media:19 +#: aiogram.types.message.Message.answer_photo:18 +#: aiogram.types.message.Message.answer_poll:26 +#: aiogram.types.message.Message.answer_sticker:14 +#: aiogram.types.message.Message.answer_venue:20 +#: aiogram.types.message.Message.answer_video:25 +#: aiogram.types.message.Message.answer_video_note:16 +#: aiogram.types.message.Message.answer_voice:17 +#: aiogram.types.message.Message.copy_to:18 +#: aiogram.types.message.Message.forward:14 +#: aiogram.types.message.Message.reply:17 +#: aiogram.types.message.Message.reply_animation:23 +#: aiogram.types.message.Message.reply_audio:22 +#: aiogram.types.message.Message.reply_contact:17 +#: aiogram.types.message.Message.reply_dice:14 +#: aiogram.types.message.Message.reply_document:19 +#: aiogram.types.message.Message.reply_game:14 +#: aiogram.types.message.Message.reply_invoice:34 +#: aiogram.types.message.Message.reply_location:19 +#: aiogram.types.message.Message.reply_paid_media:20 +#: aiogram.types.message.Message.reply_photo:19 +#: aiogram.types.message.Message.reply_poll:27 +#: aiogram.types.message.Message.reply_sticker:15 +#: aiogram.types.message.Message.reply_venue:21 +#: aiogram.types.message.Message.reply_video:26 +#: aiogram.types.message.Message.reply_video_note:17 +#: aiogram.types.message.Message.reply_voice:18 of msgid "" "Sends the message `silently `_. Users will receive a notification with no sound." msgstr "" -#: aiogram.types.message.Message.answer:16 -#: aiogram.types.message.Message.answer_animation:21 -#: aiogram.types.message.Message.answer_audio:21 -#: aiogram.types.message.Message.answer_contact:16 -#: aiogram.types.message.Message.answer_document:18 -#: aiogram.types.message.Message.answer_game:13 -#: aiogram.types.message.Message.answer_invoice:33 -#: aiogram.types.message.Message.answer_location:18 -#: aiogram.types.message.Message.answer_photo:17 -#: aiogram.types.message.Message.answer_poll:24 -#: aiogram.types.message.Message.answer_sticker:14 -#: aiogram.types.message.Message.answer_venue:20 -#: aiogram.types.message.Message.answer_video:22 -#: aiogram.types.message.Message.answer_video_note:16 -#: aiogram.types.message.Message.answer_voice:17 -#: aiogram.types.message.Message.copy_to:17 -#: aiogram.types.message.Message.reply:17 -#: aiogram.types.message.Message.reply_animation:22 -#: aiogram.types.message.Message.reply_audio:22 -#: aiogram.types.message.Message.reply_contact:17 -#: aiogram.types.message.Message.reply_document:19 -#: aiogram.types.message.Message.reply_game:14 -#: aiogram.types.message.Message.reply_invoice:34 -#: aiogram.types.message.Message.reply_location:19 -#: aiogram.types.message.Message.reply_photo:18 -#: aiogram.types.message.Message.reply_poll:25 -#: aiogram.types.message.Message.reply_sticker:15 -#: aiogram.types.message.Message.reply_venue:21 -#: aiogram.types.message.Message.reply_video:23 -#: aiogram.types.message.Message.reply_video_note:17 -#: aiogram.types.message.Message.reply_voice:18 of -msgid "Protects the contents of the sent message from forwarding and saving" -msgstr "" - #: aiogram.types.message.Message.answer:17 -#: aiogram.types.message.Message.answer_animation:22 +#: aiogram.types.message.Message.answer_animation:23 #: aiogram.types.message.Message.answer_audio:22 #: aiogram.types.message.Message.answer_contact:17 -#: aiogram.types.message.Message.answer_dice:14 #: aiogram.types.message.Message.answer_document:19 #: aiogram.types.message.Message.answer_game:14 #: aiogram.types.message.Message.answer_invoice:34 #: aiogram.types.message.Message.answer_location:19 -#: aiogram.types.message.Message.answer_media_group:14 -#: aiogram.types.message.Message.answer_photo:18 -#: aiogram.types.message.Message.answer_poll:25 +#: aiogram.types.message.Message.answer_paid_media:20 +#: aiogram.types.message.Message.answer_photo:19 +#: aiogram.types.message.Message.answer_poll:27 #: aiogram.types.message.Message.answer_sticker:15 #: aiogram.types.message.Message.answer_venue:21 -#: aiogram.types.message.Message.answer_video:23 +#: aiogram.types.message.Message.answer_video:26 #: aiogram.types.message.Message.answer_video_note:17 #: aiogram.types.message.Message.answer_voice:18 -#: aiogram.types.message.Message.copy_to:18 +#: aiogram.types.message.Message.copy_to:19 #: aiogram.types.message.Message.reply:18 -#: aiogram.types.message.Message.reply_animation:23 +#: aiogram.types.message.Message.reply_animation:24 #: aiogram.types.message.Message.reply_audio:23 #: aiogram.types.message.Message.reply_contact:18 -#: aiogram.types.message.Message.reply_dice:15 #: aiogram.types.message.Message.reply_document:20 #: aiogram.types.message.Message.reply_game:15 #: aiogram.types.message.Message.reply_invoice:35 #: aiogram.types.message.Message.reply_location:20 -#: aiogram.types.message.Message.reply_media_group:15 -#: aiogram.types.message.Message.reply_photo:19 -#: aiogram.types.message.Message.reply_poll:26 +#: aiogram.types.message.Message.reply_paid_media:21 +#: aiogram.types.message.Message.reply_photo:20 +#: aiogram.types.message.Message.reply_poll:28 #: aiogram.types.message.Message.reply_sticker:16 #: aiogram.types.message.Message.reply_venue:22 -#: aiogram.types.message.Message.reply_video:24 +#: aiogram.types.message.Message.reply_video:27 #: aiogram.types.message.Message.reply_video_note:18 #: aiogram.types.message.Message.reply_voice:19 of -msgid "Description of the message to reply to" +msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" #: aiogram.types.message.Message.answer:18 -#: aiogram.types.message.Message.answer_animation:23 +#: aiogram.types.message.Message.answer_animation:24 #: aiogram.types.message.Message.answer_audio:23 #: aiogram.types.message.Message.answer_contact:18 #: aiogram.types.message.Message.answer_dice:15 #: aiogram.types.message.Message.answer_document:20 +#: aiogram.types.message.Message.answer_game:15 +#: aiogram.types.message.Message.answer_invoice:35 #: aiogram.types.message.Message.answer_location:20 -#: aiogram.types.message.Message.answer_photo:19 -#: aiogram.types.message.Message.answer_poll:26 +#: aiogram.types.message.Message.answer_media_group:15 +#: aiogram.types.message.Message.answer_paid_media:21 +#: aiogram.types.message.Message.answer_photo:20 +#: aiogram.types.message.Message.answer_poll:28 #: aiogram.types.message.Message.answer_sticker:16 #: aiogram.types.message.Message.answer_venue:22 -#: aiogram.types.message.Message.answer_video:24 +#: aiogram.types.message.Message.answer_video:27 #: aiogram.types.message.Message.answer_video_note:18 #: aiogram.types.message.Message.answer_voice:19 -#: aiogram.types.message.Message.copy_to:19 +#: aiogram.types.message.Message.copy_to:20 #: aiogram.types.message.Message.reply:19 -#: aiogram.types.message.Message.reply_animation:24 +#: aiogram.types.message.Message.reply_animation:25 #: aiogram.types.message.Message.reply_audio:24 #: aiogram.types.message.Message.reply_contact:19 #: aiogram.types.message.Message.reply_dice:16 #: aiogram.types.message.Message.reply_document:21 +#: aiogram.types.message.Message.reply_game:16 +#: aiogram.types.message.Message.reply_invoice:36 #: aiogram.types.message.Message.reply_location:21 -#: aiogram.types.message.Message.reply_photo:20 -#: aiogram.types.message.Message.reply_poll:27 +#: aiogram.types.message.Message.reply_media_group:16 +#: aiogram.types.message.Message.reply_paid_media:22 +#: aiogram.types.message.Message.reply_photo:21 +#: aiogram.types.message.Message.reply_poll:29 #: aiogram.types.message.Message.reply_sticker:17 #: aiogram.types.message.Message.reply_venue:23 -#: aiogram.types.message.Message.reply_video:25 +#: aiogram.types.message.Message.reply_video:28 #: aiogram.types.message.Message.reply_video_note:19 #: aiogram.types.message.Message.reply_voice:20 of msgid "" -"Additional interface options. A JSON-serialized object for an `inline " -"keyboard `_, " -"`custom reply keyboard " -"`_, instructions to " -"remove reply keyboard or to force a reply from the user." +"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" msgstr "" #: aiogram.types.message.Message.answer:19 -#: aiogram.types.message.Message.answer_animation:24 +#: aiogram.types.message.Message.answer_animation:25 #: aiogram.types.message.Message.answer_audio:24 #: aiogram.types.message.Message.answer_contact:19 #: aiogram.types.message.Message.answer_dice:16 @@ -892,17 +953,16 @@ msgstr "" #: aiogram.types.message.Message.answer_game:16 #: aiogram.types.message.Message.answer_invoice:36 #: aiogram.types.message.Message.answer_location:21 -#: aiogram.types.message.Message.answer_media_group:15 -#: aiogram.types.message.Message.answer_photo:20 -#: aiogram.types.message.Message.answer_poll:27 +#: aiogram.types.message.Message.answer_media_group:16 +#: aiogram.types.message.Message.answer_photo:21 +#: aiogram.types.message.Message.answer_poll:29 #: aiogram.types.message.Message.answer_sticker:17 #: aiogram.types.message.Message.answer_venue:23 -#: aiogram.types.message.Message.answer_video:25 +#: aiogram.types.message.Message.answer_video:28 #: aiogram.types.message.Message.answer_video_note:19 #: aiogram.types.message.Message.answer_voice:20 -#: aiogram.types.message.Message.copy_to:20 #: aiogram.types.message.Message.reply:20 -#: aiogram.types.message.Message.reply_animation:25 +#: aiogram.types.message.Message.reply_animation:26 #: aiogram.types.message.Message.reply_audio:25 #: aiogram.types.message.Message.reply_contact:20 #: aiogram.types.message.Message.reply_dice:17 @@ -910,75 +970,109 @@ msgstr "" #: aiogram.types.message.Message.reply_game:17 #: aiogram.types.message.Message.reply_invoice:37 #: aiogram.types.message.Message.reply_location:22 -#: aiogram.types.message.Message.reply_media_group:16 -#: aiogram.types.message.Message.reply_photo:21 -#: aiogram.types.message.Message.reply_poll:28 +#: aiogram.types.message.Message.reply_media_group:17 +#: aiogram.types.message.Message.reply_photo:22 +#: aiogram.types.message.Message.reply_poll:30 #: aiogram.types.message.Message.reply_sticker:18 #: aiogram.types.message.Message.reply_venue:24 -#: aiogram.types.message.Message.reply_video:26 +#: aiogram.types.message.Message.reply_video:29 #: aiogram.types.message.Message.reply_video_note:20 #: aiogram.types.message.Message.reply_voice:21 of msgid "" +"Unique identifier of the message effect to be added to the message; for " +"private chats only" +msgstr "" + +#: aiogram.types.message.Message.answer:21 +#: aiogram.types.message.Message.answer_animation:27 +#: aiogram.types.message.Message.answer_audio:26 +#: aiogram.types.message.Message.answer_contact:21 +#: aiogram.types.message.Message.answer_dice:18 +#: aiogram.types.message.Message.answer_document:23 +#: aiogram.types.message.Message.answer_location:23 +#: aiogram.types.message.Message.answer_paid_media:23 +#: aiogram.types.message.Message.answer_photo:23 +#: aiogram.types.message.Message.answer_poll:31 +#: aiogram.types.message.Message.answer_sticker:19 +#: aiogram.types.message.Message.answer_venue:25 +#: aiogram.types.message.Message.answer_video:30 +#: aiogram.types.message.Message.answer_video_note:21 +#: aiogram.types.message.Message.answer_voice:22 +#: aiogram.types.message.Message.copy_to:22 +#: aiogram.types.message.Message.reply:21 +#: aiogram.types.message.Message.reply_animation:27 +#: aiogram.types.message.Message.reply_audio:26 +#: aiogram.types.message.Message.reply_contact:21 +#: aiogram.types.message.Message.reply_dice:18 +#: aiogram.types.message.Message.reply_document:23 +#: aiogram.types.message.Message.reply_location:23 +#: aiogram.types.message.Message.reply_paid_media:23 +#: aiogram.types.message.Message.reply_photo:23 +#: aiogram.types.message.Message.reply_poll:31 +#: aiogram.types.message.Message.reply_sticker:19 +#: aiogram.types.message.Message.reply_venue:25 +#: aiogram.types.message.Message.reply_video:30 +#: aiogram.types.message.Message.reply_video_note:21 +#: aiogram.types.message.Message.reply_voice:22 of +msgid "" +"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" +msgstr "" + +#: aiogram.types.message.Message.answer:22 +#: aiogram.types.message.Message.answer_animation:28 +#: aiogram.types.message.Message.answer_audio:27 +#: aiogram.types.message.Message.answer_contact:22 +#: aiogram.types.message.Message.answer_dice:19 +#: aiogram.types.message.Message.answer_document:24 +#: aiogram.types.message.Message.answer_game:19 +#: aiogram.types.message.Message.answer_invoice:39 +#: aiogram.types.message.Message.answer_location:24 +#: aiogram.types.message.Message.answer_media_group:18 +#: aiogram.types.message.Message.answer_photo:24 +#: aiogram.types.message.Message.answer_poll:32 +#: aiogram.types.message.Message.answer_sticker:20 +#: aiogram.types.message.Message.answer_venue:26 +#: aiogram.types.message.Message.answer_video:31 +#: aiogram.types.message.Message.answer_video_note:22 +#: aiogram.types.message.Message.answer_voice:23 +#: aiogram.types.message.Message.copy_to:23 +#: aiogram.types.message.Message.reply:22 +#: aiogram.types.message.Message.reply_animation:28 +#: aiogram.types.message.Message.reply_audio:27 +#: aiogram.types.message.Message.reply_contact:22 +#: aiogram.types.message.Message.reply_dice:19 +#: aiogram.types.message.Message.reply_document:24 +#: aiogram.types.message.Message.reply_game:19 +#: aiogram.types.message.Message.reply_invoice:39 +#: aiogram.types.message.Message.reply_location:24 +#: aiogram.types.message.Message.reply_media_group:18 +#: aiogram.types.message.Message.reply_photo:24 +#: aiogram.types.message.Message.reply_poll:32 +#: aiogram.types.message.Message.reply_sticker:20 +#: aiogram.types.message.Message.reply_venue:26 +#: aiogram.types.message.Message.reply_video:31 +#: aiogram.types.message.Message.reply_video_note:22 +#: aiogram.types.message.Message.reply_voice:23 of +msgid "" "Pass :code:`True` if the message should be sent even if the specified " "replied-to message is not found" msgstr "" -#: aiogram.types.message.Message.answer -#: aiogram.types.message.Message.answer_animation -#: aiogram.types.message.Message.answer_audio -#: aiogram.types.message.Message.answer_contact -#: aiogram.types.message.Message.answer_dice -#: aiogram.types.message.Message.answer_document -#: aiogram.types.message.Message.answer_game -#: aiogram.types.message.Message.answer_invoice -#: aiogram.types.message.Message.answer_location -#: aiogram.types.message.Message.answer_media_group -#: aiogram.types.message.Message.answer_photo -#: aiogram.types.message.Message.answer_poll -#: aiogram.types.message.Message.answer_sticker -#: aiogram.types.message.Message.answer_venue -#: aiogram.types.message.Message.answer_video -#: aiogram.types.message.Message.answer_video_note -#: aiogram.types.message.Message.answer_voice -#: aiogram.types.message.Message.copy_to aiogram.types.message.Message.delete -#: aiogram.types.message.Message.delete_reply_markup -#: aiogram.types.message.Message.edit_caption -#: aiogram.types.message.Message.edit_live_location -#: aiogram.types.message.Message.edit_media -#: aiogram.types.message.Message.edit_reply_markup -#: aiogram.types.message.Message.edit_text -#: aiogram.types.message.Message.forward aiogram.types.message.Message.get_url -#: aiogram.types.message.Message.pin aiogram.types.message.Message.react -#: aiogram.types.message.Message.reply -#: aiogram.types.message.Message.reply_animation -#: aiogram.types.message.Message.reply_audio -#: aiogram.types.message.Message.reply_contact -#: aiogram.types.message.Message.reply_dice -#: aiogram.types.message.Message.reply_document -#: aiogram.types.message.Message.reply_game -#: aiogram.types.message.Message.reply_invoice -#: aiogram.types.message.Message.reply_location -#: aiogram.types.message.Message.reply_media_group -#: aiogram.types.message.Message.reply_photo -#: aiogram.types.message.Message.reply_poll -#: aiogram.types.message.Message.reply_sticker -#: aiogram.types.message.Message.reply_venue -#: aiogram.types.message.Message.reply_video -#: aiogram.types.message.Message.reply_video_note -#: aiogram.types.message.Message.reply_voice -#: aiogram.types.message.Message.send_copy -#: aiogram.types.message.Message.stop_live_location -#: aiogram.types.message.Message.unpin of +#: ../../api/types/message.rst msgid "Returns" msgstr "" -#: aiogram.types.message.Message.answer_animation:26 -#: aiogram.types.message.Message.reply_animation:26 of +#: aiogram.types.message.Message.answer_animation:30 +#: aiogram.types.message.Message.reply_animation:29 of msgid "instance of method :class:`aiogram.methods.send_animation.SendAnimation`" msgstr "" -#: aiogram.types.message.Message.answer:21 -#: aiogram.types.message.Message.answer_animation:25 +#: aiogram.types.message.Message.answer:20 +#: aiogram.types.message.Message.answer_animation:26 #: aiogram.types.message.Message.answer_audio:25 #: aiogram.types.message.Message.answer_contact:20 #: aiogram.types.message.Message.answer_dice:17 @@ -986,14 +1080,36 @@ msgstr "" #: aiogram.types.message.Message.answer_game:17 #: aiogram.types.message.Message.answer_invoice:37 #: aiogram.types.message.Message.answer_location:22 -#: aiogram.types.message.Message.answer_photo:21 -#: aiogram.types.message.Message.answer_poll:28 +#: aiogram.types.message.Message.answer_media_group:17 +#: aiogram.types.message.Message.answer_paid_media:22 +#: aiogram.types.message.Message.answer_photo:22 +#: aiogram.types.message.Message.answer_poll:30 #: aiogram.types.message.Message.answer_sticker:18 #: aiogram.types.message.Message.answer_venue:24 -#: aiogram.types.message.Message.answer_video:26 +#: aiogram.types.message.Message.answer_video:29 #: aiogram.types.message.Message.answer_video_note:20 #: aiogram.types.message.Message.answer_voice:21 #: aiogram.types.message.Message.copy_to:21 of +msgid "Description of the message to reply to" +msgstr "" + +#: aiogram.types.message.Message.answer:24 +#: aiogram.types.message.Message.answer_animation:29 +#: aiogram.types.message.Message.answer_audio:28 +#: aiogram.types.message.Message.answer_contact:23 +#: aiogram.types.message.Message.answer_dice:20 +#: aiogram.types.message.Message.answer_document:25 +#: aiogram.types.message.Message.answer_game:20 +#: aiogram.types.message.Message.answer_invoice:40 +#: aiogram.types.message.Message.answer_location:25 +#: aiogram.types.message.Message.answer_photo:25 +#: aiogram.types.message.Message.answer_poll:33 +#: aiogram.types.message.Message.answer_sticker:21 +#: aiogram.types.message.Message.answer_venue:27 +#: aiogram.types.message.Message.answer_video:32 +#: aiogram.types.message.Message.answer_video_note:23 +#: aiogram.types.message.Message.answer_voice:24 +#: aiogram.types.message.Message.copy_to:24 of msgid "If the message is a reply, ID of the original message" msgstr "" @@ -1004,8 +1120,8 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_audio:7 -#: aiogram.types.message.Message.reply_audio:8 of +#: aiogram.types.message.Message.answer_audio:8 +#: aiogram.types.message.Message.reply_audio:9 of msgid "" "Use this method to send audio files, if you want Telegram clients to " "display them in the music player. Your audio must be in the .MP3 or .M4A " @@ -1015,13 +1131,13 @@ msgid "" "the :class:`aiogram.methods.send_voice.SendVoice` method instead." msgstr "" -#: aiogram.types.message.Message.answer_audio:10 -#: aiogram.types.message.Message.reply_audio:11 of +#: aiogram.types.message.Message.answer_audio:11 +#: aiogram.types.message.Message.reply_audio:12 of msgid "Source: https://core.telegram.org/bots/api#sendaudio" msgstr "" -#: aiogram.types.message.Message.answer_audio:12 -#: aiogram.types.message.Message.reply_audio:13 of +#: aiogram.types.message.Message.answer_audio:13 +#: aiogram.types.message.Message.reply_audio:14 of msgid "" "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 " @@ -1030,36 +1146,36 @@ msgid "" "Files » `" msgstr "" -#: aiogram.types.message.Message.answer_audio:13 -#: aiogram.types.message.Message.reply_audio:14 of +#: aiogram.types.message.Message.answer_audio:14 +#: aiogram.types.message.Message.reply_audio:15 of msgid "Audio caption, 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.message.Message.answer_audio:14 -#: aiogram.types.message.Message.reply_audio:15 of +#: aiogram.types.message.Message.answer_audio:15 +#: aiogram.types.message.Message.reply_audio:16 of msgid "" "Mode for parsing entities in the audio caption. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.message.Message.answer_audio:16 -#: aiogram.types.message.Message.reply_audio:17 of -msgid "Duration of the audio in seconds" -msgstr "" - #: aiogram.types.message.Message.answer_audio:17 #: aiogram.types.message.Message.reply_audio:18 of -msgid "Performer" +msgid "Duration of the audio in seconds" msgstr "" #: aiogram.types.message.Message.answer_audio:18 #: aiogram.types.message.Message.reply_audio:19 of +msgid "Performer" +msgstr "" + +#: aiogram.types.message.Message.answer_audio:19 +#: aiogram.types.message.Message.reply_audio:20 of msgid "Track name" msgstr "" -#: aiogram.types.message.Message.answer_audio:26 -#: aiogram.types.message.Message.reply_audio:26 of +#: aiogram.types.message.Message.answer_audio:29 +#: aiogram.types.message.Message.reply_audio:28 of msgid "instance of method :class:`aiogram.methods.send_audio.SendAudio`" msgstr "" @@ -1070,42 +1186,42 @@ msgid "" "will automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_contact:7 -#: aiogram.types.message.Message.reply_contact:8 of +#: aiogram.types.message.Message.answer_contact:8 +#: aiogram.types.message.Message.reply_contact:9 of msgid "" "Use this method to send phone contacts. On success, the sent " ":class:`aiogram.types.message.Message` is returned." msgstr "" -#: aiogram.types.message.Message.answer_contact:9 -#: aiogram.types.message.Message.reply_contact:10 of +#: aiogram.types.message.Message.answer_contact:10 +#: aiogram.types.message.Message.reply_contact:11 of msgid "Source: https://core.telegram.org/bots/api#sendcontact" msgstr "" -#: aiogram.types.message.Message.answer_contact:11 -#: aiogram.types.message.Message.reply_contact:12 of -msgid "Contact's phone number" -msgstr "" - #: aiogram.types.message.Message.answer_contact:12 #: aiogram.types.message.Message.reply_contact:13 of -msgid "Contact's first name" +msgid "Contact's phone number" msgstr "" #: aiogram.types.message.Message.answer_contact:13 #: aiogram.types.message.Message.reply_contact:14 of -msgid "Contact's last name" +msgid "Contact's first name" msgstr "" #: aiogram.types.message.Message.answer_contact:14 #: aiogram.types.message.Message.reply_contact:15 of +msgid "Contact's last name" +msgstr "" + +#: aiogram.types.message.Message.answer_contact:15 +#: aiogram.types.message.Message.reply_contact:16 of msgid "" "Additional data about the contact in the form of a `vCard " "`_, 0-2048 bytes" msgstr "" -#: aiogram.types.message.Message.answer_contact:21 -#: aiogram.types.message.Message.reply_contact:21 of +#: aiogram.types.message.Message.answer_contact:24 +#: aiogram.types.message.Message.reply_contact:23 of msgid "instance of method :class:`aiogram.methods.send_contact.SendContact`" msgstr "" @@ -1116,8 +1232,8 @@ msgid "" "will automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_document:7 -#: aiogram.types.message.Message.reply_document:8 of +#: aiogram.types.message.Message.answer_document:8 +#: aiogram.types.message.Message.reply_document:9 of msgid "" "Use this method to send general files. On success, the sent " ":class:`aiogram.types.message.Message` is returned. Bots can currently " @@ -1125,13 +1241,13 @@ msgid "" "in the future." msgstr "" -#: aiogram.types.message.Message.answer_document:9 -#: aiogram.types.message.Message.reply_document:10 of +#: aiogram.types.message.Message.answer_document:10 +#: aiogram.types.message.Message.reply_document:11 of msgid "Source: https://core.telegram.org/bots/api#senddocument" msgstr "" -#: aiogram.types.message.Message.answer_document:11 -#: aiogram.types.message.Message.reply_document:12 of +#: aiogram.types.message.Message.answer_document:12 +#: aiogram.types.message.Message.reply_document:13 of msgid "" "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" @@ -1139,30 +1255,30 @@ msgid "" "/form-data. :ref:`More information on Sending Files » `" msgstr "" -#: aiogram.types.message.Message.answer_document:13 -#: aiogram.types.message.Message.reply_document:14 of +#: aiogram.types.message.Message.answer_document:14 +#: aiogram.types.message.Message.reply_document:15 of msgid "" "Document caption (may also be used when resending documents by " "*file_id*), 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.message.Message.answer_document:14 -#: aiogram.types.message.Message.reply_document:15 of +#: aiogram.types.message.Message.answer_document:15 +#: aiogram.types.message.Message.reply_document:16 of msgid "" "Mode for parsing entities in the document caption. See `formatting " "options `_ for " "more details." msgstr "" -#: aiogram.types.message.Message.answer_document:16 -#: aiogram.types.message.Message.reply_document:17 of +#: aiogram.types.message.Message.answer_document:17 +#: aiogram.types.message.Message.reply_document:18 of msgid "" "Disables automatic server-side content type detection for files uploaded " "using multipart/form-data" msgstr "" -#: aiogram.types.message.Message.answer_document:23 -#: aiogram.types.message.Message.reply_document:23 of +#: aiogram.types.message.Message.answer_document:26 +#: aiogram.types.message.Message.reply_document:25 of msgid "instance of method :class:`aiogram.methods.send_document.SendDocument`" msgstr "" @@ -1173,27 +1289,27 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_game:7 -#: aiogram.types.message.Message.reply_game:8 of +#: aiogram.types.message.Message.answer_game:8 +#: aiogram.types.message.Message.reply_game:9 of msgid "" "Use this method to send a game. On success, the sent " ":class:`aiogram.types.message.Message` is returned." msgstr "" -#: aiogram.types.message.Message.answer_game:9 -#: aiogram.types.message.Message.reply_game:10 of +#: aiogram.types.message.Message.answer_game:10 +#: aiogram.types.message.Message.reply_game:11 of msgid "Source: https://core.telegram.org/bots/api#sendgame" msgstr "" -#: aiogram.types.message.Message.answer_game:11 -#: aiogram.types.message.Message.reply_game:12 of +#: aiogram.types.message.Message.answer_game:12 +#: aiogram.types.message.Message.reply_game:13 of msgid "" "Short name of the game, serves as the unique identifier for the game. Set" " up your games via `@BotFather `_." msgstr "" -#: aiogram.types.message.Message.answer_game:15 -#: aiogram.types.message.Message.reply_game:16 of +#: aiogram.types.message.Message.answer_game:18 +#: aiogram.types.message.Message.reply_game:18 of msgid "" "A JSON-serialized object for an `inline keyboard " "`_. If empty, " @@ -1201,8 +1317,8 @@ msgid "" "button must launch the game." msgstr "" -#: aiogram.types.message.Message.answer_game:18 -#: aiogram.types.message.Message.reply_game:18 of +#: aiogram.types.message.Message.answer_game:21 +#: aiogram.types.message.Message.reply_game:20 of msgid "instance of method :class:`aiogram.methods.send_game.SendGame`" msgstr "" @@ -1213,70 +1329,75 @@ msgid "" "will automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_invoice:7 -#: aiogram.types.message.Message.reply_invoice:8 of +#: aiogram.types.message.Message.answer_invoice:8 +#: aiogram.types.message.Message.reply_invoice:9 of msgid "" "Use this method to send invoices. On success, the sent " ":class:`aiogram.types.message.Message` is returned." msgstr "" -#: aiogram.types.message.Message.answer_invoice:9 -#: aiogram.types.message.Message.reply_invoice:10 of +#: aiogram.types.message.Message.answer_invoice:10 +#: aiogram.types.message.Message.reply_invoice:11 of msgid "Source: https://core.telegram.org/bots/api#sendinvoice" msgstr "" -#: aiogram.types.message.Message.answer_invoice:11 -#: aiogram.types.message.Message.reply_invoice:12 of -msgid "Product name, 1-32 characters" -msgstr "" - #: aiogram.types.message.Message.answer_invoice:12 #: aiogram.types.message.Message.reply_invoice:13 of -msgid "Product description, 1-255 characters" +msgid "Product name, 1-32 characters" msgstr "" #: aiogram.types.message.Message.answer_invoice:13 #: aiogram.types.message.Message.reply_invoice:14 of -msgid "" -"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to " -"the user, use for your internal processes." +msgid "Product description, 1-255 characters" msgstr "" #: aiogram.types.message.Message.answer_invoice:14 #: aiogram.types.message.Message.reply_invoice:15 of msgid "" -"Payment provider token, obtained via `@BotFather " -"`_" +"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to " +"the user, use it for your internal processes." msgstr "" #: aiogram.types.message.Message.answer_invoice:15 #: aiogram.types.message.Message.reply_invoice:16 of msgid "" "Three-letter ISO 4217 currency code, see `more on currencies " -"`_" +"`_. Pass " +"'XTR' for payments in `Telegram Stars `_." msgstr "" #: aiogram.types.message.Message.answer_invoice:16 #: aiogram.types.message.Message.reply_invoice:17 of msgid "" "Price breakdown, a JSON-serialized list of components (e.g. product " -"price, tax, discount, delivery cost, delivery tax, bonus, etc.)" +"price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must " +"contain exactly one item for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.message.Message.answer_invoice:17 #: aiogram.types.message.Message.reply_invoice:18 of msgid "" +"Payment provider token, obtained via `@BotFather " +"`_. Pass an empty string for payments in " +"`Telegram Stars `_." +msgstr "" + +#: aiogram.types.message.Message.answer_invoice:18 +#: aiogram.types.message.Message.reply_invoice:19 of +msgid "" "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" +"majority of currencies). Defaults to 0. Not supported for payments in " +"`Telegram Stars `_." msgstr "" -#: aiogram.types.message.Message.answer_invoice:18 -#: aiogram.types.message.Message.reply_invoice:19 of +#: aiogram.types.message.Message.answer_invoice:19 +#: aiogram.types.message.Message.reply_invoice:20 of msgid "" "A JSON-serialized array of suggested amounts of tips in the *smallest " "units* of the currency (integer, **not** float/double). At most 4 " @@ -1285,8 +1406,8 @@ msgid "" "*max_tip_amount*." msgstr "" -#: aiogram.types.message.Message.answer_invoice:19 -#: aiogram.types.message.Message.reply_invoice:20 of +#: aiogram.types.message.Message.answer_invoice:20 +#: aiogram.types.message.Message.reply_invoice:21 of msgid "" "Unique deep-linking parameter. If left empty, **forwarded copies** of the" " sent message will have a *Pay* button, allowing multiple users to pay " @@ -1296,82 +1417,94 @@ msgid "" "as the start parameter" msgstr "" -#: aiogram.types.message.Message.answer_invoice:20 -#: aiogram.types.message.Message.reply_invoice:21 of +#: aiogram.types.message.Message.answer_invoice:21 +#: aiogram.types.message.Message.reply_invoice:22 of msgid "" "JSON-serialized data about the invoice, which will be shared with the " "payment provider. A detailed description of required fields should be " "provided by the payment provider." msgstr "" -#: aiogram.types.message.Message.answer_invoice:21 -#: aiogram.types.message.Message.reply_invoice:22 of +#: aiogram.types.message.Message.answer_invoice:22 +#: aiogram.types.message.Message.reply_invoice:23 of msgid "" "URL of the product photo for the invoice. Can be a photo of the goods or " "a marketing image for a service. People like it better when they see what" " they are paying for." msgstr "" -#: aiogram.types.message.Message.answer_invoice:22 -#: aiogram.types.message.Message.reply_invoice:23 of -msgid "Photo size in bytes" -msgstr "" - #: aiogram.types.message.Message.answer_invoice:23 #: aiogram.types.message.Message.reply_invoice:24 of -msgid "Photo width" +msgid "Photo size in bytes" msgstr "" #: aiogram.types.message.Message.answer_invoice:24 #: aiogram.types.message.Message.reply_invoice:25 of -msgid "Photo height" +msgid "Photo width" msgstr "" #: aiogram.types.message.Message.answer_invoice:25 #: aiogram.types.message.Message.reply_invoice:26 of -msgid "" -"Pass :code:`True` if you require the user's full name to complete the " -"order" +msgid "Photo height" msgstr "" #: aiogram.types.message.Message.answer_invoice:26 #: aiogram.types.message.Message.reply_invoice:27 of msgid "" -"Pass :code:`True` if you require the user's phone number to complete the " -"order" +"Pass :code:`True` if you require the user's full name to complete the " +"order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.message.Message.answer_invoice:27 #: aiogram.types.message.Message.reply_invoice:28 of msgid "" -"Pass :code:`True` if you require the user's email address to complete the" -" order" +"Pass :code:`True` if you require the user's phone number to complete the " +"order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.message.Message.answer_invoice:28 #: aiogram.types.message.Message.reply_invoice:29 of msgid "" -"Pass :code:`True` if you require the user's shipping address to complete " -"the order" +"Pass :code:`True` if you require the user's email address to complete the" +" order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.message.Message.answer_invoice:29 #: aiogram.types.message.Message.reply_invoice:30 of -msgid "Pass :code:`True` if the user's phone number should be sent to provider" +msgid "" +"Pass :code:`True` if you require the user's shipping address to complete " +"the order. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.message.Message.answer_invoice:30 #: aiogram.types.message.Message.reply_invoice:31 of -msgid "Pass :code:`True` if the user's email address should be sent to provider" +msgid "" +"Pass :code:`True` if the user's phone number should be sent to the " +"provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" #: aiogram.types.message.Message.answer_invoice:31 #: aiogram.types.message.Message.reply_invoice:32 of -msgid "Pass :code:`True` if the final price depends on the shipping method" +msgid "" +"Pass :code:`True` if the user's email address should be sent to the " +"provider. Ignored for payments in `Telegram Stars " +"`_." msgstr "" -#: aiogram.types.message.Message.answer_invoice:35 -#: aiogram.types.message.Message.reply_invoice:36 of +#: aiogram.types.message.Message.answer_invoice:32 +#: aiogram.types.message.Message.reply_invoice:33 of +msgid "" +"Pass :code:`True` if the final price depends on the shipping method. " +"Ignored for payments in `Telegram Stars `_." +msgstr "" + +#: aiogram.types.message.Message.answer_invoice:38 +#: aiogram.types.message.Message.reply_invoice:38 of msgid "" "A JSON-serialized object for an `inline keyboard " "`_. If empty, " @@ -1379,8 +1512,8 @@ msgid "" "first button must be a Pay button." msgstr "" -#: aiogram.types.message.Message.answer_invoice:38 -#: aiogram.types.message.Message.reply_invoice:38 of +#: aiogram.types.message.Message.answer_invoice:41 +#: aiogram.types.message.Message.reply_invoice:40 of msgid "instance of method :class:`aiogram.methods.send_invoice.SendInvoice`" msgstr "" @@ -1391,59 +1524,60 @@ msgid "" "will automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_location:7 -#: aiogram.types.message.Message.reply_location:8 of +#: aiogram.types.message.Message.answer_location:8 +#: aiogram.types.message.Message.reply_location:9 of msgid "" "Use this method to send point on the map. On success, the sent " ":class:`aiogram.types.message.Message` is returned." msgstr "" -#: aiogram.types.message.Message.answer_location:9 -#: aiogram.types.message.Message.reply_location:10 of +#: aiogram.types.message.Message.answer_location:10 +#: aiogram.types.message.Message.reply_location:11 of msgid "Source: https://core.telegram.org/bots/api#sendlocation" msgstr "" -#: aiogram.types.message.Message.answer_location:11 -#: aiogram.types.message.Message.reply_location:12 of -msgid "Latitude of the location" -msgstr "" - #: aiogram.types.message.Message.answer_location:12 #: aiogram.types.message.Message.reply_location:13 of -msgid "Longitude of the location" +msgid "Latitude of the location" msgstr "" #: aiogram.types.message.Message.answer_location:13 -#: aiogram.types.message.Message.edit_live_location:14 #: aiogram.types.message.Message.reply_location:14 of -msgid "The radius of uncertainty for the location, measured in meters; 0-1500" +msgid "Longitude of the location" msgstr "" #: aiogram.types.message.Message.answer_location:14 +#: aiogram.types.message.Message.edit_live_location:16 #: aiogram.types.message.Message.reply_location:15 of -msgid "" -"Period in seconds for which the location will be updated (see `Live " -"Locations `_, should be between" -" 60 and 86400." +msgid "The radius of uncertainty for the location, measured in meters; 0-1500" msgstr "" #: aiogram.types.message.Message.answer_location:15 #: aiogram.types.message.Message.reply_location:16 of msgid "" -"For live locations, a direction in which the user is moving, in degrees. " -"Must be between 1 and 360 if specified." +"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." msgstr "" #: aiogram.types.message.Message.answer_location:16 #: aiogram.types.message.Message.reply_location:17 of msgid "" +"For live locations, a direction in which the user is moving, in degrees. " +"Must be between 1 and 360 if specified." +msgstr "" + +#: aiogram.types.message.Message.answer_location:17 +#: aiogram.types.message.Message.reply_location:18 of +msgid "" "For live locations, a maximum distance for proximity alerts about " "approaching another chat member, in meters. Must be between 1 and 100000 " "if specified." msgstr "" -#: aiogram.types.message.Message.answer_location:23 -#: aiogram.types.message.Message.reply_location:23 of +#: aiogram.types.message.Message.answer_location:26 +#: aiogram.types.message.Message.reply_location:25 of msgid "instance of method :class:`aiogram.methods.send_location.SendLocation`" msgstr "" @@ -1455,8 +1589,8 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_media_group:7 -#: aiogram.types.message.Message.reply_media_group:8 of +#: aiogram.types.message.Message.answer_media_group:8 +#: aiogram.types.message.Message.reply_media_group:9 of msgid "" "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" @@ -1465,38 +1599,38 @@ msgid "" "returned." msgstr "" -#: aiogram.types.message.Message.answer_media_group:9 -#: aiogram.types.message.Message.reply_media_group:10 of +#: aiogram.types.message.Message.answer_media_group:10 +#: aiogram.types.message.Message.reply_media_group:11 of msgid "Source: https://core.telegram.org/bots/api#sendmediagroup" msgstr "" -#: aiogram.types.message.Message.answer_media_group:11 -#: aiogram.types.message.Message.reply_media_group:12 of -msgid "" -"A JSON-serialized array describing messages to be sent, must include 2-10" -" items" -msgstr "" - #: aiogram.types.message.Message.answer_media_group:12 #: aiogram.types.message.Message.reply_media_group:13 of msgid "" -"Sends messages `silently `_. Users will receive a notification with no sound." +"A JSON-serialized array describing messages to be sent, must include 2-10" +" items" msgstr "" #: aiogram.types.message.Message.answer_media_group:13 #: aiogram.types.message.Message.reply_media_group:14 of +msgid "" +"Sends messages `silently `_. Users will receive a notification with no sound." +msgstr "" + +#: aiogram.types.message.Message.answer_media_group:14 +#: aiogram.types.message.Message.reply_media_group:15 of msgid "Protects the contents of the sent messages from forwarding and saving" msgstr "" -#: aiogram.types.message.Message.answer_media_group:17 -#: aiogram.types.message.Message.reply_media_group:17 of +#: aiogram.types.message.Message.answer_media_group:20 +#: aiogram.types.message.Message.reply_media_group:19 of msgid "" "instance of method " ":class:`aiogram.methods.send_media_group.SendMediaGroup`" msgstr "" -#: aiogram.types.message.Message.answer_media_group:16 of +#: aiogram.types.message.Message.answer_media_group:19 of msgid "If the messages are a reply, ID of the original message" msgstr "" @@ -1507,54 +1641,54 @@ msgid "" "will automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer:7 aiogram.types.message.Message.reply:8 +#: aiogram.types.message.Message.answer:8 aiogram.types.message.Message.reply:9 #: of msgid "" "Use this method to send text messages. On success, the sent " ":class:`aiogram.types.message.Message` is returned." msgstr "" -#: aiogram.types.message.Message.answer:9 -#: aiogram.types.message.Message.reply:10 of +#: aiogram.types.message.Message.answer:10 +#: aiogram.types.message.Message.reply:11 of msgid "Source: https://core.telegram.org/bots/api#sendmessage" msgstr "" -#: aiogram.types.message.Message.answer:11 -#: aiogram.types.message.Message.reply:12 of -msgid "Text of the message to be sent, 1-4096 characters after entities parsing" -msgstr "" - #: aiogram.types.message.Message.answer:12 -#: aiogram.types.message.Message.edit_text:13 #: aiogram.types.message.Message.reply:13 of -msgid "" -"Mode for parsing entities in the message text. See `formatting options " -"`_ for more " -"details." +msgid "Text of the message to be sent, 1-4096 characters after entities parsing" msgstr "" #: aiogram.types.message.Message.answer:13 #: aiogram.types.message.Message.edit_text:14 #: aiogram.types.message.Message.reply:14 of msgid "" -"A JSON-serialized list of special entities that appear in message text, " -"which can be specified instead of *parse_mode*" +"Mode for parsing entities in the message text. See `formatting options " +"`_ for more " +"details." msgstr "" #: aiogram.types.message.Message.answer:14 #: aiogram.types.message.Message.edit_text:15 #: aiogram.types.message.Message.reply:15 of +msgid "" +"A JSON-serialized list of special entities that appear in message text, " +"which can be specified instead of *parse_mode*" +msgstr "" + +#: aiogram.types.message.Message.answer:15 +#: aiogram.types.message.Message.edit_text:16 +#: aiogram.types.message.Message.reply:16 of msgid "Link preview generation options for the message" msgstr "" -#: aiogram.types.message.Message.answer:20 -#: aiogram.types.message.Message.edit_text:17 -#: aiogram.types.message.Message.reply:21 of +#: aiogram.types.message.Message.answer:23 +#: aiogram.types.message.Message.edit_text:18 +#: aiogram.types.message.Message.reply:23 of msgid "Disables link previews for links in this message" msgstr "" -#: aiogram.types.message.Message.answer:22 -#: aiogram.types.message.Message.reply:22 of +#: aiogram.types.message.Message.answer:25 +#: aiogram.types.message.Message.reply:24 of msgid "instance of method :class:`aiogram.methods.send_message.SendMessage`" msgstr "" @@ -1565,20 +1699,20 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_photo:7 -#: aiogram.types.message.Message.reply_photo:8 of +#: aiogram.types.message.Message.answer_photo:8 +#: aiogram.types.message.Message.reply_photo:9 of msgid "" "Use this method to send photos. On success, the sent " ":class:`aiogram.types.message.Message` is returned." msgstr "" -#: aiogram.types.message.Message.answer_photo:9 -#: aiogram.types.message.Message.reply_photo:10 of +#: aiogram.types.message.Message.answer_photo:10 +#: aiogram.types.message.Message.reply_photo:11 of msgid "Source: https://core.telegram.org/bots/api#sendphoto" msgstr "" -#: aiogram.types.message.Message.answer_photo:11 -#: aiogram.types.message.Message.reply_photo:12 of +#: aiogram.types.message.Message.answer_photo:12 +#: aiogram.types.message.Message.reply_photo:13 of msgid "" "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 " @@ -1589,30 +1723,30 @@ msgid "" "files>`" msgstr "" -#: aiogram.types.message.Message.answer_photo:12 -#: aiogram.types.message.Message.reply_photo:13 of +#: aiogram.types.message.Message.answer_photo:13 +#: aiogram.types.message.Message.reply_photo:14 of msgid "" "Photo caption (may also be used when resending photos by *file_id*), " "0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.message.Message.answer_photo:13 -#: aiogram.types.message.Message.reply_photo:14 of +#: aiogram.types.message.Message.answer_photo:14 +#: aiogram.types.message.Message.reply_photo:15 of msgid "" "Mode for parsing entities in the photo caption. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.message.Message.answer_photo:15 -#: aiogram.types.message.Message.reply_photo:16 of +#: aiogram.types.message.Message.answer_photo:17 +#: aiogram.types.message.Message.reply_photo:18 of msgid "" "Pass :code:`True` if the photo needs to be covered with a spoiler " "animation" msgstr "" -#: aiogram.types.message.Message.answer_photo:22 -#: aiogram.types.message.Message.reply_photo:22 of +#: aiogram.types.message.Message.answer_photo:26 +#: aiogram.types.message.Message.reply_photo:25 of msgid "instance of method :class:`aiogram.methods.send_photo.SendPhoto`" msgstr "" @@ -1623,101 +1757,114 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_poll:7 -#: aiogram.types.message.Message.reply_poll:8 of +#: aiogram.types.message.Message.answer_poll:8 +#: aiogram.types.message.Message.reply_poll:9 of msgid "" "Use this method to send a native poll. On success, the sent " ":class:`aiogram.types.message.Message` is returned." msgstr "" -#: aiogram.types.message.Message.answer_poll:9 -#: aiogram.types.message.Message.reply_poll:10 of +#: aiogram.types.message.Message.answer_poll:10 +#: aiogram.types.message.Message.reply_poll:11 of msgid "Source: https://core.telegram.org/bots/api#sendpoll" msgstr "" -#: aiogram.types.message.Message.answer_poll:11 -#: aiogram.types.message.Message.reply_poll:12 of -msgid "Poll question, 1-300 characters" -msgstr "" - #: aiogram.types.message.Message.answer_poll:12 #: aiogram.types.message.Message.reply_poll:13 of -msgid "" -"A JSON-serialized list of answer options, 2-10 strings 1-100 characters " -"each" +msgid "Poll question, 1-300 characters" msgstr "" #: aiogram.types.message.Message.answer_poll:13 #: aiogram.types.message.Message.reply_poll:14 of -msgid ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`" +msgid "A JSON-serialized list of 2-10 answer options" msgstr "" #: aiogram.types.message.Message.answer_poll:14 #: aiogram.types.message.Message.reply_poll:15 of -msgid "Poll type, 'quiz' or 'regular', defaults to 'regular'" +msgid "" +"Mode for parsing entities in the question. See `formatting options " +"`_ for more " +"details. Currently, only custom emoji entities are allowed" msgstr "" #: aiogram.types.message.Message.answer_poll:15 #: aiogram.types.message.Message.reply_poll:16 of msgid "" -":code:`True`, if the poll allows multiple answers, ignored for polls in " -"quiz mode, defaults to :code:`False`" +"A JSON-serialized list of special entities that appear in the poll " +"question. It can be specified instead of *question_parse_mode*" msgstr "" #: aiogram.types.message.Message.answer_poll:16 #: aiogram.types.message.Message.reply_poll:17 of +msgid ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`" +msgstr "" + +#: aiogram.types.message.Message.answer_poll:17 +#: aiogram.types.message.Message.reply_poll:18 of +msgid "Poll type, 'quiz' or 'regular', defaults to 'regular'" +msgstr "" + +#: aiogram.types.message.Message.answer_poll:18 +#: aiogram.types.message.Message.reply_poll:19 of +msgid "" +":code:`True`, if the poll allows multiple answers, ignored for polls in " +"quiz mode, defaults to :code:`False`" +msgstr "" + +#: aiogram.types.message.Message.answer_poll:19 +#: aiogram.types.message.Message.reply_poll:20 of msgid "" "0-based identifier of the correct answer option, required for polls in " "quiz mode" msgstr "" -#: aiogram.types.message.Message.answer_poll:17 -#: aiogram.types.message.Message.reply_poll:18 of +#: aiogram.types.message.Message.answer_poll:20 +#: aiogram.types.message.Message.reply_poll:21 of msgid "" "Text that is shown when a user chooses an incorrect answer or taps on the" " lamp icon in a quiz-style poll, 0-200 characters with at most 2 line " "feeds after entities parsing" msgstr "" -#: aiogram.types.message.Message.answer_poll:18 -#: aiogram.types.message.Message.reply_poll:19 of +#: aiogram.types.message.Message.answer_poll:21 +#: aiogram.types.message.Message.reply_poll:22 of msgid "" "Mode for parsing entities in the explanation. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.message.Message.answer_poll:19 -#: aiogram.types.message.Message.reply_poll:20 of +#: aiogram.types.message.Message.answer_poll:22 +#: aiogram.types.message.Message.reply_poll:23 of msgid "" "A JSON-serialized list of special entities that appear in the poll " -"explanation, which can be specified instead of *parse_mode*" +"explanation. It can be specified instead of *explanation_parse_mode*" msgstr "" -#: aiogram.types.message.Message.answer_poll:20 -#: aiogram.types.message.Message.reply_poll:21 of +#: aiogram.types.message.Message.answer_poll:23 +#: aiogram.types.message.Message.reply_poll:24 of msgid "" "Amount of time in seconds the poll will be active after creation, 5-600. " "Can't be used together with *close_date*." msgstr "" -#: aiogram.types.message.Message.answer_poll:21 -#: aiogram.types.message.Message.reply_poll:22 of +#: aiogram.types.message.Message.answer_poll:24 +#: aiogram.types.message.Message.reply_poll:25 of msgid "" "Point in time (Unix timestamp) when the poll will be automatically " "closed. Must be at least 5 and no more than 600 seconds in the future. " "Can't be used together with *open_period*." msgstr "" -#: aiogram.types.message.Message.answer_poll:22 -#: aiogram.types.message.Message.reply_poll:23 of +#: aiogram.types.message.Message.answer_poll:25 +#: aiogram.types.message.Message.reply_poll:26 of msgid "" "Pass :code:`True` if the poll needs to be immediately closed. This can be" " useful for poll preview." msgstr "" -#: aiogram.types.message.Message.answer_poll:29 -#: aiogram.types.message.Message.reply_poll:29 of +#: aiogram.types.message.Message.answer_poll:34 +#: aiogram.types.message.Message.reply_poll:33 of msgid "instance of method :class:`aiogram.methods.send_poll.SendPoll`" msgstr "" @@ -1728,21 +1875,21 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_dice:7 -#: aiogram.types.message.Message.reply_dice:8 of +#: aiogram.types.message.Message.answer_dice:8 +#: aiogram.types.message.Message.reply_dice:9 of msgid "" "Use this method to send an animated emoji that will display a random " "value. On success, the sent :class:`aiogram.types.message.Message` is " "returned." msgstr "" -#: aiogram.types.message.Message.answer_dice:9 -#: aiogram.types.message.Message.reply_dice:10 of +#: aiogram.types.message.Message.answer_dice:10 +#: aiogram.types.message.Message.reply_dice:11 of msgid "Source: https://core.telegram.org/bots/api#senddice" msgstr "" -#: aiogram.types.message.Message.answer_dice:11 -#: aiogram.types.message.Message.reply_dice:12 of +#: aiogram.types.message.Message.answer_dice:12 +#: aiogram.types.message.Message.reply_dice:13 of msgid "" "Emoji on which the dice throw animation is based. Currently, must be one " "of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯'" @@ -1750,13 +1897,13 @@ msgid "" "to '🎲'" msgstr "" -#: aiogram.types.message.Message.answer_dice:13 -#: aiogram.types.message.Message.reply_dice:14 of +#: aiogram.types.message.Message.answer_dice:14 +#: aiogram.types.message.Message.reply_dice:15 of msgid "Protects the contents of the sent message from forwarding" msgstr "" -#: aiogram.types.message.Message.answer_dice:18 -#: aiogram.types.message.Message.reply_dice:18 of +#: aiogram.types.message.Message.answer_dice:21 +#: aiogram.types.message.Message.reply_dice:20 of msgid "instance of method :class:`aiogram.methods.send_dice.SendDice`" msgstr "" @@ -1767,8 +1914,8 @@ msgid "" "will automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_sticker:7 -#: aiogram.types.message.Message.reply_sticker:8 of +#: aiogram.types.message.Message.answer_sticker:8 +#: aiogram.types.message.Message.reply_sticker:9 of msgid "" "Use this method to send static .WEBP, `animated " "`_ .TGS, or `video " @@ -1777,29 +1924,29 @@ msgid "" "returned." msgstr "" -#: aiogram.types.message.Message.answer_sticker:9 -#: aiogram.types.message.Message.reply_sticker:10 of +#: aiogram.types.message.Message.answer_sticker:10 +#: aiogram.types.message.Message.reply_sticker:11 of msgid "Source: https://core.telegram.org/bots/api#sendsticker" msgstr "" -#: aiogram.types.message.Message.answer_sticker:11 -#: aiogram.types.message.Message.reply_sticker:12 of -msgid "" -"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 " -"or .TGS sticker using multipart/form-data. :ref:`More information on " -"Sending Files » `. Video stickers can only be sent by a " -"file_id. Animated stickers can't be sent via an HTTP URL." -msgstr "" - #: aiogram.types.message.Message.answer_sticker:12 #: aiogram.types.message.Message.reply_sticker:13 of +msgid "" +"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." +msgstr "" + +#: aiogram.types.message.Message.answer_sticker:13 +#: aiogram.types.message.Message.reply_sticker:14 of msgid "Emoji associated with the sticker; only for just uploaded stickers" msgstr "" -#: aiogram.types.message.Message.answer_sticker:19 -#: aiogram.types.message.Message.reply_sticker:19 of +#: aiogram.types.message.Message.answer_sticker:22 +#: aiogram.types.message.Message.reply_sticker:21 of msgid "instance of method :class:`aiogram.methods.send_sticker.SendSticker`" msgstr "" @@ -1810,65 +1957,65 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_venue:7 -#: aiogram.types.message.Message.reply_venue:8 of +#: aiogram.types.message.Message.answer_venue:8 +#: aiogram.types.message.Message.reply_venue:9 of msgid "" "Use this method to send information about a venue. On success, the sent " ":class:`aiogram.types.message.Message` is returned." msgstr "" -#: aiogram.types.message.Message.answer_venue:9 -#: aiogram.types.message.Message.reply_venue:10 of +#: aiogram.types.message.Message.answer_venue:10 +#: aiogram.types.message.Message.reply_venue:11 of msgid "Source: https://core.telegram.org/bots/api#sendvenue" msgstr "" -#: aiogram.types.message.Message.answer_venue:11 -#: aiogram.types.message.Message.reply_venue:12 of -msgid "Latitude of the venue" -msgstr "" - #: aiogram.types.message.Message.answer_venue:12 #: aiogram.types.message.Message.reply_venue:13 of -msgid "Longitude of the venue" +msgid "Latitude of the venue" msgstr "" #: aiogram.types.message.Message.answer_venue:13 #: aiogram.types.message.Message.reply_venue:14 of -msgid "Name of the venue" +msgid "Longitude of the venue" msgstr "" #: aiogram.types.message.Message.answer_venue:14 #: aiogram.types.message.Message.reply_venue:15 of -msgid "Address of the venue" +msgid "Name of the venue" msgstr "" #: aiogram.types.message.Message.answer_venue:15 #: aiogram.types.message.Message.reply_venue:16 of -msgid "Foursquare identifier of the venue" +msgid "Address of the venue" msgstr "" #: aiogram.types.message.Message.answer_venue:16 #: aiogram.types.message.Message.reply_venue:17 of +msgid "Foursquare identifier of the venue" +msgstr "" + +#: aiogram.types.message.Message.answer_venue:17 +#: aiogram.types.message.Message.reply_venue:18 of msgid "" "Foursquare type of the venue, if known. (For example, " "'arts_entertainment/default', 'arts_entertainment/aquarium' or " "'food/icecream'.)" msgstr "" -#: aiogram.types.message.Message.answer_venue:17 -#: aiogram.types.message.Message.reply_venue:18 of +#: aiogram.types.message.Message.answer_venue:18 +#: aiogram.types.message.Message.reply_venue:19 of msgid "Google Places identifier of the venue" msgstr "" -#: aiogram.types.message.Message.answer_venue:18 -#: aiogram.types.message.Message.reply_venue:19 of +#: aiogram.types.message.Message.answer_venue:19 +#: aiogram.types.message.Message.reply_venue:20 of msgid "" "Google Places type of the venue. (See `supported types " "`_.)" msgstr "" -#: aiogram.types.message.Message.answer_venue:25 -#: aiogram.types.message.Message.reply_venue:25 of +#: aiogram.types.message.Message.answer_venue:28 +#: aiogram.types.message.Message.reply_venue:27 of msgid "instance of method :class:`aiogram.methods.send_venue.SendVenue`" msgstr "" @@ -1879,8 +2026,8 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_video:7 -#: aiogram.types.message.Message.reply_video:8 of +#: aiogram.types.message.Message.answer_video:8 +#: aiogram.types.message.Message.reply_video:9 of msgid "" "Use this method to send video files, Telegram clients support MPEG4 " "videos (other formats may be sent as " @@ -1890,13 +2037,13 @@ msgid "" " future." msgstr "" -#: aiogram.types.message.Message.answer_video:9 -#: aiogram.types.message.Message.reply_video:10 of +#: aiogram.types.message.Message.answer_video:10 +#: aiogram.types.message.Message.reply_video:11 of msgid "Source: https://core.telegram.org/bots/api#sendvideo" msgstr "" -#: aiogram.types.message.Message.answer_video:11 -#: aiogram.types.message.Message.reply_video:12 of +#: aiogram.types.message.Message.answer_video:12 +#: aiogram.types.message.Message.reply_video:13 of msgid "" "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 " @@ -1905,52 +2052,68 @@ msgid "" "files>`" msgstr "" -#: aiogram.types.message.Message.answer_video:12 -#: aiogram.types.message.Message.answer_video_note:12 -#: aiogram.types.message.Message.reply_video:13 -#: aiogram.types.message.Message.reply_video_note:13 of -msgid "Duration of sent video in seconds" -msgstr "" - #: aiogram.types.message.Message.answer_video:13 -#: aiogram.types.message.Message.reply_video:14 of -msgid "Video width" +#: aiogram.types.message.Message.answer_video_note:13 +#: aiogram.types.message.Message.reply_video:14 +#: aiogram.types.message.Message.reply_video_note:14 of +msgid "Duration of sent video in seconds" msgstr "" #: aiogram.types.message.Message.answer_video:14 #: aiogram.types.message.Message.reply_video:15 of +msgid "Video width" +msgstr "" + +#: aiogram.types.message.Message.answer_video:15 +#: aiogram.types.message.Message.reply_video:16 of msgid "Video height" msgstr "" -#: aiogram.types.message.Message.answer_video:16 -#: aiogram.types.message.Message.reply_video:17 of +#: aiogram.types.message.Message.answer_video:17 +#: aiogram.types.message.Message.reply_video:18 of +msgid "" +"Cover for the video in the message. Pass a file_id to send a file that " +"exists on the Telegram servers (recommended), pass an HTTP URL for " +"Telegram to get a file from the Internet, or pass " +"'attach://' to upload a new one using multipart/form-" +"data under name. :ref:`More information on Sending " +"Files » `" +msgstr "" + +#: aiogram.types.message.Message.answer_video:18 +#: aiogram.types.message.Message.reply_video:19 of +msgid "Start timestamp for the video in the message" +msgstr "" + +#: aiogram.types.message.Message.answer_video:19 +#: aiogram.types.message.Message.reply_video:20 of msgid "" "Video caption (may also be used when resending videos by *file_id*), " "0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.message.Message.answer_video:17 -#: aiogram.types.message.Message.reply_video:18 of +#: aiogram.types.message.Message.answer_video:20 +#: aiogram.types.message.Message.reply_video:21 of msgid "" "Mode for parsing entities in the video caption. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.message.Message.answer_video:19 -#: aiogram.types.message.Message.reply_video:20 of +#: aiogram.types.message.Message.answer_video:23 +#: aiogram.types.message.Message.reply_video:24 of msgid "" "Pass :code:`True` if the video needs to be covered with a spoiler " "animation" msgstr "" -#: aiogram.types.message.Message.answer_video:20 -#: aiogram.types.message.Message.reply_video:21 of +#: aiogram.types.message.Message.answer_video:24 +#: aiogram.types.message.Message.reply_video:25 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" -#: aiogram.types.message.Message.answer_video:27 -#: aiogram.types.message.Message.reply_video:27 of +#: aiogram.types.message.Message.answer_video:33 +#: aiogram.types.message.Message.reply_video:32 of msgid "instance of method :class:`aiogram.methods.send_video.SendVideo`" msgstr "" @@ -1962,8 +2125,8 @@ msgid "" " fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_video_note:7 -#: aiogram.types.message.Message.reply_video_note:8 of +#: aiogram.types.message.Message.answer_video_note:8 +#: aiogram.types.message.Message.reply_video_note:9 of msgid "" "As of `v.4.0 `_, " "Telegram clients support rounded square MPEG4 videos of up to 1 minute " @@ -1971,13 +2134,13 @@ msgid "" ":class:`aiogram.types.message.Message` is returned." msgstr "" -#: aiogram.types.message.Message.answer_video_note:9 -#: aiogram.types.message.Message.reply_video_note:10 of +#: aiogram.types.message.Message.answer_video_note:10 +#: aiogram.types.message.Message.reply_video_note:11 of msgid "Source: https://core.telegram.org/bots/api#sendvideonote" msgstr "" -#: aiogram.types.message.Message.answer_video_note:11 -#: aiogram.types.message.Message.reply_video_note:12 of +#: aiogram.types.message.Message.answer_video_note:12 +#: aiogram.types.message.Message.reply_video_note:13 of msgid "" "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 " @@ -1985,13 +2148,13 @@ msgid "" "files>`. Sending video notes by a URL is currently unsupported" msgstr "" -#: aiogram.types.message.Message.answer_video_note:13 -#: aiogram.types.message.Message.reply_video_note:14 of +#: aiogram.types.message.Message.answer_video_note:14 +#: aiogram.types.message.Message.reply_video_note:15 of msgid "Video width and height, i.e. diameter of the video message" msgstr "" -#: aiogram.types.message.Message.answer_video_note:21 -#: aiogram.types.message.Message.reply_video_note:21 of +#: aiogram.types.message.Message.answer_video_note:24 +#: aiogram.types.message.Message.reply_video_note:23 of msgid "instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`" msgstr "" @@ -2002,26 +2165,27 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.answer_voice:7 -#: aiogram.types.message.Message.reply_voice:8 of +#: aiogram.types.message.Message.answer_voice:8 +#: aiogram.types.message.Message.reply_voice:9 of msgid "" "Use this method to send audio files, if you want Telegram clients to " "display the file as a playable voice message. For this to work, your " -"audio must be in an .OGG file encoded with OPUS (other formats may be " -"sent as :class:`aiogram.types.audio.Audio` or " +"audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in" +" .M4A format (other formats may be sent as " +":class:`aiogram.types.audio.Audio` or " ":class:`aiogram.types.document.Document`). On success, the sent " ":class:`aiogram.types.message.Message` is returned. Bots can currently " "send voice messages of up to 50 MB in size, this limit may be changed in " "the future." msgstr "" -#: aiogram.types.message.Message.answer_voice:9 -#: aiogram.types.message.Message.reply_voice:10 of +#: aiogram.types.message.Message.answer_voice:10 +#: aiogram.types.message.Message.reply_voice:11 of msgid "Source: https://core.telegram.org/bots/api#sendvoice" msgstr "" -#: aiogram.types.message.Message.answer_voice:11 -#: aiogram.types.message.Message.reply_voice:12 of +#: aiogram.types.message.Message.answer_voice:12 +#: aiogram.types.message.Message.reply_voice:13 of msgid "" "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 " @@ -2030,26 +2194,26 @@ msgid "" "files>`" msgstr "" -#: aiogram.types.message.Message.answer_voice:12 -#: aiogram.types.message.Message.reply_voice:13 of +#: aiogram.types.message.Message.answer_voice:13 +#: aiogram.types.message.Message.reply_voice:14 of msgid "Voice message caption, 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.message.Message.answer_voice:13 -#: aiogram.types.message.Message.reply_voice:14 of +#: aiogram.types.message.Message.answer_voice:14 +#: aiogram.types.message.Message.reply_voice:15 of msgid "" "Mode for parsing entities in the voice message caption. See `formatting " "options `_ for " "more details." msgstr "" -#: aiogram.types.message.Message.answer_voice:15 -#: aiogram.types.message.Message.reply_voice:16 of +#: aiogram.types.message.Message.answer_voice:16 +#: aiogram.types.message.Message.reply_voice:17 of msgid "Duration of the voice message in seconds" msgstr "" -#: aiogram.types.message.Message.answer_voice:22 -#: aiogram.types.message.Message.reply_voice:22 of +#: aiogram.types.message.Message.answer_voice:25 +#: aiogram.types.message.Message.reply_voice:24 of msgid "instance of method :class:`aiogram.methods.send_voice.SendVoice`" msgstr "" @@ -2097,11 +2261,11 @@ msgstr "" #: aiogram.types.message.Message.copy_to:7 of msgid "" -"Use this method to copy messages of any kind. Service messages, giveaway " -"messages, giveaway winners messages, and invoice messages can't be " -"copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if " -"the value of the field *correct_option_id* is known to the bot. The " -"method is analogous to the method " +"Use this method to copy messages of any kind. Service messages, paid " +"media messages, giveaway messages, giveaway winners messages, and invoice" +" messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can " +"be copied only if the value of the field *correct_option_id* is known to " +"the bot. The method is analogous to the method " ":class:`aiogram.methods.forward_message.ForwardMessage`, but the copied " "message doesn't have a link to the original message. Returns the " ":class:`aiogram.types.message_id.MessageId` of the sent message on " @@ -2127,25 +2291,35 @@ msgid "" msgstr "" #: aiogram.types.message.Message.copy_to:13 of +msgid "New start timestamp for the copied video in the message" +msgstr "" + +#: aiogram.types.message.Message.copy_to:14 of msgid "" "New caption for media, 0-1024 characters after entities parsing. If not " "specified, the original caption is kept" msgstr "" -#: aiogram.types.message.Message.copy_to:14 of +#: aiogram.types.message.Message.copy_to:15 of msgid "" "Mode for parsing entities in the new caption. See `formatting options " "`_ for more " "details." msgstr "" -#: aiogram.types.message.Message.copy_to:15 of +#: aiogram.types.message.Message.copy_to:16 of msgid "" "A JSON-serialized list of special entities that appear in the new " "caption, which can be specified instead of *parse_mode*" msgstr "" -#: aiogram.types.message.Message.copy_to:22 of +#: aiogram.types.message.Message.copy_to:17 of +msgid "" +"Pass :code:`True`, if the caption must be shown above the message media. " +"Ignored if a new caption isn't specified." +msgstr "" + +#: aiogram.types.message.Message.copy_to:25 of msgid "instance of method :class:`aiogram.methods.copy_message.CopyMessage`" msgstr "" @@ -2156,44 +2330,46 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.edit_text:7 of +#: aiogram.types.message.Message.edit_text:8 of msgid "" "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." +":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." msgstr "" -#: aiogram.types.message.Message.edit_text:9 of +#: aiogram.types.message.Message.edit_text:10 of msgid "Source: https://core.telegram.org/bots/api#editmessagetext" msgstr "" -#: aiogram.types.message.Message.edit_text:11 of +#: aiogram.types.message.Message.edit_text:12 of msgid "New text of the message, 1-4096 characters after entities parsing" msgstr "" -#: aiogram.types.message.Message.delete_reply_markup:12 -#: aiogram.types.message.Message.edit_caption:11 -#: aiogram.types.message.Message.edit_live_location:13 -#: aiogram.types.message.Message.edit_media:12 -#: aiogram.types.message.Message.edit_reply_markup:11 -#: aiogram.types.message.Message.edit_text:12 -#: aiogram.types.message.Message.stop_live_location:11 of +#: aiogram.types.message.Message.delete_reply_markup:13 +#: aiogram.types.message.Message.edit_caption:12 +#: aiogram.types.message.Message.edit_live_location:14 +#: aiogram.types.message.Message.edit_media:13 +#: aiogram.types.message.Message.edit_reply_markup:12 +#: aiogram.types.message.Message.edit_text:13 +#: aiogram.types.message.Message.stop_live_location:12 of msgid "" "Required if *chat_id* and *message_id* are not specified. Identifier of " "the inline message" msgstr "" -#: aiogram.types.message.Message.edit_caption:15 -#: aiogram.types.message.Message.edit_reply_markup:12 -#: aiogram.types.message.Message.edit_text:16 of +#: aiogram.types.message.Message.edit_caption:17 +#: aiogram.types.message.Message.edit_reply_markup:13 +#: aiogram.types.message.Message.edit_text:17 of msgid "" "A JSON-serialized object for an `inline keyboard " "`_." msgstr "" -#: aiogram.types.message.Message.edit_text:18 of +#: aiogram.types.message.Message.edit_text:19 of msgid "" "instance of method " ":class:`aiogram.methods.edit_message_text.EditMessageText`" @@ -2217,11 +2393,15 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#forwardmessage" msgstr "" -#: aiogram.types.message.Message.forward:14 of -msgid "Protects the contents of the forwarded message from forwarding and saving" +#: aiogram.types.message.Message.forward:13 of +msgid "New start timestamp for the forwarded video in the message" msgstr "" #: aiogram.types.message.Message.forward:15 of +msgid "Protects the contents of the forwarded message from forwarding and saving" +msgstr "" + +#: aiogram.types.message.Message.forward:16 of msgid "instance of method :class:`aiogram.methods.forward_message.ForwardMessage`" msgstr "" @@ -2232,35 +2412,38 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.edit_media:7 of +#: aiogram.types.message.Message.edit_media:8 of msgid "" "Use this method to edit animation, audio, document, photo, or video " -"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." +"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." msgstr "" -#: aiogram.types.message.Message.edit_media:9 of +#: aiogram.types.message.Message.edit_media:10 of msgid "Source: https://core.telegram.org/bots/api#editmessagemedia" msgstr "" -#: aiogram.types.message.Message.edit_media:11 of +#: aiogram.types.message.Message.edit_media:12 of msgid "A JSON-serialized object for a new media content of the message" msgstr "" -#: aiogram.types.message.Message.edit_live_location:17 -#: aiogram.types.message.Message.edit_media:13 -#: aiogram.types.message.Message.stop_live_location:12 of +#: aiogram.types.message.Message.edit_live_location:19 +#: aiogram.types.message.Message.edit_media:14 +#: aiogram.types.message.Message.stop_live_location:13 of msgid "" "A JSON-serialized object for a new `inline keyboard " "`_." msgstr "" -#: aiogram.types.message.Message.edit_media:14 of +#: aiogram.types.message.Message.edit_media:15 of msgid "" "instance of method " ":class:`aiogram.methods.edit_message_media.EditMessageMedia`" @@ -2274,28 +2457,30 @@ msgid "" " will automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.delete_reply_markup:8 -#: aiogram.types.message.Message.edit_reply_markup:7 of +#: aiogram.types.message.Message.delete_reply_markup:9 +#: aiogram.types.message.Message.edit_reply_markup:8 of msgid "" "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." +":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." msgstr "" -#: aiogram.types.message.Message.delete_reply_markup:10 -#: aiogram.types.message.Message.edit_reply_markup:9 of +#: aiogram.types.message.Message.delete_reply_markup:11 +#: aiogram.types.message.Message.edit_reply_markup:10 of msgid "Source: https://core.telegram.org/bots/api#editmessagereplymarkup" msgstr "" -#: aiogram.types.message.Message.delete_reply_markup:13 -#: aiogram.types.message.Message.edit_reply_markup:13 of +#: aiogram.types.message.Message.delete_reply_markup:14 +#: aiogram.types.message.Message.edit_reply_markup:14 of msgid "" "instance of method " ":class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup`" msgstr "" -#: aiogram.types.message.Message.delete_reply_markup:6 of +#: aiogram.types.message.Message.delete_reply_markup:7 of msgid ":code:`reply_markup`" msgstr "" @@ -2306,7 +2491,7 @@ msgid "" " will automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.edit_live_location:7 of +#: aiogram.types.message.Message.edit_live_location:8 of msgid "" "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 " @@ -2317,31 +2502,41 @@ msgid "" ":code:`True` is returned." msgstr "" -#: aiogram.types.message.Message.edit_live_location:9 of +#: aiogram.types.message.Message.edit_live_location:10 of msgid "Source: https://core.telegram.org/bots/api#editmessagelivelocation" msgstr "" -#: aiogram.types.message.Message.edit_live_location:11 of +#: aiogram.types.message.Message.edit_live_location:12 of msgid "Latitude of new location" msgstr "" -#: aiogram.types.message.Message.edit_live_location:12 of +#: aiogram.types.message.Message.edit_live_location:13 of msgid "Longitude of new location" msgstr "" #: aiogram.types.message.Message.edit_live_location:15 of msgid "" +"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" +msgstr "" + +#: aiogram.types.message.Message.edit_live_location:17 of +msgid "" "Direction in which the user is moving, in degrees. Must be between 1 and " "360 if specified." msgstr "" -#: aiogram.types.message.Message.edit_live_location:16 of +#: aiogram.types.message.Message.edit_live_location:18 of msgid "" "The maximum distance for proximity alerts about approaching another chat " "member, in meters. Must be between 1 and 100000 if specified." msgstr "" -#: aiogram.types.message.Message.edit_live_location:18 of +#: aiogram.types.message.Message.edit_live_location:20 of msgid "" "instance of method " ":class:`aiogram.methods.edit_message_live_location.EditMessageLiveLocation`" @@ -2354,7 +2549,7 @@ msgid "" " will automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.stop_live_location:7 of +#: aiogram.types.message.Message.stop_live_location:8 of msgid "" "Use this method to stop updating a live location message before " "*live_period* expires. On success, if the message is not an inline " @@ -2362,11 +2557,11 @@ msgid "" "otherwise :code:`True` is returned." msgstr "" -#: aiogram.types.message.Message.stop_live_location:9 of +#: aiogram.types.message.Message.stop_live_location:10 of msgid "Source: https://core.telegram.org/bots/api#stopmessagelivelocation" msgstr "" -#: aiogram.types.message.Message.stop_live_location:13 of +#: aiogram.types.message.Message.stop_live_location:14 of msgid "" "instance of method " ":class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`" @@ -2379,23 +2574,25 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.edit_caption:7 of +#: aiogram.types.message.Message.edit_caption:8 of msgid "" "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." +":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." msgstr "" -#: aiogram.types.message.Message.edit_caption:9 of +#: aiogram.types.message.Message.edit_caption:10 of msgid "Source: https://core.telegram.org/bots/api#editmessagecaption" msgstr "" -#: aiogram.types.message.Message.edit_caption:12 of +#: aiogram.types.message.Message.edit_caption:13 of msgid "New caption of the message, 0-1024 characters after entities parsing" msgstr "" -#: aiogram.types.message.Message.edit_caption:13 of +#: aiogram.types.message.Message.edit_caption:14 of msgid "" "Mode for parsing entities in the message caption. See `formatting options" " `_ for more " @@ -2404,6 +2601,12 @@ msgstr "" #: aiogram.types.message.Message.edit_caption:16 of msgid "" +"Pass :code:`True`, if the caption must be shown above the message media. " +"Supported only for animation, photo and video messages." +msgstr "" + +#: aiogram.types.message.Message.edit_caption:18 of +msgid "" "instance of method " ":class:`aiogram.methods.edit_message_caption.EditMessageCaption`" msgstr "" @@ -2414,65 +2617,65 @@ msgid "" " will automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.delete:7 of +#: aiogram.types.message.Message.delete:8 of msgid "" "Use this method to delete a message, including service messages, with the" " following limitations:" msgstr "" -#: aiogram.types.message.Message.delete:9 of +#: aiogram.types.message.Message.delete:10 of msgid "A message can only be deleted if it was sent less than 48 hours ago." msgstr "" -#: aiogram.types.message.Message.delete:11 of +#: aiogram.types.message.Message.delete:12 of msgid "" "Service messages about a supergroup, channel, or forum topic creation " "can't be deleted." msgstr "" -#: aiogram.types.message.Message.delete:13 of +#: aiogram.types.message.Message.delete:14 of msgid "" "A dice message in a private chat can only be deleted if it was sent more " "than 24 hours ago." msgstr "" -#: aiogram.types.message.Message.delete:15 of +#: aiogram.types.message.Message.delete:16 of msgid "" "Bots can delete outgoing messages in private chats, groups, and " "supergroups." msgstr "" -#: aiogram.types.message.Message.delete:17 of +#: aiogram.types.message.Message.delete:18 of msgid "Bots can delete incoming messages in private chats." msgstr "" -#: aiogram.types.message.Message.delete:19 of +#: aiogram.types.message.Message.delete:20 of msgid "" "Bots granted *can_post_messages* permissions can delete outgoing messages" " in channels." msgstr "" -#: aiogram.types.message.Message.delete:21 of +#: aiogram.types.message.Message.delete:22 of msgid "" "If the bot is an administrator of a group, it can delete any message " "there." msgstr "" -#: aiogram.types.message.Message.delete:23 of +#: aiogram.types.message.Message.delete:24 of msgid "" "If the bot has *can_delete_messages* permission in a supergroup or a " "channel, it can delete any message there." msgstr "" -#: aiogram.types.message.Message.delete:25 of +#: aiogram.types.message.Message.delete:26 of msgid "Returns :code:`True` on success." msgstr "" -#: aiogram.types.message.Message.delete:27 of +#: aiogram.types.message.Message.delete:28 of msgid "Source: https://core.telegram.org/bots/api#deletemessage" msgstr "" -#: aiogram.types.message.Message.delete:29 of +#: aiogram.types.message.Message.delete:30 of msgid "instance of method :class:`aiogram.methods.delete_message.DeleteMessage`" msgstr "" @@ -2483,7 +2686,7 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.pin:7 of +#: aiogram.types.message.Message.pin:8 of msgid "" "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" @@ -2492,18 +2695,18 @@ msgid "" "right in a channel. Returns :code:`True` on success." msgstr "" -#: aiogram.types.message.Message.pin:9 of +#: aiogram.types.message.Message.pin:10 of msgid "Source: https://core.telegram.org/bots/api#pinchatmessage" msgstr "" -#: aiogram.types.message.Message.pin:11 of +#: aiogram.types.message.Message.pin:12 of msgid "" "Pass :code:`True` if it is not necessary to send a notification to all " "chat members about the new pinned message. Notifications are always " "disabled in channels and private chats." msgstr "" -#: aiogram.types.message.Message.pin:12 of +#: aiogram.types.message.Message.pin:13 of msgid "" "instance of method " ":class:`aiogram.methods.pin_chat_message.PinChatMessage`" @@ -2516,7 +2719,7 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.unpin:7 of +#: aiogram.types.message.Message.unpin:8 of msgid "" "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 " @@ -2526,11 +2729,11 @@ msgid "" ":code:`True` on success." msgstr "" -#: aiogram.types.message.Message.unpin:9 of +#: aiogram.types.message.Message.unpin:10 of msgid "Source: https://core.telegram.org/bots/api#unpinchatmessage" msgstr "" -#: aiogram.types.message.Message.unpin:11 of +#: aiogram.types.message.Message.unpin:12 of msgid "" "instance of method " ":class:`aiogram.methods.unpin_chat_message.UnpinChatMessage`" @@ -2549,6 +2752,12 @@ msgid "if set, a private URL is returned even for a public chat" msgstr "" #: aiogram.types.message.Message.get_url:6 of +msgid "" +"if set, adds chat thread id to URL and returns like " +"https://t.me/username/thread_id/message_id" +msgstr "" + +#: aiogram.types.message.Message.get_url:7 of msgid "string with full message URL" msgstr "" @@ -2559,36 +2768,95 @@ msgid "" "automatically fill method attributes:" msgstr "" -#: aiogram.types.message.Message.react:7 of +#: aiogram.types.message.Message.react:8 of msgid "" "Use this method to change the chosen reactions on a message. Service " -"messages can't be reacted to. Automatically forwarded messages from a " -"channel to its discussion group have the same available reactions as " -"messages in the channel. Returns :code:`True` on success." +"messages of some types can't be reacted to. Automatically forwarded " +"messages from a channel to its discussion group have the same available " +"reactions as messages in the channel. Bots can't use paid reactions. " +"Returns :code:`True` on success." msgstr "" -#: aiogram.types.message.Message.react:9 of +#: aiogram.types.message.Message.react:10 of msgid "Source: https://core.telegram.org/bots/api#setmessagereaction" msgstr "" -#: aiogram.types.message.Message.react:11 of -msgid "" -"New list of reaction types to set on the message. Currently, as non-" -"premium users, bots can set up to one reaction per message. A custom " -"emoji reaction can be used if it is either already present on the message" -" or explicitly allowed by chat administrators." -msgstr "" - #: aiogram.types.message.Message.react:12 of -msgid "Pass :code:`True` to set the reaction with a big animation" +msgid "" +"A JSON-serialized list of reaction types to set on the message. " +"Currently, as non-premium users, bots can set up to one reaction per " +"message. A custom emoji reaction can be used if it is either already " +"present on the message or explicitly allowed by chat administrators. Paid" +" reactions can't be used by bots." msgstr "" #: aiogram.types.message.Message.react:13 of +msgid "Pass :code:`True` to set the reaction with a big animation" +msgstr "" + +#: aiogram.types.message.Message.react:14 of msgid "" "instance of method " ":class:`aiogram.methods.set_message_reaction.SetMessageReaction`" msgstr "" +#: aiogram.types.message.Message.answer_paid_media:1 +#: aiogram.types.message.Message.reply_paid_media:1 of +msgid "" +"Shortcut for method " +":class:`aiogram.methods.send_paid_media.SendPaidMedia` will automatically" +" fill method attributes:" +msgstr "" + +#: aiogram.types.message.Message.answer_paid_media:8 +#: aiogram.types.message.Message.reply_paid_media:9 of +msgid "" +"Use this method to send paid media. On success, the sent " +":class:`aiogram.types.message.Message` is returned." +msgstr "" + +#: aiogram.types.message.Message.answer_paid_media:10 +#: aiogram.types.message.Message.reply_paid_media:11 of +msgid "Source: https://core.telegram.org/bots/api#sendpaidmedia" +msgstr "" + +#: aiogram.types.message.Message.answer_paid_media:12 +#: aiogram.types.message.Message.reply_paid_media:13 of +msgid "" +"The number of Telegram Stars that must be paid to buy access to the " +"media; 1-2500" +msgstr "" + +#: aiogram.types.message.Message.answer_paid_media:13 +#: aiogram.types.message.Message.reply_paid_media:14 of +msgid "A JSON-serialized array describing the media to be sent; up to 10 items" +msgstr "" + +#: aiogram.types.message.Message.answer_paid_media:14 +#: aiogram.types.message.Message.reply_paid_media:15 of +msgid "" +"Bot-defined paid media payload, 0-128 bytes. This will not be displayed " +"to the user, use it for your internal processes." +msgstr "" + +#: aiogram.types.message.Message.answer_paid_media:15 +#: aiogram.types.message.Message.reply_paid_media:16 of +msgid "Media caption, 0-1024 characters after entities parsing" +msgstr "" + +#: aiogram.types.message.Message.answer_paid_media:16 +#: aiogram.types.message.Message.reply_paid_media:17 of +msgid "" +"Mode for parsing entities in the media caption. See `formatting options " +"`_ for more " +"details." +msgstr "" + +#: aiogram.types.message.Message.answer_paid_media:24 +#: aiogram.types.message.Message.reply_paid_media:24 of +msgid "instance of method :class:`aiogram.methods.send_paid_media.SendPaidMedia`" +msgstr "" + #~ msgid "Reply with animation" #~ msgstr "" @@ -2785,3 +3053,263 @@ msgstr "" #~ "be forwarded. On success, the sent " #~ ":class:`aiogram.types.message.Message` is returned." #~ msgstr "" + +#~ msgid "Unique message identifier inside this chat" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Sender of the message; empty" +#~ " for messages sent to channels. For" +#~ " backward compatibility, the field contains" +#~ " a fake sender user in non-" +#~ "channel chats, if the message was " +#~ "sent on behalf of a chat." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Sender of the message, sent" +#~ " on behalf of a chat. For " +#~ "example, the channel itself for channel" +#~ " posts, the supergroup itself for " +#~ "messages from anonymous group administrators," +#~ " the linked channel for messages " +#~ "automatically forwarded to the discussion " +#~ "group. For backward compatibility, the " +#~ "field *from* contains a fake sender " +#~ "user in non-channel chats, if the" +#~ " message was sent on behalf of " +#~ "a chat." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Caption for the animation, " +#~ "audio, document, photo, video or voice" +#~ msgstr "" + +#~ msgid ":code:`reply_to_message_id`" +#~ msgstr "" + +#~ msgid "" +#~ "Additional interface options. A JSON-" +#~ "serialized object for an `inline " +#~ "keyboard `_, `custom reply keyboard " +#~ "`_, " +#~ "instructions to remove reply keyboard or" +#~ " to force a reply from the " +#~ "user." +#~ msgstr "" + +#~ msgid "" +#~ "Bot-defined invoice payload, 1-128 " +#~ "bytes. This will not be displayed " +#~ "to the user, use for your internal" +#~ " processes." +#~ msgstr "" + +#~ msgid "" +#~ "Payment provider token, obtained via " +#~ "`@BotFather `_" +#~ msgstr "" + +#~ msgid "" +#~ "Three-letter ISO 4217 currency code, " +#~ "see `more on currencies " +#~ "`_" +#~ msgstr "" + +#~ msgid "" +#~ "Price breakdown, a JSON-serialized list" +#~ " of components (e.g. product price, " +#~ "tax, discount, delivery cost, delivery " +#~ "tax, bonus, etc.)" +#~ msgstr "" + +#~ msgid "" +#~ "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" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's full name to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's phone number to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's email address to complete the " +#~ "order" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if you require the " +#~ "user's shipping address to complete the" +#~ " order" +#~ msgstr "" + +#~ msgid "Pass :code:`True` if the user's phone number should be sent to provider" +#~ msgstr "" + +#~ msgid "" +#~ "Pass :code:`True` if the user's email" +#~ " address should be sent to provider" +#~ msgstr "" + +#~ msgid "Pass :code:`True` if the final price depends on the shipping method" +#~ msgstr "" + +#~ msgid "" +#~ "Period in seconds for which the " +#~ "location will be updated (see `Live " +#~ "Locations `_," +#~ " should be between 60 and 86400." +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized list of answer " +#~ "options, 2-10 strings 1-100 characters " +#~ "each" +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized list of special " +#~ "entities that appear in the poll " +#~ "explanation, which can be specified " +#~ "instead of *parse_mode*" +#~ msgstr "" + +#~ msgid "" +#~ "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 or .TGS sticker" +#~ " using multipart/form-data. :ref:`More " +#~ "information on Sending Files » " +#~ "`. Video stickers can only" +#~ " be sent by a file_id. Animated " +#~ "stickers can't be sent via an HTTP" +#~ " URL." +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to send audio " +#~ "files, if you want Telegram clients " +#~ "to display the file as a playable" +#~ " voice message. For this to work, " +#~ "your audio must be in an .OGG " +#~ "file encoded with OPUS (other formats" +#~ " may be sent as " +#~ ":class:`aiogram.types.audio.Audio` or " +#~ ":class:`aiogram.types.document.Document`). On success, " +#~ "the sent :class:`aiogram.types.message.Message` is" +#~ " returned. Bots can currently send " +#~ "voice messages of up to 50 MB " +#~ "in size, this limit may be changed" +#~ " in the future." +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to copy messages " +#~ "of any kind. Service messages, giveaway" +#~ " messages, giveaway winners messages, and" +#~ " invoice messages can't be copied. A" +#~ " quiz :class:`aiogram.methods.poll.Poll` can be" +#~ " copied only if the value of " +#~ "the field *correct_option_id* is known " +#~ "to the bot. The method is " +#~ "analogous to the method " +#~ ":class:`aiogram.methods.forward_message.ForwardMessage`, but " +#~ "the copied message doesn't have a " +#~ "link to the original message. Returns" +#~ " the :class:`aiogram.types.message_id.MessageId` of " +#~ "the sent message on success." +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to edit animation, " +#~ "audio, document, photo, or video " +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to change the " +#~ "chosen reactions on a message. Service" +#~ " messages can't be reacted to. " +#~ "Automatically forwarded messages from a " +#~ "channel to its discussion group have " +#~ "the same available reactions as messages" +#~ " in the channel. Returns :code:`True` " +#~ "on success." +#~ msgstr "" + +#~ msgid "" +#~ "New list of reaction types to set" +#~ " on the message. Currently, as " +#~ "non-premium users, bots can set up" +#~ " to one reaction per message. A " +#~ "custom emoji reaction can be used " +#~ "if it is either already present on" +#~ " the message or explicitly allowed by" +#~ " chat administrators." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message_entity.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_entity.po index db1cb80e..6003aee6 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/message_entity.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_entity.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -34,14 +34,16 @@ msgstr "" #: ../../docstring aiogram.types.message_entity.MessageEntity.type:1 of msgid "" "Type of the entity. Currently, can be 'mention' (:code:`@username`), " -"'hashtag' (:code:`#hashtag`), 'cashtag' (:code:`$USD`), 'bot_command' " +"'hashtag' (:code:`#hashtag` or :code:`#hashtag@chatusername`), 'cashtag' " +"(:code:`$USD` or :code:`$USD@chatusername`), 'bot_command' " "(:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' " "(:code:`do-not-reply@telegram.org`), 'phone_number' " "(:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic " "text*), 'underline' (underlined text), 'strikethrough' (strikethrough " "text), 'spoiler' (spoiler message), 'blockquote' (block quotation), " -"'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for " -"clickable text URLs), 'text_mention' (for users `without usernames " +"'expandable_blockquote' (collapsed-by-default block quotation), 'code' " +"(monowidth string), 'pre' (monowidth block), 'text_link' (for clickable " +"text URLs), 'text_mention' (for users `without usernames " "`_), 'custom_emoji' (for " "inline custom emoji stickers)" msgstr "" @@ -105,3 +107,23 @@ msgstr "" #~ "mentions>`_), 'custom_emoji' (for inline " #~ "custom emoji stickers)" #~ msgstr "" + +#~ msgid "" +#~ "Type of the entity. Currently, can " +#~ "be 'mention' (:code:`@username`), 'hashtag' " +#~ "(:code:`#hashtag`), 'cashtag' (:code:`$USD`), " +#~ "'bot_command' (:code:`/start@jobs_bot`), 'url' " +#~ "(:code:`https://telegram.org`), 'email' (:code:`do-" +#~ "not-reply@telegram.org`), 'phone_number' " +#~ "(:code:`+1-212-555-0123`), 'bold' (**bold text**)," +#~ " 'italic' (*italic text*), 'underline' " +#~ "(underlined text), 'strikethrough' (strikethrough" +#~ " text), 'spoiler' (spoiler message), " +#~ "'blockquote' (block quotation), 'code' " +#~ "(monowidth string), 'pre' (monowidth block)," +#~ " 'text_link' (for clickable text URLs), " +#~ "'text_mention' (for users `without usernames" +#~ " `_), " +#~ "'custom_emoji' (for inline custom emoji " +#~ "stickers)" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message_id.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_id.po index fd2da80c..3af35158 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/message_id.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message_id.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/message_id.rst:3 msgid "MessageId" @@ -30,5 +30,13 @@ msgid "Source: https://core.telegram.org/bots/api#messageid" msgstr "" #: ../../docstring aiogram.types.message_id.MessageId.message_id:1 of -msgid "Unique message identifier" +msgid "" +"Unique message identifier. In specific instances (e.g., message " +"containing a video sent to a big chat), the server might automatically " +"schedule a message instead of sending it immediately. In such cases, this" +" field will be 0 and the relevant message will be unusable until it is " +"actually sent" msgstr "" + +#~ msgid "Unique message identifier" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media.po new file mode 100644 index 00000000..93c9b9ef --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/paid_media.rst:3 +msgid "PaidMedia" +msgstr "" + +#: aiogram.types.paid_media.PaidMedia:1 of +msgid "This object describes paid media. Currently, it can be one of" +msgstr "" + +#: aiogram.types.paid_media.PaidMedia:3 of +msgid ":class:`aiogram.types.paid_media_preview.PaidMediaPreview`" +msgstr "" + +#: aiogram.types.paid_media.PaidMedia:4 of +msgid ":class:`aiogram.types.paid_media_photo.PaidMediaPhoto`" +msgstr "" + +#: aiogram.types.paid_media.PaidMedia:5 of +msgid ":class:`aiogram.types.paid_media_video.PaidMediaVideo`" +msgstr "" + +#: aiogram.types.paid_media.PaidMedia:7 of +msgid "Source: https://core.telegram.org/bots/api#paidmedia" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_info.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_info.po new file mode 100644 index 00000000..9758db21 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_info.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/paid_media_info.rst:3 +msgid "PaidMediaInfo" +msgstr "" + +#: aiogram.types.paid_media_info.PaidMediaInfo:1 of +msgid "Describes the paid media added to a message." +msgstr "" + +#: aiogram.types.paid_media_info.PaidMediaInfo:3 of +msgid "Source: https://core.telegram.org/bots/api#paidmediainfo" +msgstr "" + +#: ../../docstring aiogram.types.paid_media_info.PaidMediaInfo.star_count:1 of +msgid "The number of Telegram Stars that must be paid to buy access to the media" +msgstr "" + +#: ../../docstring aiogram.types.paid_media_info.PaidMediaInfo.paid_media:1 of +msgid "Information about the paid media" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_photo.po new file mode 100644 index 00000000..bc7c63c6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_photo.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/paid_media_photo.rst:3 +msgid "PaidMediaPhoto" +msgstr "" + +#: aiogram.types.paid_media_photo.PaidMediaPhoto:1 of +msgid "The paid media is a photo." +msgstr "" + +#: aiogram.types.paid_media_photo.PaidMediaPhoto:3 of +msgid "Source: https://core.telegram.org/bots/api#paidmediaphoto" +msgstr "" + +#: ../../docstring aiogram.types.paid_media_photo.PaidMediaPhoto.type:1 of +msgid "Type of the paid media, always 'photo'" +msgstr "" + +#: ../../docstring aiogram.types.paid_media_photo.PaidMediaPhoto.photo:1 of +msgid "The photo" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_preview.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_preview.po new file mode 100644 index 00000000..aa69616e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_preview.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/paid_media_preview.rst:3 +msgid "PaidMediaPreview" +msgstr "" + +#: aiogram.types.paid_media_preview.PaidMediaPreview:1 of +msgid "The paid media isn't available before the payment." +msgstr "" + +#: aiogram.types.paid_media_preview.PaidMediaPreview:3 of +msgid "Source: https://core.telegram.org/bots/api#paidmediapreview" +msgstr "" + +#: ../../docstring aiogram.types.paid_media_preview.PaidMediaPreview.type:1 of +msgid "Type of the paid media, always 'preview'" +msgstr "" + +#: ../../docstring aiogram.types.paid_media_preview.PaidMediaPreview.width:1 of +msgid "*Optional*. Media width as defined by the sender" +msgstr "" + +#: ../../docstring aiogram.types.paid_media_preview.PaidMediaPreview.height:1 +#: of +msgid "*Optional*. Media height as defined by the sender" +msgstr "" + +#: ../../docstring aiogram.types.paid_media_preview.PaidMediaPreview.duration:1 +#: of +msgid "*Optional*. Duration of the media in seconds as defined by the sender" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_purchased.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_purchased.po new file mode 100644 index 00000000..f6886b47 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_purchased.po @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/paid_media_purchased.rst:3 +msgid "PaidMediaPurchased" +msgstr "" + +#: aiogram.types.paid_media_purchased.PaidMediaPurchased:1 of +msgid "This object contains information about a paid media purchase." +msgstr "" + +#: aiogram.types.paid_media_purchased.PaidMediaPurchased:3 of +msgid "Source: https://core.telegram.org/bots/api#paidmediapurchased" +msgstr "" + +#: ../../docstring +#: aiogram.types.paid_media_purchased.PaidMediaPurchased.from_user:1 of +msgid "User who purchased the media" +msgstr "" + +#: ../../docstring +#: aiogram.types.paid_media_purchased.PaidMediaPurchased.paid_media_payload:1 +#: of +msgid "Bot-specified paid media payload" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_video.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_video.po new file mode 100644 index 00000000..25ec20ac --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/paid_media_video.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/paid_media_video.rst:3 +msgid "PaidMediaVideo" +msgstr "" + +#: aiogram.types.paid_media_video.PaidMediaVideo:1 of +msgid "The paid media is a video." +msgstr "" + +#: aiogram.types.paid_media_video.PaidMediaVideo:3 of +msgid "Source: https://core.telegram.org/bots/api#paidmediavideo" +msgstr "" + +#: ../../docstring aiogram.types.paid_media_video.PaidMediaVideo.type:1 of +msgid "Type of the paid media, always 'video'" +msgstr "" + +#: ../../docstring aiogram.types.paid_media_video.PaidMediaVideo.video:1 of +msgid "The video" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/poll.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/poll.po index 34ce17a6..2f29a679 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/poll.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/poll.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/poll.rst:3 msgid "Poll" @@ -61,6 +61,12 @@ msgstr "" msgid ":code:`True`, if the poll allows multiple answers" msgstr "" +#: ../../docstring aiogram.types.poll.Poll.question_entities:1 of +msgid "" +"*Optional*. Special entities that appear in the *question*. Currently, " +"only custom emoji entities are allowed in poll questions" +msgstr "" + #: ../../docstring aiogram.types.poll.Poll.correct_option_id:1 of msgid "" "*Optional*. 0-based identifier of the correct answer option. Available " diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/poll_option.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/poll_option.po index 27ecd197..e6b4c3bc 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/poll_option.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/poll_option.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/poll_option.rst:3 msgid "PollOption" @@ -36,3 +36,9 @@ msgstr "" #: ../../docstring aiogram.types.poll_option.PollOption.voter_count:1 of msgid "Number of users that voted for this option" msgstr "" + +#: ../../docstring aiogram.types.poll_option.PollOption.text_entities:1 of +msgid "" +"*Optional*. Special entities that appear in the option *text*. Currently," +" only custom emoji entities are allowed in poll option texts" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/pre_checkout_query.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/pre_checkout_query.po index 59009813..d0034254 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/pre_checkout_query.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/pre_checkout_query.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-06 16:52+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/pre_checkout_query.rst:3 msgid "PreCheckoutQuery" @@ -42,7 +42,8 @@ msgstr "" #: of msgid "" "Three-letter ISO 4217 `currency `_ code" +"#supported-currencies>`_ code, or 'XTR' for payments in `Telegram Stars " +"`_" msgstr "" #: ../../docstring @@ -58,7 +59,7 @@ msgstr "" #: ../../docstring #: aiogram.types.pre_checkout_query.PreCheckoutQuery.invoice_payload:1 of -msgid "Bot specified invoice payload" +msgid "Bot-specified invoice payload" msgstr "" #: ../../docstring @@ -96,7 +97,7 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#answerprecheckoutquery" msgstr "" -#: aiogram.types.pre_checkout_query.PreCheckoutQuery.answer of +#: ../../api/types/pre_checkout_query.rst msgid "Parameters" msgstr "" @@ -117,7 +118,7 @@ msgid "" " user." msgstr "" -#: aiogram.types.pre_checkout_query.PreCheckoutQuery.answer of +#: ../../api/types/pre_checkout_query.rst msgid "Returns" msgstr "" @@ -126,3 +127,12 @@ msgid "" "instance of method " ":class:`aiogram.methods.answer_pre_checkout_query.AnswerPreCheckoutQuery`" msgstr "" + +#~ msgid "" +#~ "Three-letter ISO 4217 `currency " +#~ "`_" +#~ " code" +#~ msgstr "" + +#~ msgid "Bot specified invoice payload" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/prepared_inline_message.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/prepared_inline_message.po new file mode 100644 index 00000000..2dae0a46 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/prepared_inline_message.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/prepared_inline_message.rst:3 +msgid "PreparedInlineMessage" +msgstr "" + +#: aiogram.types.prepared_inline_message.PreparedInlineMessage:1 of +msgid "Describes an inline message to be sent by a user of a Mini App." +msgstr "" + +#: aiogram.types.prepared_inline_message.PreparedInlineMessage:3 of +msgid "Source: https://core.telegram.org/bots/api#preparedinlinemessage" +msgstr "" + +#: ../../docstring +#: aiogram.types.prepared_inline_message.PreparedInlineMessage.id:1 of +msgid "Unique identifier of the prepared message" +msgstr "" + +#: ../../docstring +#: aiogram.types.prepared_inline_message.PreparedInlineMessage.expiration_date:1 +#: of +msgid "" +"Expiration date of the prepared message, in Unix time. Expired prepared " +"messages can no longer be used" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type.po index 5ec39eb1..bf4000d0 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -36,6 +36,10 @@ msgstr "" msgid ":class:`aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji`" msgstr "" -#: aiogram.types.reaction_type.ReactionType:6 of +#: aiogram.types.reaction_type.ReactionType:5 of +msgid ":class:`aiogram.types.reaction_type_paid.ReactionTypePaid`" +msgstr "" + +#: aiogram.types.reaction_type.ReactionType:7 of msgid "Source: https://core.telegram.org/bots/api#reactiontype" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type_paid.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type_paid.po new file mode 100644 index 00000000..0e095220 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reaction_type_paid.po @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/reaction_type_paid.rst:3 +msgid "ReactionTypePaid" +msgstr "" + +#: aiogram.types.reaction_type_paid.ReactionTypePaid:1 of +msgid "The reaction is paid." +msgstr "" + +#: aiogram.types.reaction_type_paid.ReactionTypePaid:3 of +msgid "Source: https://core.telegram.org/bots/api#reactiontypepaid" +msgstr "" + +#: ../../docstring aiogram.types.reaction_type_paid.ReactionTypePaid.type:1 of +msgid "Type of the reaction, always 'paid'" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/refunded_payment.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/refunded_payment.po new file mode 100644 index 00000000..3d55596e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/refunded_payment.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/refunded_payment.rst:3 +msgid "RefundedPayment" +msgstr "" + +#: aiogram.types.refunded_payment.RefundedPayment:1 of +msgid "This object contains basic information about a refunded payment." +msgstr "" + +#: aiogram.types.refunded_payment.RefundedPayment:3 of +msgid "Source: https://core.telegram.org/bots/api#refundedpayment" +msgstr "" + +#: ../../docstring aiogram.types.refunded_payment.RefundedPayment.currency:1 of +msgid "" +"Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars " +"`_. Currently, always 'XTR'" +msgstr "" + +#: ../../docstring +#: aiogram.types.refunded_payment.RefundedPayment.total_amount:1 of +msgid "" +"Total refunded price in the *smallest units* of the currency (integer, " +"**not** float/double). For example, for a price of :code:`US$ 1.45`, " +":code:`total_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)." +msgstr "" + +#: ../../docstring +#: aiogram.types.refunded_payment.RefundedPayment.invoice_payload:1 of +msgid "Bot-specified invoice payload" +msgstr "" + +#: ../../docstring +#: aiogram.types.refunded_payment.RefundedPayment.telegram_payment_charge_id:1 +#: of +msgid "Telegram payment identifier" +msgstr "" + +#: ../../docstring +#: aiogram.types.refunded_payment.RefundedPayment.provider_payment_charge_id:1 +#: of +msgid "*Optional*. Provider payment identifier" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po index 4f2b1f86..082de65b 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/reply_keyboard_markup.rst:3 msgid "ReplyKeyboardMarkup" @@ -27,7 +27,8 @@ msgid "" "`_ with reply options " "(see `Introduction to bots " "`_ for details and " -"examples)." +"examples). Not supported in channels and for messages sent on behalf of a" +" Telegram Business account." msgstr "" #: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup:3 of @@ -83,8 +84,8 @@ msgid "" "*Optional*. Use this parameter if you want to show the keyboard to " "specific users only. Targets: 1) users that are @mentioned in the *text* " "of the :class:`aiogram.types.message.Message` object; 2) if the bot's " -"message is a reply (has *reply_to_message_id*), sender of the original " -"message." +"message is a reply to a message in the same chat and forum topic, sender " +"of the original message." msgstr "" #~ msgid "" @@ -94,3 +95,23 @@ msgstr "" #~ "bots `_ for " #~ "details and examples)." #~ msgstr "" + +#~ msgid "" +#~ "This object represents a `custom " +#~ "keyboard `_" +#~ " with reply options (see `Introduction " +#~ "to bots " +#~ "`_ for " +#~ "details and examples)." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Use this parameter if you" +#~ " want to show the keyboard to " +#~ "specific users only. Targets: 1) users" +#~ " that are @mentioned in the *text*" +#~ " of the :class:`aiogram.types.message.Message` " +#~ "object; 2) if the bot's message is" +#~ " a reply (has *reply_to_message_id*), " +#~ "sender of the original message." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_remove.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_remove.po index 26e7d05c..c9ec03f4 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_remove.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_remove.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/reply_keyboard_remove.rst:3 msgid "ReplyKeyboardRemove" @@ -28,7 +28,9 @@ msgid "" "default, custom keyboards are displayed until a new keyboard is sent by a" " bot. An exception is made for one-time keyboards that are hidden " "immediately after the user presses a button (see " -":class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup`)." +":class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup`). Not " +"supported in channels and for messages sent on behalf of a Telegram " +"Business account." msgstr "" #: aiogram.types.reply_keyboard_remove.ReplyKeyboardRemove:3 of @@ -50,6 +52,31 @@ msgid "" "*Optional*. Use this parameter if you want to remove the keyboard for " "specific users only. Targets: 1) users that are @mentioned in the *text* " "of the :class:`aiogram.types.message.Message` object; 2) if the bot's " -"message is a reply (has *reply_to_message_id*), sender of the original " -"message." +"message is a reply to a message in the same chat and forum topic, sender " +"of the original message." msgstr "" + +#~ msgid "" +#~ "Upon receiving a message with this " +#~ "object, Telegram clients will remove the" +#~ " current custom keyboard and display " +#~ "the default letter-keyboard. By default," +#~ " custom keyboards are displayed until " +#~ "a new keyboard is sent by a " +#~ "bot. An exception is made for " +#~ "one-time keyboards that are hidden " +#~ "immediately after the user presses a " +#~ "button (see " +#~ ":class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup`)." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Use this parameter if you" +#~ " want to remove the keyboard for " +#~ "specific users only. Targets: 1) users" +#~ " that are @mentioned in the *text*" +#~ " of the :class:`aiogram.types.message.Message` " +#~ "object; 2) if the bot's message is" +#~ " a reply (has *reply_to_message_id*), " +#~ "sender of the original message." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_parameters.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_parameters.po index 8268c89d..a278dcf0 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_parameters.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_parameters.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -43,7 +43,8 @@ msgstr "" msgid "" "*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`)" +":code:`@channelusername`). Not supported for messages sent on behalf of a" +" business account." msgstr "" #: ../../docstring @@ -51,8 +52,9 @@ msgstr "" #: of msgid "" "*Optional*. Pass :code:`True` if the message should be sent even if the " -"specified message to be replied to is not found; can be used only for " -"replies in the same chat and forum topic." +"specified message to be replied to is not found. Always :code:`False` for" +" replies in another chat or forum topic. Always :code:`True` for messages" +" sent on behalf of a business account." msgstr "" #: ../../docstring aiogram.types.reply_parameters.ReplyParameters.quote:1 of @@ -85,3 +87,20 @@ msgid "" "*Optional*. Position of the quote in the original message in UTF-16 code " "units" msgstr "" + +#~ msgid "" +#~ "*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`)" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Pass :code:`True` if the " +#~ "message should be sent even if the" +#~ " specified message to be replied to" +#~ " is not found; can be used only" +#~ " for replies in the same chat " +#~ "and forum topic." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state.po new file mode 100644 index 00000000..87fa31ce --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/revenue_withdrawal_state.rst:3 +msgid "RevenueWithdrawalState" +msgstr "" + +#: aiogram.types.revenue_withdrawal_state.RevenueWithdrawalState:1 of +msgid "" +"This object describes the state of a revenue withdrawal operation. " +"Currently, it can be one of" +msgstr "" + +#: aiogram.types.revenue_withdrawal_state.RevenueWithdrawalState:3 of +msgid ":class:`aiogram.types.revenue_withdrawal_state_pending.RevenueWithdrawalStatePending`" +msgstr "" + +#: aiogram.types.revenue_withdrawal_state.RevenueWithdrawalState:4 of +msgid ":class:`aiogram.types.revenue_withdrawal_state_succeeded.RevenueWithdrawalStateSucceeded`" +msgstr "" + +#: aiogram.types.revenue_withdrawal_state.RevenueWithdrawalState:5 of +msgid ":class:`aiogram.types.revenue_withdrawal_state_failed.RevenueWithdrawalStateFailed`" +msgstr "" + +#: aiogram.types.revenue_withdrawal_state.RevenueWithdrawalState:7 of +msgid "Source: https://core.telegram.org/bots/api#revenuewithdrawalstate" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state_failed.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state_failed.po new file mode 100644 index 00000000..cfca0093 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state_failed.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/revenue_withdrawal_state_failed.rst:3 +msgid "RevenueWithdrawalStateFailed" +msgstr "" + +#: aiogram.types.revenue_withdrawal_state_failed.RevenueWithdrawalStateFailed:1 +#: of +msgid "The withdrawal failed and the transaction was refunded." +msgstr "" + +#: aiogram.types.revenue_withdrawal_state_failed.RevenueWithdrawalStateFailed:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#revenuewithdrawalstatefailed" +msgstr "" + +#: ../../docstring +#: aiogram.types.revenue_withdrawal_state_failed.RevenueWithdrawalStateFailed.type:1 +#: of +msgid "Type of the state, always 'failed'" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state_pending.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state_pending.po new file mode 100644 index 00000000..dc9b61af --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state_pending.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/revenue_withdrawal_state_pending.rst:3 +msgid "RevenueWithdrawalStatePending" +msgstr "" + +#: aiogram.types.revenue_withdrawal_state_pending.RevenueWithdrawalStatePending:1 +#: of +msgid "The withdrawal is in progress." +msgstr "" + +#: aiogram.types.revenue_withdrawal_state_pending.RevenueWithdrawalStatePending:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#revenuewithdrawalstatepending" +msgstr "" + +#: ../../docstring +#: aiogram.types.revenue_withdrawal_state_pending.RevenueWithdrawalStatePending.type:1 +#: of +msgid "Type of the state, always 'pending'" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state_succeeded.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state_succeeded.po new file mode 100644 index 00000000..353604c8 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/revenue_withdrawal_state_succeeded.po @@ -0,0 +1,53 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/revenue_withdrawal_state_succeeded.rst:3 +msgid "RevenueWithdrawalStateSucceeded" +msgstr "" + +#: aiogram.types.revenue_withdrawal_state_succeeded.RevenueWithdrawalStateSucceeded:1 +#: of +msgid "The withdrawal succeeded." +msgstr "" + +#: aiogram.types.revenue_withdrawal_state_succeeded.RevenueWithdrawalStateSucceeded:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#revenuewithdrawalstatesucceeded" +msgstr "" + +#: ../../docstring +#: aiogram.types.revenue_withdrawal_state_succeeded.RevenueWithdrawalStateSucceeded.type:1 +#: of +msgid "Type of the state, always 'succeeded'" +msgstr "" + +#: ../../docstring +#: aiogram.types.revenue_withdrawal_state_succeeded.RevenueWithdrawalStateSucceeded.date:1 +#: of +msgid "Date the withdrawal was completed in Unix time" +msgstr "" + +#: ../../docstring +#: aiogram.types.revenue_withdrawal_state_succeeded.RevenueWithdrawalStateSucceeded.url:1 +#: of +msgid "An HTTPS URL that can be used to see transaction details" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/shared_user.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/shared_user.po new file mode 100644 index 00000000..3a7e12b6 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/shared_user.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/shared_user.rst:3 +msgid "SharedUser" +msgstr "" + +#: aiogram.types.shared_user.SharedUser:1 of +msgid "" +"This object contains information about a user that was shared with the " +"bot using a " +":class:`aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers`" +" button." +msgstr "" + +#: aiogram.types.shared_user.SharedUser:3 of +msgid "Source: https://core.telegram.org/bots/api#shareduser" +msgstr "" + +#: ../../docstring aiogram.types.shared_user.SharedUser.user_id:1 of +msgid "" +"Identifier of the shared user. 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 64-bit integers or double-precision float types are " +"safe for storing these identifiers. The bot may not have access to the " +"user and could be unable to use this identifier, unless the user is " +"already known to the bot by some other means." +msgstr "" + +#: ../../docstring aiogram.types.shared_user.SharedUser.first_name:1 of +msgid "*Optional*. First name of the user, if the name was requested by the bot" +msgstr "" + +#: ../../docstring aiogram.types.shared_user.SharedUser.last_name:1 of +msgid "*Optional*. Last name of the user, if the name was requested by the bot" +msgstr "" + +#: ../../docstring aiogram.types.shared_user.SharedUser.username:1 of +msgid "*Optional*. Username of the user, if the username was requested by the bot" +msgstr "" + +#: ../../docstring aiogram.types.shared_user.SharedUser.photo:1 of +msgid "" +"*Optional*. Available sizes of the chat photo, if the photo was requested" +" by the bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/shipping_query.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/shipping_query.po index b17b8c63..68672cf7 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/shipping_query.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/shipping_query.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-06 16:52+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/shipping_query.rst:3 msgid "ShippingQuery" @@ -39,7 +39,7 @@ msgstr "" #: ../../docstring aiogram.types.shipping_query.ShippingQuery.invoice_payload:1 #: of -msgid "Bot specified invoice payload" +msgid "Bot-specified invoice payload" msgstr "" #: ../../docstring @@ -71,7 +71,7 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#answershippingquery" msgstr "" -#: aiogram.types.shipping_query.ShippingQuery.answer of +#: ../../api/types/shipping_query.rst msgid "Parameters" msgstr "" @@ -91,12 +91,12 @@ msgstr "" #: aiogram.types.shipping_query.ShippingQuery.answer:12 of msgid "" "Required if *ok* is :code:`False`. Error message in human readable form " -"that explains why it is impossible to complete the order (e.g. \"Sorry, " +"that explains why it is impossible to complete the order (e.g. 'Sorry, " "delivery to your desired address is unavailable'). Telegram will display " "this message to the user." msgstr "" -#: aiogram.types.shipping_query.ShippingQuery.answer of +#: ../../api/types/shipping_query.rst msgid "Returns" msgstr "" @@ -105,3 +105,16 @@ msgid "" "instance of method " ":class:`aiogram.methods.answer_shipping_query.AnswerShippingQuery`" msgstr "" + +#~ msgid "Bot specified invoice payload" +#~ msgstr "" + +#~ msgid "" +#~ "Required if *ok* is :code:`False`. Error" +#~ " message in human readable form that" +#~ " explains why it is impossible to " +#~ "complete the order (e.g. \"Sorry, " +#~ "delivery to your desired address is " +#~ "unavailable'). Telegram will display this " +#~ "message to the user." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/star_transaction.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/star_transaction.po new file mode 100644 index 00000000..85efb121 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/star_transaction.po @@ -0,0 +1,75 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/star_transaction.rst:3 +msgid "StarTransaction" +msgstr "" + +#: aiogram.types.star_transaction.StarTransaction:1 of +msgid "" +"Describes a Telegram Star transaction. Note that if the buyer initiates a" +" chargeback with the payment provider from whom they acquired Stars " +"(e.g., Apple, Google) following this transaction, the refunded Stars will" +" be deducted from the bot's balance. This is outside of Telegram's " +"control." +msgstr "" + +#: aiogram.types.star_transaction.StarTransaction:3 of +msgid "Source: https://core.telegram.org/bots/api#startransaction" +msgstr "" + +#: ../../docstring aiogram.types.star_transaction.StarTransaction.id:1 of +msgid "" +"Unique identifier of the transaction. Coincides with the identifier of " +"the original transaction for refund transactions. Coincides with " +"*SuccessfulPayment.telegram_payment_charge_id* for successful incoming " +"payments from users." +msgstr "" + +#: ../../docstring aiogram.types.star_transaction.StarTransaction.amount:1 of +msgid "Integer amount of Telegram Stars transferred by the transaction" +msgstr "" + +#: ../../docstring aiogram.types.star_transaction.StarTransaction.date:1 of +msgid "Date the transaction was created in Unix time" +msgstr "" + +#: ../../docstring +#: aiogram.types.star_transaction.StarTransaction.nanostar_amount:1 of +msgid "" +"*Optional*. The number of 1/1000000000 shares of Telegram Stars " +"transferred by the transaction; from 0 to 999999999" +msgstr "" + +#: ../../docstring aiogram.types.star_transaction.StarTransaction.source:1 of +msgid "" +"*Optional*. Source of an incoming transaction (e.g., a user purchasing " +"goods or services, Fragment refunding a failed withdrawal). Only for " +"incoming transactions" +msgstr "" + +#: ../../docstring aiogram.types.star_transaction.StarTransaction.receiver:1 of +msgid "" +"*Optional*. Receiver of an outgoing transaction (e.g., a user for a " +"purchase refund, Fragment for a withdrawal). Only for outgoing " +"transactions" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/star_transactions.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/star_transactions.po new file mode 100644 index 00000000..56b20b93 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/star_transactions.po @@ -0,0 +1,38 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/star_transactions.rst:3 +msgid "StarTransactions" +msgstr "" + +#: aiogram.types.star_transactions.StarTransactions:1 of +msgid "Contains a list of Telegram Star transactions." +msgstr "" + +#: aiogram.types.star_transactions.StarTransactions:3 of +msgid "Source: https://core.telegram.org/bots/api#startransactions" +msgstr "" + +#: ../../docstring +#: aiogram.types.star_transactions.StarTransactions.transactions:1 of +msgid "The list of transactions" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/sticker_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/sticker_set.po index 6e76be18..121d9faf 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/sticker_set.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/sticker_set.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/sticker_set.rst:3 msgid "StickerSet" @@ -43,22 +43,27 @@ msgid "" "'custom_emoji'" msgstr "" +#: ../../docstring aiogram.types.sticker_set.StickerSet.stickers:1 of +msgid "List of all set stickers" +msgstr "" + +#: ../../docstring aiogram.types.sticker_set.StickerSet.thumbnail:1 of +msgid "*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format" +msgstr "" + #: ../../docstring aiogram.types.sticker_set.StickerSet.is_animated:1 of msgid "" ":code:`True`, if the sticker set contains `animated stickers " "`_" msgstr "" +#: ../../docstring aiogram.types.sticker_set.StickerSet.is_animated:3 +#: aiogram.types.sticker_set.StickerSet.is_video:3 of +msgid "https://core.telegram.org/bots/api-changelog#march-31-2024" +msgstr "" + #: ../../docstring aiogram.types.sticker_set.StickerSet.is_video:1 of msgid "" ":code:`True`, if the sticker set contains `video stickers " "`_" msgstr "" - -#: ../../docstring aiogram.types.sticker_set.StickerSet.stickers:1 of -msgid "List of all set stickers" -msgstr "" - -#: ../../docstring aiogram.types.sticker_set.StickerSet.thumb:1 of -msgid "*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format" -msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/story.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/story.po index 92bf0e3a..f940ed4d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/story.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/story.po @@ -8,25 +8,37 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-26 23:17+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/story.rst:3 msgid "Story" msgstr "" #: aiogram.types.story.Story:1 of -msgid "" -"This object represents a message about a forwarded story in the chat. " -"Currently holds no information." +msgid "This object represents a story." msgstr "" #: aiogram.types.story.Story:3 of msgid "Source: https://core.telegram.org/bots/api#story" msgstr "" + +#: ../../docstring aiogram.types.story.Story.chat:1 of +msgid "Chat that posted the story" +msgstr "" + +#: ../../docstring aiogram.types.story.Story.id:1 of +msgid "Unique identifier for the story in the chat" +msgstr "" + +#~ msgid "" +#~ "This object represents a message about" +#~ " a forwarded story in the chat. " +#~ "Currently holds no information." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/successful_payment.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/successful_payment.po index d6152e59..7082c319 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/successful_payment.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/successful_payment.po @@ -8,21 +8,25 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/successful_payment.rst:3 msgid "SuccessfulPayment" msgstr "" #: aiogram.types.successful_payment.SuccessfulPayment:1 of -msgid "This object contains basic information about a successful payment." +msgid "" +"This object contains basic information about a successful payment. Note " +"that if the buyer initiates a chargeback with the relevant payment " +"provider following this transaction, the funds may be debited from your " +"balance. This is outside of Telegram's control." msgstr "" #: aiogram.types.successful_payment.SuccessfulPayment:3 of @@ -33,7 +37,8 @@ msgstr "" #: aiogram.types.successful_payment.SuccessfulPayment.currency:1 of msgid "" "Three-letter ISO 4217 `currency `_ code" +"#supported-currencies>`_ code, or 'XTR' for payments in `Telegram Stars " +"`_" msgstr "" #: ../../docstring @@ -49,7 +54,7 @@ msgstr "" #: ../../docstring #: aiogram.types.successful_payment.SuccessfulPayment.invoice_payload:1 of -msgid "Bot specified invoice payload" +msgid "Bot-specified invoice payload" msgstr "" #: ../../docstring @@ -64,6 +69,24 @@ msgstr "" msgid "Provider payment identifier" msgstr "" +#: ../../docstring +#: aiogram.types.successful_payment.SuccessfulPayment.subscription_expiration_date:1 +#: of +msgid "" +"*Optional*. Expiration date of the subscription, in Unix time; for " +"recurring payments only" +msgstr "" + +#: ../../docstring +#: aiogram.types.successful_payment.SuccessfulPayment.is_recurring:1 of +msgid "*Optional*. True, if the payment is a recurring payment for a subscription" +msgstr "" + +#: ../../docstring +#: aiogram.types.successful_payment.SuccessfulPayment.is_first_recurring:1 of +msgid "*Optional*. True, if the payment is the first payment for a subscription" +msgstr "" + #: ../../docstring #: aiogram.types.successful_payment.SuccessfulPayment.shipping_option_id:1 of msgid "*Optional*. Identifier of the shipping option chosen by the user" @@ -73,3 +96,15 @@ msgstr "" #: aiogram.types.successful_payment.SuccessfulPayment.order_info:1 of msgid "*Optional*. Order information provided by the user" msgstr "" + +#~ msgid "This object contains basic information about a successful payment." +#~ msgstr "" + +#~ msgid "" +#~ "Three-letter ISO 4217 `currency " +#~ "`_" +#~ " code" +#~ msgstr "" + +#~ msgid "Bot specified invoice payload" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner.po new file mode 100644 index 00000000..553ba900 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner.po @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/transaction_partner.rst:3 +msgid "TransactionPartner" +msgstr "" + +#: aiogram.types.transaction_partner.TransactionPartner:1 of +msgid "" +"This object describes the source of a transaction, or its recipient for " +"outgoing transactions. Currently, it can be one of" +msgstr "" + +#: aiogram.types.transaction_partner.TransactionPartner:3 of +msgid ":class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`" +msgstr "" + +#: aiogram.types.transaction_partner.TransactionPartner:4 of +msgid ":class:`aiogram.types.transaction_partner_chat.TransactionPartnerChat`" +msgstr "" + +#: aiogram.types.transaction_partner.TransactionPartner:5 of +msgid ":class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram`" +msgstr "" + +#: aiogram.types.transaction_partner.TransactionPartner:6 of +msgid ":class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`" +msgstr "" + +#: aiogram.types.transaction_partner.TransactionPartner:7 of +msgid ":class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`" +msgstr "" + +#: aiogram.types.transaction_partner.TransactionPartner:8 of +msgid ":class:`aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi`" +msgstr "" + +#: aiogram.types.transaction_partner.TransactionPartner:9 of +msgid ":class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`" +msgstr "" + +#: aiogram.types.transaction_partner.TransactionPartner:11 of +msgid "Source: https://core.telegram.org/bots/api#transactionpartner" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_affiliate_program.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_affiliate_program.po new file mode 100644 index 00000000..936b83f5 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_affiliate_program.po @@ -0,0 +1,59 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/transaction_partner_affiliate_program.rst:3 +msgid "TransactionPartnerAffiliateProgram" +msgstr "" + +#: aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram:1 +#: of +msgid "" +"Describes the affiliate program that issued the affiliate commission " +"received via this transaction." +msgstr "" + +#: aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram:3 +#: of +msgid "" +"Source: " +"https://core.telegram.org/bots/api#transactionpartneraffiliateprogram" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram.type:1 +#: of +msgid "Type of the transaction partner, always 'affiliate_program'" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram.commission_per_mille:1 +#: of +msgid "" +"The number of Telegram Stars received by the bot for each 1000 Telegram " +"Stars received by the affiliate program sponsor from referred users" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram.sponsor_user:1 +#: of +msgid "*Optional*. Information about the bot that sponsored the affiliate program" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_chat.po new file mode 100644 index 00000000..d4549612 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_chat.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/transaction_partner_chat.rst:3 +msgid "TransactionPartnerChat" +msgstr "" + +#: aiogram.types.transaction_partner_chat.TransactionPartnerChat:1 of +msgid "Describes a transaction with a chat." +msgstr "" + +#: aiogram.types.transaction_partner_chat.TransactionPartnerChat:3 of +msgid "Source: https://core.telegram.org/bots/api#transactionpartnerchat" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_chat.TransactionPartnerChat.type:1 of +msgid "Type of the transaction partner, always 'chat'" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_chat.TransactionPartnerChat.chat:1 of +msgid "Information about the chat" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_chat.TransactionPartnerChat.gift:1 of +msgid "*Optional*. The gift sent to the chat by the bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_fragment.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_fragment.po new file mode 100644 index 00000000..f9acabfb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_fragment.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/transaction_partner_fragment.rst:3 +msgid "TransactionPartnerFragment" +msgstr "" + +#: aiogram.types.transaction_partner_fragment.TransactionPartnerFragment:1 of +msgid "Describes a withdrawal transaction with Fragment." +msgstr "" + +#: aiogram.types.transaction_partner_fragment.TransactionPartnerFragment:3 of +msgid "Source: https://core.telegram.org/bots/api#transactionpartnerfragment" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_fragment.TransactionPartnerFragment.type:1 +#: of +msgid "Type of the transaction partner, always 'fragment'" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_fragment.TransactionPartnerFragment.withdrawal_state:1 +#: of +msgid "*Optional*. State of the transaction if the transaction is outgoing" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_other.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_other.po new file mode 100644 index 00000000..f16ad04d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_other.po @@ -0,0 +1,38 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/transaction_partner_other.rst:3 +msgid "TransactionPartnerOther" +msgstr "" + +#: aiogram.types.transaction_partner_other.TransactionPartnerOther:1 of +msgid "Describes a transaction with an unknown source or recipient." +msgstr "" + +#: aiogram.types.transaction_partner_other.TransactionPartnerOther:3 of +msgid "Source: https://core.telegram.org/bots/api#transactionpartnerother" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_other.TransactionPartnerOther.type:1 of +msgid "Type of the transaction partner, always 'other'" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_telegram_ads.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_telegram_ads.po new file mode 100644 index 00000000..a7839c78 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_telegram_ads.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/transaction_partner_telegram_ads.rst:3 +msgid "TransactionPartnerTelegramAds" +msgstr "" + +#: aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds:1 +#: of +msgid "Describes a withdrawal transaction to the Telegram Ads platform." +msgstr "" + +#: aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#transactionpartnertelegramads" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds.type:1 +#: of +msgid "Type of the transaction partner, always 'telegram_ads'" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_telegram_api.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_telegram_api.po new file mode 100644 index 00000000..8159376e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_telegram_api.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/transaction_partner_telegram_api.rst:3 +msgid "TransactionPartnerTelegramApi" +msgstr "" + +#: aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi:1 +#: of +msgid "" +"Describes a transaction with payment for `paid broadcasting " +"`_." +msgstr "" + +#: aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi:3 +#: of +msgid "Source: https://core.telegram.org/bots/api#transactionpartnertelegramapi" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi.type:1 +#: of +msgid "Type of the transaction partner, always 'telegram_api'" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi.request_count:1 +#: of +msgid "" +"The number of successful requests that exceeded regular limits and were " +"therefore billed" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_user.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_user.po new file mode 100644 index 00000000..8269167a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/transaction_partner_user.po @@ -0,0 +1,79 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../api/types/transaction_partner_user.rst:3 +msgid "TransactionPartnerUser" +msgstr "" + +#: aiogram.types.transaction_partner_user.TransactionPartnerUser:1 of +msgid "Describes a transaction with a user." +msgstr "" + +#: aiogram.types.transaction_partner_user.TransactionPartnerUser:3 of +msgid "Source: https://core.telegram.org/bots/api#transactionpartneruser" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_user.TransactionPartnerUser.type:1 of +msgid "Type of the transaction partner, always 'user'" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_user.TransactionPartnerUser.user:1 of +msgid "Information about the user" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_user.TransactionPartnerUser.affiliate:1 of +msgid "" +"*Optional*. Information about the affiliate that received a commission " +"via this transaction" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_user.TransactionPartnerUser.invoice_payload:1 +#: of +msgid "*Optional*. Bot-specified invoice payload" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_user.TransactionPartnerUser.subscription_period:1 +#: of +msgid "*Optional*. The duration of the paid subscription" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_user.TransactionPartnerUser.paid_media:1 +#: of +msgid "*Optional*. Information about the paid media bought by the user" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_user.TransactionPartnerUser.paid_media_payload:1 +#: of +msgid "*Optional*. Bot-specified paid media payload" +msgstr "" + +#: ../../docstring +#: aiogram.types.transaction_partner_user.TransactionPartnerUser.gift:1 of +msgid "*Optional*. The gift sent to the user by the bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/update.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/update.po index bfc9188e..2332b7c2 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/update.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/update.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -40,8 +40,8 @@ msgstr "" #: ../../docstring aiogram.types.update.Update.update_id:1 of msgid "" "The update's unique identifier. Update identifiers start from a certain " -"positive number and increase sequentially. This ID becomes especially " -"handy if you're using `webhooks " +"positive number and increase sequentially. This identifier becomes " +"especially handy if you're using `webhooks " "`_, since it allows you to" " ignore repeated updates or to restore the correct update sequence, " "should they get out of order. If there are no new updates for at least a " @@ -56,7 +56,8 @@ msgstr "" #: ../../docstring aiogram.types.update.Update.edited_message:1 of msgid "" "*Optional*. New version of a message that is known to the bot and was " -"edited" +"edited. This update may at times be triggered by changes to message " +"fields that are either unavailable or not actively used by your bot." msgstr "" #: ../../docstring aiogram.types.update.Update.channel_post:1 of @@ -68,7 +69,26 @@ msgstr "" #: ../../docstring aiogram.types.update.Update.edited_channel_post:1 of msgid "" "*Optional*. New version of a channel post that is known to the bot and " -"was edited" +"was edited. This update may at times be triggered by changes to message " +"fields that are either unavailable or not actively used by your bot." +msgstr "" + +#: ../../docstring aiogram.types.update.Update.business_connection:1 of +msgid "" +"*Optional*. The bot was connected to or disconnected from a business " +"account, or a user edited an existing connection with the bot" +msgstr "" + +#: ../../docstring aiogram.types.update.Update.business_message:1 of +msgid "*Optional*. New message from a connected business account" +msgstr "" + +#: ../../docstring aiogram.types.update.Update.edited_business_message:1 of +msgid "*Optional*. New version of a message from a connected business account" +msgstr "" + +#: ../../docstring aiogram.types.update.Update.deleted_business_messages:1 of +msgid "*Optional*. Messages were deleted from a connected business account" msgstr "" #: ../../docstring aiogram.types.update.Update.message_reaction:1 of @@ -84,7 +104,8 @@ msgid "" "*Optional*. Reactions to a message with anonymous reactions were changed." " The bot must be an administrator in the chat and must explicitly specify" " :code:`\"message_reaction_count\"` in the list of *allowed_updates* to " -"receive these updates." +"receive these updates. The updates are grouped and can be sent with delay" +" up to a few minutes." msgstr "" #: ../../docstring aiogram.types.update.Update.inline_query:1 of @@ -118,10 +139,16 @@ msgid "" "about checkout" msgstr "" +#: ../../docstring aiogram.types.update.Update.purchased_paid_media:1 of +msgid "" +"*Optional*. A user purchased paid media with a non-empty payload sent by " +"the bot in a non-channel chat" +msgstr "" + #: ../../docstring aiogram.types.update.Update.poll:1 of msgid "" -"*Optional*. New poll state. Bots receive only updates about stopped polls" -" and polls, which are sent by the bot" +"*Optional*. New poll state. Bots receive only updates about manually " +"stopped polls and polls, which are sent by the bot" msgstr "" #: ../../docstring aiogram.types.update.Update.poll_answer:1 of @@ -168,7 +195,7 @@ msgstr "" msgid "Detect update type If update type is unknown, raise UpdateTypeLookupError" msgstr "" -#: aiogram.types.update.Update.event_type of +#: ../../api/types/update.rst msgid "Returns" msgstr "" @@ -184,3 +211,49 @@ msgstr "" #~ "'chat_member' in the list of " #~ "*allowed_updates* to receive these updates." #~ msgstr "" + +#~ msgid "" +#~ "The update's unique identifier. Update " +#~ "identifiers start from a certain " +#~ "positive number and increase sequentially. " +#~ "This ID becomes especially handy if " +#~ "you're using `webhooks " +#~ "`_, since " +#~ "it allows you to ignore repeated " +#~ "updates or to restore the correct " +#~ "update sequence, should they get out " +#~ "of order. If there are no new " +#~ "updates for at least a week, then" +#~ " identifier of the next update will" +#~ " be chosen randomly instead of " +#~ "sequentially." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. New version of a message " +#~ "that is known to the bot and " +#~ "was edited" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. New version of a channel " +#~ "post that is known to the bot " +#~ "and was edited" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. Reactions to a message with" +#~ " anonymous reactions were changed. The " +#~ "bot must be an administrator in " +#~ "the chat and must explicitly specify " +#~ ":code:`\"message_reaction_count\"` in the list " +#~ "of *allowed_updates* to receive these " +#~ "updates." +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. New poll state. Bots receive" +#~ " only updates about stopped polls and" +#~ " polls, which are sent by the " +#~ "bot" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/user.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/user.po index b7e590b3..537fe1d8 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/user.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/user.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/user.rst:3 msgid "User" @@ -90,6 +90,19 @@ msgid "" "only in :class:`aiogram.methods.get_me.GetMe`." msgstr "" +#: ../../docstring aiogram.types.user.User.can_connect_to_business:1 of +msgid "" +"*Optional*. :code:`True`, if the bot can be connected to a Telegram " +"Business account to receive its messages. Returned only in " +":class:`aiogram.methods.get_me.GetMe`." +msgstr "" + +#: ../../docstring aiogram.types.user.User.has_main_web_app:1 of +msgid "" +"*Optional*. :code:`True`, if the bot has a main Web App. Returned only in" +" :class:`aiogram.methods.get_me.GetMe`." +msgstr "" + #: aiogram.types.user.User.get_profile_photos:1 of msgid "" "Shortcut for method " @@ -111,7 +124,7 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/api#getuserprofilephotos" msgstr "" -#: aiogram.types.user.User.get_profile_photos of +#: ../../api/types/user.rst msgid "Parameters" msgstr "" @@ -127,7 +140,7 @@ msgid "" "accepted. Defaults to 100." msgstr "" -#: aiogram.types.user.User.get_profile_photos of +#: ../../api/types/user.rst msgid "Returns" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/users_shared.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/users_shared.po index 3cfb884c..2306458b 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/users_shared.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/users_shared.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: uk_UA\n" @@ -40,6 +40,10 @@ msgstr "" msgid "Identifier of the request" msgstr "" +#: ../../docstring aiogram.types.users_shared.UsersShared.users:1 of +msgid "Information about users shared with the bot." +msgstr "" + #: ../../docstring aiogram.types.users_shared.UsersShared.user_ids:1 of msgid "" "Identifiers of the shared users. These numbers may have more than 32 " @@ -50,3 +54,7 @@ msgid "" "users and could be unable to use these identifiers, unless the users are " "already known to the bot by some other means." msgstr "" + +#: ../../docstring aiogram.types.users_shared.UsersShared.user_ids:3 of +msgid "https://core.telegram.org/bots/api-changelog#march-31-2024" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/video.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/video.po index d3df202b..5da7a7d3 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/video.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/video.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/video.rst:3 msgid "Video" @@ -40,27 +40,37 @@ msgid "" msgstr "" #: ../../docstring aiogram.types.video.Video.width:1 of -msgid "Video width as defined by sender" +msgid "Video width as defined by the sender" msgstr "" #: ../../docstring aiogram.types.video.Video.height:1 of -msgid "Video height as defined by sender" +msgid "Video height as defined by the sender" msgstr "" #: ../../docstring aiogram.types.video.Video.duration:1 of -msgid "Duration of the video in seconds as defined by sender" +msgid "Duration of the video in seconds as defined by the sender" msgstr "" -#: ../../docstring aiogram.types.video.Video.thumb:1 of +#: ../../docstring aiogram.types.video.Video.thumbnail:1 of msgid "*Optional*. Video thumbnail" msgstr "" +#: ../../docstring aiogram.types.video.Video.cover:1 of +msgid "*Optional*. Available sizes of the cover of the video in the message" +msgstr "" + +#: ../../docstring aiogram.types.video.Video.start_timestamp:1 of +msgid "" +"*Optional*. Timestamp in seconds from which the video will play in the " +"message" +msgstr "" + #: ../../docstring aiogram.types.video.Video.file_name:1 of -msgid "*Optional*. Original filename as defined by sender" +msgid "*Optional*. Original filename as defined by the sender" msgstr "" #: ../../docstring aiogram.types.video.Video.mime_type:1 of -msgid "*Optional*. MIME type of the file as defined by sender" +msgid "*Optional*. MIME type of the file as defined by the sender" msgstr "" #: ../../docstring aiogram.types.video.Video.file_size:1 of @@ -70,3 +80,18 @@ msgid "" "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 value." msgstr "" + +#~ msgid "Video width as defined by sender" +#~ msgstr "" + +#~ msgid "Video height as defined by sender" +#~ msgstr "" + +#~ msgid "Duration of the video in seconds as defined by sender" +#~ msgstr "" + +#~ msgid "*Optional*. Original filename as defined by sender" +#~ msgstr "" + +#~ msgid "*Optional*. MIME type of the file as defined by sender" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/video_note.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/video_note.po index e2a1f689..ea1accb2 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/video_note.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/video_note.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/video_note.rst:3 msgid "VideoNote" @@ -44,18 +44,27 @@ msgstr "" #: ../../docstring aiogram.types.video_note.VideoNote.length:1 of msgid "" -"Video width and height (diameter of the video message) as defined by " +"Video width and height (diameter of the video message) as defined by the " "sender" msgstr "" #: ../../docstring aiogram.types.video_note.VideoNote.duration:1 of -msgid "Duration of the video in seconds as defined by sender" +msgid "Duration of the video in seconds as defined by the sender" msgstr "" -#: ../../docstring aiogram.types.video_note.VideoNote.thumb:1 of +#: ../../docstring aiogram.types.video_note.VideoNote.thumbnail:1 of msgid "*Optional*. Video thumbnail" msgstr "" #: ../../docstring aiogram.types.video_note.VideoNote.file_size:1 of msgid "*Optional*. File size in bytes" msgstr "" + +#~ msgid "" +#~ "Video width and height (diameter of " +#~ "the video message) as defined by " +#~ "sender" +#~ msgstr "" + +#~ msgid "Duration of the video in seconds as defined by sender" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/voice.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/voice.po index 1f0abe93..572000d2 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/voice.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/voice.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/types/voice.rst:3 msgid "Voice" @@ -40,11 +40,11 @@ msgid "" msgstr "" #: ../../docstring aiogram.types.voice.Voice.duration:1 of -msgid "Duration of the audio in seconds as defined by sender" +msgid "Duration of the audio in seconds as defined by the sender" msgstr "" #: ../../docstring aiogram.types.voice.Voice.mime_type:1 of -msgid "*Optional*. MIME type of the file as defined by sender" +msgid "*Optional*. MIME type of the file as defined by the sender" msgstr "" #: ../../docstring aiogram.types.voice.Voice.file_size:1 of @@ -54,3 +54,9 @@ msgid "" "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 value." msgstr "" + +#~ msgid "Duration of the audio in seconds as defined by sender" +#~ msgstr "" + +#~ msgid "*Optional*. MIME type of the file as defined by sender" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po index 693fc1ea..b5ff8ed9 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-02 15:10+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: 2022-12-13 21:40+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../api/upload_file.rst:5 msgid "How to upload file?" @@ -77,16 +77,17 @@ msgstr "" "<#upload-from-url>`__" #: ../../api/upload_file.rst:23 -msgid "**Be respectful with Telegram**" +#, fuzzy +msgid "**Be respectful to Telegram**" msgstr "**Поважайте Telegram**" #: ../../api/upload_file.rst:25 #, fuzzy msgid "" -"Instances of `InputFile` are reusable. That's mean you can create " -"instance of InputFile and sent this file multiple times but Telegram does" -" not recommend to do that and when you upload file once just save their " -"`file_id` and use it in next times." +"Instances of `InputFile` are reusable. That means you can create an " +"instance of InputFile and send it multiple times. However, Telegram does " +"not recommend doing this. Instead, once you upload a file, save its " +"`file_id` and reuse that later." msgstr "" "Екземпляри `InputFile` можна використовувати повторно. Це означає, що ви " "можете створити екземпляр InputFile і надіслати цей файл кілька разів, " @@ -94,15 +95,15 @@ msgstr "" " раз, просто збережіть його `file_id` і використовуйте його наступного " "разу." -#: ../../api/upload_file.rst:31 +#: ../../api/upload_file.rst:29 msgid "Upload from file system" msgstr "Відвантаження з файлової системи" -#: ../../api/upload_file.rst:33 +#: ../../api/upload_file.rst:31 msgid "By first step you will need to import InputFile wrapper:" msgstr "Перш за все, вам потрібно буде імпортувати обгортку InputFile:" -#: ../../api/upload_file.rst:39 +#: ../../api/upload_file.rst:37 msgid "Then you can use it:" msgstr "Тепер ви можете використовувати її:" @@ -111,8 +112,7 @@ msgstr "Тепер ви можете використовувати її:" msgid "Represents object for uploading files from filesystem" msgstr "Об’єкт для відвантаження файлів із файлової системи" -#: aiogram.types.input_file.BufferedInputFile.__init__ -#: aiogram.types.input_file.FSInputFile.__init__ of +#: ../../api/upload_file.rst msgid "Parameters" msgstr "Параметри" @@ -133,11 +133,11 @@ msgstr "" msgid "Uploading chunk size" msgstr "Розмір фрагмента відвантаження" -#: ../../api/upload_file.rst:52 +#: ../../api/upload_file.rst:50 msgid "Upload from buffer" msgstr "Відвантаження з буферу" -#: ../../api/upload_file.rst:54 +#: ../../api/upload_file.rst:52 #, fuzzy msgid "" "Files can be also passed from buffer (For example you generate image " @@ -148,11 +148,11 @@ msgstr "" " за допомогою `Pillow `_ і " "хочете надіслати його в Telegram):" -#: ../../api/upload_file.rst:58 ../../api/upload_file.rst:80 +#: ../../api/upload_file.rst:56 ../../api/upload_file.rst:78 msgid "Import wrapper:" msgstr "Імпорт обгортки:" -#: ../../api/upload_file.rst:64 ../../api/upload_file.rst:86 +#: ../../api/upload_file.rst:62 ../../api/upload_file.rst:84 msgid "And then you can use it:" msgstr "Тепер ви можете використовувати її:" @@ -164,11 +164,11 @@ msgstr "Байти" msgid "Filename to be propagated to telegram." msgstr "Ім'я файлу, яке буде передано в telegram." -#: ../../api/upload_file.rst:74 +#: ../../api/upload_file.rst:72 msgid "Upload from url" msgstr "Відвантаження з URL" -#: ../../api/upload_file.rst:76 +#: ../../api/upload_file.rst:74 msgid "" "If you need to upload a file from another server, but the direct link is " "bound to your server's IP, or you want to bypass native `upload limits " diff --git a/docs/locale/uk_UA/LC_MESSAGES/changelog.po b/docs/locale/uk_UA/LC_MESSAGES/changelog.po index 6cd2eb55..a0027709 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/changelog.po +++ b/docs/locale/uk_UA/LC_MESSAGES/changelog.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,142 +21,1371 @@ msgstr "" msgid "Changelog" msgstr "" -#: ../../[towncrier-fragments]:2 -msgid "\\ |release| [UNRELEASED DRAFT] (2024-02-16)" +#: ../../../CHANGES.rst:20 +msgid "3.18.0 (2025-02-16)" msgstr "" -#: ../../../CHANGES.rst:23 ../../../CHANGES.rst:43 ../../../CHANGES.rst:117 -#: ../../../CHANGES.rst:206 ../../../CHANGES.rst:264 ../../../CHANGES.rst:306 -#: ../../../CHANGES.rst:469 ../../../CHANGES.rst:569 ../../../CHANGES.rst:629 -#: ../../../CHANGES.rst:680 ../../../CHANGES.rst:753 ../../../CHANGES.rst:794 -#: ../../../CHANGES.rst:832 ../../../CHANGES.rst:880 ../../../CHANGES.rst:956 -#: ../../../CHANGES.rst:989 ../../../CHANGES.rst:1020 -#: ../../[towncrier-fragments]:5 +#: ../../../CHANGES.rst:23 ../../../CHANGES.rst:70 ../../../CHANGES.rst:85 +#: ../../../CHANGES.rst:117 ../../../CHANGES.rst:179 ../../../CHANGES.rst:273 +#: ../../../CHANGES.rst:310 ../../../CHANGES.rst:349 ../../../CHANGES.rst:384 +#: ../../../CHANGES.rst:400 ../../../CHANGES.rst:448 ../../../CHANGES.rst:518 +#: ../../../CHANGES.rst:552 ../../../CHANGES.rst:569 ../../../CHANGES.rst:635 +#: ../../../CHANGES.rst:677 ../../../CHANGES.rst:697 ../../../CHANGES.rst:771 +#: ../../../CHANGES.rst:860 ../../../CHANGES.rst:918 ../../../CHANGES.rst:960 +#: ../../../CHANGES.rst:1123 ../../../CHANGES.rst:1223 +#: ../../../CHANGES.rst:1283 ../../../CHANGES.rst:1334 +#: ../../../CHANGES.rst:1407 ../../../CHANGES.rst:1448 +#: ../../../CHANGES.rst:1486 ../../../CHANGES.rst:1534 +#: ../../../CHANGES.rst:1610 ../../../CHANGES.rst:1643 +#: ../../../CHANGES.rst:1674 msgid "Features" msgstr "" -#: ../../[towncrier-fragments]:7 +#: ../../../CHANGES.rst:25 +msgid "" +"Added full support for the `Bot API 8.3 `_:" +msgstr "" + +#: ../../../CHANGES.rst:27 +msgid "" +"Added the parameter :code:`chat_id` to the method " +":class:`aiogram.methods.send_gift.SendGift`, allowing bots to send gifts " +"to channel chats." +msgstr "" + +#: ../../../CHANGES.rst:28 +msgid "" +"Added the field :code:`can_send_gift` to the class " +":class:`aiogram.types.chat_full_info.ChatFullInfo`." +msgstr "" + +#: ../../../CHANGES.rst:29 +msgid "" +"Added the class " +":class:`aiogram.types.transaction_partner_chat.TransactionPartnerChat` " +"describing transactions with chats." +msgstr "" + +#: ../../../CHANGES.rst:30 +msgid "" +"Added the fields :code:`cover` and :code:`start_timestamp` to the class " +":class:`aiogram.types.video.Video`, containing a message-specific cover " +"and a start timestamp for the video." +msgstr "" + +#: ../../../CHANGES.rst:31 +msgid "" +"Added the parameters :code:`cover` and :code:`start_timestamp` to the " +"method :class:`aiogram.methods.send_video.SendVideo`, allowing bots to " +"specify a cover and a start timestamp for the videos they send." +msgstr "" + +#: ../../../CHANGES.rst:32 +msgid "" +"Added the fields :code:`cover` and :code:`start_timestamp` to the classes" +" :class:`aiogram.types.input_media_video.InputMediaVideo` and " +":class:`aiogram.types.input_paid_media_video.InputPaidMediaVideo`, " +"allowing bots to edit video covers and start timestamps, and specify them" +" for videos in albums and paid media." +msgstr "" + +#: ../../../CHANGES.rst:33 +msgid "" +"Added the parameter :code:`video_start_timestamp` to the methods " +":class:`aiogram.methods.forward_message.ForwardMessage` and " +":class:`aiogram.methods.copy_message.CopyMessage`, allowing bots to " +"change the start timestamp for forwarded and copied videos." +msgstr "" + +#: ../../../CHANGES.rst:34 +msgid "Allowed adding reactions to most types of service messages." +msgstr "" + +#: ../../../CHANGES.rst:35 +msgid "`#1638 `_" +msgstr "" + +#: ../../../CHANGES.rst:39 ../../../CHANGES.rst:96 ../../../CHANGES.rst:226 +#: ../../../CHANGES.rst:263 ../../../CHANGES.rst:297 ../../../CHANGES.rst:363 +#: ../../../CHANGES.rst:438 ../../../CHANGES.rst:482 ../../../CHANGES.rst:527 +#: ../../../CHANGES.rst:590 ../../../CHANGES.rst:624 ../../../CHANGES.rst:658 +#: ../../../CHANGES.rst:707 ../../../CHANGES.rst:761 ../../../CHANGES.rst:782 +#: ../../../CHANGES.rst:794 ../../../CHANGES.rst:815 ../../../CHANGES.rst:884 +#: ../../../CHANGES.rst:929 ../../../CHANGES.rst:999 ../../../CHANGES.rst:1185 +#: ../../../CHANGES.rst:1248 ../../../CHANGES.rst:1297 +#: ../../../CHANGES.rst:1358 ../../../CHANGES.rst:1416 +#: ../../../CHANGES.rst:1462 ../../../CHANGES.rst:1510 +#: ../../../CHANGES.rst:1566 ../../../CHANGES.rst:1651 +#: ../../../CHANGES.rst:1683 +msgid "Bugfixes" +msgstr "" + +#: ../../../CHANGES.rst:41 +msgid "" +"Fixed endless loop while adding buttons to the :code:`KeyboardBuilder`. " +"`#1595 `_" +msgstr "" + +#: ../../../CHANGES.rst:43 +msgid "" +"Change the :code:`Downloadable` protocol to be non-writable to shut up " +"type checking that checks code that uses the :code:`bot.download(...)` " +"method `#1628 `_" +msgstr "" + +#: ../../../CHANGES.rst:45 +msgid "" +"Fix the regex pattern that finds the \"bad characters\" for deeplink " +"payload. `#1630 `_" +msgstr "" + +#: ../../../CHANGES.rst:50 ../../../CHANGES.rst:237 ../../../CHANGES.rst:489 +#: ../../../CHANGES.rst:559 ../../../CHANGES.rst:605 ../../../CHANGES.rst:667 +#: ../../../CHANGES.rst:718 ../../../CHANGES.rst:827 ../../../CHANGES.rst:897 +#: ../../../CHANGES.rst:942 ../../../CHANGES.rst:1027 ../../../CHANGES.rst:1260 +#: ../../../CHANGES.rst:1310 ../../../CHANGES.rst:1690 +msgid "Improved Documentation" +msgstr "" + +#: ../../../CHANGES.rst:52 +msgid "" +"Update :code:`data: Dict[Any, str]` to :code:`data: Dict[str, Any]` " +"`#1634 `_" +msgstr "" + +#: ../../../CHANGES.rst:54 +msgid "" +"Fix small typo in the Scenes documentation `#1640 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:58 ../../../CHANGES.rst:103 ../../../CHANGES.rst:151 +#: ../../../CHANGES.rst:254 ../../../CHANGES.rst:339 ../../../CHANGES.rst:370 +#: ../../../CHANGES.rst:498 ../../../CHANGES.rst:542 ../../../CHANGES.rst:612 +#: ../../../CHANGES.rst:732 ../../../CHANGES.rst:848 ../../../CHANGES.rst:904 +#: ../../../CHANGES.rst:1043 ../../../CHANGES.rst:1194 +#: ../../../CHANGES.rst:1271 ../../../CHANGES.rst:1324 +#: ../../../CHANGES.rst:1375 ../../../CHANGES.rst:1429 +#: ../../../CHANGES.rst:1471 ../../../CHANGES.rst:1517 +#: ../../../CHANGES.rst:1577 ../../../CHANGES.rst:1598 +#: ../../../CHANGES.rst:1621 ../../../CHANGES.rst:1658 +#: ../../../CHANGES.rst:1697 +msgid "Misc" +msgstr "" + +#: ../../../CHANGES.rst:60 +msgid "" +"Removed redundant :code:`Path` to :code:`str` convertion on file " +"download. `#1612 `_" +msgstr "" + +#: ../../../CHANGES.rst:62 +msgid "" +"Increased max :code:`redis` version support from “<5.1.0” to “<5.3.0” " +"`#1631 `_" +msgstr "" + +#: ../../../CHANGES.rst:67 +msgid "3.17.0 (2025-01-02)" +msgstr "" + +#: ../../../CHANGES.rst:72 +msgid "" +"Added full support of the `Bot API 8.2 `_" +msgstr "" + +#: ../../../CHANGES.rst:74 +msgid "" +"Added the methods :class:`aiogram.methods.verify_user.VerifyUser`, " +":class:`aiogram.methods.verify_chat.VerifyChat`, " +":class:`aiogram.methods.remove_user_verification.RemoveUserVerification` " +"and " +":class:`aiogram.methods.remove_chat_verification.RemoveChatVerification`," +" allowing bots to manage verifications on behalf of an organization." +msgstr "" + +#: ../../../CHANGES.rst:75 +msgid "" +"Added the field :code:`upgrade_star_count` to the class " +":class:`aiogram.types.gift.Gift`." +msgstr "" + +#: ../../../CHANGES.rst:76 +msgid "" +"Added the parameter :code:`pay_for_upgrade` to the method " +":class:`aiogram.methods.send_gift.SendGift`." +msgstr "" + +#: ../../../CHANGES.rst:77 +msgid "" +"Removed the field :code:`hide_url` from the class " +":class:`aiogram.types.inline_query_result_article.InlineQueryResultArticle`." +" Pass an empty string as :code:`url` instead." +msgstr "" + +#: ../../../CHANGES.rst:78 +msgid "`#1623 `_" +msgstr "" + +#: ../../../CHANGES.rst:82 +msgid "3.16.0 (2024-12-21)" +msgstr "" + +#: ../../../CHANGES.rst:87 +msgid "" +"Added full support of `Bot API 8.1 `_:" +msgstr "" + +#: ../../../CHANGES.rst:89 +msgid "" +"Added the field :code:`nanostar_amount` to the class " +":class:`aiogram.types.star_transaction.StarTransaction`." +msgstr "" + +#: ../../../CHANGES.rst:90 +msgid "" +"Added the class " +":class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram`" +" for transactions pertaining to incoming affiliate commissions." +msgstr "" + +#: ../../../CHANGES.rst:91 +msgid "" +"Added the class :class:`aiogram.types.affiliate_info.AffiliateInfo` and " +"the field :code:`affiliate` to the class " +":class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`, " +"allowing bots to identify the relevant affiliate in transactions with an " +"affiliate commission." +msgstr "" + +#: ../../../CHANGES.rst:92 +msgid "`#1617 `_" +msgstr "" + +#: ../../../CHANGES.rst:98 +msgid "" +"Corrected the exception text of " +"`aiogram.methods.base.TelegramMethod.__await__` method. `#1616 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:105 +msgid "" +"Increased max :code:`pydantic` version support from “<2.10” to “<2.11” " +"`#1607 `_" +msgstr "" + +#: ../../../CHANGES.rst:107 +msgid "" +"Fixed closing tag for :code:`tg-emoji` in the " +":class:`aiogram.utils.text_decoration.HtmlDecoration`: use the same " +"constant as for tag opening `#1608 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:109 +msgid "" +"Increased max :code:`aiohttp` version support from “<3.11” to “<3.12” " +"`#1615 `_" +msgstr "" + +#: ../../../CHANGES.rst:114 +msgid "3.15.0 (2024-11-17)" +msgstr "" + +#: ../../../CHANGES.rst:119 +msgid "" +"Added full support for `Bot API 8.0 `_" +msgstr "" + +#: ../../../CHANGES.rst:121 +msgid "" +"Added the parameter :code:`subscription_period` to the method " +":class:`aiogram.methods.create_invoice_link.CreateInvoiceLink` to support" +" the creation of links that are billed periodically." +msgstr "" + +#: ../../../CHANGES.rst:124 +msgid "" +"Added the parameter :code:`business_connection_id` to the method " +":class:`aiogram.methods.create_invoice_link.CreateInvoiceLink` to support" +" the creation of invoice links on behalf of business accounts." +msgstr "" + +#: ../../../CHANGES.rst:127 +msgid "" +"Added the fields :code:`subscription_expiration_date`, " +":code:`is_recurring` and :code:`is_first_recurring` to the class " +":class:`aiogram.types.successful_payment.SuccessfulPayment`." +msgstr "" + +#: ../../../CHANGES.rst:130 +msgid "" +"Added the method " +":class:`aiogram.methods.edit_user_star_subscription.EditUserStarSubscription`." +msgstr "" + +#: ../../../CHANGES.rst:131 +msgid "" +"Added the field :code:`subscription_period` to the class " +":class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`." +msgstr "" + +#: ../../../CHANGES.rst:133 +msgid "" +"Added the method " +":class:`aiogram.methods.set_user_emoji_status.SetUserEmojiStatus`. The " +"user must allow the bot to manage their emoji status." +msgstr "" + +#: ../../../CHANGES.rst:135 +msgid "" +"Added the class " +":class:`aiogram.types.prepared_inline_message.PreparedInlineMessage` and " +"the method " +":class:`aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage`," +" allowing bots to suggest users send a specific message from a Mini App " +"via the method :class:`aiogram.methods.share_message.ShareMessage`." +msgstr "" + +#: ../../../CHANGES.rst:139 +msgid "" +"Added the classes :class:`aiogram.types.gift.Gift` and " +":class:`aiogram.types.gifts.Gifts` and the method " +":class:`aiogram.methods.get_available_gifts.GetAvailableGifts`, allowing " +"bots to get all gifts available for sending." +msgstr "" + +#: ../../../CHANGES.rst:142 +msgid "" +"Added the field :code:`gift` to the class " +":class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`." +msgstr "" + +#: ../../../CHANGES.rst:144 +msgid "`#1606 `_" +msgstr "" + +#: ../../../CHANGES.rst:148 +msgid "3.14.0 (2024-11-02)" +msgstr "" + +#: ../../../CHANGES.rst:153 +msgid "" +"Checked compatibility with Python 3.13 (added to the CI/CD processes), so" +" now aiogram is totally compatible with it." +msgstr "" + +#: ../../../CHANGES.rst:156 +msgid "" +"Dropped compatibility with Python 3.8 due to this version being `EOL " +"`_." +msgstr "" + +#: ../../../CHANGES.rst:160 +msgid "" +"In some cases you will need to have the installed compiler (Rust or C++) " +"to install some of the dependencies to compile packages from source on " +"`pip install` command." +msgstr "" + +#: ../../../CHANGES.rst:163 +msgid "" +"If you are using Windows, you will need to have the `Visual Studio " +"`_ installed." +msgstr "" + +#: ../../../CHANGES.rst:164 +msgid "" +"If you are using Linux, you will need to have the `build-essential` " +"package installed." +msgstr "" + +#: ../../../CHANGES.rst:165 +msgid "" +"If you are using macOS, you will need to have the `Xcode " +"`_ installed." +msgstr "" + +#: ../../../CHANGES.rst:167 +msgid "" +"When developers of this dependencies will release new versions with " +"precompiled wheels for Windows, Linux and macOS, this action will not be " +"necessary anymore until the next version of the Python interpreter." +msgstr "" + +#: ../../../CHANGES.rst:169 +msgid "`#1589 `_" +msgstr "" + +#: ../../../CHANGES.rst:170 +msgid "" +"Added business_connection_id to the " +":class:`aiogram.types.message.Message` API methods shortcuts." +msgstr "" + +#: ../../../CHANGES.rst:172 +msgid "" +"Integrated the :code:`business_connection_id` attribute into various " +"message manipulation methods, ensuring consistent data handling. This " +"update eliminates the need to pass the :code:`business_connection_id` as " +"a parameter, instead directly accessing it from the instance attributes. " +"`#1586 `_" +msgstr "" + +#: ../../../CHANGES.rst:181 +msgid "" +"Add function ``get_value`` to all built-in storage implementations, " +"``FSMContext`` and ``SceneWizard`` `#1431 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:183 +msgid "" +"Enhanced the inheritance of handlers and actions in :ref:`Scenes " +"`. Refactored to eliminate the copying of previously connected " +"handlers and actions from parent scenes. Now, handlers are dynamically " +"rebuilt based on the current class, properly utilizing class inheritance " +"and enabling handler overrides." +msgstr "" + +#: ../../../CHANGES.rst:187 +msgid "" +"That's mean that you can now override handlers and actions in the child " +"scene, instead of copying and duplicating them. `#1583 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:189 +msgid "" +"Added full support of `Bot API 7.11 `_" +msgstr "" + +#: ../../../CHANGES.rst:191 +msgid "" +"Added the class :class:`aiogram.types.copy_text_button.CopyTextButton` " +"and the field :code:`copy_text` in the class " +":class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton`, " +"allowing bots to send and receive inline buttons that copy arbitrary " +"text." +msgstr "" + +#: ../../../CHANGES.rst:195 +msgid "" +"Added the parameter :code:`allow_paid_broadcast` to the methods " +":class:`aiogram.methods.send_message.SendMessage`, " +":class:`aiogram.methods.send_photo.SendPhoto`, " +":class:`aiogram.methods.send_video.SendVideo`, " +":class:`aiogram.methods.send_animation.SendAnimation`, " +":class:`aiogram.methods.send_audio.SendAudio`, " +":class:`aiogram.methods.send_document.SendDocument`, " +":class:`aiogram.methods.send_paid_media.SendPaidMedia`, " +":class:`aiogram.methods.send_sticker.SendSticker`, " +":class:`aiogram.methods.send_video_note.SendVideoNote`, " +":class:`aiogram.methods.send_voice.SendVoice`, " +":class:`aiogram.methods.send_location.SendLocation`, " +":class:`aiogram.methods.send_venue.SendVenue`, " +":class:`aiogram.methods.send_contact.SendContact`, " +":class:`aiogram.methods.send_poll.SendPoll`, " +":class:`aiogram.methods.send_dice.SendDice`, " +":class:`aiogram.methods.send_invoice.SendInvoice`, " +":class:`aiogram.methods.send_game.SendGame`, " +":class:`aiogram.methods.send_media_group.SendMediaGroup` and " +":class:`aiogram.methods.copy_message.CopyMessage`." +msgstr "" + +#: ../../../CHANGES.rst:215 +msgid "" +"Added the class " +":class:`aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi`" +" for transactions related to paid broadcasted messages." +msgstr "" + +#: ../../../CHANGES.rst:218 +msgid "" +"Introduced the ability to add media to existing text messages using the " +"method :class:`aiogram.methods.edit_message_media.EditMessageMedia`." +msgstr "" + +#: ../../../CHANGES.rst:220 +msgid "" +"Added support for hashtag and cashtag entities with a specified chat " +"username that opens a search for the relevant tag within the specified " +"chat." +msgstr "" + +#: ../../../CHANGES.rst:222 +msgid "`#1601 `_" +msgstr "" + +#: ../../../CHANGES.rst:228 +msgid "" +"Fix PytestDeprecationWarning thrown by pytest-asyncio when running the " +"tests `#1584 `_" +msgstr "" + +#: ../../../CHANGES.rst:230 +msgid "" +"Fixed customized serialization in the " +":class:`aiogram.filters.callback_data.CallbackData` factory." +msgstr "" + +#: ../../../CHANGES.rst:232 +msgid "" +"From now UUID will have 32 bytes length instead of 36 bytes (with no `-` " +"separators) in the callback data representation. `#1602 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:239 +msgid "" +"Add missing closing tag for bold. `#1599 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:244 +msgid "3.13.1 (2024-09-18)" +msgstr "" + +#: ../../../CHANGES.rst:248 +msgid "" +"**Python 3.8 End of Life**: Python 3.8 will reach its end of life (EOL) " +"soon and will no longer be supported by aiogram in the next releases (1-2" +" months ETA)." +msgstr "" + +#: ../../../CHANGES.rst:251 +msgid "" +"Please upgrade to a newer version of Python to ensure compatibility and " +"receive future updates." +msgstr "" + +#: ../../../CHANGES.rst:256 +msgid "" +"Increase max pydantic version support \"<2.9\" -> \"<2.10\" (only For " +"Python >=3.9) `#1576 `_" +msgstr "" + +#: ../../../CHANGES.rst:258 +msgid "" +"Bump aiofiles version upper bound to <24.2 `#1577 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:265 +msgid "" +"Fixed `Default` object annotation resolution using `pydantic` `#1579 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:270 +msgid "3.13.0 (2024-09-08)" +msgstr "" + +#: ../../../CHANGES.rst:275 +msgid "" +"Added updates about purchased paid media, represented by the class " +":class:`aiogram.types.paid_media_purchased.PaidMediaPurchased` and the " +"field :code:`purchased_paid_media` in the class " +":class:`aiogram.types.update.Update`." +msgstr "" + +#: ../../../CHANGES.rst:279 +msgid "" +"Added the ability to specify a payload in " +":class:`aiogram.methods.send_paid_media.SendPaidMedia` that is received " +"back by the bot in " +":class:`aiogram.types.transaction_partner_user.TransactionPartnerUser` " +"and :code:`purchased_paid_media` updates." +msgstr "" + +#: ../../../CHANGES.rst:283 +msgid "" +"Added the field :code:`prize_star_count` to the classes " +":class:`aiogram.types.giveaway_created.GiveawayCreated`, " +":class:`aiogram.types.giveaway.Giveaway`, " +":class:`aiogram.types.giveaway_winners.GiveawayWinners` and " +":class:`aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway`." +msgstr "" + +#: ../../../CHANGES.rst:288 +msgid "" +"Added the field :code:`is_star_giveaway` to the class " +":class:`aiogram.types.giveaway_completed.GiveawayCompleted`." +msgstr "" + +#: ../../../CHANGES.rst:290 +msgid "`#1510 `_" +msgstr "" + +#: ../../../CHANGES.rst:291 +msgid "" +"Added missing method aliases such as `.answer()`, `.reply()`, and others " +"to `InaccessibleMessage`. This change ensures consistency and improves " +"usability by aligning the functionality of `InaccessibleMessage` with the" +" `Message` type. `#1574 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:299 +msgid "" +"Fixed link preview options to use global defaults in various types and " +"methods to use global defaults for `link_preview_options`. This change " +"ensures consistency and enhances flexibility in handling link preview " +"options across different components. `#1543 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:307 +msgid "3.12.0 (2024-08-16)" +msgstr "" + +#: ../../../CHANGES.rst:312 +msgid "" +"Added **message_thread_id** parameter to **message.get_url()**. `#1451 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:314 +msgid "" +"Added getting user from `chat_boost` with source `ChatBoostSourcePremium`" +" in `UserContextMiddleware` for `EventContext` `#1474 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:316 +msgid "" +"Added full support of `Bot API 7.8 `_" +msgstr "" + +#: ../../../CHANGES.rst:318 +msgid "Added the ability to send paid media to any chat." +msgstr "" + +#: ../../../CHANGES.rst:319 +msgid "" +"Added the parameter :code:`business_connection_id` to the method " +":class:`aiogram.methods.send_paid_media.SendPaidMedia`, allowing bots to " +"send paid media on behalf of a business account." +msgstr "" + +#: ../../../CHANGES.rst:322 +msgid "" +"Added the field :code:`paid_media` to the class " +":class:`aiogram.types.transaction_partner_user.TransactionPartnerUser` " +"for transactions involving paid media." +msgstr "" + +#: ../../../CHANGES.rst:325 +msgid "" +"Added the method " +":class:`aiogram.methods.create_chat_subscription_invite_link.CreateChatSubscriptionInviteLink`," +" allowing bots to create subscription invite links." +msgstr "" + +#: ../../../CHANGES.rst:328 +msgid "" +"Added the method " +":class:`aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink`," +" allowing bots to edit the name of subscription invite links." +msgstr "" + +#: ../../../CHANGES.rst:331 +msgid "" +"Added the field :code:`until_date` to the class " +":class:`aiogram.types.chat_member_member.ChatMemberMember` for members " +"with an active subscription." +msgstr "" + +#: ../../../CHANGES.rst:333 +msgid "" +"Added support for paid reactions and the class " +":class:`aiogram.types.reaction_type_paid.ReactionTypePaid`." +msgstr "" + +#: ../../../CHANGES.rst:335 +msgid "`#1560 `_" +msgstr "" + +#: ../../../CHANGES.rst:341 +msgid "" +"Improved performance of StatesGroup `#1507 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:346 +msgid "3.11.0 (2024-08-09)" +msgstr "" + +#: ../../../CHANGES.rst:351 +msgid "" +"Added full support of `Bot API 7.8 `_" +msgstr "" + +#: ../../../CHANGES.rst:353 +msgid "" +"Added the field :code:`has_main_web_app` to the class " +":class:`aiogram.types.user.User`, which is returned in the response to " +":class:`aiogram.methods.get_me.GetMe`." +msgstr "" + +#: ../../../CHANGES.rst:355 +msgid "" +"Added the parameter :code:`business_connection_id` to the methods " +":class:`aiogram.methods.pin_chat_message.PinChatMessage` and " +":class:`aiogram.methods.unpin_chat_message.UnpinChatMessage`, allowing " +"bots to manage pinned messages on behalf of a business account." +msgstr "" + +#: ../../../CHANGES.rst:359 +msgid "`#1551 `_" +msgstr "" + +#: ../../../CHANGES.rst:365 +msgid "" +"Fixed URL path in the \"Open\" button at the \"demo/sendMessage\" " +"endpoint in the web_app example. `#1546 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:372 +msgid "" +"Added method :func:`aiogram.types.message.Message.as_reply_parameters`. " +"Replaced usage of the argument :code:`reply_to_message_id` with " +":code:`reply_parameters` in all Message reply methods. `#1538 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:376 +msgid "" +"Added `aiohttp v3.10 `_ ` support. `#1548 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:381 +msgid "3.10.0 (2024-07-07)" +msgstr "" + +#: ../../../CHANGES.rst:386 +msgid "" +"Added full support of `Bot API 7.7 `_" +msgstr "" + +#: ../../../CHANGES.rst:388 +msgid "" +"Added the class :class:`aiogram.types.refunded_payment.RefundedPayment`, " +"containing information about a refunded payment." +msgstr "" + +#: ../../../CHANGES.rst:390 +msgid "" +"Added the field :code:`refunded_payment` to the class " +":class:`aiogram.types.message.Message`, describing a service message " +"about a refunded payment." +msgstr "" + +#: ../../../CHANGES.rst:393 +msgid "`#1536 `_" +msgstr "" + +#: ../../../CHANGES.rst:397 +msgid "3.9.0 (2024-07-06)" +msgstr "" + +#: ../../../CHANGES.rst:402 +msgid "" +"Added ChatMember resolution tool and updated 2.x migration guide. `#1525 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:404 +msgid "" +"Added full support of `Bot API 7.6 `_" +msgstr "" + +#: ../../../CHANGES.rst:406 +msgid "Added the classes :class:`aiogram.types.paid_media.PaidMedia`," +msgstr "" + +#: ../../../CHANGES.rst:407 +msgid "" +":class:`aiogram.types.paid_media_info.PaidMediaInfo`, " +":class:`aiogram.types.paid_media_preview.PaidMediaPreview`, " +":class:`aiogram.types.paid_media_photo.PaidMediaPhoto` and " +":class:`aiogram.types.paid_media_video.PaidMediaVideo`, containing " +"information about paid media." +msgstr "" + +#: ../../../CHANGES.rst:412 +msgid "Added the method :class:`aiogram.methods.send_paid_media.SendPaidMedia`" +msgstr "" + +#: ../../../CHANGES.rst:413 +msgid "" +"and the classes :class:`aiogram.types.input_paid_media.InputPaidMedia`, " +":class:`aiogram.types.input_paid_media_photo.InputPaidMediaPhoto` and " +":class:`aiogram.types.input_paid_media_video.InputPaidMediaVideo`, to " +"support sending paid media." +msgstr "" + +#: ../../../CHANGES.rst:417 +msgid "" +"Documented that the methods " +":class:`aiogram.methods.copy_message.CopyMessage`" +msgstr "" + +#: ../../../CHANGES.rst:418 +msgid "" +"and :class:`aiogram.methods.copy_messages.CopyMessages` cannot be used to" +" copy paid media." +msgstr "" + +#: ../../../CHANGES.rst:419 +msgid "Added the field :code:`can_send_paid_media` to the class" +msgstr "" + +#: ../../../CHANGES.rst:420 +msgid ":class:`aiogram.types.chat_full_info.ChatFullInfo`." +msgstr "" + +#: ../../../CHANGES.rst:421 +msgid "Added the field :code:`paid_media` to the classes" +msgstr "" + +#: ../../../CHANGES.rst:422 +msgid "" +":class:`aiogram.types.message.Message` and " +":class:`aiogram.types.external_reply_info.ExternalReplyInfo`." +msgstr "" + +#: ../../../CHANGES.rst:424 +msgid "Added the class" +msgstr "" + +#: ../../../CHANGES.rst:425 +msgid "" +":class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`," +" containing information about Telegram Star transactions involving the " +"Telegram Ads Platform." +msgstr "" + +#: ../../../CHANGES.rst:427 +msgid "Added the field :code:`invoice_payload` to the class" +msgstr "" + +#: ../../../CHANGES.rst:428 +msgid "" +":class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`, " +"containing the bot-specified invoice payload." +msgstr "" + +#: ../../../CHANGES.rst:430 +msgid "Changed the default opening mode for Direct Link Mini Apps." +msgstr "" + +#: ../../../CHANGES.rst:431 +msgid "Added support for launching Web Apps via t.me link in the class" +msgstr "" + +#: ../../../CHANGES.rst:432 +msgid ":class:`aiogram.types.menu_button_web_app.MenuButtonWebApp`." +msgstr "" + +#: ../../../CHANGES.rst:433 +msgid "" +"Added the field :code:`section_separator_color` to the class " +":code:`ThemeParams`." +msgstr "" + +#: ../../../CHANGES.rst:434 +msgid "`#1533 `_" +msgstr "" + +#: ../../../CHANGES.rst:440 +msgid "" +"Fixed event context resolving for the callback query that is coming from " +"the business account `#1520 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:445 +msgid "3.8.0 (2024-06-19)" +msgstr "" + +#: ../../../CHANGES.rst:450 +msgid "" +"Added utility to safely deserialize any Telegram object or method to a " +"JSON-compatible object (dict). (:ref:`>> Read more `)" +" `#1450 `_" +msgstr "" + +#: ../../../CHANGES.rst:453 +msgid "" +"Added full support of `Bot API 7.5 `_" +msgstr "" + +#: ../../../CHANGES.rst:455 +msgid "" +"Added the classes " +":class:`aiogram.types.star_transactions.StarTransactions`," +msgstr "" + +#: ../../../CHANGES.rst:456 +msgid "" +":class:`aiogram.types.star_transaction.StarTransaction`, " +":class:`aiogram.types.transaction_partner.TransactionPartner` and " +":class:`aiogram.types.revenue_withdrawal_state.RevenueWithdrawalState`, " +"containing information about Telegram Star transactions involving the " +"bot." +msgstr "" + +#: ../../../CHANGES.rst:460 +msgid "" +"Added the method " +":class:`aiogram.methods.get_star_transactions.GetStarTransactions`" +msgstr "" + +#: ../../../CHANGES.rst:461 +msgid "" +"that can be used to get the list of all Telegram Star transactions for " +"the bot." +msgstr "" + +#: ../../../CHANGES.rst:462 +msgid "Added support for callback buttons in" +msgstr "" + +#: ../../../CHANGES.rst:463 +msgid "" +":class:`aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup` for " +"messages sent on behalf of a business account." +msgstr "" + +#: ../../../CHANGES.rst:465 +msgid "Added support for callback queries originating from a message sent" +msgstr "" + +#: ../../../CHANGES.rst:466 +msgid "on behalf of a business account." +msgstr "" + +#: ../../../CHANGES.rst:467 +msgid "Added the parameter :code:`business_connection_id` to the methods" +msgstr "" + +#: ../../../CHANGES.rst:468 +msgid "" +":class:`aiogram.methods.edit_message_text.EditMessageText`, " +":class:`aiogram.methods.edit_message_media.EditMessageMedia`, " +":class:`aiogram.methods.edit_message_caption.EditMessageCaption`, " +":class:`aiogram.methods.edit_message_live_location.EditMessageLiveLocation`," +" " +":class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`" +" and " +":class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup`," +" allowing the bot to edit business messages." +msgstr "" + +#: ../../../CHANGES.rst:475 +msgid "Added the parameter :code:`business_connection_id` to the method" +msgstr "" + +#: ../../../CHANGES.rst:476 +msgid "" +":class:`aiogram.methods.stop_poll.StopPoll`, allowing the bot to stop " +"polls it sent on behalf of a business account." +msgstr "" + +#: ../../../CHANGES.rst:478 +msgid "`#1518 `_" +msgstr "" + +#: ../../../CHANGES.rst:484 +msgid "" +"Increased DNS cache ttl setting to aiohttp session as a workaround for " +"DNS resolution issues in aiohttp. `#1500 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:491 +msgid "" +"Fixed MongoStorage section in the documentation by adding extra " +"dependency to ReadTheDocs configuration. `#1501 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:493 +msgid "" +"Added information about dependency changes to the :code:`2.x --> 3.x` " +"migration guide. `#1504 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:500 +msgid "" +"[Only for contributors] Fail redis and mongo tests if incorrect URI " +"provided + some storages tests refactoring" +msgstr "" + +#: ../../../CHANGES.rst:502 +msgid "" +"If incorrect URIs provided to \"--redis\" and/or \"--mongo\" options " +"tests should fail with errors instead of skipping. Otherwise the next " +"scenario is possible:" +msgstr "" + +#: ../../../CHANGES.rst:504 +msgid "developer breaks RedisStorage and/or MongoStorage code" +msgstr "" + +#: ../../../CHANGES.rst:505 +msgid "" +"tests are run with incorrect redis and/or mongo URIsprovided by \"--" +"redis\" and \"--mongo\" options (for example, wrong port specified)" +msgstr "" + +#: ../../../CHANGES.rst:506 +msgid "tests pass because skipping doesn't fail tests run" +msgstr "" + +#: ../../../CHANGES.rst:507 +msgid "" +"developer or reviewer doesn't notice that redis and/or mongo tests were " +"skipped" +msgstr "" + +#: ../../../CHANGES.rst:508 +msgid "broken code gets in codebase" +msgstr "" + +#: ../../../CHANGES.rst:510 +msgid "" +"Also some refactorings done (related with storages and storages tests). " +"`#1510 `_" +msgstr "" + +#: ../../../CHANGES.rst:515 +msgid "3.7.0 (2024-05-31)" +msgstr "" + +#: ../../../CHANGES.rst:520 +msgid "" +"Added new storage :code:`aiogram.fsm.storage.MongoStorage` for Finite " +"State Machine based on Mongo DB (using :code:`motor` library) `#1434 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:522 +msgid "" +"Added full support of `Bot API 7.4 `_ `#1498 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:529 +msgid "" +"Fixed wrong :code:`MarkdownV2` custom emoji parsing in " +":code:`aiogram.utils.text_decorations` `#1496 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:534 ../../../CHANGES.rst:949 ../../../CHANGES.rst:1034 +#: ../../../CHANGES.rst:1317 +msgid "Deprecations and Removals" +msgstr "" + +#: ../../../CHANGES.rst:536 +msgid "" +"Removed deprecated arguments from Bot class :code:`parse_mode`, " +":code:`disable_web_page_preview`, :code:`protect_content` as previously " +"announced in v3.4.0. `#1494 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:544 +msgid "" +"Improved code consistency and readability in code examples by refactoring" +" imports, adjusting the base webhook URL, modifying bot instance " +"initialization to utilize DefaultBotProperties, and updating router " +"message handlers. `#1482 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:549 +msgid "3.6.0 (2024-05-06)" +msgstr "" + +#: ../../../CHANGES.rst:554 +msgid "" +"Added full support of `Bot API 7.3 `_ `#1480 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:561 +msgid "" +"Added telegram objects transformation block in 2.x -> 3.x migration guide" +" `#1412 `_" +msgstr "" + +#: ../../../CHANGES.rst:566 +msgid "3.5.0 (2024-04-23)" +msgstr "" + +#: ../../../CHANGES.rst:571 +msgid "" +"Added **message_thread_id** parameter to **ChatActionSender** class " +"methods. `#1437 `_" +msgstr "" + +#: ../../../CHANGES.rst:573 +msgid "Added context manager interface to Bot instance, from now you can use:" +msgstr "" + +#: ../../../CHANGES.rst:580 +msgid "instead of" +msgstr "" + +#: ../../../CHANGES.rst:586 +msgid "`#1468 `_" +msgstr "" + +#: ../../../CHANGES.rst:592 +msgid "" +"**WebAppUser Class Fields**: Added missing `is_premium`, " +"`added_to_attachment_menu`, and `allows_write_to_pm` fields to " +"`WebAppUser` class to align with the Telegram API." +msgstr "" + +#: ../../../CHANGES.rst:594 +msgid "" +"**WebAppChat Class Implementation**: Introduced the `WebAppChat` class " +"with all its fields (`id`, `type`, `title`, `username`, and `photo_url`) " +"as specified in the Telegram API, which was previously missing from the " +"library." +msgstr "" + +#: ../../../CHANGES.rst:596 +msgid "" +"**WebAppInitData Class Fields**: Included previously omitted fields in " +"the `WebAppInitData` class: `chat`, `chat_type`, `chat_instance`, to " +"match the official documentation for a complete Telegram Web Apps " +"support." +msgstr "" + +#: ../../../CHANGES.rst:597 +msgid "`#1424 `_" +msgstr "" + +#: ../../../CHANGES.rst:598 +msgid "" +"Fixed poll answer FSM context by handling :code:`voter_chat` for " +":code:`poll_answer` event `#1436 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:600 +msgid "" +"Added missing error handling to :code:`_background_feed_update` (when in " +":code:`handle_in_background=True` webhook mode) `#1458 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:607 +msgid "" +"Added WebAppChat class to WebApp docs, updated uk_UA localisation of " +"WebApp docs. `#1433 `_" +msgstr "" + +#: ../../../CHANGES.rst:614 +msgid "" +"Added full support of `Bot API 7.2 `_ `#1444 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:616 +msgid "" +"Loosened pydantic version upper restriction from ``<2.7`` to ``<2.8`` " +"`#1460 `_" +msgstr "" + +#: ../../../CHANGES.rst:621 +msgid "3.4.1 (2024-02-17)" +msgstr "" + +#: ../../../CHANGES.rst:626 +msgid "" +"Fixed JSON serialization of the :code:`LinkPreviewOptions` class while it" +" is passed as bot-wide default options. `#1418 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:632 +msgid "3.4.0 (2024-02-16)" +msgstr "" + +#: ../../../CHANGES.rst:637 msgid "" "Reworked bot-wide globals like :code:`parse_mode`, " ":code:`disable_web_page_preview`, and others to be more flexible." msgstr "" -#: ../../[towncrier-fragments]:11 +#: ../../../CHANGES.rst:641 msgid "" "Note that the old way of setting these global bot properties is now " "deprecated and will be removed in the next major release." msgstr "" -#: ../../[towncrier-fragments]:12 +#: ../../../CHANGES.rst:642 msgid "`#1392 `_" msgstr "" -#: ../../[towncrier-fragments]:13 +#: ../../../CHANGES.rst:643 msgid "" "A new enum :code:`KeyboardButtonPollTypeType` for " ":code:`KeyboardButtonPollTypeType.type` field has bed added. `#1398 " "`_" msgstr "" -#: ../../../CHANGES.rst:53 ../../../CHANGES.rst:107 ../../../CHANGES.rst:128 -#: ../../../CHANGES.rst:140 ../../../CHANGES.rst:161 ../../../CHANGES.rst:230 -#: ../../../CHANGES.rst:275 ../../../CHANGES.rst:345 ../../../CHANGES.rst:531 -#: ../../../CHANGES.rst:594 ../../../CHANGES.rst:643 ../../../CHANGES.rst:704 -#: ../../../CHANGES.rst:762 ../../../CHANGES.rst:808 ../../../CHANGES.rst:856 -#: ../../../CHANGES.rst:912 ../../../CHANGES.rst:997 ../../../CHANGES.rst:1029 -#: ../../[towncrier-fragments]:18 -msgid "Bugfixes" +#: ../../../CHANGES.rst:645 +msgid "" +"Added full support of `Bot API 7.1 `_" msgstr "" -#: ../../[towncrier-fragments]:20 +#: ../../../CHANGES.rst:647 +msgid "" +"Added support for the administrator rights :code:`can_post_stories`, " +":code:`can_edit_stories`, :code:`can_delete_stories` in supergroups." +msgstr "" + +#: ../../../CHANGES.rst:648 +msgid "" +"Added the class :code:`ChatBoostAdded` and the field :code:`boost_added` " +"to the class :code:`Message` for service messages about a user boosting a" +" chat." +msgstr "" + +#: ../../../CHANGES.rst:649 +msgid "Added the field :code:`sender_boost_count` to the class :code:`Message`." +msgstr "" + +#: ../../../CHANGES.rst:650 +msgid "Added the field :code:`reply_to_story` to the class :code:`Message`." +msgstr "" + +#: ../../../CHANGES.rst:651 +msgid "Added the fields :code:`chat` and :code:`id` to the class :code:`Story`." +msgstr "" + +#: ../../../CHANGES.rst:652 +msgid "Added the field :code:`unrestrict_boost_count` to the class :code:`Chat`." +msgstr "" + +#: ../../../CHANGES.rst:653 +msgid "" +"Added the field :code:`custom_emoji_sticker_set_name` to the class " +":code:`Chat`." +msgstr "" + +#: ../../../CHANGES.rst:654 +msgid "`#1417 `_" +msgstr "" + +#: ../../../CHANGES.rst:660 msgid "" "Update KeyboardBuilder utility, fixed type-hints for button method, " "adjusted limits of the different markup types to real world values. " "`#1399 `_" msgstr "" -#: ../../[towncrier-fragments]:22 +#: ../../../CHANGES.rst:662 msgid "" "Added new :code:`reply_parameters` param to :code:`message.send_copy` " "because it hasn't been added there `#1403 " "`_" msgstr "" -#: ../../../CHANGES.rst:64 ../../../CHANGES.rst:173 ../../../CHANGES.rst:243 -#: ../../../CHANGES.rst:288 ../../../CHANGES.rst:373 ../../../CHANGES.rst:606 -#: ../../../CHANGES.rst:656 ../../../CHANGES.rst:1036 -#: ../../[towncrier-fragments]:27 -msgid "Improved Documentation" -msgstr "" - -#: ../../[towncrier-fragments]:29 +#: ../../../CHANGES.rst:669 msgid "" "Add notion \"Working with plural forms\" in documentation Utils -> " "Translation `#1395 `_" msgstr "" -#: ../../../CHANGES.rst:20 +#: ../../../CHANGES.rst:674 msgid "3.3.0 (2023-12-31)" msgstr "" -#: ../../../CHANGES.rst:25 +#: ../../../CHANGES.rst:679 msgid "" "Added full support of `Bot API 7.0 `_" msgstr "" -#: ../../../CHANGES.rst:27 +#: ../../../CHANGES.rst:681 msgid "Reactions" msgstr "" -#: ../../../CHANGES.rst:28 +#: ../../../CHANGES.rst:682 msgid "Replies 2.0" msgstr "" -#: ../../../CHANGES.rst:29 +#: ../../../CHANGES.rst:683 msgid "Link Preview Customization" msgstr "" -#: ../../../CHANGES.rst:30 +#: ../../../CHANGES.rst:684 msgid "Block Quotation" msgstr "" -#: ../../../CHANGES.rst:31 +#: ../../../CHANGES.rst:685 msgid "Multiple Message Actions" msgstr "" -#: ../../../CHANGES.rst:32 +#: ../../../CHANGES.rst:686 msgid "Requests for multiple users" msgstr "" -#: ../../../CHANGES.rst:33 +#: ../../../CHANGES.rst:687 msgid "Chat Boosts" msgstr "" -#: ../../../CHANGES.rst:34 +#: ../../../CHANGES.rst:688 msgid "Giveaway" msgstr "" -#: ../../../CHANGES.rst:35 +#: ../../../CHANGES.rst:689 msgid "Other changes" msgstr "" -#: ../../../CHANGES.rst:36 +#: ../../../CHANGES.rst:690 msgid "`#1387 `_" msgstr "" -#: ../../../CHANGES.rst:40 +#: ../../../CHANGES.rst:694 msgid "3.2.0 (2023-11-24)" msgstr "" -#: ../../../CHANGES.rst:45 +#: ../../../CHANGES.rst:699 msgid "" "Introduced Scenes feature that helps you to simplify user interactions " "using Finite State Machine. Read more about 👉 :ref:`Scenes `. " "`#1280 `_" msgstr "" -#: ../../../CHANGES.rst:48 +#: ../../../CHANGES.rst:702 msgid "" "Added the new FSM strategy :code:`CHAT_TOPIC`, which sets the state for " "the entire topic in the chat, also works in private messages and regular " @@ -164,321 +1393,312 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:55 +#: ../../../CHANGES.rst:709 msgid "" "Fixed :code:`parse_mode` argument in the in :code:`Message.send_copy` " "shortcut. Disable by default. `#1332 " "`_" msgstr "" -#: ../../../CHANGES.rst:57 +#: ../../../CHANGES.rst:711 msgid "" "Added ability to get handler flags from filters. `#1360 " "`_" msgstr "" -#: ../../../CHANGES.rst:59 +#: ../../../CHANGES.rst:713 msgid "" "Fixed a situation where a :code:`CallbackData` could not be parsed " "without a default value. `#1368 " "`_" msgstr "" -#: ../../../CHANGES.rst:66 +#: ../../../CHANGES.rst:720 msgid "" "Corrected grammatical errors, improved sentence structures, translation " "for migration 2.x-3.x `#1302 " "`_" msgstr "" -#: ../../../CHANGES.rst:68 +#: ../../../CHANGES.rst:722 msgid "" "Minor typo correction, specifically in module naming + some grammar. " "`#1340 `_" msgstr "" -#: ../../../CHANGES.rst:70 +#: ../../../CHANGES.rst:724 msgid "" "Added `CITATION.cff` file for automatic academic citation generation. Now" " you can copy citation from the GitHub page and paste it into your paper." " `#1351 `_" msgstr "" -#: ../../../CHANGES.rst:73 +#: ../../../CHANGES.rst:727 msgid "" "Minor typo correction in middleware docs. `#1353 " "`_" msgstr "" -#: ../../../CHANGES.rst:78 ../../../CHANGES.rst:194 ../../../CHANGES.rst:250 -#: ../../../CHANGES.rst:389 ../../../CHANGES.rst:540 ../../../CHANGES.rst:617 -#: ../../../CHANGES.rst:670 ../../../CHANGES.rst:721 ../../../CHANGES.rst:775 -#: ../../../CHANGES.rst:817 ../../../CHANGES.rst:863 ../../../CHANGES.rst:923 -#: ../../../CHANGES.rst:944 ../../../CHANGES.rst:967 ../../../CHANGES.rst:1004 -#: ../../../CHANGES.rst:1043 -msgid "Misc" -msgstr "" - -#: ../../../CHANGES.rst:80 +#: ../../../CHANGES.rst:734 msgid "" "Fixed ResourceWarning in the tests, reworked :code:`RedisEventsIsolation`" " fixture to use Redis connection from :code:`RedisStorage` `#1320 " "`_" msgstr "" -#: ../../../CHANGES.rst:82 +#: ../../../CHANGES.rst:736 msgid "Updated dependencies, bumped minimum required version:" msgstr "" -#: ../../../CHANGES.rst:84 +#: ../../../CHANGES.rst:738 msgid ":code:`magic-filter` - fixed `.resolve` operation" msgstr "" -#: ../../../CHANGES.rst:85 +#: ../../../CHANGES.rst:739 msgid ":code:`pydantic` - fixed compatibility (broken in 2.4)" msgstr "" -#: ../../../CHANGES.rst:86 +#: ../../../CHANGES.rst:740 msgid "" ":code:`aiodns` - added new dependency to the :code:`fast` extras " "(:code:`pip install aiogram[fast]`)" msgstr "" -#: ../../../CHANGES.rst:87 +#: ../../../CHANGES.rst:741 msgid "*others...*" msgstr "" -#: ../../../CHANGES.rst:88 +#: ../../../CHANGES.rst:742 msgid "`#1327 `_" msgstr "" -#: ../../../CHANGES.rst:89 +#: ../../../CHANGES.rst:743 msgid "" "Prevent update handling task pointers from being garbage collected, " "backport from 2.x `#1331 " "`_" msgstr "" -#: ../../../CHANGES.rst:91 +#: ../../../CHANGES.rst:745 msgid "" "Updated :code:`typing-extensions` package version range in dependencies " "to fix compatibility with :code:`FastAPI` `#1347 " "`_" msgstr "" -#: ../../../CHANGES.rst:93 +#: ../../../CHANGES.rst:747 msgid "" "Introduce Python 3.12 support `#1354 " "`_" msgstr "" -#: ../../../CHANGES.rst:95 +#: ../../../CHANGES.rst:749 msgid "" "Speeded up CallableMixin processing by caching references to nested " "objects and simplifying kwargs assembly. `#1357 " "`_" msgstr "" -#: ../../../CHANGES.rst:97 +#: ../../../CHANGES.rst:751 msgid "" "Added :code:`pydantic` v2.5 support. `#1361 " "`_" msgstr "" -#: ../../../CHANGES.rst:99 +#: ../../../CHANGES.rst:753 msgid "" "Updated :code:`thumbnail` fields type to :code:`InputFile` only `#1372 " "`_" msgstr "" -#: ../../../CHANGES.rst:104 +#: ../../../CHANGES.rst:758 msgid "3.1.1 (2023-09-25)" msgstr "" -#: ../../../CHANGES.rst:109 +#: ../../../CHANGES.rst:763 msgid "" "Fixed `pydantic` version <2.4, since 2.4 has breaking changes. `#1322 " "`_" msgstr "" -#: ../../../CHANGES.rst:114 +#: ../../../CHANGES.rst:768 msgid "3.1.0 (2023-09-22)" msgstr "" -#: ../../../CHANGES.rst:119 +#: ../../../CHANGES.rst:773 msgid "" "Added support for custom encoders/decoders for payload (and also for " "deep-linking). `#1262 `_" msgstr "" -#: ../../../CHANGES.rst:121 +#: ../../../CHANGES.rst:775 msgid "" "Added :class:`aiogram.utils.input_media.MediaGroupBuilder` for media " "group construction. `#1293 " "`_" msgstr "" -#: ../../../CHANGES.rst:123 +#: ../../../CHANGES.rst:777 msgid "" "Added full support of `Bot API 6.9 `_ `#1319 " "`_" msgstr "" -#: ../../../CHANGES.rst:130 +#: ../../../CHANGES.rst:784 msgid "" "Added actual param hints for `InlineKeyboardBuilder` and " "`ReplyKeyboardBuilder`. `#1303 " "`_" msgstr "" -#: ../../../CHANGES.rst:132 +#: ../../../CHANGES.rst:786 msgid "" "Fixed priority of events isolation, now user state will be loaded only " "after lock is acquired `#1317 " "`_" msgstr "" -#: ../../../CHANGES.rst:137 +#: ../../../CHANGES.rst:791 msgid "3.0.0 (2023-09-01)" msgstr "" -#: ../../../CHANGES.rst:142 +#: ../../../CHANGES.rst:796 msgid "" "Replaced :code:`datetime.datetime` with `DateTime` type wrapper across " "types to make dumped JSONs object more compatible with data that is sent " "by Telegram. `#1277 `_" msgstr "" -#: ../../../CHANGES.rst:145 +#: ../../../CHANGES.rst:799 msgid "" "Fixed magic :code:`.as_(...)` operation for values that can be " "interpreted as `False` (e.g. `0`). `#1281 " "`_" msgstr "" -#: ../../../CHANGES.rst:147 +#: ../../../CHANGES.rst:801 msgid "" "Italic markdown from utils now uses correct decorators `#1282 " "`_" msgstr "" -#: ../../../CHANGES.rst:149 +#: ../../../CHANGES.rst:803 msgid "" "Fixed method :code:`Message.send_copy` for stickers. `#1284 " "`_" msgstr "" -#: ../../../CHANGES.rst:151 +#: ../../../CHANGES.rst:805 msgid "" "Fixed :code:`Message.send_copy` method, which was not working properly " "with stories, so not you can copy stories too (forwards messages). `#1286" " `_" msgstr "" -#: ../../../CHANGES.rst:153 +#: ../../../CHANGES.rst:807 msgid "" "Fixed error overlapping when validation error is caused by remove_unset " "root validator in base types and methods. `#1290 " "`_" msgstr "" -#: ../../../CHANGES.rst:158 +#: ../../../CHANGES.rst:812 msgid "3.0.0rc2 (2023-08-18)" msgstr "" -#: ../../../CHANGES.rst:163 +#: ../../../CHANGES.rst:817 msgid "" "Fixed missing message content types (:code:`ContentType.USER_SHARED`, " ":code:`ContentType.CHAT_SHARED`) `#1252 " "`_" msgstr "" -#: ../../../CHANGES.rst:165 +#: ../../../CHANGES.rst:819 msgid "" "Fixed nested hashtag, cashtag and email message entities not being parsed" " correctly when these entities are inside another entity. `#1259 " "`_" msgstr "" -#: ../../../CHANGES.rst:167 +#: ../../../CHANGES.rst:821 msgid "" "Moved global filters check placement into router to add chance to pass " "context from global filters into handlers in the same way as it possible " "in other places `#1266 `_" msgstr "" -#: ../../../CHANGES.rst:175 +#: ../../../CHANGES.rst:829 msgid "" "Added error handling example `examples/error_handling.py` `#1099 " "`_" msgstr "" -#: ../../../CHANGES.rst:177 +#: ../../../CHANGES.rst:831 msgid "" "Added a few words about skipping pending updates `#1251 " "`_" msgstr "" -#: ../../../CHANGES.rst:179 +#: ../../../CHANGES.rst:833 msgid "" "Added a section on Dependency Injection technology `#1253 " "`_" msgstr "" -#: ../../../CHANGES.rst:181 +#: ../../../CHANGES.rst:835 msgid "" "This update includes the addition of a multi-file bot example to the " "repository. `#1254 `_" msgstr "" -#: ../../../CHANGES.rst:183 +#: ../../../CHANGES.rst:837 msgid "" "Refactored examples code to use aiogram enumerations and enhanced chat " "messages with markdown beautification's for a more user-friendly display." " `#1256 `_" msgstr "" -#: ../../../CHANGES.rst:186 +#: ../../../CHANGES.rst:840 msgid "" "Supplemented \"Finite State Machine\" section in Migration FAQ `#1264 " "`_" msgstr "" -#: ../../../CHANGES.rst:188 +#: ../../../CHANGES.rst:842 msgid "" "Removed extra param in docstring of TelegramEventObserver's filter method" " and fixed typo in I18n documentation. `#1268 " "`_" msgstr "" -#: ../../../CHANGES.rst:196 +#: ../../../CHANGES.rst:850 msgid "" "Enhanced the warning message in dispatcher to include a JSON dump of the " "update when update type is not known. `#1269 " "`_" msgstr "" -#: ../../../CHANGES.rst:198 +#: ../../../CHANGES.rst:852 msgid "" "Added support for `Bot API 6.8 `_ `#1275 " "`_" msgstr "" -#: ../../../CHANGES.rst:203 +#: ../../../CHANGES.rst:857 msgid "3.0.0rc1 (2023-08-06)" msgstr "" -#: ../../../CHANGES.rst:208 +#: ../../../CHANGES.rst:862 msgid "Added Currency enum. You can use it like this:" msgstr "" -#: ../../../CHANGES.rst:220 +#: ../../../CHANGES.rst:874 msgid "`#1194 `_" msgstr "" -#: ../../../CHANGES.rst:221 +#: ../../../CHANGES.rst:875 msgid "" "Updated keyboard builders with new methods for integrating buttons and " "keyboard creation more seamlessly. Added functionality to create buttons " @@ -487,45 +1707,45 @@ msgid "" "`#1236 `_" msgstr "" -#: ../../../CHANGES.rst:225 +#: ../../../CHANGES.rst:879 msgid "" "Added support for message_thread_id in ChatActionSender `#1249 " "`_" msgstr "" -#: ../../../CHANGES.rst:232 +#: ../../../CHANGES.rst:886 msgid "" "Fixed polling startup when \"bot\" key is passed manually into dispatcher" " workflow data `#1242 `_" msgstr "" -#: ../../../CHANGES.rst:234 +#: ../../../CHANGES.rst:888 msgid "Added codegen configuration for lost shortcuts:" msgstr "" -#: ../../../CHANGES.rst:236 +#: ../../../CHANGES.rst:890 msgid "ShippingQuery.answer" msgstr "" -#: ../../../CHANGES.rst:237 +#: ../../../CHANGES.rst:891 msgid "PreCheckoutQuery.answer" msgstr "" -#: ../../../CHANGES.rst:238 +#: ../../../CHANGES.rst:892 msgid "Message.delete_reply_markup" msgstr "" -#: ../../../CHANGES.rst:239 +#: ../../../CHANGES.rst:893 msgid "`#1244 `_" msgstr "" -#: ../../../CHANGES.rst:245 +#: ../../../CHANGES.rst:899 msgid "" "Added documentation for webhook and polling modes. `#1241 " "`_" msgstr "" -#: ../../../CHANGES.rst:252 +#: ../../../CHANGES.rst:906 msgid "" "Reworked InputFile reading, removed :code:`__aiter__` method, added `bot:" " Bot` argument to the :code:`.read(...)` method, so, from now " @@ -533,18 +1753,18 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:256 +#: ../../../CHANGES.rst:910 msgid "" "Code-generated :code:`__init__` typehints in types and methods to make " "IDE happy without additional pydantic plugin `#1245 " "`_" msgstr "" -#: ../../../CHANGES.rst:261 +#: ../../../CHANGES.rst:915 msgid "3.0.0b9 (2023-07-30)" msgstr "" -#: ../../../CHANGES.rst:266 +#: ../../../CHANGES.rst:920 msgid "" "Added new shortcuts for " ":class:`aiogram.types.chat_member_updated.ChatMemberUpdated` to send " @@ -552,7 +1772,7 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:269 +#: ../../../CHANGES.rst:923 msgid "" "Added new shortcuts for " ":class:`aiogram.types.chat_join_request.ChatJoinRequest` to make easier " @@ -560,13 +1780,13 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:277 +#: ../../../CHANGES.rst:931 msgid "" "Fixed bot assignment in the :code:`Message.send_copy` shortcut `#1232 " "`_" msgstr "" -#: ../../../CHANGES.rst:279 +#: ../../../CHANGES.rst:933 msgid "" "Added model validation to remove UNSET before field validation. This " "change was necessary to correctly handle parse_mode where 'UNSET' is used" @@ -576,21 +1796,17 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:284 +#: ../../../CHANGES.rst:938 msgid "Updated pydantic to 2.1 with few bugfixes" msgstr "" -#: ../../../CHANGES.rst:290 +#: ../../../CHANGES.rst:944 msgid "" "Improved docs, added basic migration guide (will be expanded later) " "`#1143 `_" msgstr "" -#: ../../../CHANGES.rst:295 ../../../CHANGES.rst:380 ../../../CHANGES.rst:663 -msgid "Deprecations and Removals" -msgstr "" - -#: ../../../CHANGES.rst:297 +#: ../../../CHANGES.rst:951 msgid "" "Removed the use of the context instance (Bot.get_current) from all " "placements that were used previously. This is to avoid the use of the " @@ -598,78 +1814,78 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:303 +#: ../../../CHANGES.rst:957 msgid "3.0.0b8 (2023-07-17)" msgstr "" -#: ../../../CHANGES.rst:308 +#: ../../../CHANGES.rst:962 msgid "" "Added possibility to use custom events in routers (If router does not " "support custom event it does not break and passes it to included " "routers). `#1147 `_" msgstr "" -#: ../../../CHANGES.rst:310 +#: ../../../CHANGES.rst:964 msgid "Added support for FSM in Forum topics." msgstr "" -#: ../../../CHANGES.rst:312 +#: ../../../CHANGES.rst:966 msgid "The strategy can be changed in dispatcher:" msgstr "" -#: ../../../CHANGES.rst:325 +#: ../../../CHANGES.rst:979 msgid "" "If you have implemented you own storages you should extend record key " "generation with new one attribute - :code:`thread_id`" msgstr "" -#: ../../../CHANGES.rst:327 +#: ../../../CHANGES.rst:981 msgid "`#1161 `_" msgstr "" -#: ../../../CHANGES.rst:328 +#: ../../../CHANGES.rst:982 msgid "Improved CallbackData serialization." msgstr "" -#: ../../../CHANGES.rst:330 +#: ../../../CHANGES.rst:984 msgid "Minimized UUID (hex without dashes)" msgstr "" -#: ../../../CHANGES.rst:331 +#: ../../../CHANGES.rst:985 msgid "Replaced bool values with int (true=1, false=0)" msgstr "" -#: ../../../CHANGES.rst:332 +#: ../../../CHANGES.rst:986 msgid "`#1163 `_" msgstr "" -#: ../../../CHANGES.rst:333 +#: ../../../CHANGES.rst:987 msgid "" "Added a tool to make text formatting flexible and easy. More details on " "the :ref:`corresponding documentation page ` `#1172 " "`_" msgstr "" -#: ../../../CHANGES.rst:336 +#: ../../../CHANGES.rst:990 msgid "" "Added :code:`X-Telegram-Bot-Api-Secret-Token` header check `#1173 " "`_" msgstr "" -#: ../../../CHANGES.rst:338 +#: ../../../CHANGES.rst:992 msgid "" "Made :code:`allowed_updates` list to revolve automatically in " "start_polling method if not set explicitly. `#1178 " "`_" msgstr "" -#: ../../../CHANGES.rst:340 +#: ../../../CHANGES.rst:994 msgid "" "Added possibility to pass custom headers to :class:`URLInputFile` object " "`#1191 `_" msgstr "" -#: ../../../CHANGES.rst:347 +#: ../../../CHANGES.rst:1001 msgid "" "Change type of result in InlineQueryResult enum for " ":code:`InlineQueryResultCachedMpeg4Gif` and " @@ -677,51 +1893,51 @@ msgid "" "documentation." msgstr "" -#: ../../../CHANGES.rst:350 +#: ../../../CHANGES.rst:1004 msgid "" "Change regexp for entities parsing to more correct " "(:code:`InlineQueryResultType.yml`). `#1146 " "`_" msgstr "" -#: ../../../CHANGES.rst:352 +#: ../../../CHANGES.rst:1006 msgid "" "Fixed signature of startup/shutdown events to include the " ":code:`**dispatcher.workflow_data` as the handler arguments. `#1155 " "`_" msgstr "" -#: ../../../CHANGES.rst:354 +#: ../../../CHANGES.rst:1008 msgid "" "Added missing :code:`FORUM_TOPIC_EDITED` value to content_type property " "`#1160 `_" msgstr "" -#: ../../../CHANGES.rst:356 +#: ../../../CHANGES.rst:1010 msgid "" "Fixed compatibility with Python 3.8-3.9 (from previous release) `#1162 " "`_" msgstr "" -#: ../../../CHANGES.rst:358 +#: ../../../CHANGES.rst:1012 msgid "" "Fixed the markdown spoiler parser. `#1176 " "`_" msgstr "" -#: ../../../CHANGES.rst:360 +#: ../../../CHANGES.rst:1014 msgid "" "Fixed workflow data propagation `#1196 " "`_" msgstr "" -#: ../../../CHANGES.rst:362 +#: ../../../CHANGES.rst:1016 msgid "" "Fixed the serialization error associated with nested subtypes like " "InputMedia, ChatMember, etc." msgstr "" -#: ../../../CHANGES.rst:365 +#: ../../../CHANGES.rst:1019 msgid "" "The previously generated code resulted in an invalid schema under " "pydantic v2, which has stricter type parsing. Hence, subtypes without the" @@ -730,71 +1946,71 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:375 +#: ../../../CHANGES.rst:1029 msgid "" "Changed small grammar typos for :code:`upload_file` `#1133 " "`_" msgstr "" -#: ../../../CHANGES.rst:382 +#: ../../../CHANGES.rst:1036 msgid "" "Removed text filter in due to is planned to remove this filter few " "versions ago." msgstr "" -#: ../../../CHANGES.rst:384 +#: ../../../CHANGES.rst:1038 msgid "" "Use :code:`F.text` instead `#1170 " "`_" msgstr "" -#: ../../../CHANGES.rst:391 +#: ../../../CHANGES.rst:1045 msgid "" "Added full support of `Bot API 6.6 `_" msgstr "" -#: ../../../CHANGES.rst:395 +#: ../../../CHANGES.rst:1049 msgid "" "Note that this issue has breaking changes described in the Bot API " "changelog, this changes is not breaking in the API but breaking inside " "aiogram because Beta stage is not finished." msgstr "" -#: ../../../CHANGES.rst:398 +#: ../../../CHANGES.rst:1052 msgid "`#1139 `_" msgstr "" -#: ../../../CHANGES.rst:399 +#: ../../../CHANGES.rst:1053 msgid "" "Added full support of `Bot API 6.7 `_" msgstr "" -#: ../../../CHANGES.rst:403 +#: ../../../CHANGES.rst:1057 msgid "" "Note that arguments *switch_pm_parameter* and *switch_pm_text* was " "deprecated and should be changed to *button* argument as described in API" " docs." msgstr "" -#: ../../../CHANGES.rst:405 +#: ../../../CHANGES.rst:1059 msgid "`#1168 `_" msgstr "" -#: ../../../CHANGES.rst:406 +#: ../../../CHANGES.rst:1060 msgid "Updated `Pydantic to V2 `_" msgstr "" -#: ../../../CHANGES.rst:410 +#: ../../../CHANGES.rst:1064 msgid "Be careful, not all libraries is already updated to using V2" msgstr "" -#: ../../../CHANGES.rst:411 +#: ../../../CHANGES.rst:1065 msgid "`#1202 `_" msgstr "" -#: ../../../CHANGES.rst:412 +#: ../../../CHANGES.rst:1066 msgid "" "Added global defaults :code:`disable_web_page_preview` and " ":code:`protect_content` in addition to :code:`parse_mode` to the Bot " @@ -802,13 +2018,13 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:415 +#: ../../../CHANGES.rst:1069 msgid "" "Removed bot parameters from storages `#1144 " "`_" msgstr "" -#: ../../../CHANGES.rst:418 +#: ../../../CHANGES.rst:1072 msgid "" "Replaced ContextVar's with a new feature called `Validation Context " "`_" @@ -816,69 +2032,69 @@ msgid "" "handling the Bot instance within method shortcuts." msgstr "" -#: ../../../CHANGES.rst:423 +#: ../../../CHANGES.rst:1077 msgid "**Breaking**: The 'bot' argument now is required in `URLInputFile`" msgstr "" -#: ../../../CHANGES.rst:424 +#: ../../../CHANGES.rst:1078 msgid "`#1210 `_" msgstr "" -#: ../../../CHANGES.rst:425 +#: ../../../CHANGES.rst:1079 msgid "Updated magic-filter with new features" msgstr "" -#: ../../../CHANGES.rst:427 +#: ../../../CHANGES.rst:1081 msgid "Added hint for :code:`len(F)` error" msgstr "" -#: ../../../CHANGES.rst:428 +#: ../../../CHANGES.rst:1082 msgid "Added not in operation" msgstr "" -#: ../../../CHANGES.rst:429 +#: ../../../CHANGES.rst:1083 msgid "`#1221 `_" msgstr "" -#: ../../../CHANGES.rst:433 +#: ../../../CHANGES.rst:1087 msgid "3.0.0b7 (2023-02-18)" msgstr "" -#: ../../../CHANGES.rst:437 +#: ../../../CHANGES.rst:1091 msgid "" "Note that this version has incompatibility with Python 3.8-3.9 in case " "when you create an instance of Dispatcher outside of the any coroutine." msgstr "" -#: ../../../CHANGES.rst:439 +#: ../../../CHANGES.rst:1093 msgid "Sorry for the inconvenience, it will be fixed in the next version." msgstr "" -#: ../../../CHANGES.rst:441 +#: ../../../CHANGES.rst:1095 msgid "This code will not work:" msgstr "" -#: ../../../CHANGES.rst:453 +#: ../../../CHANGES.rst:1107 msgid "But if you change it like this it should works as well:" msgstr "" -#: ../../../CHANGES.rst:471 +#: ../../../CHANGES.rst:1125 msgid "Added missing shortcuts, new enums, reworked old stuff" msgstr "" -#: ../../../CHANGES.rst:473 +#: ../../../CHANGES.rst:1127 msgid "" "**Breaking** All previously added enums is re-generated in new place - " "`aiogram.enums` instead of `aiogram.types`" msgstr "" -#: ../../../CHANGES.rst:491 +#: ../../../CHANGES.rst:1130 msgid "" "**Added enums:** " ":class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`," msgstr "" -#: ../../../CHANGES.rst:477 +#: ../../../CHANGES.rst:1131 msgid "" ":class:`aiogram.enums.chat_action.ChatAction`, " ":class:`aiogram.enums.chat_member_status.ChatMemberStatus`, " @@ -897,15 +2113,15 @@ msgid "" ":class:`aiogram.enums.update_type.UpdateType`," msgstr "" -#: ../../../CHANGES.rst:493 +#: ../../../CHANGES.rst:1147 msgid "**Added shortcuts**:" msgstr "" -#: ../../../CHANGES.rst:518 +#: ../../../CHANGES.rst:1149 msgid "*Chat* :meth:`aiogram.types.chat.Chat.get_administrators`," msgstr "" -#: ../../../CHANGES.rst:496 +#: ../../../CHANGES.rst:1150 msgid "" ":meth:`aiogram.types.chat.Chat.delete_message`, " ":meth:`aiogram.types.chat.Chat.revoke_invite_link`, " @@ -933,85 +2149,85 @@ msgid "" ":meth:`aiogram.types.chat.Chat.set_photo`," msgstr "" -#: ../../../CHANGES.rst:520 +#: ../../../CHANGES.rst:1174 msgid "*Sticker*: :meth:`aiogram.types.sticker.Sticker.set_position_in_set`," msgstr "" -#: ../../../CHANGES.rst:521 +#: ../../../CHANGES.rst:1175 msgid ":meth:`aiogram.types.sticker.Sticker.delete_from_set`," msgstr "" -#: ../../../CHANGES.rst:522 +#: ../../../CHANGES.rst:1176 msgid "*User*: :meth:`aiogram.types.user.User.get_profile_photos`" msgstr "" -#: ../../../CHANGES.rst:523 +#: ../../../CHANGES.rst:1177 msgid "`#952 `_" msgstr "" -#: ../../../CHANGES.rst:524 +#: ../../../CHANGES.rst:1178 msgid "" "Added :ref:`callback answer ` feature `#1091 " "`_" msgstr "" -#: ../../../CHANGES.rst:526 +#: ../../../CHANGES.rst:1180 msgid "" "Added a method that allows you to compactly register routers `#1117 " "`_" msgstr "" -#: ../../../CHANGES.rst:533 +#: ../../../CHANGES.rst:1187 msgid "" "Check status code when downloading file `#816 " "`_" msgstr "" -#: ../../../CHANGES.rst:535 +#: ../../../CHANGES.rst:1189 msgid "" "Fixed `ignore_case` parameter in :obj:`aiogram.filters.command.Command` " "filter `#1106 `_" msgstr "" -#: ../../../CHANGES.rst:542 +#: ../../../CHANGES.rst:1196 msgid "" "Added integration with new code-generator named `Butcher " "`_ `#1069 " "`_" msgstr "" -#: ../../../CHANGES.rst:544 +#: ../../../CHANGES.rst:1198 msgid "" "Added full support of `Bot API 6.4 `_ `#1088 " "`_" msgstr "" -#: ../../../CHANGES.rst:546 +#: ../../../CHANGES.rst:1200 msgid "" "Updated package metadata, moved build internals from Poetry to Hatch, " "added contributing guides. `#1095 " "`_" msgstr "" -#: ../../../CHANGES.rst:548 +#: ../../../CHANGES.rst:1202 msgid "" "Added full support of `Bot API 6.5 `_" msgstr "" -#: ../../../CHANGES.rst:552 +#: ../../../CHANGES.rst:1206 msgid "" "Note that :obj:`aiogram.types.chat_permissions.ChatPermissions` is " "updated without backward compatibility, so now this object has no " ":code:`can_send_media_messages` attribute" msgstr "" -#: ../../../CHANGES.rst:554 +#: ../../../CHANGES.rst:1208 msgid "`#1112 `_" msgstr "" -#: ../../../CHANGES.rst:555 +#: ../../../CHANGES.rst:1209 msgid "" "Replaced error :code:`TypeError: TelegramEventObserver.__call__() got an " "unexpected keyword argument ''` with a more understandable one for " @@ -1019,13 +2235,13 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:558 +#: ../../../CHANGES.rst:1212 msgid "" "Added possibility to reply into webhook with files `#1120 " "`_" msgstr "" -#: ../../../CHANGES.rst:560 +#: ../../../CHANGES.rst:1214 msgid "" "Reworked graceful shutdown. Added method to stop polling. Now polling " "started from dispatcher can be stopped by signals gracefully without " @@ -1033,127 +2249,127 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:566 +#: ../../../CHANGES.rst:1220 msgid "3.0.0b6 (2022-11-18)" msgstr "" -#: ../../../CHANGES.rst:571 +#: ../../../CHANGES.rst:1225 msgid "" "(again) Added possibility to combine filters with an *and*/*or* " "operations." msgstr "" -#: ../../../CHANGES.rst:573 +#: ../../../CHANGES.rst:1227 msgid "" "Read more in \":ref:`Combining filters `\" " "documentation section `#1018 " "`_" msgstr "" -#: ../../../CHANGES.rst:575 +#: ../../../CHANGES.rst:1229 msgid "Added following methods to ``Message`` class:" msgstr "" -#: ../../../CHANGES.rst:577 +#: ../../../CHANGES.rst:1231 msgid ":code:`Message.forward(...)`" msgstr "" -#: ../../../CHANGES.rst:578 +#: ../../../CHANGES.rst:1232 msgid ":code:`Message.edit_media(...)`" msgstr "" -#: ../../../CHANGES.rst:579 +#: ../../../CHANGES.rst:1233 msgid ":code:`Message.edit_live_location(...)`" msgstr "" -#: ../../../CHANGES.rst:580 +#: ../../../CHANGES.rst:1234 msgid ":code:`Message.stop_live_location(...)`" msgstr "" -#: ../../../CHANGES.rst:581 +#: ../../../CHANGES.rst:1235 msgid ":code:`Message.pin(...)`" msgstr "" -#: ../../../CHANGES.rst:582 +#: ../../../CHANGES.rst:1236 msgid ":code:`Message.unpin()`" msgstr "" -#: ../../../CHANGES.rst:583 +#: ../../../CHANGES.rst:1237 msgid "`#1030 `_" msgstr "" -#: ../../../CHANGES.rst:584 +#: ../../../CHANGES.rst:1238 msgid "Added following methods to :code:`User` class:" msgstr "" -#: ../../../CHANGES.rst:586 +#: ../../../CHANGES.rst:1240 msgid ":code:`User.mention_markdown(...)`" msgstr "" -#: ../../../CHANGES.rst:587 +#: ../../../CHANGES.rst:1241 msgid ":code:`User.mention_html(...)`" msgstr "" -#: ../../../CHANGES.rst:588 +#: ../../../CHANGES.rst:1242 msgid "`#1049 `_" msgstr "" -#: ../../../CHANGES.rst:589 +#: ../../../CHANGES.rst:1243 msgid "" "Added full support of `Bot API 6.3 `_ `#1057 " "`_" msgstr "" -#: ../../../CHANGES.rst:596 +#: ../../../CHANGES.rst:1250 msgid "" "Fixed :code:`Message.send_invoice` and :code:`Message.reply_invoice`, " "added missing arguments `#1047 " "`_" msgstr "" -#: ../../../CHANGES.rst:598 +#: ../../../CHANGES.rst:1252 msgid "Fixed copy and forward in:" msgstr "" -#: ../../../CHANGES.rst:600 +#: ../../../CHANGES.rst:1254 msgid ":code:`Message.answer(...)`" msgstr "" -#: ../../../CHANGES.rst:601 +#: ../../../CHANGES.rst:1255 msgid ":code:`Message.copy_to(...)`" msgstr "" -#: ../../../CHANGES.rst:602 +#: ../../../CHANGES.rst:1256 msgid "`#1064 `_" msgstr "" -#: ../../../CHANGES.rst:608 +#: ../../../CHANGES.rst:1262 msgid "" "Fixed UA translations in index.po `#1017 " "`_" msgstr "" -#: ../../../CHANGES.rst:610 +#: ../../../CHANGES.rst:1264 msgid "" "Fix typehints for :code:`Message`, :code:`reply_media_group` and " ":code:`answer_media_group` methods `#1029 " "`_" msgstr "" -#: ../../../CHANGES.rst:612 +#: ../../../CHANGES.rst:1266 msgid "" "Removed an old now non-working feature `#1060 " "`_" msgstr "" -#: ../../../CHANGES.rst:619 +#: ../../../CHANGES.rst:1273 msgid "" "Enabled testing on Python 3.11 `#1044 " "`_" msgstr "" -#: ../../../CHANGES.rst:621 +#: ../../../CHANGES.rst:1275 msgid "" "Added a mandatory dependency :code:`certifi` in due to in some cases on " "systems that doesn't have updated ca-certificates the requests to Bot API" @@ -1162,23 +2378,23 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:626 +#: ../../../CHANGES.rst:1280 msgid "3.0.0b5 (2022-10-02)" msgstr "" -#: ../../../CHANGES.rst:631 +#: ../../../CHANGES.rst:1285 msgid "" "Add PyPy support and run tests under PyPy `#985 " "`_" msgstr "" -#: ../../../CHANGES.rst:633 +#: ../../../CHANGES.rst:1287 msgid "" "Added message text to aiogram exceptions representation `#988 " "`_" msgstr "" -#: ../../../CHANGES.rst:635 +#: ../../../CHANGES.rst:1289 msgid "" "Added warning about using magic filter from `magic_filter` instead of " "`aiogram`'s ones. Is recommended to use `from aiogram import F` instead " @@ -1186,61 +2402,61 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:638 +#: ../../../CHANGES.rst:1292 msgid "" "Added more detailed error when server response can't be deserialized. " "This feature will help to debug unexpected responses from the Server " "`#1014 `_" msgstr "" -#: ../../../CHANGES.rst:645 +#: ../../../CHANGES.rst:1299 msgid "" "Reworked error event, introduced " ":class:`aiogram.types.error_event.ErrorEvent` object. `#898 " "`_" msgstr "" -#: ../../../CHANGES.rst:647 +#: ../../../CHANGES.rst:1301 msgid "" "Fixed escaping markdown in `aiogram.utils.markdown` module `#903 " "`_" msgstr "" -#: ../../../CHANGES.rst:649 +#: ../../../CHANGES.rst:1303 msgid "" "Fixed polling crash when Telegram Bot API raises HTTP 429 status-code. " "`#995 `_" msgstr "" -#: ../../../CHANGES.rst:651 +#: ../../../CHANGES.rst:1305 msgid "" "Fixed empty mention in command parsing, now it will be None instead of an" " empty string `#1013 `_" msgstr "" -#: ../../../CHANGES.rst:658 +#: ../../../CHANGES.rst:1312 msgid "" "Initialized Docs translation (added Ukrainian language) `#925 " "`_" msgstr "" -#: ../../../CHANGES.rst:665 +#: ../../../CHANGES.rst:1319 msgid "" "Removed filters factory as described in corresponding issue. `#942 " "`_" msgstr "" -#: ../../../CHANGES.rst:672 +#: ../../../CHANGES.rst:1326 msgid "" "Now Router/Dispatcher accepts only keyword arguments. `#982 " "`_" msgstr "" -#: ../../../CHANGES.rst:677 +#: ../../../CHANGES.rst:1331 msgid "3.0.0b4 (2022-08-14)" msgstr "" -#: ../../../CHANGES.rst:682 +#: ../../../CHANGES.rst:1336 msgid "" "Add class helper ChatAction for constants that Telegram BotAPI uses in " "sendChatAction request. In my opinion, this will help users and will also" @@ -1248,198 +2464,198 @@ msgid "" "\"ChatActions\". `#803 `_" msgstr "" -#: ../../../CHANGES.rst:686 +#: ../../../CHANGES.rst:1340 msgid "Added possibility to combine filters or invert result" msgstr "" -#: ../../../CHANGES.rst:688 +#: ../../../CHANGES.rst:1342 msgid "Example:" msgstr "" -#: ../../../CHANGES.rst:696 +#: ../../../CHANGES.rst:1350 msgid "`#894 `_" msgstr "" -#: ../../../CHANGES.rst:697 +#: ../../../CHANGES.rst:1351 msgid "" "Fixed type hints for redis TTL params. `#922 " "`_" msgstr "" -#: ../../../CHANGES.rst:699 +#: ../../../CHANGES.rst:1353 msgid "" "Added `full_name` shortcut for `Chat` object `#929 " "`_" msgstr "" -#: ../../../CHANGES.rst:706 +#: ../../../CHANGES.rst:1360 msgid "" "Fixed false-positive coercing of Union types in API methods `#901 " "`_" msgstr "" -#: ../../../CHANGES.rst:708 +#: ../../../CHANGES.rst:1362 msgid "Added 3 missing content types:" msgstr "" -#: ../../../CHANGES.rst:710 +#: ../../../CHANGES.rst:1364 msgid "proximity_alert_triggered" msgstr "" -#: ../../../CHANGES.rst:711 +#: ../../../CHANGES.rst:1365 msgid "supergroup_chat_created" msgstr "" -#: ../../../CHANGES.rst:712 +#: ../../../CHANGES.rst:1366 msgid "channel_chat_created" msgstr "" -#: ../../../CHANGES.rst:713 +#: ../../../CHANGES.rst:1367 msgid "`#906 `_" msgstr "" -#: ../../../CHANGES.rst:714 +#: ../../../CHANGES.rst:1368 msgid "" "Fixed the ability to compare the state, now comparison to copy of the " "state will return `True`. `#927 " "`_" msgstr "" -#: ../../../CHANGES.rst:716 +#: ../../../CHANGES.rst:1370 msgid "" "Fixed default lock kwargs in RedisEventIsolation. `#972 " "`_" msgstr "" -#: ../../../CHANGES.rst:723 +#: ../../../CHANGES.rst:1377 msgid "" "Restrict including routers with strings `#896 " "`_" msgstr "" -#: ../../../CHANGES.rst:725 +#: ../../../CHANGES.rst:1379 msgid "" "Changed CommandPatterType to CommandPatternType in " "`aiogram/dispatcher/filters/command.py` `#907 " "`_" msgstr "" -#: ../../../CHANGES.rst:727 +#: ../../../CHANGES.rst:1381 msgid "" "Added full support of `Bot API 6.1 `_ `#936 " "`_" msgstr "" -#: ../../../CHANGES.rst:729 +#: ../../../CHANGES.rst:1383 msgid "**Breaking!** More flat project structure" msgstr "" -#: ../../../CHANGES.rst:731 +#: ../../../CHANGES.rst:1385 msgid "These packages was moved, imports in your code should be fixed:" msgstr "" -#: ../../../CHANGES.rst:733 +#: ../../../CHANGES.rst:1387 msgid ":code:`aiogram.dispatcher.filters` -> :code:`aiogram.filters`" msgstr "" -#: ../../../CHANGES.rst:734 +#: ../../../CHANGES.rst:1388 msgid ":code:`aiogram.dispatcher.fsm` -> :code:`aiogram.fsm`" msgstr "" -#: ../../../CHANGES.rst:735 +#: ../../../CHANGES.rst:1389 msgid ":code:`aiogram.dispatcher.handler` -> :code:`aiogram.handler`" msgstr "" -#: ../../../CHANGES.rst:736 +#: ../../../CHANGES.rst:1390 msgid ":code:`aiogram.dispatcher.webhook` -> :code:`aiogram.webhook`" msgstr "" -#: ../../../CHANGES.rst:737 +#: ../../../CHANGES.rst:1391 msgid "" ":code:`aiogram.dispatcher.flags/*` -> :code:`aiogram.dispatcher.flags` " "(single module instead of package)" msgstr "" -#: ../../../CHANGES.rst:738 +#: ../../../CHANGES.rst:1392 msgid "`#938 `_" msgstr "" -#: ../../../CHANGES.rst:739 +#: ../../../CHANGES.rst:1393 msgid "" "Removed deprecated :code:`router._handler` and " ":code:`router.register__handler` methods. `#941 " "`_" msgstr "" -#: ../../../CHANGES.rst:741 +#: ../../../CHANGES.rst:1395 msgid "" "Deprecated filters factory. It will be removed in next Beta (3.0b5) `#942" " `_" msgstr "" -#: ../../../CHANGES.rst:743 +#: ../../../CHANGES.rst:1397 msgid "" "`MessageEntity` method `get_text` was removed and `extract` was renamed " "to `extract_from` `#944 `_" msgstr "" -#: ../../../CHANGES.rst:745 +#: ../../../CHANGES.rst:1399 msgid "" "Added full support of `Bot API 6.2 `_ `#975 " "`_" msgstr "" -#: ../../../CHANGES.rst:750 +#: ../../../CHANGES.rst:1404 msgid "3.0.0b3 (2022-04-19)" msgstr "" -#: ../../../CHANGES.rst:755 +#: ../../../CHANGES.rst:1409 msgid "" "Added possibility to get command magic result as handler argument `#889 " "`_" msgstr "" -#: ../../../CHANGES.rst:757 +#: ../../../CHANGES.rst:1411 msgid "" "Added full support of `Telegram Bot API 6.0 " "`_ `#890 " "`_" msgstr "" -#: ../../../CHANGES.rst:764 +#: ../../../CHANGES.rst:1418 msgid "" "Fixed I18n lazy-proxy. Disabled caching. `#839 " "`_" msgstr "" -#: ../../../CHANGES.rst:766 +#: ../../../CHANGES.rst:1420 msgid "" "Added parsing of spoiler message entity `#865 " "`_" msgstr "" -#: ../../../CHANGES.rst:768 +#: ../../../CHANGES.rst:1422 msgid "" "Fixed default `parse_mode` for `Message.copy_to()` method. `#876 " "`_" msgstr "" -#: ../../../CHANGES.rst:770 +#: ../../../CHANGES.rst:1424 msgid "" "Fixed CallbackData factory parsing IntEnum's `#885 " "`_" msgstr "" -#: ../../../CHANGES.rst:777 +#: ../../../CHANGES.rst:1431 msgid "" "Added automated check that pull-request adds a changes description to " "**CHANGES** directory `#873 " "`_" msgstr "" -#: ../../../CHANGES.rst:779 +#: ../../../CHANGES.rst:1433 msgid "" "Changed :code:`Message.html_text` and :code:`Message.md_text` attributes " "behaviour when message has no text. The empty string will be used instead" @@ -1447,14 +2663,14 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:782 +#: ../../../CHANGES.rst:1436 msgid "" "Used `redis-py` instead of `aioredis` package in due to this packages was" " merged into single one `#882 " "`_" msgstr "" -#: ../../../CHANGES.rst:784 +#: ../../../CHANGES.rst:1438 msgid "" "Solved common naming problem with middlewares that confusing too much " "developers - now you can't see the `middleware` and `middlewares` " @@ -1463,113 +2679,113 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:791 +#: ../../../CHANGES.rst:1445 msgid "3.0.0b2 (2022-02-19)" msgstr "" -#: ../../../CHANGES.rst:796 +#: ../../../CHANGES.rst:1450 msgid "" "Added possibility to pass additional arguments into the aiohttp webhook " "handler to use this arguments inside handlers as the same as it possible " "in polling mode. `#785 `_" msgstr "" -#: ../../../CHANGES.rst:799 +#: ../../../CHANGES.rst:1453 msgid "" "Added possibility to add handler flags via decorator (like `pytest.mark` " "decorator but `aiogram.flags`) `#836 " "`_" msgstr "" -#: ../../../CHANGES.rst:801 +#: ../../../CHANGES.rst:1455 msgid "" "Added :code:`ChatActionSender` utility to automatically sends chat action" " while long process is running." msgstr "" -#: ../../../CHANGES.rst:803 +#: ../../../CHANGES.rst:1457 msgid "" "It also can be used as message middleware and can be customized via " ":code:`chat_action` flag. `#837 " "`_" msgstr "" -#: ../../../CHANGES.rst:810 +#: ../../../CHANGES.rst:1464 msgid "" "Fixed unexpected behavior of sequences in the StateFilter. `#791 " "`_" msgstr "" -#: ../../../CHANGES.rst:812 +#: ../../../CHANGES.rst:1466 msgid "" "Fixed exceptions filters `#827 " "`_" msgstr "" -#: ../../../CHANGES.rst:819 +#: ../../../CHANGES.rst:1473 msgid "" "Logger name for processing events is changed to :code:`aiogram.events`. " "`#830 `_" msgstr "" -#: ../../../CHANGES.rst:821 +#: ../../../CHANGES.rst:1475 msgid "" "Added full support of Telegram Bot API 5.6 and 5.7 `#835 " "`_" msgstr "" -#: ../../../CHANGES.rst:823 +#: ../../../CHANGES.rst:1477 msgid "" "**BREAKING** Events isolation mechanism is moved from FSM storages to " "standalone managers `#838 " "`_" msgstr "" -#: ../../../CHANGES.rst:829 +#: ../../../CHANGES.rst:1483 msgid "3.0.0b1 (2021-12-12)" msgstr "" -#: ../../../CHANGES.rst:834 +#: ../../../CHANGES.rst:1488 msgid "Added new custom operation for MagicFilter named :code:`as_`" msgstr "" -#: ../../../CHANGES.rst:836 +#: ../../../CHANGES.rst:1490 msgid "Now you can use it to get magic filter result as handler argument" msgstr "" -#: ../../../CHANGES.rst:852 +#: ../../../CHANGES.rst:1506 msgid "`#759 `_" msgstr "" -#: ../../../CHANGES.rst:858 +#: ../../../CHANGES.rst:1512 msgid "" "Fixed: Missing :code:`ChatMemberHandler` import in " ":code:`aiogram/dispatcher/handler` `#751 " "`_" msgstr "" -#: ../../../CHANGES.rst:865 +#: ../../../CHANGES.rst:1519 msgid "" "Check :code:`destiny` in case of no :code:`with_destiny` enabled in " "RedisStorage key builder `#776 " "`_" msgstr "" -#: ../../../CHANGES.rst:867 +#: ../../../CHANGES.rst:1521 msgid "" "Added full support of `Bot API 5.5 `_ `#777 " "`_" msgstr "" -#: ../../../CHANGES.rst:869 +#: ../../../CHANGES.rst:1523 msgid "" "Stop using feature from #336. From now settings of client-session should " "be placed as initializer arguments instead of changing instance " "attributes. `#778 `_" msgstr "" -#: ../../../CHANGES.rst:871 +#: ../../../CHANGES.rst:1525 msgid "" "Make TelegramAPIServer files wrapper in local mode bi-directional " "(server-client, client-server) Now you can convert local path to server " @@ -1577,11 +2793,11 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:877 +#: ../../../CHANGES.rst:1531 msgid "3.0.0a18 (2021-11-10)" msgstr "" -#: ../../../CHANGES.rst:882 +#: ../../../CHANGES.rst:1536 msgid "" "Breaking: Changed the signature of the session middlewares Breaking: " "Renamed AiohttpSession.make_request method parameter from call to method " @@ -1589,258 +2805,258 @@ msgid "" "outgoing requests `#716 `_" msgstr "" -#: ../../../CHANGES.rst:886 +#: ../../../CHANGES.rst:1540 msgid "" "Improved description of filters resolving error. For example when you try" " to pass wrong type of argument to the filter but don't know why filter " "is not resolved now you can get error like this:" msgstr "" -#: ../../../CHANGES.rst:896 +#: ../../../CHANGES.rst:1550 msgid "`#717 `_" msgstr "" -#: ../../../CHANGES.rst:897 +#: ../../../CHANGES.rst:1551 msgid "" "**Breaking internal API change** Reworked FSM Storage record keys " "propagation `#723 `_" msgstr "" -#: ../../../CHANGES.rst:900 +#: ../../../CHANGES.rst:1554 msgid "" "Implemented new filter named :code:`MagicData(magic_data)` that helps to " "filter event by data from middlewares or other filters" msgstr "" -#: ../../../CHANGES.rst:902 +#: ../../../CHANGES.rst:1556 msgid "" "For example your bot is running with argument named :code:`config` that " "contains the application config then you can filter event by value from " "this config:" msgstr "" -#: ../../../CHANGES.rst:908 +#: ../../../CHANGES.rst:1562 msgid "`#724 `_" msgstr "" -#: ../../../CHANGES.rst:914 +#: ../../../CHANGES.rst:1568 msgid "" "Fixed I18n context inside error handlers `#726 " "`_" msgstr "" -#: ../../../CHANGES.rst:916 +#: ../../../CHANGES.rst:1570 msgid "" "Fixed bot session closing before emit shutdown `#734 " "`_" msgstr "" -#: ../../../CHANGES.rst:918 +#: ../../../CHANGES.rst:1572 msgid "" "Fixed: bound filter resolving does not require children routers `#736 " "`_" msgstr "" -#: ../../../CHANGES.rst:925 +#: ../../../CHANGES.rst:1579 msgid "" "Enabled testing on Python 3.10 Removed `async_lru` dependency (is " "incompatible with Python 3.10) and replaced usage with protected property" " `#719 `_" msgstr "" -#: ../../../CHANGES.rst:928 +#: ../../../CHANGES.rst:1582 msgid "" "Converted README.md to README.rst and use it as base file for docs `#725 " "`_" msgstr "" -#: ../../../CHANGES.rst:930 +#: ../../../CHANGES.rst:1584 msgid "Rework filters resolving:" msgstr "" -#: ../../../CHANGES.rst:932 +#: ../../../CHANGES.rst:1586 msgid "Automatically apply Bound Filters with default values to handlers" msgstr "" -#: ../../../CHANGES.rst:933 +#: ../../../CHANGES.rst:1587 msgid "Fix data transfer from parent to included routers filters" msgstr "" -#: ../../../CHANGES.rst:934 +#: ../../../CHANGES.rst:1588 msgid "`#727 `_" msgstr "" -#: ../../../CHANGES.rst:935 +#: ../../../CHANGES.rst:1589 msgid "" "Added full support of Bot API 5.4 https://core.telegram.org/bots/api-" "changelog#november-5-2021 `#744 " "`_" msgstr "" -#: ../../../CHANGES.rst:941 +#: ../../../CHANGES.rst:1595 msgid "3.0.0a17 (2021-09-24)" msgstr "" -#: ../../../CHANGES.rst:946 +#: ../../../CHANGES.rst:1600 msgid "" "Added :code:`html_text` and :code:`md_text` to Message object `#708 " "`_" msgstr "" -#: ../../../CHANGES.rst:948 +#: ../../../CHANGES.rst:1602 msgid "" "Refactored I18n, added context managers for I18n engine and current " "locale `#709 `_" msgstr "" -#: ../../../CHANGES.rst:953 +#: ../../../CHANGES.rst:1607 msgid "3.0.0a16 (2021-09-22)" msgstr "" -#: ../../../CHANGES.rst:958 +#: ../../../CHANGES.rst:1612 msgid "Added support of local Bot API server files downloading" msgstr "" -#: ../../../CHANGES.rst:960 +#: ../../../CHANGES.rst:1614 msgid "" "When Local API is enabled files can be downloaded via " "`bot.download`/`bot.download_file` methods. `#698 " "`_" msgstr "" -#: ../../../CHANGES.rst:962 +#: ../../../CHANGES.rst:1616 msgid "" "Implemented I18n & L10n support `#701 " "`_" msgstr "" -#: ../../../CHANGES.rst:969 +#: ../../../CHANGES.rst:1623 msgid "" "Covered by tests and docs KeyboardBuilder util `#699 " "`_" msgstr "" -#: ../../../CHANGES.rst:971 +#: ../../../CHANGES.rst:1625 msgid "**Breaking!!!**. Refactored and renamed exceptions." msgstr "" -#: ../../../CHANGES.rst:973 +#: ../../../CHANGES.rst:1627 msgid "" "Exceptions module was moved from :code:`aiogram.utils.exceptions` to " ":code:`aiogram.exceptions`" msgstr "" -#: ../../../CHANGES.rst:974 +#: ../../../CHANGES.rst:1628 msgid "Added prefix `Telegram` for all error classes" msgstr "" -#: ../../../CHANGES.rst:975 +#: ../../../CHANGES.rst:1629 msgid "`#700 `_" msgstr "" -#: ../../../CHANGES.rst:976 +#: ../../../CHANGES.rst:1630 msgid "" "Replaced all :code:`pragma: no cover` marks via global " ":code:`.coveragerc` config `#702 " "`_" msgstr "" -#: ../../../CHANGES.rst:978 +#: ../../../CHANGES.rst:1632 msgid "Updated dependencies." msgstr "" -#: ../../../CHANGES.rst:980 +#: ../../../CHANGES.rst:1634 msgid "" "**Breaking for framework developers** Now all optional dependencies " "should be installed as extra: `poetry install -E fast -E redis -E proxy " "-E i18n -E docs` `#703 `_" msgstr "" -#: ../../../CHANGES.rst:986 +#: ../../../CHANGES.rst:1640 msgid "3.0.0a15 (2021-09-10)" msgstr "" -#: ../../../CHANGES.rst:991 +#: ../../../CHANGES.rst:1645 msgid "" "Ability to iterate over all states in StatesGroup. Aiogram already had in" " check for states group so this is relative feature. `#666 " "`_" msgstr "" -#: ../../../CHANGES.rst:999 +#: ../../../CHANGES.rst:1653 msgid "" "Fixed incorrect type checking in the " ":class:`aiogram.utils.keyboard.KeyboardBuilder` `#674 " "`_" msgstr "" -#: ../../../CHANGES.rst:1006 +#: ../../../CHANGES.rst:1660 msgid "" "Disable ContentType filter by default `#668 " "`_" msgstr "" -#: ../../../CHANGES.rst:1008 +#: ../../../CHANGES.rst:1662 msgid "" "Moved update type detection from Dispatcher to Update object `#669 " "`_" msgstr "" -#: ../../../CHANGES.rst:1010 +#: ../../../CHANGES.rst:1664 msgid "" "Updated **pre-commit** config `#681 " "`_" msgstr "" -#: ../../../CHANGES.rst:1012 +#: ../../../CHANGES.rst:1666 msgid "" "Reworked **handlers_in_use** util. Function moved to Router as method " "**.resolve_used_update_types()** `#682 " "`_" msgstr "" -#: ../../../CHANGES.rst:1017 +#: ../../../CHANGES.rst:1671 msgid "3.0.0a14 (2021-08-17)" msgstr "" -#: ../../../CHANGES.rst:1022 +#: ../../../CHANGES.rst:1676 msgid "" "add aliases for edit/delete reply markup to Message `#662 " "`_" msgstr "" -#: ../../../CHANGES.rst:1024 +#: ../../../CHANGES.rst:1678 msgid "" "Reworked outer middleware chain. Prevent to call many times the outer " "middleware for each nested router `#664 " "`_" msgstr "" -#: ../../../CHANGES.rst:1031 +#: ../../../CHANGES.rst:1685 msgid "" "Prepare parse mode for InputMessageContent in AnswerInlineQuery method " "`#660 `_" msgstr "" -#: ../../../CHANGES.rst:1038 +#: ../../../CHANGES.rst:1692 msgid "" "Added integration with :code:`towncrier` `#602 " "`_" msgstr "" -#: ../../../CHANGES.rst:1045 +#: ../../../CHANGES.rst:1699 msgid "" "Added `.editorconfig` `#650 " "`_" msgstr "" -#: ../../../CHANGES.rst:1047 +#: ../../../CHANGES.rst:1701 msgid "" "Redis storage speedup globals `#651 " "`_" msgstr "" -#: ../../../CHANGES.rst:1049 +#: ../../../CHANGES.rst:1703 msgid "" "add allow_sending_without_reply param to Message reply aliases `#663 " "`_" @@ -3369,3 +4585,6 @@ msgstr "" #~ " 👉 :ref:`Scenes `. `#1280 " #~ "`_" #~ msgstr "" + +#~ msgid "\\ |release| [UNRELEASED DRAFT] (2024-02-16)" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/contributing.po b/docs/locale/uk_UA/LC_MESSAGES/contributing.po index 57c134f1..ab57b8da 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/contributing.po +++ b/docs/locale/uk_UA/LC_MESSAGES/contributing.po @@ -8,39 +8,39 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-26 23:17+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../contributing.rst:3 msgid "Contributing" -msgstr "" +msgstr "Сприяння розробці" #: ../../contributing.rst:5 msgid "You're welcome to contribute to aiogram!" -msgstr "" +msgstr "Ласкаво просимо зробити свій внесок у aiogram!" #: ../../contributing.rst:7 msgid "" "*aiogram* is an open-source project, and anyone can contribute to it in " "any possible way" -msgstr "" +msgstr "*aiogram* є проєктом з відкритим вихідним кодом, і будь-хто може зробити свій внесок у будь-який можливий спосіб" #: ../../contributing.rst:11 msgid "Developing" -msgstr "" +msgstr "Розробка" #: ../../contributing.rst:13 msgid "" "Before making any changes in the framework code, it is necessary to fork " "the project and clone the project to your PC and know how to do a pull-" "request." -msgstr "" +msgstr "Перш ніж вносити будь-які зміни в код фреймворка, потрібно створити форк проєкту, клонувати проєкт на свій комп’ютер і розуміти, як робити запит на витяг (pull-request)." #: ../../contributing.rst:16 msgid "" @@ -48,274 +48,276 @@ msgid "" "`_" -msgstr "" +msgstr "Як працювати із запитами на витяг (pull-request), можна прочитати в `документації GitHub `_" #: ../../contributing.rst:18 msgid "" "Also in due to this project is written in Python, you will need Python to" " be installed (is recommended to use latest Python versions, but any " "version starting from 3.8 can be used)" -msgstr "" +msgstr "Оскільки цей проєкт написаний на Python, вам потрібно встановити Python (рекомендується використовувати останні версії Python, але можна використовувати будь-яку версію, починаючи з 3.8)" #: ../../contributing.rst:23 msgid "Use virtualenv" -msgstr "" +msgstr "Використовуйте virtualenv" #: ../../contributing.rst:25 msgid "" "You can create a virtual environment in a directory using :code:`venv` " "module (it should be pre-installed by default):" -msgstr "" +msgstr "Ви можете створити віртуальне середовище в каталозі, використовуючи модуль :code:`venv` (він повинен бути попередньо встановлений за замовчуванням):" #: ../../contributing.rst:31 msgid "" "This action will create a :code:`.venv` directory with the Python " "binaries and then you will be able to install packages into that isolated" " environment." -msgstr "" +msgstr "Ця дія створить каталог :code:`.venv` з виконуваними файлами Python, і тоді ви зможете встановлювати пакунки в цьому ізольованому середовищі." #: ../../contributing.rst:36 msgid "Activate the environment" -msgstr "" +msgstr "Активуйте середовище" #: ../../contributing.rst:38 ../../contributing.rst:77 msgid "Linux / macOS:" -msgstr "" +msgstr "Linux / macOS:" #: ../../contributing.rst:44 msgid "Windows cmd" -msgstr "" +msgstr "Windows cmd" #: ../../contributing.rst:50 msgid "Windows PowerShell" -msgstr "" +msgstr "Windows PowerShell" #: ../../contributing.rst:56 msgid "" "To check it worked, use described command, it should show the :code:`pip`" " version and location inside the isolated environment" -msgstr "" +msgstr "Щоб перевірити, що все працює, скористайтеся описаною командою, яка повинна показати версію :code:`pip` і його розташування в ізольованому середовищі" #: ../../contributing.rst:64 msgid "" "Also make sure you have the latest pip version in your virtual " "environment to avoid errors on next steps:" -msgstr "" +msgstr "Також переконайтеся, що у вас найновіша версія pip у вашому віртуальному середовищі, щоб уникнути помилок на наступних етапах:" #: ../../contributing.rst:73 msgid "Setup project" -msgstr "" +msgstr "Налаштування проєкту" #: ../../contributing.rst:75 msgid "" "After activating the environment install `aiogram` from sources and their" " dependencies." -msgstr "" +msgstr "Після активації середовища встановіть `aiogram` із вихідних кодів разом із їх залежностями." #: ../../contributing.rst:83 msgid "Windows:" -msgstr "" +msgstr "Windows:" #: ../../contributing.rst:89 msgid "" "It will install :code:`aiogram` in editable mode into your virtual " "environment and all dependencies." -msgstr "" +msgstr "Це встановить :code:`aiogram` у режимі редагування у ваше віртуальне середовище та всі залежності." #: ../../contributing.rst:92 msgid "Making changes in code" -msgstr "" +msgstr "Внесення змін у код" #: ../../contributing.rst:94 msgid "" "At this point you can make any changes in the code that you want, it can " "be any fixes, implementing new features or experimenting." -msgstr "" +msgstr "На цьому етапі ви можете вносити будь-які зміни у код, які бажаєте, це можуть бути виправлення, впровадження нових функцій або експерименти." #: ../../contributing.rst:99 msgid "Format the code (code-style)" -msgstr "" +msgstr "Форматування коду (стиль коду)" #: ../../contributing.rst:101 msgid "" "Note that this project is Black-formatted, so you should follow that " "code-style, too be sure You're correctly doing this let's reformat the " "code automatically:" -msgstr "" +msgstr "Зверніть увагу, що цей проєкт використовує форматування Black, тому ви також маєте дотримуватись цього стилю коду. Щоб упевнитись, що ви робите це правильно, відформатуйте код автоматично:" #: ../../contributing.rst:111 msgid "Run tests" -msgstr "" +msgstr "Запуск тестів" #: ../../contributing.rst:113 msgid "All changes should be tested:" -msgstr "" +msgstr "Всі зміни повинні бути протестовані:" #: ../../contributing.rst:119 msgid "" -"Also if you are doing something with Redis-storage, you will need to test" -" everything works with Redis:" -msgstr "" +"Also if you are doing something with Redis-storage or/and MongoDB-" +"storage, you will need to test everything works with Redis or/and " +"MongoDB:" +msgstr "Крім того, якщо ви працюєте з Redis-сховищем і/або сховищем MongoDB, вам потрібно протестувати, чи все працює з Redis і/або MongoDB:" -#: ../../contributing.rst:126 +#: ../../contributing.rst:127 msgid "Docs" -msgstr "" +msgstr "Документація" -#: ../../contributing.rst:128 +#: ../../contributing.rst:129 msgid "" "We are using `Sphinx` to render docs in different languages, all sources " "located in `docs` directory, you can change the sources and to test it " "you can start live-preview server and look what you are doing:" -msgstr "" +msgstr "Ми використовуємо `Sphinx` для створення документації різними мовами. Всі вихідні файли знаходяться в каталозі `docs`. Ви можете змінювати джерела та тестувати їх, запустивши сервер попереднього перегляду, щоб побачити, що ви робите:" -#: ../../contributing.rst:137 +#: ../../contributing.rst:138 msgid "Docs translations" -msgstr "" +msgstr "Переклади документації" -#: ../../contributing.rst:139 +#: ../../contributing.rst:140 msgid "" "Translation of the documentation is very necessary and cannot be done " "without the help of the community from all over the world, so you are " "welcome to translate the documentation into different languages." -msgstr "" +msgstr "Переклад документації є дуже важливим і не може бути виконаний без допомоги спільноти зі всього світу, тому ми запрошуємо вас перекладати документацію різними мовами." -#: ../../contributing.rst:143 +#: ../../contributing.rst:144 msgid "Before start, let's up to date all texts:" -msgstr "" +msgstr "Перш ніж почати, оновіть усі тексти:" -#: ../../contributing.rst:151 +#: ../../contributing.rst:152 msgid "" "Change the :code:`` in example below to the target " "language code, after that you can modify texts inside " ":code:`docs/locale//LC_MESSAGES` as :code:`*.po` files by " "using any text-editor or specialized utilites for GNU Gettext, for " "example via `poedit `_." -msgstr "" +msgstr "Змініть :code:`` у прикладі нижче на код цільової мови, після цього ви можете змінювати тексти в :code:`docs/locale//LC_MESSAGES` як файли :code:`*.po`, використовуючи будь-який текстовий редактор або спеціалізовані утиліти для GNU Gettext, наприклад за допомогою `poedit `_." -#: ../../contributing.rst:156 +#: ../../contributing.rst:157 msgid "To view results:" -msgstr "" +msgstr "Щоб переглянути результати:" -#: ../../contributing.rst:164 +#: ../../contributing.rst:165 msgid "Describe changes" -msgstr "" +msgstr "Опишіть зміни" -#: ../../contributing.rst:166 +#: ../../contributing.rst:167 msgid "" "Describe your changes in one or more sentences so that bot developers " "know what's changed in their favorite framework - create " "`..rst` file and write the description." -msgstr "" +msgstr "Опишіть свої зміни одним або кількома реченнями, щоб розробники ботів знали, що змінилося у їхньому улюбленому фреймворку. Створіть файл `..rst` і напишіть опис." -#: ../../contributing.rst:169 +#: ../../contributing.rst:170 msgid "" ":code:`` is Issue or Pull-request number, after release link to " "this issue will be published to the *Changelog* page." -msgstr "" +msgstr ":code:`` — це номер issue або запиту на витяг (pull-request). Після релізу посилання на цей issue буде опубліковано на сторінці *Changelog*." -#: ../../contributing.rst:172 +#: ../../contributing.rst:173 msgid ":code:`` is a changes category marker, it can be one of:" -msgstr "" - -#: ../../contributing.rst:174 -msgid ":code:`feature` - when you are implementing new feature" -msgstr "" +msgstr ":code:`` — це маркер категорії змін, і це може бути одне з наступного:" #: ../../contributing.rst:175 -msgid ":code:`bugfix` - when you fix a bug" -msgstr "" +msgid ":code:`feature` - when you are implementing new feature" +msgstr ":code:`feature` — якщо ви впроваджуєте нову функцію" #: ../../contributing.rst:176 -msgid ":code:`doc` - when you improve the docs" -msgstr "" +msgid ":code:`bugfix` - when you fix a bug" +msgstr ":code:`bugfix` — якщо ви виправляєте помилку" #: ../../contributing.rst:177 -msgid ":code:`removal` - when you remove something from the framework" -msgstr "" +msgid ":code:`doc` - when you improve the docs" +msgstr ":code:`doc` — якщо ви покращуєте документацію" #: ../../contributing.rst:178 +msgid ":code:`removal` - when you remove something from the framework" +msgstr ":code:`removal` — якщо ви видаляєте щось із фреймворку" + +#: ../../contributing.rst:179 msgid "" ":code:`misc` - when changed something inside the Core or project " "configuration" -msgstr "" +msgstr ":code:`misc` — якщо ви змінили щось усередині ядра або конфігурації проєкту" -#: ../../contributing.rst:180 +#: ../../contributing.rst:181 msgid "" "If you have troubles with changing category feel free to ask Core-" "contributors to help with choosing it." -msgstr "" +msgstr "Якщо у вас виникли труднощі з вибором категорії, не соромтеся звертатися до основних контриб'юторів за допомогою." -#: ../../contributing.rst:183 +#: ../../contributing.rst:184 msgid "Complete" -msgstr "" +msgstr "Завершення" -#: ../../contributing.rst:185 +#: ../../contributing.rst:186 msgid "" "After you have made all your changes, publish them to the repository and " "create a pull request as mentioned at the beginning of the article and " "wait for a review of these changes." -msgstr "" +msgstr "Після того, як ви внесли всі зміни, опублікуйте їх у репозиторії і створіть запит на витяг, як зазначено в початку статті, і зачекайте на перегляд цих змін." -#: ../../contributing.rst:190 +#: ../../contributing.rst:191 msgid "Star on GitHub" -msgstr "" +msgstr "Зірка на GitHub" -#: ../../contributing.rst:192 +#: ../../contributing.rst:193 msgid "" "You can \"star\" repository on GitHub - " "https://github.com/aiogram/aiogram (click the star button at the top " "right)" -msgstr "" +msgstr "Ви можете «зіркувати» репозиторій на GitHub -" +"https://github.com/aiogram/aiogram (натисніть кнопку зірки в правому верхньому куті)" -#: ../../contributing.rst:194 +#: ../../contributing.rst:195 msgid "" "Adding stars makes it easier for other people to find this project and " "understand how useful it is." -msgstr "" +msgstr "Додавання зірок полегшує іншим людям знаходження цього проекту і розуміння того, наскільки він корисний." -#: ../../contributing.rst:197 +#: ../../contributing.rst:198 msgid "Guides" -msgstr "" +msgstr "Інструкції" -#: ../../contributing.rst:199 +#: ../../contributing.rst:200 msgid "" "You can write guides how to develop Bots on top of aiogram and publish it" " into YouTube, Medium, GitHub Books, any Courses platform or any other " "platform that you know." -msgstr "" +msgstr "Ви можете написати посібники, як розробляти ботів на основі aiogram і публікувати їх на YouTube, Medium, GitHub Books, будь-якій платформі курсів або на будь-якій іншій платформі, яку ви знаєте." -#: ../../contributing.rst:202 +#: ../../contributing.rst:203 msgid "" "This will help more people learn about the framework and learn how to use" " it" -msgstr "" +msgstr "Це допоможе більшій кількості людей дізнатися про фреймворк і навчитися його використовувати." -#: ../../contributing.rst:206 +#: ../../contributing.rst:207 msgid "Take answers" -msgstr "" +msgstr "Запитання" -#: ../../contributing.rst:208 +#: ../../contributing.rst:209 msgid "" "The developers is always asks for any question in our chats or any other " "platforms like GitHub Discussions, StackOverflow and others, feel free to" " answer to this questions." -msgstr "" +msgstr "Розробники завжди задають питання в наших чатах або на інших платформах, таких як GitHub Discussions, StackOverflow та інших, не соромтеся відповідати на ці питання." -#: ../../contributing.rst:212 +#: ../../contributing.rst:213 msgid "Funding" -msgstr "" +msgstr "Фінансова підтримка" -#: ../../contributing.rst:214 +#: ../../contributing.rst:215 msgid "" "The development of the project is free and not financed by commercial " "organizations, it is my personal initiative (`@JRootJunior " "`_) and I am engaged in the development of the " "project in my free time." -msgstr "" +msgstr "Розробка проекту є безкоштовною і не фінансується комерційними організаціями, це моя особиста ініціатива (`@JRootJunior `_) і я займаюся розробкою проекту у вільний час." -#: ../../contributing.rst:218 +#: ../../contributing.rst:219 msgid "" "So, if you want to financially support the project, or, for example, give" " me a pizza or a beer, you can do it on `OpenCollective " "`_." -msgstr "" +msgstr "Тож, якщо ви хочете фінансово підтримати проект, або, наприклад, купити мені піцу чи пиво, ви можете зробити це на `OpenCollective `_." diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po index 632ef480..942af74c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po @@ -47,12 +47,12 @@ msgid "" "This class also has a default initializer and you don't need to change " "it. The initializer accepts the incoming event and all contextual data, " "which can be accessed from the handler through attributes: :code:`event: " -"TelegramEvent` and :code:`data: Dict[Any, str]`" +"TelegramEvent` and :code:`data: Dict[str, Any]`" msgstr "" "Цей клас також має ініціалізатор за замовчуванням, і вам не потрібно його" " змінювати. Ініціалізатор приймає поточну подію та всі контекстні дані, " "доступ до яких можна отримати з обробника через атрибути: :code:`event: " -"TelegramEvent` and :code:`data: Dict[Any, str]`" +"TelegramEvent` and :code:`data: Dict[str, Any]`" #: ../../dispatcher/class_based_handlers/base.rst:17 #, fuzzy diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dependency_injection.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dependency_injection.po index b3e158d8..aff32317 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dependency_injection.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dependency_injection.po @@ -8,18 +8,18 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-26 23:17+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../dispatcher/dependency_injection.rst:3 msgid "Dependency injection" -msgstr "" +msgstr "Ін'єкція залежностей" #: ../../dispatcher/dependency_injection.rst:5 msgid "" @@ -29,10 +29,14 @@ msgid "" "`_ dependency inversion and single " "responsibility principles." msgstr "" +"Ін'єкція залежностей — це техніка програмування, яка робить класи " +"незалежними від їхніх залежностей. Вона досягається шляхом відділення " +"використання об'єкта від його створення. Це допомагає дотримуватися " +"принципів інверсії залежностей та єдиної відповідальності за SOLID." #: ../../dispatcher/dependency_injection.rst:12 msgid "How it works in aiogram" -msgstr "" +msgstr "Як це працює в aiogram" #: ../../dispatcher/dependency_injection.rst:14 msgid "" @@ -40,6 +44,9 @@ msgid "" "handling context data. Filters and middleware can also make changes to " "the context." msgstr "" +"Для кожного оновлення :class:`aiogram.dispatcher.dispatcher.Dispatcher` " +"передає дані контексту обробки. Фільтри та проміжне програмне забезпечення " +"також можуть вносити зміни до контексту." #: ../../dispatcher/dependency_injection.rst:17 msgid "" @@ -47,14 +54,17 @@ msgid "" "parameter in handler or filter. For example, to get " ":class:`aiogram.fsm.context.FSMContext` we do it like that:" msgstr "" +"Щоб отримати доступ до контекстних даних, ви повинні вказати відповідний " +"параметр ключового слова в обробнику або фільтрі. Наприклад, щоб отримати " +":class:`aiogram.fsm.context.FSMContext`, ми робимо це так:" #: ../../dispatcher/dependency_injection.rst:30 msgid "Injecting own dependencies" -msgstr "" +msgstr "Ін'єкція власних залежностей" #: ../../dispatcher/dependency_injection.rst:32 msgid "Aiogram provides several ways to complement / modify contextual data." -msgstr "" +msgstr "Aiogram надає кілька способів для доповнення/модифікації контекстних даних." #: ../../dispatcher/dependency_injection.rst:34 msgid "" @@ -64,33 +74,134 @@ msgid "" ":class:`aiogram.webhook.aiohttp_server.SimpleRequestHandler` " "initialization if you use webhooks." msgstr "" +"Перший і найпростіший спосіб — це просто вказати іменовані аргументи під час " +"ініціалізації :class:`aiogram.dispatcher.dispatcher.Dispatcher`, запуску методів " +"опитування або ініціалізації " +":class:`aiogram.webhook.aiohttp_server.SimpleRequestHandler`, якщо ви використовуєте вебхуки." #: ../../dispatcher/dependency_injection.rst:46 msgid "Analogy for webhook:" -msgstr "" +msgstr "Аналогія для вебхука:" #: ../../dispatcher/dependency_injection.rst:55 msgid "" ":class:`aiogram.dispatcher.dispatcher.Dispatcher`'s workflow data also " "can be supplemented by setting values as in a dictionary:" msgstr "" +"Дані робочого процесу :class:`aiogram.dispatcher.dispatcher.Dispatcher` також можуть " +"доповнюватися шляхом встановлення значень, як у словнику:" #: ../../dispatcher/dependency_injection.rst:63 msgid "" "The middlewares updates the context quite often. You can read more about " "them on this page:" msgstr "" +"Проміжне програмне забезпечення досить часто оновлює контекст. Ви можете " +"прочитати про це більше на цій сторінці:" #: ../../dispatcher/dependency_injection.rst:66 msgid ":ref:`Middlewares `" -msgstr "" +msgstr ":ref:`Проміжне програмне забезпечення `" #: ../../dispatcher/dependency_injection.rst:68 msgid "The last way is to return a dictionary from the filter:" -msgstr "" +msgstr "Останній спосіб — повернути словник із фільтра:" #: ../../dispatcher/dependency_injection.rst:72 msgid "" "...or using :ref:`MagicFilter ` with :code:`.as_(...)` " "method." msgstr "" +"...або використовуючи :ref:`MagicFilter ` з методом " +":code:`.as_(...)`." + +#: ../../dispatcher/dependency_injection.rst:76 +msgid "Using type hints" +msgstr "Використання підказок типів" + +#: ../../dispatcher/dependency_injection.rst:80 +msgid "" +"Type-hinting middleware data is optional and is not required for the " +"correct operation of the dispatcher. However, it is recommended to use it" +" to improve the readability of the code." +msgstr "" +"Використання підказок типів для даних проміжного програмного забезпечення " +"необов'язкове й не потрібне для правильної роботи диспетчера. Проте " +"рекомендується використовувати їх для покращення читабельності коду." + +#: ../../dispatcher/dependency_injection.rst:83 +msgid "" +"You can use type hints to specify the type of the context data in the " +"middlewares, filters and handlers." +msgstr "" +"Ви можете використовувати підказки типів для визначення типу контекстних " +"даних у проміжному ПЗ, фільтрах та обробниках." + +#: ../../dispatcher/dependency_injection.rst:85 +msgid "" +"The default middleware data typed dict can be found in " +":class:`aiogram.dispatcher.middlewares.data.MiddlewareData`." +msgstr "" +"Словник типів даних за замовчуванням для проміжного ПЗ можна знайти в " +":class:`aiogram.dispatcher.middlewares.data.MiddlewareData`." + +#: ../../dispatcher/dependency_injection.rst:87 +msgid "" +"In case when you have extended the context data, you can use the " +":class:`aiogram.dispatcher.middlewares.data.MiddlewareData` as a base " +"class and specify the type hints for the new fields." +msgstr "" +"Якщо ви розширили контекстні дані, ви можете використовувати " +":class:`aiogram.dispatcher.middlewares.data.MiddlewareData` як базовий клас " +"та вказати підказки типів для нових полів." + +#: ../../dispatcher/dependency_injection.rst:91 +msgid "" +"If you using type checking tools like mypy, you can experience warnings " +"about that this type hint against Liskov substitution principle in due " +"stricter type is not a subclass of :code:`dict[str, Any]`. This is a " +"known issue and it is not a bug. You can ignore this warning or use " +":code:`# type: ignore` comment." +msgstr "" +"Якщо ви використовуєте інструменти перевірки типів, такі як mypy, ви " +"можете отримати попередження про те, що ці підказки типів порушують " +"принцип підстановки Лісков через те, що суворіший тип не є підкласом " +":code:`dict[str, Any]`. Це відома проблема, і це не є помилкою. Ви можете " +"проігнорувати це попередження або використати коментар :code:`# type: ignore`." + +#: ../../dispatcher/dependency_injection.rst:94 +msgid "Example of using type hints:" +msgstr "Приклад використання підказок типів:" + +#: ../../dispatcher/dependency_injection.rst:119 +msgid "Available context data type helpers" +msgstr "Доступні помічники для типів контекстних даних" + +#: aiogram.dispatcher.middlewares.data.MiddlewareData:1 of +msgid "Data passed to the handler by the middlewares." +msgstr "Дані, передані обробнику проміжним ПЗ." + +#: aiogram.dispatcher.middlewares.data.MiddlewareData:3 of +msgid "You can add your own data by extending this class." +msgstr "Ви можете додати власні дані, розширивши цей клас." + +#: aiogram.dispatcher.middlewares.data.I18nData:1 of +msgid "I18n related data." +msgstr "Дані, пов'язані з I18n." + +#: aiogram.dispatcher.middlewares.data.I18nData:3 of +msgid "" +"Is not included by default, you need to add it to your own Data class if " +"you need it." +msgstr "" +"За замовчуванням не включено, вам потрібно додати це до власного класу Даних, " +"якщо це необхідно." + +#: ../../docstring aiogram.dispatcher.middlewares.data.I18nData.i18n:1 of +msgid "I18n object." +msgstr "Об'єкт I18n." + +#: ../../docstring +#: aiogram.dispatcher.middlewares.data.I18nData.i18n_middleware:1 of +msgid "I18n middleware." +msgstr "Проміжне ПЗ для I18n." diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po index 341c7eb3..6e922b5c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: 2022-12-10 19:44+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -21,9 +21,11 @@ msgid "Dispatcher" msgstr "Диспетчер" #: ../../dispatcher/dispatcher.rst:5 +#, fuzzy msgid "" -"Dispatcher is root :obj:`Router` and in code Dispatcher can be used " -"directly for routing updates or attach another routers into dispatcher." +"Dispatcher is root :class:`~aiogram.dispatcher.router.Router` and in code" +" Dispatcher can be used directly for routing updates or attach another " +"routers into dispatcher." msgstr "" "Диспетчер - це кореневий маршрутизатор, і в коді диспетчер може " "використовуватися безпосередньо для маршрутизації подій або підключення " @@ -41,22 +43,18 @@ msgstr "" #: ../../dispatcher/dispatcher.rst:9 #, fuzzy msgid ":ref:`Router `" -msgstr "`Router `__" +msgstr "`Маршрутизатор `__" #: ../../dispatcher/dispatcher.rst:10 msgid ":ref:`Filtering events`" -msgstr "" +msgstr ":ref:`Фільтрація подій`" #: aiogram.dispatcher.dispatcher.Dispatcher:1 #: aiogram.dispatcher.dispatcher.Dispatcher.__init__:1 of msgid "Root router" msgstr "Кореневий маршрутизатор" -#: aiogram.dispatcher.dispatcher.Dispatcher.__init__ -#: aiogram.dispatcher.dispatcher.Dispatcher.feed_raw_update -#: aiogram.dispatcher.dispatcher.Dispatcher.feed_update -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling -#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling of +#: ../../dispatcher/dispatcher.rst msgid "Parameters" msgstr "Параметри" @@ -66,7 +64,7 @@ msgstr "Сховище для кінцевого автомату (FSM)" #: aiogram.dispatcher.dispatcher.Dispatcher.__init__:4 of msgid "FSM strategy" -msgstr "Стратегія кінцевого апарату" +msgstr "Стратегія кінцевого автомату" #: aiogram.dispatcher.dispatcher.Dispatcher.__init__:5 of msgid "Events isolation" @@ -77,9 +75,8 @@ msgid "" "Disable FSM, note that if you disable FSM then you should not use storage" " and events isolation" msgstr "" -"Відключення кінцевого апарату, зауважте що при вимкненому кінцевому " -"апаратові вам не слід використовувати сховище (кінцевого апарату) та " -"ізоляцію подій" +"Відключення кінцевого автомату, зауважте, що при вимкненому кінцевому " +"автоматі вам не слід використовувати сховище та ізоляцію подій" #: aiogram.dispatcher.dispatcher.Dispatcher.__init__:8 of msgid "Other arguments, will be passed as keyword arguments to handlers" @@ -89,103 +86,108 @@ msgstr "Інші аргументи будуть передані обробни msgid "" "Main entry point for incoming updates with automatic Dict->Update " "serializer" -msgstr "Основна точка входу для подій" +msgstr "Основна точка входу для подій з автоматичною серіалізацією Dict->Update" #: aiogram.dispatcher.dispatcher.Dispatcher.feed_update:1 of msgid "" "Main entry point for incoming updates Response of this method can be used" " as Webhook response" msgstr "" -"Основна точка входу для подій. Відповідь цього метода може бути " +"Основна точка входу для подій. Відповідь цього методу може бути " "використана для відповіді у Webhook" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:1 of msgid "Run many bots with polling" -msgstr "Запуск кількох ботів з опитуванням" +msgstr "Запуск кількох ботів із використанням опитування" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:3 #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:3 of #, fuzzy msgid "Bot instances (one or more)" -msgstr "Екземпляри ботів" +msgstr "Екземпляри ботів (один або кілька)" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:4 #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:4 of msgid "Long-polling wait time" -msgstr "" +msgstr "Час очікування під час тривалого опитування" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:5 #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:5 of msgid "Run task for each event and no wait result" -msgstr "Запуск обробки без очікування результату" +msgstr "Запуск завдання для кожної події без очікування результату" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:6 #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:6 of msgid "backoff-retry config" -msgstr "" +msgstr "конфігурація повторів із затримкою" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:7 of msgid "List of the update types you want your bot to receive" -msgstr "Список типів подій, які має опрацьовувати ваш бот" +msgstr "Список типів оновлень, які має отримувати ваш бот" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:8 #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:9 of msgid "handle signals (SIGINT/SIGTERM)" -msgstr "" +msgstr "обробка сигналів (SIGINT/SIGTERM)" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:9 #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:10 of msgid "close bot sessions on shutdown" -msgstr "" +msgstr "закривати сесії бота під час завершення роботи" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:10 #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:11 of msgid "contextual data" msgstr "контекстні дані" -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling -#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling -#: aiogram.dispatcher.dispatcher.Dispatcher.stop_polling of +#: ../../dispatcher/dispatcher.rst msgid "Returns" msgstr "Повертає" #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:1 of msgid "Polling runner" -msgstr "Запуск кількох ботів з опитуванням (асинхронно)" +msgstr "Запуск виконавця опитування" #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:7 of msgid "" "List of the update types you want your bot to receive By default, all " "used update types are enabled (resolved from handlers)" msgstr "" +"Список типів оновлень, які має отримувати ваш бот. За замовчуванням " +"увімкнені всі використовувані типи оновлень (визначено з обробників)" #: aiogram.dispatcher.dispatcher.Dispatcher.stop_polling:1 of msgid "Execute this method if you want to stop polling programmatically" -msgstr "" +msgstr "Використовуйте цей метод, якщо хочете зупинити опитування програмно" #: ../../dispatcher/dispatcher.rst:18 msgid "Simple usage" -msgstr "Просте застосування" +msgstr "Просте використання" #: ../../dispatcher/dispatcher.rst:20 ../../dispatcher/dispatcher.rst:33 msgid "Example:" -msgstr "Наприклад:" +msgstr "Приклад:" #: ../../dispatcher/dispatcher.rst:31 msgid "Including routers" -msgstr "Включаючи маршрутизатори" +msgstr "Додавання маршрутизаторів" -#: ../../dispatcher/dispatcher.rst:43 +#: ../../dispatcher/dispatcher.rst:46 msgid "Handling updates" -msgstr "Обробка подій" +msgstr "Обробка оновлень" -#: ../../dispatcher/dispatcher.rst:45 +#: ../../dispatcher/dispatcher.rst:48 msgid "" "All updates can be propagated to the dispatcher by " -":obj:`Dispatcher.feed_update(bot=..., update=...)` method:" +":meth:`~aiogram.dispatcher.dispatcher.Dispatcher.feed_update` method:" msgstr "" -"Усі оновлення можна передати диспетчеру через " -":obj:`Dispatcher.feed_update(bot=..., update=...)` method:" +"Усі оновлення можна передати диспетчеру через метод " +":meth:`~aiogram.dispatcher.dispatcher.Dispatcher.feed_update`:" -#~ msgid "Bot instances (one or mre)" -#~ msgstr "Екземпляри ботів" +#: ../../dispatcher/dispatcher.rst:57 +msgid "" +"Also you can feed raw update (dictionary) object to the dispatcher by " +":meth:`~aiogram.dispatcher.dispatcher.Dispatcher.feed_raw_update` method:" +msgstr "" +"Також ви можете передати сирий об'єкт оновлення (словник) до диспетчера " +"через метод :meth:`~aiogram.dispatcher.dispatcher.Dispatcher.feed_raw_update`:" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/command.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/command.po index c75755ac..c43c54d5 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/command.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/command.po @@ -5,52 +5,98 @@ # msgid "" msgstr "" -"Project-Id-Version: aiogram\n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: 2022-10-25 16:51+0300\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" -"X-Generator: Poedit 3.1.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../dispatcher/filters/command.rst:3 msgid "Command" msgstr "Команди" +#: ../../dispatcher/filters/command.rst:6 +msgid "Usage" +msgstr "Використання" + +#: ../../dispatcher/filters/command.rst:8 +msgid "Filter single variant of commands: :code:`Command(\"start\")`" +msgstr "Фільтр єдиного варіанту команд: :code:`Command(\"start\")`" + +#: ../../dispatcher/filters/command.rst:9 +#, fuzzy +msgid "" +"Handle command by regexp pattern: " +":code:`Command(re.compile(r\"item_(\\\\d+)\"))`" +msgstr "" +"Обробка команди за шаблоном регулярного виразу: " +":code:`Command(re.compile(r\"item_(\\d+)\"))`" + +#: ../../dispatcher/filters/command.rst:10 +#, fuzzy +msgid "" +"Match command by multiple variants: :code:`Command(\"item\", " +"re.compile(r\"item_(\\\\d+)\"))`" +msgstr "" +"Порівняння команди за кількома варіантами: :code:`Command(\"item\", " +"re.compile(r\"item_(\\d+)\"))`" + +#: ../../dispatcher/filters/command.rst:11 +msgid "" +"Handle commands in public chats intended for other bots: " +":code:`Command(\"command\", ignore_mention=True)`" +msgstr "" +"Обробка команди в публічних чатах, призначених для інших ботів: " +":code:`Command(\"command\", ignore_mention=True)`" + +#: ../../dispatcher/filters/command.rst:12 +msgid "" +"Use :class:`aiogram.types.bot_command.BotCommand` object as command " +"reference :code:`Command(BotCommand(command=\"command\", description=\"My" +" awesome command\")`" +msgstr "" +"Використання об’єкту :class:`aiogram.types.bot_command.BotCommand` як " +"посилання на команду :code:`Command(BotCommand(command=\"command\", " +"description=\"My awesome command\")`" + +#: ../../dispatcher/filters/command.rst:16 +msgid "Command cannot include spaces or any whitespace" +msgstr "Команда не може містити пробілів чи переносів рядків" + #: aiogram.filters.command.Command:1 of msgid "This filter can be helpful for handling commands from the text messages." -msgstr "" -"Цей фільтр може бути корисним для обробки команд із текстових повідомлень." +msgstr "Цей фільтр може бути корисним для обробки команд із текстових повідомлень." #: aiogram.filters.command.Command:3 of msgid "" -"Works only with :class:`aiogram.types.message.Message` events which have the :" -"code:`text`." +"Works only with :class:`aiogram.types.message.Message` events which have " +"the :code:`text`." msgstr "" -"Працює лише з подіями :class:`aiogram.types.message.Message` , що мають :" -"code:`text`." +"Працює лише з подіями :class:`aiogram.types.message.Message` , що мають " +":code:`text`." #: aiogram.filters.command.Command.__init__:1 of msgid "List of commands (string or compiled regexp patterns)" msgstr "Перелік команд (рядки або скомпільовані шаблони регулярних виразів)" -#: aiogram.filters.command.Command.__init__ of +#: ../../dispatcher/filters/command.rst msgid "Parameters" msgstr "Параметри" #: aiogram.filters.command.Command.__init__:3 of msgid "" -"Prefix for command. Prefix is always a single char but here you can pass all " -"of allowed prefixes, for example: :code:`\"/!\"` will work with commands " -"prefixed by :code:`\"/\"` or :code:`\"!\"`." +"Prefix for command. Prefix is always a single char but here you can pass " +"all of allowed prefixes, for example: :code:`\"/!\"` will work with " +"commands prefixed by :code:`\"/\"` or :code:`\"!\"`." msgstr "" -"Префікс для команди. Префікс завжди складається з одного символу, але тут ви " -"можете передати всі дозволені префікси, наприклад: :code:`\"/!\"` працюватиме " -"з командами з префіксом :code:`\"/\"` або :code:`\"!\" `." +"Префікс для команди. Префікс завжди складається з одного символу, але тут" +" ви можете передати всі дозволені префікси, наприклад: :code:`\"/!\"` " +"працюватиме з командами з префіксом :code:`\"/\"` або :code:`\"!\" `." #: aiogram.filters.command.Command.__init__:7 of msgid "Ignore case (Does not work with regexp, use flags instead)" @@ -63,27 +109,27 @@ msgid "" "Ignore bot mention. By default, bot can not handle commands intended for " "other bots" msgstr "" -"Ігнорувати згадку про бота. За замовчуванням бот не може обробляти команди, " -"призначені для інших ботів" +"Ігнорувати згадку про бота. За замовчуванням бот не може обробляти " +"команди, призначені для інших ботів" #: aiogram.filters.command.Command.__init__:10 of msgid "Validate command object via Magic filter after all checks done" msgstr "" -"Перевірка об’єкту команди за допомогою магічного фільтра після виконання всіх " -"перевірок" +"Перевірка об’єкту команди за допомогою магічного фільтра після виконання " +"всіх перевірок" -#: ../../dispatcher/filters/command.rst:10 +#: ../../dispatcher/filters/command.rst:24 msgid "" -"When filter is passed the :class:`aiogram.filters.command.CommandObject` will " -"be passed to the handler argument :code:`command`" +"When filter is passed the :class:`aiogram.filters.command.CommandObject` " +"will be passed to the handler argument :code:`command`" msgstr "" -"Коли фільтр пройдено, :class:`aiogram.filters.command.CommandObject` буде " -"передано аргументу обробника :code:`command`" +"Коли фільтр пройдено, :class:`aiogram.filters.command.CommandObject` буде" +" передано аргументу обробника :code:`command`" #: aiogram.filters.command.CommandObject:1 of msgid "" -"Instance of this object is always has command and it prefix. Can be passed as " -"keyword argument **command** to the handler" +"Instance of this object is always has command and it prefix. Can be " +"passed as keyword argument **command** to the handler" msgstr "" "Екземпляр цього об’єкта завжди має команду та її префікс. Можна передати " "обробнику (handler) як аргумент ключового слова **command**" @@ -106,7 +152,8 @@ msgstr "Аргумент команди" #: ../../docstring aiogram.filters.command.CommandObject.regexp_match:1 of msgid "" -"Will be presented match result if the command is presented as regexp in filter" +"Will be presented match result if the command is presented as regexp in " +"filter" msgstr "" "Буде представлено результат відповідності, якщо команда представлена як " "регулярний вираз у фільтрі" @@ -119,52 +166,6 @@ msgstr "Ця команда згадується?" msgid "Generate original text from object" msgstr "Створення оригінального тексту з об'єкта" -#: ../../dispatcher/filters/command.rst:19 -msgid "Usage" -msgstr "Використання" - -#: ../../dispatcher/filters/command.rst:21 -msgid "Filter single variant of commands: :code:`Command(\"start\")`" -msgstr "Фільтр єдиного варіанту команд: :code:`Command(\"start\")`" - -#: ../../dispatcher/filters/command.rst:22 -msgid "" -"Handle command by regexp pattern: :code:`Command(re.compile(r\"item_(\\d" -"+)\"))`" -msgstr "" -"Обробка команди за шаблоном регулярного виразу: :code:`Command(re.compile(r" -"\"item_(\\d+)\"))`" - -#: ../../dispatcher/filters/command.rst:23 -msgid "" -"Match command by multiple variants: :code:`Command(\"item\", re.compile(r" -"\"item_(\\d+)\"))`" -msgstr "" -"Порівняння команди за кількома варіантами: :code:`Command(\"item\", re." -"compile(r\"item_(\\d+)\"))`" - -#: ../../dispatcher/filters/command.rst:24 -msgid "" -"Handle commands in public chats intended for other bots: :code:" -"`Command(\"command\", ignore_mention=True)`" -msgstr "" -"Обробка команди в публічних чатах, призначених для інших ботів: :code:" -"`Command(\"command\", ignore_mention=True)`" - -#: ../../dispatcher/filters/command.rst:25 -msgid "" -"Use :class:`aiogram.types.bot_command.BotCommand` object as command " -"reference :code:`Command(BotCommand(command=\"command\", description=\"My " -"awesome command\")`" -msgstr "" -"Використання об’єкту :class:`aiogram.types.bot_command.BotCommand` як " -"посилання на команду :code:`Command(BotCommand(command=\"command\", " -"description=\"My awesome command\")`" - -#: ../../dispatcher/filters/command.rst:29 -msgid "Command cannot include spaces or any whitespace" -msgstr "Команда не може містити пробілів чи переносів рядків" - #: ../../dispatcher/filters/command.rst:32 msgid "Allowed handlers" msgstr "Дозволені обробники (handler)" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/index.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/index.po index a19bb7a1..d3fe7556 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/filters/index.po @@ -195,4 +195,3 @@ msgstr "" "Альтернативним способом є об’єднання за допомогою спеціальних функцій " "(:func:`and_f`, :func:`or_f`, :func:`invert_f` з модуля " ":code:`aiogram.filters`):" - diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/scene.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/scene.po index 7c1de50e..3cef578c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/scene.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/scene.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-11-24 21:53+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: 2023-11-23 01:27+0200\n" "Last-Translator: \n" "Language: uk_UA\n" @@ -59,20 +59,21 @@ msgid "" msgstr "" "Сцена в **aiogram** схожа на абстрактний, ізольований простір імен або " "кімнату, до якої користувач може потрапити за допомогою коду. Коли " -"користувач перебуває в межах Сцени, більшість інших глобальних команд " -"або обробників повідомлень пропускаються, якщо тільки вони не призначені " -"для роботи поза Сценами." -"Сцени забезпечують структуру для більш складних взаємодій, " -"ефективно ізолюючи та керуючи контекстами для різних етапів розмови. Вони" -" дозволяють більш організовано контролювати та керувати розмовою." +"користувач перебуває в межах Сцени, більшість інших глобальних команд або" +" обробників повідомлень пропускаються, якщо тільки вони не призначені для" +" роботи поза Сценами.Сцени забезпечують структуру для більш складних " +"взаємодій, ефективно ізолюючи та керуючи контекстами для різних етапів " +"розмови. Вони дозволяють більш організовано контролювати та керувати " +"розмовою." #: ../../dispatcher/finite_state_machine/scene.rst:31 msgid "Scene Lifecycle" msgstr "Життєвий цикл" #: ../../dispatcher/finite_state_machine/scene.rst:33 +#, fuzzy msgid "" -"Each Scene can be \"entered\", \"left\" of \"exited\", allowing for clear" +"Each Scene can be \"entered\", \"left\" or \"exited\", allowing for clear" " transitions between different stages of the conversation. For instance, " "in a multi-step form filling interaction, each step could be a Scene - " "the bot guides the user from one Scene to the next as they provide the " @@ -385,28 +386,11 @@ msgstr "" msgid "Adds the scene to the given router." msgstr "Додає сцену до заданого маршрутизатора." -#: aiogram.fsm.scene.Scene.add_to_router aiogram.fsm.scene.SceneRegistry.add -#: aiogram.fsm.scene.SceneRegistry.get aiogram.fsm.scene.SceneRegistry.register -#: aiogram.fsm.scene.SceneWizard.back aiogram.fsm.scene.SceneWizard.enter -#: aiogram.fsm.scene.SceneWizard.exit aiogram.fsm.scene.SceneWizard.goto -#: aiogram.fsm.scene.SceneWizard.leave aiogram.fsm.scene.SceneWizard.retake -#: aiogram.fsm.scene.SceneWizard.set_data -#: aiogram.fsm.scene.SceneWizard.update_data -#: aiogram.fsm.scene.ScenesManager.close aiogram.fsm.scene.ScenesManager.enter -#: of +#: ../../dispatcher/finite_state_machine/scene.rst msgid "Parameters" msgstr "Параметри" -#: aiogram.fsm.scene.Scene.add_to_router aiogram.fsm.scene.Scene.as_router -#: aiogram.fsm.scene.SceneRegistry.add aiogram.fsm.scene.SceneRegistry.get -#: aiogram.fsm.scene.SceneRegistry.register aiogram.fsm.scene.SceneWizard.back -#: aiogram.fsm.scene.SceneWizard.clear_data aiogram.fsm.scene.SceneWizard.enter -#: aiogram.fsm.scene.SceneWizard.exit aiogram.fsm.scene.SceneWizard.get_data -#: aiogram.fsm.scene.SceneWizard.goto aiogram.fsm.scene.SceneWizard.leave -#: aiogram.fsm.scene.SceneWizard.retake aiogram.fsm.scene.SceneWizard.set_data -#: aiogram.fsm.scene.SceneWizard.update_data -#: aiogram.fsm.scene.ScenesManager.close aiogram.fsm.scene.ScenesManager.enter -#: of +#: ../../dispatcher/finite_state_machine/scene.rst msgid "Returns" msgstr "Повертає" @@ -573,6 +557,14 @@ msgstr "Додаткові іменовані аргументи для пере msgid "Scene actions" msgstr "Дії сцени" +#: aiogram.utils.class_attrs_resolver.get_sorted_mro_attrs_resolver:1 of +msgid "Attributes resolver." +msgstr "" + +#: aiogram.utils.class_attrs_resolver.get_sorted_mro_attrs_resolver:4 of +msgid "This attribute should only be changed when you know what you are doing." +msgstr "" + #: ../../docstring aiogram.fsm.scene.SceneConfig.callback_query_without_state:1 #: of msgid "Allow callback query without state" @@ -827,7 +819,8 @@ msgstr "" ":code:`on.inline_query`:" #: ../../dispatcher/finite_state_machine/scene.rst:240 -msgid "Scene has only tree points for transitions:" +#, fuzzy +msgid "Scene has only three points for transitions:" msgstr "Сцени мають три точки для переходів:" #: ../../dispatcher/finite_state_machine/scene.rst:242 diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/storages.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/storages.po index dd8a43f3..d53b943c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/storages.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/storages.po @@ -1,170 +1,215 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2022, aiogram Team -# This file is distributed under the same license as the aiogram package. -# FIRST AUTHOR , 2022. +# Translations template for PROJECT. +# Copyright (C) 2025 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2025. # +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-02 15:10+0300\n" -"PO-Revision-Date: 2022-10-20 22:00+0300\n" -"Last-Translator: \n" -"Language-Team: \n" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../dispatcher/finite_state_machine/storages.rst:3 msgid "Storages" -msgstr "Сховища" +msgstr "" #: ../../dispatcher/finite_state_machine/storages.rst:6 msgid "Storages out of the box" -msgstr "Вбудоване сховище" +msgstr "" #: ../../dispatcher/finite_state_machine/storages.rst:9 msgid "MemoryStorage" -msgstr "MemoryStorage" +msgstr "" #: aiogram.fsm.storage.memory.MemoryStorage:1 of msgid "" "Default FSM storage, stores all data in :class:`dict` and loss everything" " on shutdown" msgstr "" -"Сховище кінцевого автомату за замовчуванням, зберігає всі дані в " -":class:`dict` і забуває все під час вимкнення" #: aiogram.fsm.storage.memory.MemoryStorage:5 of msgid "" "Is not recommended using in production in due to you will lose all data " "when your bot restarts" msgstr "" -"Не рекомендується використовувати на production, оскільки, Ви втратите " -"всі дані під час перезапуску бота" #: ../../dispatcher/finite_state_machine/storages.rst:16 msgid "RedisStorage" -msgstr "RedisStorage" +msgstr "" #: aiogram.fsm.storage.redis.RedisStorage:1 of msgid "" "Redis storage required :code:`redis` package installed (:code:`pip " "install redis`)" msgstr "" +"Для сховища Redis потрібен встановлений пакет :code:`redis` (:code:`pip " +"install redis`)" -#: aiogram.fsm.storage.base.BaseStorage.get_data -#: aiogram.fsm.storage.base.BaseStorage.get_state -#: aiogram.fsm.storage.base.BaseStorage.set_data -#: aiogram.fsm.storage.base.BaseStorage.set_state -#: aiogram.fsm.storage.base.BaseStorage.update_data -#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build -#: aiogram.fsm.storage.redis.KeyBuilder.build -#: aiogram.fsm.storage.redis.RedisStorage.__init__ -#: aiogram.fsm.storage.redis.RedisStorage.from_url of +#: ../../dispatcher/finite_state_machine/storages.rst msgid "Parameters" -msgstr "Параметри" +msgstr "" #: aiogram.fsm.storage.redis.RedisStorage.__init__:1 of -#, fuzzy msgid "Instance of Redis connection" -msgstr "екземпляр поточного бота" +msgstr "Екземпляр підключення Redis" +#: aiogram.fsm.storage.mongo.MongoStorage.__init__:2 #: aiogram.fsm.storage.redis.RedisStorage.__init__:2 of msgid "builder that helps to convert contextual key to string" -msgstr "" +msgstr "конструктор, який допомагає конвертувати контекстний ключ у рядок" #: aiogram.fsm.storage.redis.RedisStorage.__init__:3 of msgid "TTL for state records" -msgstr "" +msgstr "Час життя (TTL) для записів стану" #: aiogram.fsm.storage.redis.RedisStorage.__init__:4 of msgid "TTL for data records" -msgstr "" +msgstr "Час життя (TTL) для записів даних" #: aiogram.fsm.storage.redis.RedisStorage.from_url:1 of msgid "" "Create an instance of :class:`RedisStorage` with specifying the " "connection string" -msgstr "" +msgstr "Створити екземпляр :class:`RedisStorage`, вказавши строку підключення" #: aiogram.fsm.storage.redis.RedisStorage.from_url:3 of msgid "for example :code:`redis://user:password@host:port/db`" -msgstr "" +msgstr "наприклад :code:`redis://user:password@host:port/db`" #: aiogram.fsm.storage.redis.RedisStorage.from_url:4 of msgid "see :code:`redis` docs" -msgstr "" +msgstr "див. документацію :code:`redis`" #: aiogram.fsm.storage.redis.RedisStorage.from_url:5 of msgid "arguments to be passed to :class:`RedisStorage`" -msgstr "" +msgstr "аргументи, які потрібно передати :class:`RedisStorage`" -#: aiogram.fsm.storage.base.BaseStorage.get_data -#: aiogram.fsm.storage.base.BaseStorage.get_state -#: aiogram.fsm.storage.base.BaseStorage.update_data -#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build -#: aiogram.fsm.storage.redis.KeyBuilder.build -#: aiogram.fsm.storage.redis.RedisStorage.from_url of +#: ../../dispatcher/finite_state_machine/storages.rst msgid "Returns" -msgstr "Повертає" +msgstr "" #: aiogram.fsm.storage.redis.RedisStorage.from_url:6 of +#, fuzzy msgid "an instance of :class:`RedisStorage`" -msgstr "екземпляр класу :class:`RedisStorage`" +msgstr "екземпляр класу :class:`MongoStorage`" -#: ../../dispatcher/finite_state_machine/storages.rst:22 -msgid "Keys inside storage can be customized via key builders:" -msgstr "" -"Ключі всередині сховища можна налаштувати за допомогою конструкторів " -"ключів:" - -#: aiogram.fsm.storage.redis.KeyBuilder:1 of -msgid "Base class for Redis key builder" +#: ../../dispatcher/finite_state_machine/storages.rst:23 +msgid "MongoStorage" msgstr "" -#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build:1 -#: aiogram.fsm.storage.redis.KeyBuilder.build:1 of -msgid "This method should be implemented in subclasses" +#: aiogram.fsm.storage.mongo.MongoStorage:1 of +msgid "" +"MongoDB storage required :code:`motor` package installed (:code:`pip " +"install motor`)" +msgstr "" +"Для сховища MongoDB потрібен встановлений пакет :code:`motor` (:code:`pip" +" install motor`)" + +#: aiogram.fsm.storage.mongo.MongoStorage.__init__:1 of +msgid "Instance of AsyncIOMotorClient" +msgstr "Екземпляр AsyncIOMotorClient" + +#: aiogram.fsm.storage.mongo.MongoStorage.__init__:3 of +msgid "name of the MongoDB database for FSM" +msgstr "назва бази даних MongoDB для FSM" + +#: aiogram.fsm.storage.mongo.MongoStorage.__init__:4 of +msgid "name of the collection for storing FSM states and data" +msgstr "назва колекції для зберігання станів і даних FSM" + +#: aiogram.fsm.storage.mongo.MongoStorage.from_url:1 of +msgid "" +"Create an instance of :class:`MongoStorage` with specifying the " +"connection string" +msgstr "Створити екземпляр :class:`MongoStorage`, вказавши строку підключення" + +#: aiogram.fsm.storage.mongo.MongoStorage.from_url:3 of +msgid "for example :code:`mongodb://user:password@host:port`" +msgstr "наприклад :code:`mongodb://user:password@host:port`" + +#: aiogram.fsm.storage.mongo.MongoStorage.from_url:4 of +msgid "see :code:`motor` docs" +msgstr "див. документацію :code:`motor`" + +#: aiogram.fsm.storage.mongo.MongoStorage.from_url:5 of +msgid "arguments to be passed to :class:`MongoStorage`" +msgstr "аргументи, які потрібно передати :class:`MongoStorage`" + +#: aiogram.fsm.storage.mongo.MongoStorage.from_url:6 of +msgid "an instance of :class:`MongoStorage`" +msgstr "екземпляр класу :class:`MongoStorage`" + +#: ../../dispatcher/finite_state_machine/storages.rst:30 +msgid "KeyBuilder" msgstr "" -#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build:3 -#: aiogram.fsm.storage.redis.KeyBuilder.build:3 of +#: ../../dispatcher/finite_state_machine/storages.rst:32 +msgid "Keys inside Redis and Mongo storages can be customized via key builders:" +msgstr "" + +#: aiogram.fsm.storage.base.KeyBuilder:1 of +msgid "Base class for key builder." +msgstr "Базовий клас для конструктора ключів." + +#: aiogram.fsm.storage.base.DefaultKeyBuilder.build:1 +#: aiogram.fsm.storage.base.KeyBuilder.build:1 of +msgid "Build key to be used in storage's db queries" +msgstr "Створити ключ для використання в запитах до бази даних сховища" + +#: aiogram.fsm.storage.base.DefaultKeyBuilder.build:3 +#: aiogram.fsm.storage.base.KeyBuilder.build:3 of msgid "contextual key" -msgstr "" +msgstr "контекстний ключ" -#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build:4 -#: aiogram.fsm.storage.redis.KeyBuilder.build:4 of +#: aiogram.fsm.storage.base.DefaultKeyBuilder.build:4 +#: aiogram.fsm.storage.base.KeyBuilder.build:4 of msgid "part of the record" -msgstr "" +msgstr "частина запису" -#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build:5 -#: aiogram.fsm.storage.redis.KeyBuilder.build:5 of -msgid "key to be used in Redis queries" -msgstr "" +#: aiogram.fsm.storage.base.DefaultKeyBuilder.build:5 +#: aiogram.fsm.storage.base.KeyBuilder.build:5 of +msgid "key to be used in storage's db queries" +msgstr "ключ для використання в запитах до бази даних сховища" -#: aiogram.fsm.storage.redis.DefaultKeyBuilder:1 of -msgid "Simple Redis key builder with default prefix." -msgstr "" +#: aiogram.fsm.storage.base.DefaultKeyBuilder:1 of +msgid "Simple key builder with default prefix." +msgstr "Простий конструктор ключів із стандартним префіксом." -#: aiogram.fsm.storage.redis.DefaultKeyBuilder:3 of +#: aiogram.fsm.storage.base.DefaultKeyBuilder:3 of msgid "" "Generates a colon-joined string with prefix, chat_id, user_id, optional " -"bot_id and optional destiny." +"bot_id, business_connection_id, destiny and field." msgstr "" +"Генерує рядок із префіксом, chat_id, user_id, додатковим bot_id, " +"business_connection_id, destiny та полем, розділеними двокрапкою." -#: ../../dispatcher/finite_state_machine/storages.rst:34 +#: aiogram.fsm.storage.base.DefaultKeyBuilder:6 of +msgid "Format:" +msgstr "Формат:" + +#: aiogram.fsm.storage.base.DefaultKeyBuilder:7 of +msgid ":code:`::::::`" +msgstr ":code:`::::::`" + +#: ../../dispatcher/finite_state_machine/storages.rst:44 msgid "Writing own storages" -msgstr "Написання власних сховищ" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage:1 of msgid "Base class for all FSM storages" -msgstr "Основний клас для всіх сховищ кінцевого автомату" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.set_state:1 of msgid "Set state for specified key" -msgstr "Установити стан для вказаного ключа" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.get_data:3 #: aiogram.fsm.storage.base.BaseStorage.get_state:3 @@ -172,51 +217,45 @@ msgstr "Установити стан для вказаного ключа" #: aiogram.fsm.storage.base.BaseStorage.set_state:3 #: aiogram.fsm.storage.base.BaseStorage.update_data:3 of msgid "storage key" -msgstr "ключ сховища" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.set_state:4 of msgid "new state" -msgstr "новий стан" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.get_state:1 of msgid "Get key state" -msgstr "Отримання стану ключа" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.get_state:4 of msgid "current state" -msgstr "поточний стан" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.set_data:1 of msgid "Write data (replace)" -msgstr "Запис даних (заміна)" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.set_data:4 #: aiogram.fsm.storage.base.BaseStorage.update_data:5 of msgid "new data" -msgstr "нові дані" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.get_data:1 of msgid "Get current data for key" -msgstr "Отримання поточних даних для ключа" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.get_data:4 of msgid "current data" -msgstr "нинішні дані" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.update_data:1 of msgid "Update date in the storage for key (like dict.update)" -msgstr "Дата оновлення в сховищі для ключа (наприклад, dict.update)" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.update_data:4 of msgid "partial data" -msgstr "неповні дані" +msgstr "" #: aiogram.fsm.storage.base.BaseStorage.close:1 of msgid "Close storage (database connection, file or etc.)" -msgstr "Закриття сховища (підключення до бази даних, файлу тощо)" - -#~ msgid "Custom arguments for Redis lock" -#~ msgstr "" - -#~ msgid "instance of the current bot" -#~ msgstr "екземпляр поточного бота" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/strategy.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/strategy.po new file mode 100644 index 00000000..c27bde79 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/finite_state_machine/strategy.po @@ -0,0 +1,55 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../dispatcher/finite_state_machine/strategy.rst:3 +msgid "Strategy" +msgstr "Стратегія" + +#: ../../dispatcher/finite_state_machine/strategy.rst:5 +msgid "" +"This module provides the `FSMStrategy` enumeration which is used to " +"define the strategy of the finite state machine." +msgstr "Цей модуль забезпечує перелік `FSMStrategy`, який використовується для визначення стратегії кінцевого автомата." + +#: aiogram.fsm.strategy.FSMStrategy:1 of +msgid "FSM strategy for storage key generation." +msgstr "Стратегія кінцевого автомата для генерації ключів збереження." + +#: ../../docstring aiogram.fsm.strategy.FSMStrategy.CHAT:1 of +msgid "State will be stored for each chat globally without separating by users." +msgstr "Стан зберігатиметься для кожного чату глобально без розділення за користувачами." + +#: ../../docstring aiogram.fsm.strategy.FSMStrategy.CHAT_TOPIC:1 of +msgid "State will be stored for each chat and topic, but not separated by users." +msgstr "Стан зберігатиметься для кожного чату та теми, але без розділення за користувачами." + +#: ../../docstring aiogram.fsm.strategy.FSMStrategy.GLOBAL_USER:1 of +msgid "State will be stored globally for each user globally." +msgstr "Стан зберігатиметься глобально для кожного користувача." + +#: ../../docstring aiogram.fsm.strategy.FSMStrategy.USER_IN_CHAT:1 of +msgid "State will be stored for each user in chat." +msgstr "Стан зберігатиметься для кожного користувача в чаті." + +#: ../../docstring aiogram.fsm.strategy.FSMStrategy.USER_IN_TOPIC:1 of +msgid "State will be stored for each user in chat and topic." +msgstr "Стан зберігатиметься для кожного користувача в чаті та темі." diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/observer.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/observer.po index 20cad437..437bf41d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/observer.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/observer.po @@ -106,4 +106,3 @@ msgid "" msgstr "" "Передача події обробнику подій(handler) та зупинка при першому ж збігу. " "Обробник(handler) буде викликало, коли всі його фільтри пройдено." - diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/webhook.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/webhook.po index 880fef46..ee10e8ca 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/webhook.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/webhook.po @@ -203,45 +203,95 @@ msgstr "" #: ../../dispatcher/webhook.rst:51 msgid "Security" -msgstr "" +msgstr "Безпека" #: ../../dispatcher/webhook.rst:53 msgid "" "Telegram supports two methods to verify incoming requests that they are " "from Telegram:" -msgstr "" +msgstr "Telegram підтримує два методи перевірки вхідних запитів, що вони надходять від Telegram:" #: ../../dispatcher/webhook.rst:56 msgid "Using a secret token" -msgstr "" +msgstr "Використання секретного токена" #: ../../dispatcher/webhook.rst:58 msgid "" "When you set webhook, you can specify a secret token and then use it to " "verify incoming requests." msgstr "" +"Коли ви налаштовуєте webhook, ви можете вказати секретний токен і потім " +"використовувати його для перевірки вхідних запитів." #: ../../dispatcher/webhook.rst:61 msgid "Using IP filtering" -msgstr "" +msgstr "Використання фільтрації за IP" #: ../../dispatcher/webhook.rst:63 msgid "" "You can specify a list of IP addresses from which you expect incoming " "requests, and then use it to verify incoming requests." msgstr "" +"Ви можете вказати список IP-адрес, з яких очікуєте вхідні запити, і " +"використовувати його для перевірки запитів." #: ../../dispatcher/webhook.rst:65 msgid "" "It can be acy using firewall rules or nginx configuration or middleware " "on application level." msgstr "" +"Це можна зробити за допомогою правил firewall, конфігурації nginx або " +"middleware на рівні застосунку." #: ../../dispatcher/webhook.rst:67 msgid "" "So, aiogram has an implementation of the IP filtering middleware for " "aiohttp." msgstr "" +"Тому в aiogram є реалізація middleware для фільтрації за IP для aiohttp." + +#: ../../dispatcher/webhook.rst:69 +msgid "" +"`aiogram` IP filtering middleware reads the left-most IP address from " +"`X-Forwarded-For`." +msgstr "" +"IP-фільтр middleware в `aiogram` читає крайню ліву IP-адресу з " +"`X-Forwarded-For`." + +#: ../../dispatcher/webhook.rst:73 +msgid "" +"`X-Forwarded-For` is trustworthy only if all webhook traffic goes through a" +" trusted reverse proxy that rewrites this header. If your application is " +"directly reachable from the Internet, this header can be forged." +msgstr "" +"`X-Forwarded-For` можна вважати надійним лише тоді, коли весь webhook-" +"трафік проходить через довірений reverse proxy, який перезаписує цей " +"заголовок. Якщо ваш застосунок напряму доступний з Інтернету, цей " +"заголовок можна підробити." + +#: ../../dispatcher/webhook.rst:76 +msgid "For production deployments, use defense in depth:" +msgstr "Для production-деплойментів використовуйте багаторівневий захист:" + +#: ../../dispatcher/webhook.rst:78 +msgid "Always set and verify :code:`X-Telegram-Bot-Api-Secret-Token`" +msgstr "Завжди встановлюйте та перевіряйте :code:`X-Telegram-Bot-Api-Secret-Token`" + +#: ../../dispatcher/webhook.rst:79 +msgid "" +"Restrict network access to the webhook endpoint (firewall, security " +"groups, ACL)" +msgstr "" +"Обмежуйте мережевий доступ до webhook endpoint (firewall, security groups, " +"ACL)" + +#: ../../dispatcher/webhook.rst:80 +msgid "" +"Ensure the backend app is not publicly reachable and accepts requests only " +"from the trusted proxy" +msgstr "" +"Переконайтеся, що backend-застосунок не доступний публічно та приймає " +"запити лише від довіреного proxy" #: ../../dispatcher/webhook.rst:75 msgid "Examples" diff --git a/docs/locale/uk_UA/LC_MESSAGES/index.po b/docs/locale/uk_UA/LC_MESSAGES/index.po index 496a6c50..808c81a9 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 01:15+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,42 +21,42 @@ msgstr "" msgid "aiogram" msgstr "" -#: ../../../README.rst:-1 +#: ../../../README.rst:5 msgid "MIT License" msgstr "" -#: ../../../README.rst:-1 +#: ../../../README.rst:9 msgid "PyPi status" msgstr "" -#: ../../../README.rst:-1 +#: ../../../README.rst:13 msgid "PyPi Package Version" msgstr "" -#: ../../../README.rst:-1 +#: ../../../README.rst:17 msgid "Downloads" msgstr "Завантаження" -#: ../../../README.rst:-1 +#: ../../../README.rst:21 msgid "Supported python versions" msgstr "Підтримувані версії Python" -#: ../../../README.rst:-1 +#: ../../../README.rst:25 msgid "Telegram Bot API" msgstr "" -#: ../../../README.rst:-1 +#: ../../../README.rst:29 msgid "Tests" msgstr "Тести" -#: ../../../README.rst:-1 +#: ../../../README.rst:33 msgid "Codecov" -msgstr "" +msgstr "Покриття коду" #: ../../../README.rst:37 msgid "" "**aiogram** is a modern and fully asynchronous framework for `Telegram " -"Bot API `_ written in Python 3.8 " +"Bot API `_ written in Python 3.8+ " "using `asyncio `_ and " "`aiohttp `_." msgstr "" @@ -70,7 +70,7 @@ msgstr "" msgid "Make your bots faster and more powerful!" msgstr "Зробіть своїх ботів швидшими та потужнішими!" -#: ../../../README.rst:47 +#: ../../../README.rst:44 msgid "Documentation:" msgstr "Документація" @@ -107,12 +107,11 @@ msgid "Supports `PyPy `_" msgstr "Працює з `PyPy `_" #: ../../../README.rst:55 -#, fuzzy msgid "" -"Supports `Telegram Bot API 7.0 `_ and" +"Supports `Telegram Bot API 8.3 `_ and" " gets fast updates to the latest versions of the Bot API" msgstr "" -"Підтримує `Telegram Bot API 6.3 `_ та" +"Підтримує найсвіжішу версію `Telegram Bot API `_ та" " швидко отримує оновлення до нових версії АПІ" #: ../../../README.rst:56 @@ -173,7 +172,7 @@ msgstr "" #: ../../../README.rst:71 msgid "If you have any questions, you can visit our community chats on Telegram:" -msgstr "Якщо є якість додаткові запитання, ласкаво просимо до онлайн-спільнот:" +msgstr "Якщо є додаткові запитання, ласкаво просимо до онлайн-спільнот:" #: ../../../README.rst:73 msgid "🇺🇸 `@aiogram `_" @@ -211,6 +210,14 @@ msgstr "" msgid "Simple usage" msgstr "Приклад використання" -#: ../../index.rst:9 +#: ../../index.rst:10 +msgid "Usage without dispatcher" +msgstr "Використання без диспетчера" + +#: ../../index.rst:12 +msgid "Just only interact with Bot API, without handling events" +msgstr "Тільки взаємодія з АПІ, без обробки подій" + +#: ../../index.rst:18 msgid "Contents" msgstr "Зміст" diff --git a/docs/locale/uk_UA/LC_MESSAGES/install.po b/docs/locale/uk_UA/LC_MESSAGES/install.po index 438b02d4..c61cbb4e 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/install.po +++ b/docs/locale/uk_UA/LC_MESSAGES/install.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-30 18:31+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: 2022-10-14 00:10+0300\n" "Last-Translator: \n" "Language: uk_UA\n" @@ -17,13 +17,13 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../install.rst:3 msgid "Installation" msgstr "Встановлення" -#: ../../install.rst:6 ../../install.rst:23 +#: ../../install.rst:6 msgid "From PyPI" msgstr "З PyPI" @@ -31,10 +31,16 @@ msgstr "З PyPI" msgid "From Arch Linux Repository" msgstr "З репозиторію Arch Linux" -#: ../../install.rst:20 -msgid "Development build (3.x)" +#: ../../install.rst:15 +msgid "" +"Package in this repository may be outdated. Use PyPI package for the " +"latest version." +msgstr "" + +#: ../../install.rst:22 +msgid "Development build" msgstr "Бета-версія (3.х)" -#: ../../install.rst:30 +#: ../../install.rst:25 msgid "From GitHub" msgstr "З GitHub" diff --git a/docs/locale/uk_UA/LC_MESSAGES/migration_2_to_3.po b/docs/locale/uk_UA/LC_MESSAGES/migration_2_to_3.po index 2ffb754f..fdcc86e8 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/migration_2_to_3.po +++ b/docs/locale/uk_UA/LC_MESSAGES/migration_2_to_3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-08 19:04+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: 2023-09-14 18:34+0300\n" "Last-Translator: \n" "Language: uk_UA\n" @@ -17,17 +17,17 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" -#: ../../migration_2_to_3.rst:3 +#: ../../migration_2_to_3.rst:7 msgid "Migration FAQ (2.x -> 3.0)" msgstr "FAQ по переходу з версії 2.x на 3.0" -#: ../../migration_2_to_3.rst:7 +#: ../../migration_2_to_3.rst:11 msgid "This guide is still in progress." msgstr "Цей посібник все ще в розробці." -#: ../../migration_2_to_3.rst:9 +#: ../../migration_2_to_3.rst:13 msgid "" "This version introduces numerous breaking changes and architectural " "improvements. It helps reduce the count of global variables in your code," @@ -42,7 +42,7 @@ msgstr "" "покращень, він робить проміжне програмне забезпечення (мідлварі) та " "фільтри більш контрольованими." -#: ../../migration_2_to_3.rst:15 +#: ../../migration_2_to_3.rst:19 msgid "" "On this page, you can read about the changes made in relation to the last" " stable 2.x version." @@ -50,7 +50,7 @@ msgstr "" "На цій сторінці ви можете прочитати про зміни, внесені в останню " "стабільну версію 2.x." -#: ../../migration_2_to_3.rst:19 +#: ../../migration_2_to_3.rst:23 msgid "" "This page more closely resembles a detailed changelog than a migration " "guide, but it will be updated in the future." @@ -58,7 +58,7 @@ msgstr "" "Ця сторінка більше нагадує детальний список змін, ніж посібник з " "міграції, але вона буде оновлюватися в майбутньому." -#: ../../migration_2_to_3.rst:22 +#: ../../migration_2_to_3.rst:26 msgid "" "Feel free to contribute to this page, if you find something that is not " "mentioned here." @@ -66,14 +66,29 @@ msgstr "" "Не соромтеся зробити свій внесок у цю сторінку, якщо ви знайшли щось, про" " що тут не згадано." -#: ../../migration_2_to_3.rst:26 -msgid "Dispatcher" +#: ../../migration_2_to_3.rst:29 +msgid "Dependencies" +msgstr "Залежності" + +#: ../../migration_2_to_3.rst:31 +msgid "" +"The dependencies required for :code:`i18n` are no longer part of the " +"default package. If your application uses translation functionality, be " +"sure to add an optional dependency:" +msgstr "Залежності, необхідні для :code:`i18n`, більше не є частиною пакету за замовчуванням. Якщо ваш додаток використовує функціональність перекладу, обов'язково додайте необов'язкову залежність:" + +#: ../../migration_2_to_3.rst:34 +msgid ":code:`pip install aiogram[i18n]`" msgstr "" -#: ../../migration_2_to_3.rst:28 +#: ../../migration_2_to_3.rst:38 +msgid "Dispatcher" +msgstr "Диспетчер" + +#: ../../migration_2_to_3.rst:40 msgid "" -"The :class:`Dispatcher` class no longer accepts a `Bot` instance in its " -"initializer. Instead, the `Bot` instance should be passed to the " +"The |Dispatcher| class no longer accepts a |Bot| instance in its " +"initializer. Instead, the |Bot| instance should be passed to the " "dispatcher only for starting polling or handling events from webhooks. " "This approach also allows for the use of multiple bot instances " "simultaneously (\"multibot\")." @@ -84,24 +99,18 @@ msgstr "" "також дозволяє використовувати декілька екземплярів бота одночасно " "(\"мультибот\")." -#: ../../migration_2_to_3.rst:32 +#: ../../migration_2_to_3.rst:44 msgid "" -":class:`Dispatcher` now can be extended with another Dispatcher-like " -"thing named :class:`Router` (:ref:`Read more » `)." +"|Dispatcher| now can be extended with another Dispatcher-like thing named" +" |Router|. With routes, you can easily modularize your code and " +"potentially share these modules between projects. (:ref:`Read more » " +"`.)" msgstr "" "Клас :class:`Dispatcher` тепер можна розширити ще одним об'єктом на " "кшталт диспетчера з назвою :class:`Router` (:ref:`Детальніше » `)." -#: ../../migration_2_to_3.rst:34 -msgid "" -"With routes, you can easily modularize your code and potentially share " -"these modules between projects." -msgstr "" -"За допомогою роутерів ви можете легко модулювати свій код і потенційно " -"перевикористовувати ці модулі між проектами." - -#: ../../migration_2_to_3.rst:35 +#: ../../migration_2_to_3.rst:47 msgid "" "Removed the **_handler** suffix from all event handler decorators and " "registering methods. (:ref:`Read more » `)" @@ -109,16 +118,15 @@ msgstr "" "Видалено суфікс **_handler** з усіх декораторів обробників подій та " "методів реєстрації. (:ref:`Детальніше » `)" -#: ../../migration_2_to_3.rst:37 -#, fuzzy +#: ../../migration_2_to_3.rst:49 msgid "" -"The Executor has been entirely removed; you can now use the Dispatcher " -"directly to start poll the API or handle webhooks from it." +"The :class:`Executor` has been entirely removed; you can now use the " +"|Dispatcher| directly to start poll the API or handle webhooks from it." msgstr "" "Executor було повністю вилучено; тепер ви можете використовувати " "Dispatcher безпосередньо для запуску полінгу або обробки вебхуків." -#: ../../migration_2_to_3.rst:38 +#: ../../migration_2_to_3.rst:50 msgid "" "The throttling method has been completely removed; you can now use " "middlewares to control the execution context and implement any throttling" @@ -129,13 +137,13 @@ msgstr "" "керування контекстом виконання та реалізовувати будь-який механізм " "дроселювання за вашим бажанням." -#: ../../migration_2_to_3.rst:40 +#: ../../migration_2_to_3.rst:52 msgid "" -"Removed global context variables from the API types, Bot and Dispatcher " -"object, From now on, if you want to access the current bot instance " -"within handlers or filters, you should accept the argument :code:`bot: " -"Bot` and use it instead of :code:`Bot.get_current()`. In middlewares, it " -"can be accessed via :code:`data[\"bot\"]`." +"Removed global context variables from the API types, |Bot| and " +"|Dispatcher| object. From now on, if you want to access the current bot " +"instance within handlers or filters, you should accept the argument " +":code:`bot: Bot` and use it instead of :code:`Bot.get_current()`. In " +"middlewares, it can be accessed via :code:`data[\"bot\"]`." msgstr "" "Вилучено глобальні контекстні змінні з типів API, об'єктів Bot та " "Dispatcher, Відтепер, якщо ви хочете отримати доступ до поточного " @@ -144,10 +152,11 @@ msgstr "" ":code:`Bot.get_current()`. У проміжному програмному забезпеченні " "(middleware) доступ до нього можна отримати через :code:`data[\"bot\"]`." -#: ../../migration_2_to_3.rst:44 +#: ../../migration_2_to_3.rst:56 +#, fuzzy msgid "" "To skip pending updates, you should now call the " -":class:`aiogram.methods.delete_webhook.DeleteWebhook` method directly, " +":class:`~aiogram.methods.delete_webhook.DeleteWebhook` method directly, " "rather than passing :code:`skip_updates=True` to the start polling " "method." msgstr "" @@ -155,11 +164,19 @@ msgstr "" ":class:`aiogram.methods.delete_webhook.DeleteWebhook` безпосередньо, а не" " передавати :code:`skip_updates=True` до методу запуску полінгу." -#: ../../migration_2_to_3.rst:49 +#: ../../migration_2_to_3.rst:57 +msgid "" +"To feed updates to the |Dispatcher|, instead of method " +":meth:`process_update`, you should use method " +":meth:`~aiogram.dispatcher.dispatcher.Dispatcher.feed_update`. " +"(:ref:`Read more » `)" +msgstr "" + +#: ../../migration_2_to_3.rst:63 msgid "Filtering events" msgstr "Фільтрація подій" -#: ../../migration_2_to_3.rst:51 +#: ../../migration_2_to_3.rst:65 msgid "" "Keyword filters can no longer be used; use filters explicitly. (`Read " "more » `_)" @@ -168,7 +185,7 @@ msgstr "" "використовуйте фільтри явно. (`Детальніше » " "`_)" -#: ../../migration_2_to_3.rst:52 +#: ../../migration_2_to_3.rst:66 msgid "" "Due to the removal of keyword filters, all previously enabled-by-default " "filters (such as state and content_type) are now disabled. You must " @@ -182,7 +199,7 @@ msgstr "" "замість :code:`@dp.message_handler(content_types=ContentType.PHOTO)` слід" " використовувати :code:`@router.message(F.photo)`." -#: ../../migration_2_to_3.rst:57 +#: ../../migration_2_to_3.rst:71 #, fuzzy msgid "" "Most common filters have been replaced with the \"magic filter.\" " @@ -191,7 +208,7 @@ msgstr "" "Більшість звичайних фільтрів було замінено на \"магічний фільтр\". " "(:ref:`Детальніше далі » `)" -#: ../../migration_2_to_3.rst:58 +#: ../../migration_2_to_3.rst:72 msgid "" "By default, the message handler now receives any content type. If you " "want a specific one, simply add the appropriate filters (Magic or any " @@ -201,7 +218,7 @@ msgstr "" " Якщо вам потрібен певний тип, просто додайте відповідні фільтри (Magic " "або будь-який інший)." -#: ../../migration_2_to_3.rst:60 +#: ../../migration_2_to_3.rst:74 msgid "" "The state filter is no longer enabled by default. This means that if you " "used :code:`state=\"*\"` in v2, you should not pass any state filter in " @@ -213,7 +230,7 @@ msgstr "" "фільтр стану у v3. І навпаки, якщо стан не було вказано у v2, вам " "потрібно буде вказати його у v3." -#: ../../migration_2_to_3.rst:63 +#: ../../migration_2_to_3.rst:77 msgid "" "Added the possibility to register global filters for each router, which " "helps to reduce code repetition and provides an easier way to control the" @@ -223,11 +240,11 @@ msgstr "" "допомагає зменшити повторення коду і полегшує контроль призначення " "кожного роутера." -#: ../../migration_2_to_3.rst:69 +#: ../../migration_2_to_3.rst:83 msgid "Bot API" msgstr "" -#: ../../migration_2_to_3.rst:71 +#: ../../migration_2_to_3.rst:85 msgid "" "All API methods are now classes with validation, implemented via " "`pydantic `. These API calls are also " @@ -237,7 +254,7 @@ msgstr "" "`pydantic `. Ці виклики API також доступні як" " методи в класі Bot." -#: ../../migration_2_to_3.rst:74 +#: ../../migration_2_to_3.rst:88 msgid "" "More pre-defined Enums have been added and moved to the `aiogram.enums` " "sub-package. For example, the chat type enum is now " @@ -249,7 +266,7 @@ msgstr "" ":class:`aiogram.enums.ChatType` замість " ":class:`aiogram.types.chat.ChatType`." -#: ../../migration_2_to_3.rst:76 +#: ../../migration_2_to_3.rst:90 msgid "" "The HTTP client session has been separated into a container that can be " "reused across different Bot instances within the application." @@ -257,7 +274,7 @@ msgstr "" "Клієнтська сесія HTTP була відокремлена в контейнер, який можна повторно " "використовувати для різних екземплярів бота в додатку." -#: ../../migration_2_to_3.rst:78 +#: ../../migration_2_to_3.rst:92 msgid "" "API Exceptions are no longer classified by specific messages, as Telegram" " has no documented error codes. However, all errors are classified by " @@ -273,11 +290,11 @@ msgstr "" " випадків слід перевіряти лише тип помилки (за кодом статусу), не " "перевіряючи повідомлення про помилку." -#: ../../migration_2_to_3.rst:88 +#: ../../migration_2_to_3.rst:102 msgid "Middlewares" msgstr "Проміжне ПО (Middlewares)" -#: ../../migration_2_to_3.rst:90 +#: ../../migration_2_to_3.rst:104 msgid "" "Middlewares can now control an execution context, e.g., using context " "managers. (:ref:`Read more » `)" @@ -286,7 +303,7 @@ msgstr "" " наприклад, за допомогою менеджерів контексту. (:ref:`Детальніше » " "`)" -#: ../../migration_2_to_3.rst:92 +#: ../../migration_2_to_3.rst:106 msgid "" "All contextual data is now shared end-to-end between middlewares, " "filters, and handlers. For example now you can easily pass some data into" @@ -299,7 +316,7 @@ msgstr "" "забезпеченні і отримати їх у шарі фільтрів так само, як і в обробниках " "через аргументи ключових слів." -#: ../../migration_2_to_3.rst:95 +#: ../../migration_2_to_3.rst:109 msgid "" "Added a mechanism named **flags** that helps customize handler behavior " "in conjunction with middlewares. (:ref:`Read more » `)" @@ -308,11 +325,11 @@ msgstr "" "поведінку обробника у поєднанні з проміжним програмним забезпеченням. " "(:ref:`Детальніше про » `)" -#: ../../migration_2_to_3.rst:100 +#: ../../migration_2_to_3.rst:114 msgid "Keyboard Markup" msgstr "Розмітка клавіатури" -#: ../../migration_2_to_3.rst:102 +#: ../../migration_2_to_3.rst:116 msgid "" "Now :class:`aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup` " "and :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup` no " @@ -329,11 +346,11 @@ msgstr "" ":class:`aiogram.utils.keyboard.InlineKeyboardBuilder` відповідно " "(:ref:`Детальніше » `)" -#: ../../migration_2_to_3.rst:110 +#: ../../migration_2_to_3.rst:124 msgid "Callbacks data" -msgstr "" +msgstr "Дані зворотного виклику" -#: ../../migration_2_to_3.rst:112 +#: ../../migration_2_to_3.rst:126 msgid "" "The callback data factory is now strictly typed using `pydantic " "`_ models. (:ref:`Read more » `_. (:ref:`Детальніше » " "`)" -#: ../../migration_2_to_3.rst:117 +#: ../../migration_2_to_3.rst:131 msgid "Finite State machine" msgstr "Скінченний автомат" -#: ../../migration_2_to_3.rst:119 +#: ../../migration_2_to_3.rst:133 msgid "" "State filters will no longer be automatically added to all handlers; you " "will need to specify the state if you want to use it." @@ -356,37 +373,30 @@ msgstr "" "обробників; вам потрібно буде вказати стан, якщо ви хочете його " "використати." -#: ../../migration_2_to_3.rst:121 +#: ../../migration_2_to_3.rst:135 msgid "" "Added the possibility to change the FSM strategy. For example, if you " "want to control the state for each user based on chat topics rather than " -"the user in a chat, you can specify this in the Dispatcher." +"the user in a chat, you can specify this in the |Dispatcher|." msgstr "" "Додано можливість змінювати стратегію FSM. Наприклад, якщо ви хочете " "контролювати стан для кожного користувача на основі топіків чату, а не " "користувача в чаті, ви можете вказати це в Диспетчері." -#: ../../migration_2_to_3.rst:124 +#: ../../migration_2_to_3.rst:138 +#, fuzzy msgid "" "Now :class:`aiogram.fsm.state.State` and " ":class:`aiogram.fsm.state.StateGroup` don't have helper methods like " -":code:`.set()`, :code:`.next()`, etc." +":code:`.set()`, :code:`.next()`, etc. Instead, you should set states by " +"passing them directly to :class:`aiogram.fsm.context.FSMContext` " +"(:ref:`Read more » `)" msgstr "" "Тепер :class:`aiogram.fsm.state.State` та " ":class:`aiogram.fsm.state.StateGroup` не мають допоміжних методів, таких " "як :code:`.set()`, :code:`.next()` тощо." -#: ../../migration_2_to_3.rst:127 -msgid "" -"Instead, you should set states by passing them directly to " -":class:`aiogram.fsm.context.FSMContext` (:ref:`Read more » `)" -msgstr "" -"Замість цього вам слід встановлювати стани, передаючи їх безпосередньо до" -" :class:`aiogram.fsm.context.FSMContext` (:ref:`Детальніше » `)" - -#: ../../migration_2_to_3.rst:129 +#: ../../migration_2_to_3.rst:142 msgid "" "The state proxy is deprecated; you should update the state data by " "calling :code:`state.set_data(...)` and :code:`state.get_data()` " @@ -395,11 +405,11 @@ msgstr "" "Проксі стану є застарілим; вам слід оновити дані стану, викликавши " ":code:`state.set_data(...)` та :code:`state.get_data()` відповідно." -#: ../../migration_2_to_3.rst:134 +#: ../../migration_2_to_3.rst:147 msgid "Sending Files" msgstr "Надсилання файлів" -#: ../../migration_2_to_3.rst:136 +#: ../../migration_2_to_3.rst:149 msgid "" "From now on, you should wrap files in an InputFile object before sending " "them, instead of passing the IO object directly to the API method. " @@ -409,38 +419,129 @@ msgstr "" "замість того, щоб передавати об'єкт вводу-виводу безпосередньо до методу " "API. (:ref:`Детальніше » `)" -#: ../../migration_2_to_3.rst:141 +#: ../../migration_2_to_3.rst:154 msgid "Webhook" -msgstr "" +msgstr "Вебхук" -#: ../../migration_2_to_3.rst:143 +#: ../../migration_2_to_3.rst:156 msgid "The aiohttp web app configuration has been simplified." msgstr "Спрощено налаштування веб-застосунку aiohttp." -#: ../../migration_2_to_3.rst:144 +#: ../../migration_2_to_3.rst:157 msgid "" "By default, the ability to upload files has been added when you `make " "requests in response to updates `_ (available for webhook " "only)." -msgstr "" +msgstr "За замовчуванням додана можливість завантаження файлів при `відповідях на оновлення `_ (доступно тільки для вебхука)." -#: ../../migration_2_to_3.rst:148 +#: ../../migration_2_to_3.rst:161 msgid "Telegram API Server" msgstr "Сервер Telegram API" -#: ../../migration_2_to_3.rst:150 +#: ../../migration_2_to_3.rst:163 +#, fuzzy msgid "" -"The `server` parameter has been moved from the `Bot` instance to `api` in" -" `BaseSession`." +"The :obj:`server` parameter has been moved from the |Bot| instance to " +":obj:`api` parameter of the " +":class:`~aiogram.client.session.base.BaseSession`." msgstr "" "Параметр `server` було перенесено з екземпляра `Bot` до `api` в " "`BaseSession`." -#: ../../migration_2_to_3.rst:151 +#: ../../migration_2_to_3.rst:164 +#, fuzzy msgid "" -"The constant `aiogram.bot.api.TELEGRAM_PRODUCTION` has been moved to " -"`aiogram.client.telegram.PRODUCTION`." +"The constant :obj:`aiogram.bot.api.TELEGRAM_PRODUCTION` has been moved to" +" :obj:`aiogram.client.telegram.PRODUCTION`." msgstr "" "Константа `aiogram.bot.api.TELEGRAM_PRODUCTION` була переміщена на " "`aiogram.client.telegram.PRODUCTION`." + +#: ../../migration_2_to_3.rst:168 +msgid "Telegram objects transformation (to dict, to json, from json)" +msgstr "Перетворення об'єктів Telegram (у словник, у json, з json)" + +#: ../../migration_2_to_3.rst:170 +msgid "" +"Methods :code:`TelegramObject.to_object()`, " +":code:`TelegramObject.to_json()` and :code:`TelegramObject.to_python()` " +"have been removed due to the use of `pydantic " +"`_ models." +msgstr "Методи :code:`TelegramObject.to_object()`, :code:`TelegramObject.to_json()` та :code:`TelegramObject.to_python()` були вилучені через використання моделей `pydantic `_." + + +#: ../../migration_2_to_3.rst:172 +msgid "" +":code:`TelegramObject.to_object()` should be replaced by " +":code:`TelegramObject.model_validate()` (`Read more " +"`_)" +msgstr ":code:`TelegramObject.to_object()` слід замінити на " +":code:`TelegramObject.model_validate()` (`Детальніше " +"`_)" + +#: ../../migration_2_to_3.rst:174 +msgid "" +":code:`TelegramObject.as_json()` should be replaced by " +":func:`aiogram.utils.serialization.deserialize_telegram_object_to_python`" +msgstr ":code:`TelegramObject.as_json()` слід замінити на " +":func:`aiogram.utils.serialization.deserialize_telegram_object_to_python`" + +#: ../../migration_2_to_3.rst:175 +msgid "" +":code:`.to_python()` should be replaced by " +":code:`json.dumps(deserialize_telegram_object_to_python())`" +msgstr ":code:`.to_python()` слід замінити на " +":code:`json.dumps(deserialize_telegram_object_to_python())`" + + +#: ../../migration_2_to_3.rst:177 +msgid "Here are some usage examples:" +msgstr "Ось деякі приклади використання:" + +#: ../../migration_2_to_3.rst:179 +msgid "Creating an object from a dictionary representation of an object" +msgstr "Створення об'єкта з представлення об'єкта у вигляді словника" + +#: ../../migration_2_to_3.rst:201 +msgid "Creating a json representation of an object" +msgstr "Cтворення представлення об'єкта у вигляді json" + +#: ../../migration_2_to_3.rst:223 +msgid "Creating a dictionary representation of an object" +msgstr "Створення представлення об'єкта у вигляді словника" + +#: ../../migration_2_to_3.rst:247 +msgid "ChatMember tools" +msgstr "Інструменти ChatMember" + +#: ../../migration_2_to_3.rst:249 +msgid "" +"Now :class:`aiogram.types.chat_member.ChatMember` no longer contains " +"tools to resolve an object with the appropriate status." +msgstr "Тепер :class:`aiogram.types.chat_member.ChatMember` більше не містить " +"інструментів для вирішення об'єкта з відповідним статусом." + +#: ../../migration_2_to_3.rst:266 +msgid "" +"Now :class:`aiogram.types.chat_member.ChatMember` and all its child " +"classes no longer contain methods for checking for membership in certain " +"logical groups. As a substitute, you can use pre-defined groups or create" +" such groups yourself and check their entry using the :func:`isinstance` " +"function" +msgstr "Відтепер :class:`aiogram.types.chat_member.ChatMember` та всі його " +"дочірні класи більше не містять методів для перевірки належності до певних логічних груп. " +"Замість цього ви можете використовувати попередньо визначені групи або створювати такі " +"групи самостійно та перевіряти їх входження за допомогою функції :func:`isinstance`" + +#: ../../migration_2_to_3.rst:294 +msgid "" +"You also can independently create group similar to ADMINS that fits the " +"logic of your application." +msgstr "Також ви можете самостійно створити групу, подібну до ADMINS, яка відповідає логіці вашого застосунку." + +#: ../../migration_2_to_3.rst:296 +msgid "" +"E.g., you can create a PUNISHED group and include banned and restricted " +"members there!" +msgstr "Наприклад, ви можете створити групу PUNISHED та включити туди заблокованих та обмежених учасників!" diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/callback_answer.po b/docs/locale/uk_UA/LC_MESSAGES/utils/callback_answer.po index 2adc4af9..3bd4280c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/utils/callback_answer.po +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/callback_answer.po @@ -202,4 +202,3 @@ msgstr "" #: aiogram.utils.callback_answer.CallbackAnswer.cache_time:1 of msgid "Response cache time" msgstr "" - diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/chat_action.po b/docs/locale/uk_UA/LC_MESSAGES/utils/chat_action.po index 4140fc79..6748aef8 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/utils/chat_action.po +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/chat_action.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-11-16 02:34+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: 2022-10-13 21:22+0300\n" "Last-Translator: \n" "Language-Team: \n" @@ -48,7 +48,7 @@ msgstr "" "працює до завершення дії та надсилає `дію чату " "`_ кожні 5 секунд." -#: aiogram.utils.chat_action.ChatActionSender.__init__ of +#: ../../utils/chat_action.rst msgid "Parameters" msgstr "Параметри" @@ -61,14 +61,18 @@ msgid "target chat id" msgstr "ідентифікатор цільового чату" #: aiogram.utils.chat_action.ChatActionSender.__init__:3 of +msgid "unique identifier for the target message thread; supergroups only" +msgstr "" + +#: aiogram.utils.chat_action.ChatActionSender.__init__:4 of msgid "chat action type" msgstr "тип дії" -#: aiogram.utils.chat_action.ChatActionSender.__init__:4 of +#: aiogram.utils.chat_action.ChatActionSender.__init__:5 of msgid "interval between iterations" msgstr "інтервал між ітераціями" -#: aiogram.utils.chat_action.ChatActionSender.__init__:5 of +#: aiogram.utils.chat_action.ChatActionSender.__init__:6 of #, fuzzy msgid "sleep before first sending of the action" msgstr "затримка перед першою ітерацією" diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/formatting.po b/docs/locale/uk_UA/LC_MESSAGES/utils/formatting.po index a61c73e0..222e9569 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/utils/formatting.po +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/formatting.po @@ -8,22 +8,22 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-30 18:31+0300\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: Українська \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.1\n" #: ../../utils/formatting.rst:5 msgid "Formatting" -msgstr "" +msgstr "Форматування" #: ../../utils/formatting.rst:7 msgid "Make your message formatting flexible and simple" -msgstr "" +msgstr "Зробіть форматування ваших повідомлень гнучким і простим" #: ../../utils/formatting.rst:9 msgid "" @@ -32,22 +32,27 @@ msgid "" "the Telegram without the need to remember tag parity (opening and " "closing) or escaping user input." msgstr "" +"Цей інструмент працює на основі сутностей повідомлень, а не " +"використовуючи HTML чи розмітку Markdown, ви можете легко створити своє " +"повідомлення та надіслати його у Telegram без необхідності пам'ятати про " +"парність тегів (відкриття та закриття) або про екранування " +"користувацького вводу." #: ../../utils/formatting.rst:14 msgid "Usage" -msgstr "" +msgstr "Використання" #: ../../utils/formatting.rst:17 msgid "Basic scenario" -msgstr "" +msgstr "Основний сценарій" #: ../../utils/formatting.rst:19 msgid "Construct your message and send it to the Telegram." -msgstr "" +msgstr "Складіть своє повідомлення та надішліть його у Telegram." #: ../../utils/formatting.rst:26 msgid "Is the same as the next example, but without usage markup" -msgstr "" +msgstr "Такий самий, як наступний приклад, але без використання розмітки" #: ../../utils/formatting.rst:35 msgid "" @@ -56,16 +61,22 @@ msgid "" ":code:`[MessageEntity(type='bold', offset=7, length=4)]` and passed into " "dict which can be used as :code:`**kwargs` in API call." msgstr "" +"Дослівно, коли ви виконуєте метод :code:`as_kwargs`, об'єкт Text " +"перетворюється у текст :code:`Hello, Alex!` із списком сутностей " +":code:`[MessageEntity(type='bold', offset=7, length=4)]` і передається у " +"словник, який може бути використаний як :code:`**kwargs` в API-виклику." #: ../../utils/formatting.rst:39 msgid "" "The complete list of elements is listed `on this page below <#available-" "elements>`_." msgstr "" +"Повний список елементів наведено `на сторінці нижче <#available-" +"elements>`_." #: ../../utils/formatting.rst:42 msgid "Advanced scenario" -msgstr "" +msgstr "Розширений сценарій" #: ../../utils/formatting.rst:44 msgid "" @@ -73,145 +84,138 @@ msgid "" "so, out of the box aiogram has a few already implemented functions that " "helps you to format your messages:" msgstr "" +"На додаток до базових елементів можуть бути реалізовані структури " +"рендерингу контенту, тому з коробки aiogram надає декілька вже " +"реалізованих функцій, які допомагають форматувати ваші повідомлення:" #: aiogram.utils.formatting.as_line:1 of msgid "Wrap multiple nodes into line with :code:`\\\\n` at the end of line." -msgstr "" +msgstr "Об'єднайте кілька вузлів у рядок із :code:`\\\\n` в кінці рядка." -#: aiogram.utils.formatting.Text.as_kwargs -#: aiogram.utils.formatting.as_key_value aiogram.utils.formatting.as_line -#: aiogram.utils.formatting.as_list aiogram.utils.formatting.as_marked_list -#: aiogram.utils.formatting.as_marked_section -#: aiogram.utils.formatting.as_numbered_list -#: aiogram.utils.formatting.as_numbered_section -#: aiogram.utils.formatting.as_section of +#: ../../utils/formatting.rst msgid "Parameters" -msgstr "" +msgstr "Параметри" #: aiogram.utils.formatting.as_line:3 of msgid "Text or Any" -msgstr "" +msgstr "Текст або Інше" #: aiogram.utils.formatting.as_line:4 of msgid "ending of the line, by default is :code:`\\\\n`" -msgstr "" +msgstr "завершення рядка, за замовчуванням :code:`\\\\n`" #: aiogram.utils.formatting.as_line:5 of msgid "separator between items, by default is empty string" -msgstr "" +msgstr "роздільник між елементами, за замовчуванням порожній рядок" -#: aiogram.utils.formatting.Text.as_kwargs aiogram.utils.formatting.Text.render -#: aiogram.utils.formatting.as_key_value aiogram.utils.formatting.as_line -#: aiogram.utils.formatting.as_list aiogram.utils.formatting.as_marked_list -#: aiogram.utils.formatting.as_marked_section -#: aiogram.utils.formatting.as_numbered_list -#: aiogram.utils.formatting.as_numbered_section -#: aiogram.utils.formatting.as_section of +#: ../../utils/formatting.rst msgid "Returns" -msgstr "" +msgstr "Повертає" #: aiogram.utils.formatting.as_key_value:5 aiogram.utils.formatting.as_line:6 #: aiogram.utils.formatting.as_marked_list:5 #: aiogram.utils.formatting.as_numbered_list:6 #: aiogram.utils.formatting.as_section:5 of msgid "Text" -msgstr "" +msgstr "Текст" #: aiogram.utils.formatting.as_list:1 of msgid "Wrap each element to separated lines" -msgstr "" +msgstr "Обгорніть кожен елемент у окремий рядок" #: aiogram.utils.formatting.as_marked_list:1 of msgid "Wrap elements as marked list" -msgstr "" +msgstr "Обгорніть елементи у маркований список" #: aiogram.utils.formatting.as_marked_list:4 of msgid "line marker, by default is '- '" -msgstr "" +msgstr "маркер рядка, за замовчуванням '- '" #: aiogram.utils.formatting.as_numbered_list:1 of msgid "Wrap elements as numbered list" -msgstr "" +msgstr "Обгорніть елементи у нумерований список" #: aiogram.utils.formatting.as_numbered_list:4 of msgid "initial number, by default 1" -msgstr "" +msgstr "початковий номер, за замовчуванням 1" #: aiogram.utils.formatting.as_numbered_list:5 of msgid "number format, by default '{}. '" -msgstr "" +msgstr "формат номера, за замовчуванням '{}. '" #: aiogram.utils.formatting.as_section:1 of msgid "Wrap elements as simple section, section has title and body" -msgstr "" +msgstr "Обгорніть елементи у простий розділ, розділ має заголовок та тіло" #: aiogram.utils.formatting.as_marked_section:1 of msgid "Wrap elements as section with marked list" -msgstr "" +msgstr "Обгорніть елементи у розділ із маркованим списком" #: aiogram.utils.formatting.as_numbered_section:1 of msgid "Wrap elements as section with numbered list" -msgstr "" +msgstr "Обгорніть елементи у розділ із нумерованим списком" #: aiogram.utils.formatting.as_key_value:1 of msgid "Wrap elements pair as key-value line. (:code:`{key}: {value}`)" msgstr "" +"Обгорніть пари елементів у рядок ключ-значення. (:code:`{key}: " +"{value}`)" #: ../../utils/formatting.rst:64 msgid "and lets complete them all:" -msgstr "" +msgstr "і давайте завершимо їх всіх:" #: ../../utils/formatting.rst:92 msgid "Will be rendered into:" -msgstr "" +msgstr "Буде відрендерено у:" #: ../../utils/formatting.rst:94 msgid "**Success:**" -msgstr "" +msgstr "**Успішно:**" #: ../../utils/formatting.rst:96 msgid "✅ Test 1" -msgstr "" +msgstr "✅ Тест 1" #: ../../utils/formatting.rst:98 msgid "✅ Test 3" -msgstr "" +msgstr "✅ Тест 3" #: ../../utils/formatting.rst:100 msgid "✅ Test 4" -msgstr "" +msgstr "✅ Тест 4" #: ../../utils/formatting.rst:102 msgid "**Failed:**" -msgstr "" +msgstr "**Помилки:**" #: ../../utils/formatting.rst:104 msgid "❌ Test 2" -msgstr "" +msgstr "❌ Тест 2" #: ../../utils/formatting.rst:106 msgid "**Summary:**" -msgstr "" +msgstr "**Підсумки:**" #: ../../utils/formatting.rst:108 msgid "**Total**: 4" -msgstr "" +msgstr "**Загалом**: 4" #: ../../utils/formatting.rst:110 msgid "**Success**: 3" -msgstr "" +msgstr "**Успішно**: 3" #: ../../utils/formatting.rst:112 msgid "**Failed**: 1" -msgstr "" +msgstr "**Помилки**: 1" #: ../../utils/formatting.rst:114 msgid "#test" -msgstr "" +msgstr "#тест" #: ../../utils/formatting.rst:117 msgid "Or as HTML:" -msgstr "" +msgstr "Або як HTML:" #: ../../utils/formatting.rst:137 msgid "Available methods" @@ -226,8 +230,9 @@ msgid "Simple text element" msgstr "" #: aiogram.utils.formatting.Text.render:1 of +#, fuzzy msgid "Render elements tree as text with entities list" -msgstr "" +msgstr "Обгорніть елементи у розділ із нумерованим списком" #: aiogram.utils.formatting.Text.as_kwargs:1 of msgid "" @@ -247,9 +252,11 @@ msgstr "" msgid "Available elements" msgstr "" -#: aiogram.utils.formatting.Bold:1 aiogram.utils.formatting.BotCommand:1 -#: aiogram.utils.formatting.CashTag:1 aiogram.utils.formatting.Code:1 -#: aiogram.utils.formatting.CustomEmoji:1 aiogram.utils.formatting.Email:1 +#: aiogram.utils.formatting.BlockQuote:1 aiogram.utils.formatting.Bold:1 +#: aiogram.utils.formatting.BotCommand:1 aiogram.utils.formatting.CashTag:1 +#: aiogram.utils.formatting.Code:1 aiogram.utils.formatting.CustomEmoji:1 +#: aiogram.utils.formatting.Email:1 +#: aiogram.utils.formatting.ExpandableBlockQuote:1 #: aiogram.utils.formatting.HashTag:1 aiogram.utils.formatting.Italic:1 #: aiogram.utils.formatting.PhoneNumber:1 aiogram.utils.formatting.Pre:1 #: aiogram.utils.formatting.Spoiler:1 aiogram.utils.formatting.Strikethrough:1 @@ -441,3 +448,25 @@ msgid "" "with type " ":obj:`aiogram.enums.message_entity_type.MessageEntityType.CUSTOM_EMOJI`" msgstr "" + +#: aiogram.utils.formatting.BlockQuote:1 of +msgid "Block quote element." +msgstr "" + +#: aiogram.utils.formatting.BlockQuote:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.BLOCKQUOTE`" +msgstr "" + +#: aiogram.utils.formatting.ExpandableBlockQuote:1 of +msgid "Expandable block quote element." +msgstr "" + +#: aiogram.utils.formatting.ExpandableBlockQuote:3 of +msgid "" +"Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` " +"with type " +":obj:`aiogram.enums.message_entity_type.MessageEntityType.EXPANDABLE_BLOCKQUOTE`" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/media_group.po b/docs/locale/uk_UA/LC_MESSAGES/utils/media_group.po index adf8c7d2..5abe1dd6 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/utils/media_group.po +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/media_group.po @@ -288,4 +288,3 @@ msgstr "" #: aiogram.utils.media_group.MediaGroupBuilder.build:5 of msgid "List of media objects." msgstr "" - diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/serialization.po b/docs/locale/uk_UA/LC_MESSAGES/utils/serialization.po new file mode 100644 index 00000000..0a201722 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/serialization.po @@ -0,0 +1,146 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2025, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: uk_UA\n" +"Language-Team: uk_UA \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.1\n" + +#: ../../utils/serialization.rst:5 +msgid "Telegram object serialization" +msgstr "Серіалізація об'єкта Telegram" + +#: ../../utils/serialization.rst:8 +msgid "Serialization" +msgstr "Серіалізація" + +#: ../../utils/serialization.rst:10 +msgid "" +"To serialize Python object to Telegram object you can use pydantic " +"serialization methods, for example:" +msgstr "" +"Щоб перетворити об'єкт Python у об'єкт Telegram, ви можете використати " +"методи серіалізації pydantic, наприклад:" + +#: ../../utils/serialization.rst:17 +msgid "" +"If you want to bind serialized object to the Bot instance, you can use " +"context:" +msgstr "" +"Якщо ви хочете прив'язати серіалізований об'єкт до екземпляра бота, ви можете " +"використати контекст:" + +#: ../../utils/serialization.rst:26 +msgid "Deserialization" +msgstr "Десеріалізація" + +#: ../../utils/serialization.rst:28 +msgid "" +"In cases when you need to deserialize Telegram object to Python object, " +"you can use this module." +msgstr "" +"У випадках, коли вам потрібно перетворити об'єкт Telegram у об'єкт Python, " +"ви можете використати цей модуль." + +#: ../../utils/serialization.rst:30 +msgid "" +"To convert Telegram object to Python object excluding files you can use " +":func:`aiogram.utils.serialization.deserialize_telegram_object_to_python`" +" function." +msgstr "" +"Для перетворення об'єкта Telegram у об'єкт Python без врахування файлів ви " +"можете використати функцію " +":func:`aiogram.utils.serialization.deserialize_telegram_object_to_python`." + +#: aiogram.utils.serialization.deserialize_telegram_object_to_python:1 of +msgid "" +"Deserialize telegram object to JSON compatible Python object excluding " +"files." +msgstr "" +"Десеріалізуйте об'єкт Telegram у об'єкт Python, сумісний із JSON, без " +"врахування файлів." + +#: ../../utils/serialization.rst +msgid "Parameters" +msgstr "Параметри" + +#: aiogram.utils.serialization.deserialize_telegram_object_to_python:3 of +msgid "The telegram object to be deserialized." +msgstr "Об'єкт Telegram для десеріалізації." + +#: aiogram.utils.serialization.deserialize_telegram_object:4 +#: aiogram.utils.serialization.deserialize_telegram_object_to_python:4 of +msgid "" +"Default bot properties should be passed only if you want to use custom " +"defaults." +msgstr "" +"Властивості бота за замовчуванням потрібно передавати лише якщо ви хочете " +"використати власні значення за замовчуванням." + +#: aiogram.utils.serialization.deserialize_telegram_object:6 +#: aiogram.utils.serialization.deserialize_telegram_object_to_python:6 of +msgid "Whether to include the API method name in the result." +msgstr "Чи включати назву методу API в результат." + +#: ../../utils/serialization.rst +msgid "Returns" +msgstr "Повертає" + +#: aiogram.utils.serialization.deserialize_telegram_object_to_python:7 of +msgid "The deserialized telegram object." +msgstr "Десеріалізований об'єкт Telegram." + +#: ../../utils/serialization.rst:35 +msgid "" +"To convert Telegram object to Python object including files you can use " +":func:`aiogram.utils.serialization.deserialize_telegram_object` function," +" which returns " +":class:`aiogram.utils.serialization.DeserializedTelegramObject` object." +msgstr "" +"Для перетворення об'єкта Telegram у об'єкт Python, враховуючи файли, ви " +"можете використати функцію " +":func:`aiogram.utils.serialization.deserialize_telegram_object`, яка " +"повертає об'єкт " +":class:`aiogram.utils.serialization.DeserializedTelegramObject`." + +#: aiogram.utils.serialization.deserialize_telegram_object:1 of +msgid "Deserialize Telegram Object to JSON compatible Python object." +msgstr "Десеріалізуйте об'єкт Telegram у об'єкт Python, сумісний із JSON." + +#: aiogram.utils.serialization.deserialize_telegram_object:3 of +msgid "The object to be deserialized." +msgstr "Об'єкт для десеріалізації." + +#: aiogram.utils.serialization.deserialize_telegram_object:7 of +msgid "The deserialized Telegram object." +msgstr "Десеріалізований об'єкт Telegram." + +#: aiogram.utils.serialization.DeserializedTelegramObject:1 of +msgid "Represents a dumped Telegram object." +msgstr "Представляє вивантажений об'єкт Telegram." + +#: aiogram.utils.serialization.DeserializedTelegramObject:3 of +msgid "The dumped data of the Telegram object." +msgstr "Вивантажені дані об'єкта Telegram." + +#: aiogram.utils.serialization.DeserializedTelegramObject:5 of +msgid "" +"The dictionary containing the file names as keys and the corresponding " +"`InputFile` objects as values." +msgstr "" +"Словник, що містить імена файлів як ключі та відповідні об'єкти `InputFile` " +"як значення." diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/web_app.po b/docs/locale/uk_UA/LC_MESSAGES/utils/web_app.po index e8aeee8b..37ade259 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/utils/web_app.po +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/web_app.po @@ -5,18 +5,19 @@ # msgid "" msgstr "" -"Project-Id-Version: aiogram\n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-21 21:40+0200\n" +"POT-Creation-Date: 2025-03-08 02:28+0200\n" "PO-Revision-Date: 2024-03-04 17:30+0200\n" "Last-Translator: Leroy-Bit\n" -"Language-Team: \n" "Language: uk\n" +"Language-Team: \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.13.1\n" -"X-Generator: Poedit 3.4.2\n" #: ../../utils/web_app.rst:3 msgid "WebApp" @@ -32,13 +33,13 @@ msgstr "" #: ../../utils/web_app.rst:7 msgid "" -"You can read more details on it in the official `blog `_ and `documentation " -"`_." +"You can read more details on it in the official `blog " +"`_ and " +"`documentation `_." msgstr "" -"Ви можете прочитати більше про це в офіційному `блозі `_ та `документації `_." +"Ви можете прочитати більше про це в офіційному `блозі " +"`_ та " +"`документації `_." #: ../../utils/web_app.rst:10 msgid "" @@ -61,8 +62,8 @@ msgid "" msgstr "" "Наприклад, із фронтенду ви передасте :code:`application/x-www-form-" "urlencoded` в POST запиті із полем :code:`_auth` у тілі та хочете " -"повернути інформацію про користувача у відповідь як :code:`application/" -"json`" +"повернути інформацію про користувача у відповідь як " +":code:`application/json`" #: ../../utils/web_app.rst:35 msgid "Functions" @@ -80,9 +81,7 @@ msgstr "" "Джерело: https://core.telegram.org/bots/webapps#validating-data-received-" "via-the-web-app" -#: aiogram.utils.web_app.check_webapp_signature -#: aiogram.utils.web_app.parse_webapp_init_data -#: aiogram.utils.web_app.safe_parse_webapp_init_data of +#: ../../utils/web_app.rst msgid "Parameters" msgstr "Параметри" @@ -94,9 +93,7 @@ msgstr "Токен бота" msgid "data from frontend to be validated" msgstr "дані з фронтенду, що підлягають перевірці" -#: aiogram.utils.web_app.check_webapp_signature -#: aiogram.utils.web_app.parse_webapp_init_data -#: aiogram.utils.web_app.safe_parse_webapp_init_data of +#: ../../utils/web_app.rst msgid "Returns" msgstr "Повертає" @@ -119,11 +116,10 @@ msgid "data from frontend to be parsed" msgstr "дані з frontend для аналізу" #: aiogram.utils.web_app.safe_parse_webapp_init_data:1 of -msgid "" -"Validate raw WebApp init data and return it as WebAppInitData object" +msgid "Validate raw WebApp init data and return it as WebAppInitData object" msgstr "" -"Перевірка необроблених даних ініціалізації Веб Застосунку і повернення " -"їх як об’єкту WebAppInitData" +"Перевірка необроблених даних ініціалізації Веб Застосунку і повернення їх" +" як об’єкту WebAppInitData" #: aiogram.utils.web_app.safe_parse_webapp_init_data:3 of msgid "Raise :obj:`ValueError` when data is invalid" @@ -154,39 +150,13 @@ msgstr "" msgid "Source: https://core.telegram.org/bots/webapps#webappinitdata" msgstr "Джерело: https://core.telegram.org/bots/webapps#webappinitdata" -#: ../../docstring aiogram.utils.web_app.WebAppChat.model_config:1 -#: aiogram.utils.web_app.WebAppInitData.model_config:1 -#: aiogram.utils.web_app.WebAppUser.model_config:1 of -msgid "" -"Configuration for the model, should be a dictionary conforming to " -"[`ConfigDict`][pydantic.config.ConfigDict]." -msgstr "" -"Конфігурація для моделі має бути словником, що відповідає [`ConfigDict`]" -"[pydantic.config.ConfigDict]." - -#: ../../docstring aiogram.utils.web_app.WebAppChat.model_fields:1 -#: aiogram.utils.web_app.WebAppInitData.model_fields:1 -#: aiogram.utils.web_app.WebAppUser.model_fields:1 of -msgid "" -"Metadata about the fields defined on the model, mapping of field names " -"to [`FieldInfo`][pydantic.fields.FieldInfo]." -msgstr "" -"Метадані про поля, визначені на моделі, відображення назв полів у " -"[`FieldInfo`][pydantic.fields.FieldInfo]." - -#: ../../docstring aiogram.utils.web_app.WebAppChat.model_fields:4 -#: aiogram.utils.web_app.WebAppInitData.model_fields:4 -#: aiogram.utils.web_app.WebAppUser.model_fields:4 of -msgid "This replaces `Model.__fields__` from Pydantic V1." -msgstr "Це замінює `Model.__fields__` з Pydantic V1." - #: ../../docstring aiogram.utils.web_app.WebAppInitData.query_id:1 of msgid "" "A unique identifier for the Web App session, required for sending " "messages via the answerWebAppQuery method." msgstr "" -"Унікальний ідентифікатор сеансу Веб Застосунку, необхідний для " -"надсилання повідомлень через метод answerWebAppQuery." +"Унікальний ідентифікатор сеансу Веб Застосунку, необхідний для надсилання" +" повідомлень через метод answerWebAppQuery." #: ../../docstring aiogram.utils.web_app.WebAppInitData.user:1 of msgid "An object containing data about the current user." @@ -199,8 +169,8 @@ msgid "" "only for Web Apps launched via the attachment menu." msgstr "" "Об'єкт, що містить дані про співрозмовника поточного користувача в чаті, " -"де бот був запущений через меню вкладення. Повертається тільки для веб-" -"додатків, запущених через меню вкладень." +"де бот був запущений через меню вкладення. Повертається тільки для " +"веб-додатків, запущених через меню вкладень." #: ../../docstring aiogram.utils.web_app.WebAppInitData.chat:1 of msgid "" @@ -243,8 +213,8 @@ msgid "" msgstr "" "Значення параметра startattach, передане через посилання. Повертається " "лише для Веб Застосунків, коли їх запускають із меню вкладень за " -"посиланням. Значення параметра start_param також буде передано в GET-" -"параметр tgWebAppStartParam, тому Веб Застосунок може відразу " +"посиланням. Значення параметра start_param також буде передано в " +"GET-параметр tgWebAppStartParam, тому Веб Застосунок може відразу " "завантажити правильний інтерфейс." #: ../../docstring aiogram.utils.web_app.WebAppInitData.can_send_after:1 of @@ -278,16 +248,16 @@ msgstr "Джерело: https://core.telegram.org/bots/webapps#webappuser" #: ../../docstring aiogram.utils.web_app.WebAppUser.id:1 of msgid "" "A unique identifier for the user or bot. This number may have more than " -"32 significant bits and some programming languages may have difficulty/" -"silent defects in interpreting it. It has at most 52 significant bits, " -"so a 64-bit integer or a double-precision float type is safe for storing " -"this identifier." +"32 significant bits and some programming languages may have " +"difficulty/silent defects in interpreting it. It has at most 52 " +"significant bits, so a 64-bit integer or a double-precision float type is" +" safe for storing this identifier." msgstr "" "Унікальний ідентифікатор користувача або бота. Це число може мати більше " -"32 значущих бітів, і деякі мови програмування можуть мати труднощі в " -"його інтерпретації. Він має щонайбільше 52 значущі біти, тому 64-бітне " -"ціле число або тип з плаваючою точністю подвійної точності є безпечним " -"для зберігання цього ідентифікатора." +"32 значущих бітів, і деякі мови програмування можуть мати труднощі в його" +" інтерпретації. Він має щонайбільше 52 значущі біти, тому 64-бітне ціле " +"число або тип з плаваючою точністю подвійної точності є безпечним для " +"зберігання цього ідентифікатора." #: ../../docstring aiogram.utils.web_app.WebAppUser.is_bot:1 of msgid "True, if this user is a bot. Returns in the receiver field only." @@ -308,8 +278,7 @@ msgid "Username of the user or bot." msgstr "Нік користувача або бота." #: ../../docstring aiogram.utils.web_app.WebAppUser.language_code:1 of -msgid "" -"IETF language tag of the user's language. Returns in user field only." +msgid "IETF language tag of the user's language. Returns in user field only." msgstr "" "Мовний тег IETF мови користувача. Повертаєтся лише в полі " "користувача(user)." @@ -318,8 +287,8 @@ msgstr "" msgid "True, if this user is a Telegram Premium user." msgstr "True, якщо цей користувач має підписку Telegram Premium." -#: ../../docstring -#: aiogram.utils.web_app.WebAppUser.added_to_attachment_menu:1 of +#: ../../docstring aiogram.utils.web_app.WebAppUser.added_to_attachment_menu:1 +#: of msgid "True, if this user added the bot to the attachment menu." msgstr "True, якщо цей користувач додав бота до меню вкладень." @@ -333,8 +302,8 @@ msgid "" "formats. Only returned for Web Apps launched from the attachment menu." msgstr "" "URL-адреса фотографії профілю користувача. Фотографія може бути у " -"форматах .jpeg або .svg. Повертається лише для Веб Застосунків, " -"запущених із меню вкладень." +"форматах .jpeg або .svg. Повертається лише для Веб Застосунків, запущених" +" із меню вкладень." #: aiogram.utils.web_app.WebAppChat:1 of msgid "This object represents a chat." @@ -347,10 +316,10 @@ msgstr "Джерело: https://core.telegram.org/bots/webapps#webappchat" #: ../../docstring aiogram.utils.web_app.WebAppChat.id:1 of msgid "" "Unique identifier for this chat. 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." +"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." msgstr "" "Унікальний ідентифікатор цього чату. Це число може мати більше 32 " "значущих бітів, і деякі мови програмування можуть мати труднощі в його " @@ -375,5 +344,26 @@ msgid "" "URL of the chat’s photo. The photo can be in .jpeg or .svg formats. Only " "returned for Web Apps launched from the attachment menu." msgstr "" -"URL-адреса фотографії чату. Фотографія може бути у форматах .jpeg або ." -"svg. Повертається лише для Веб Застосунків, запущених із меню вкладень." +"URL-адреса фотографії чату. Фотографія може бути у форматах .jpeg або " +".svg. Повертається лише для Веб Застосунків, запущених із меню вкладень." + +#~ msgid "" +#~ "Configuration for the model, should be" +#~ " a dictionary conforming to " +#~ "[`ConfigDict`][pydantic.config.ConfigDict]." +#~ msgstr "" +#~ "Конфігурація для моделі має бути " +#~ "словником, що відповідає " +#~ "[`ConfigDict`][pydantic.config.ConfigDict]." + +#~ msgid "" +#~ "Metadata about the fields defined on " +#~ "the model, mapping of field names " +#~ "to [`FieldInfo`][pydantic.fields.FieldInfo]." +#~ msgstr "" +#~ "Метадані про поля, визначені на моделі," +#~ " відображення назв полів у " +#~ "[`FieldInfo`][pydantic.fields.FieldInfo]." + +#~ msgid "This replaces `Model.__fields__` from Pydantic V1." +#~ msgstr "Це замінює `Model.__fields__` з Pydantic V1." diff --git a/docs/migration_2_to_3.rst b/docs/migration_2_to_3.rst index 0ac24c99..7f17682a 100644 --- a/docs/migration_2_to_3.rst +++ b/docs/migration_2_to_3.rst @@ -94,9 +94,61 @@ Bot API However, all errors are classified by HTTP status codes, and for each method, only one type of error can be associated with a given code. Therefore, in most cases, you should check only the error type (by status code) - without inspecting the error message. + without inspecting the error message. More details can be found in the + :ref:`exceptions section » `. +Exceptions +========== + +Mapping (v2 -> v3) +------------------- + +- RetryAfter -> :class:`TelegramRetryAfter` (:mod:`aiogram.exceptions`) + - Important attribute in v3: ``retry_after`` (int). + +- ChatMigrated / MigrateToChat -> :class:`TelegramMigrateToChat` + - Important attribute in v3: ``migrate_to_chat_id`` (int). + +- ClientDecodeError -> :class:`ClientDecodeError` + - Important attributes in v3: ``original`` (Exception) and ``data`` (response body). + +- BadRequest -> :class:`TelegramBadRequest` +- Unauthorized -> :class:`TelegramUnauthorizedError` +- Forbidden -> :class:`TelegramForbiddenError` +- NotFound -> :class:`TelegramNotFound` +- Conflict -> :class:`TelegramConflictError` +- ServerError -> :class:`TelegramServerError` +- NetworkError -> :class:`TelegramNetworkError` +- EntityTooLarge -> :class:`TelegramEntityTooLarge` + + +Exceptions removed in v3 (from v2) +---------------------------------- + +The list below contains common exception names that appeared in aiogram v2 but +are not defined as separate classes in the v3 codebase. For each v2 name, a +recommended v3 replacement (or handling) is provided — keep your migration +logic simple and rely on the v3 exception classes and their attributes. + +- MessageNotModified -> :class:`TelegramBadRequest` +- MessageToEditNotFound -> :class:`TelegramNotFound` +- MessageToDeleteNotFound -> :class:`TelegramNotFound` +- MessageCantBeDeleted -> :class:`TelegramForbiddenError` / :class:`TelegramBadRequest` +- CantParseEntities -> :class:`TelegramBadRequest` +- MessageIsTooLong -> :class:`TelegramEntityTooLarge` +- MessageIdentifierNotFound -> :class:`TelegramNotFound` +- UserDeactivated -> :class:`TelegramForbiddenError` +- CantInitiateConversation -> :class:`TelegramBadRequest` +- StickerSetNameInvalid -> :class:`TelegramBadRequest` +- ChatAdminRequired -> :class:`TelegramForbiddenError` + +Use these replacements when migrating exception handling from v2 to v3. If +you relied on catching very specific v2 exception classes, replace those +handlers with the corresponding v3 class above (or catch a broader v3 class +such as :class:`TelegramBadRequest` / :class:`TelegramAPIError`) and inspect +available attributes (see "Mapping (v2 -> v3)") for any required details. + Middlewares =========== diff --git a/docs/utils/deep_linking.rst b/docs/utils/deep_linking.rst index ebf907dd..a7f4e3b5 100644 --- a/docs/utils/deep_linking.rst +++ b/docs/utils/deep_linking.rst @@ -57,4 +57,8 @@ References .. autofunction:: aiogram.utils.deep_linking.create_start_link +.. autofunction:: aiogram.utils.deep_linking.create_startgroup_link + +.. autofunction:: aiogram.utils.deep_linking.create_startapp_link + .. autofunction:: aiogram.utils.deep_linking.decode_payload diff --git a/docs/utils/formatting.rst b/docs/utils/formatting.rst index 9f3a0572..6c70d23b 100644 --- a/docs/utils/formatting.rst +++ b/docs/utils/formatting.rst @@ -28,7 +28,7 @@ Is the same as the next example, but without usage markup .. code-block:: python await message.answer( - text=f"Hello, {html.quote(message.from_user.full_name)}!", + text=f"Hello, {html.quote(message.from_user.full_name)}!", parse_mode=ParseMode.HTML ) diff --git a/examples/context_addition_from_filter.py b/examples/context_addition_from_filter.py index 73143417..50eda7d3 100644 --- a/examples/context_addition_from_filter.py +++ b/examples/context_addition_from_filter.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Optional, Union +from typing import Any from aiogram import Router from aiogram.filters import Filter @@ -8,7 +8,7 @@ router = Router(name=__name__) class HelloFilter(Filter): - def __init__(self, name: Optional[str] = None) -> None: + def __init__(self, name: str | None = None) -> None: self.name = name async def __call__( @@ -16,7 +16,7 @@ class HelloFilter(Filter): message: Message, event_from_user: User, # Filters also can accept keyword parameters like in handlers - ) -> Union[bool, Dict[str, Any]]: + ) -> bool | dict[str, Any]: if message.text.casefold() == "hello": # Returning a dictionary that will update the context data return {"name": event_from_user.mention_html(name=self.name)} @@ -25,6 +25,7 @@ class HelloFilter(Filter): @router.message(HelloFilter()) async def my_handler( - message: Message, name: str # Now we can accept "name" as named parameter + message: Message, + name: str, # Now we can accept "name" as named parameter ) -> Any: - return message.answer("Hello, {name}!".format(name=name)) + return message.answer(f"Hello, {name}!") diff --git a/examples/error_handling.py b/examples/error_handling.py index fca83f82..ee02fbe1 100644 --- a/examples/error_handling.py +++ b/examples/error_handling.py @@ -75,11 +75,13 @@ async def handle_set_age(message: types.Message, command: CommandObject) -> None # To get the command arguments you can use `command.args` property. age = command.args if not age: - raise InvalidAge("No age provided. Please provide your age as a command argument.") + msg = "No age provided. Please provide your age as a command argument." + raise InvalidAge(msg) # If the age is invalid, raise an exception. if not age.isdigit(): - raise InvalidAge("Age should be a number") + msg = "Age should be a number" + raise InvalidAge(msg) # If the age is valid, send a message to the user. age = int(age) @@ -95,7 +97,8 @@ async def handle_set_name(message: types.Message, command: CommandObject) -> Non # To get the command arguments you can use `command.args` property. name = command.args if not name: - raise InvalidName("Invalid name. Please provide your name as a command argument.") + msg = "Invalid name. Please provide your name as a command argument." + raise InvalidName(msg) # If the name is valid, send a message to the user. await message.reply(text=f"Your name is {name}") diff --git a/examples/finite_state_machine.py b/examples/finite_state_machine.py index f371d2ca..27a51989 100644 --- a/examples/finite_state_machine.py +++ b/examples/finite_state_machine.py @@ -2,7 +2,7 @@ import asyncio import logging import sys from os import getenv -from typing import Any, Dict +from typing import Any from aiogram import Bot, Dispatcher, F, Router, html from aiogram.client.default import DefaultBotProperties @@ -66,7 +66,7 @@ async def process_name(message: Message, state: FSMContext) -> None: [ KeyboardButton(text="Yes"), KeyboardButton(text="No"), - ] + ], ], resize_keyboard=True, ), @@ -106,13 +106,13 @@ async def process_language(message: Message, state: FSMContext) -> None: if message.text.casefold() == "python": await message.reply( - "Python, you say? That's the language that makes my circuits light up! 😉" + "Python, you say? That's the language that makes my circuits light up! 😉", ) await show_summary(message=message, data=data) -async def show_summary(message: Message, data: Dict[str, Any], positive: bool = True) -> None: +async def show_summary(message: Message, data: dict[str, Any], positive: bool = True) -> None: name = data["name"] language = data.get("language", "") text = f"I'll keep in mind that, {html.quote(name)}, " @@ -124,7 +124,7 @@ async def show_summary(message: Message, data: Dict[str, Any], positive: bool = await message.answer(text=text, reply_markup=ReplyKeyboardRemove()) -async def main(): +async def main() -> None: # Initialize Bot instance with default bot properties which will be passed to all API calls bot = Bot(token=TOKEN, default=DefaultBotProperties(parse_mode=ParseMode.HTML)) diff --git a/examples/multi_file_bot/bot.py b/examples/multi_file_bot/bot.py index 0f1ba083..709500be 100644 --- a/examples/multi_file_bot/bot.py +++ b/examples/multi_file_bot/bot.py @@ -2,12 +2,11 @@ import asyncio import logging from os import getenv -from handlers.echo import echo_router -from handlers.start import start_router - from aiogram import Bot, Dispatcher from aiogram.client.default import DefaultBotProperties from aiogram.enums import ParseMode +from handlers.echo import echo_router +from handlers.start import start_router # Bot token can be obtained via https://t.me/BotFather TOKEN = getenv("BOT_TOKEN") diff --git a/examples/multibot.py b/examples/multibot.py index d5dbe5fc..2dc2de1a 100644 --- a/examples/multibot.py +++ b/examples/multibot.py @@ -1,10 +1,9 @@ import logging import sys from os import getenv -from typing import Any, Dict, Union +from typing import Any from aiohttp import web -from finite_state_machine import form_router from aiogram import Bot, Dispatcher, F, Router from aiogram.client.session.aiohttp import AiohttpSession @@ -19,6 +18,7 @@ from aiogram.webhook.aiohttp_server import ( TokenBasedRequestHandler, setup_application, ) +from finite_state_machine import form_router main_router = Router() @@ -34,7 +34,7 @@ REDIS_DSN = "redis://127.0.0.1:6479" OTHER_BOTS_URL = f"{BASE_URL}{OTHER_BOTS_PATH}" -def is_bot_token(value: str) -> Union[bool, Dict[str, Any]]: +def is_bot_token(value: str) -> bool | dict[str, Any]: try: validate_token(value) except TokenValidationError: @@ -54,11 +54,11 @@ async def command_add_bot(message: Message, command: CommandObject, bot: Bot) -> return await message.answer(f"Bot @{bot_user.username} successful added") -async def on_startup(dispatcher: Dispatcher, bot: Bot): +async def on_startup(dispatcher: Dispatcher, bot: Bot) -> None: await bot.set_webhook(f"{BASE_URL}{MAIN_BOT_PATH}") -def main(): +def main() -> None: logging.basicConfig(level=logging.INFO, stream=sys.stdout) session = AiohttpSession() bot_settings = {"session": session, "parse_mode": ParseMode.HTML} diff --git a/examples/own_filter.py b/examples/own_filter.py index af87408a..df55b154 100644 --- a/examples/own_filter.py +++ b/examples/own_filter.py @@ -14,4 +14,4 @@ class MyFilter(Filter): @router.message(MyFilter("hello")) -async def my_handler(message: Message): ... +async def my_handler(message: Message) -> None: ... diff --git a/examples/quiz_scene.py b/examples/quiz_scene.py index b07888df..c3b7c087 100644 --- a/examples/quiz_scene.py +++ b/examples/quiz_scene.py @@ -263,7 +263,7 @@ quiz_router.message.register(QuizScene.as_handler(), Command("quiz")) @quiz_router.message(Command("start")) -async def command_start(message: Message, scenes: ScenesManager): +async def command_start(message: Message, scenes: ScenesManager) -> None: await scenes.close() await message.answer( "Hi! This is a quiz bot. To start the quiz, use the /quiz command.", @@ -271,7 +271,7 @@ async def command_start(message: Message, scenes: ScenesManager): ) -def create_dispatcher(): +def create_dispatcher() -> Dispatcher: # Event isolation is needed to correctly handle fast user responses dispatcher = Dispatcher( events_isolation=SimpleEventIsolation(), @@ -288,7 +288,7 @@ def create_dispatcher(): return dispatcher -async def main(): +async def main() -> None: dp = create_dispatcher() bot = Bot(token=TOKEN) await dp.start_polling(bot) diff --git a/examples/scene.py b/examples/scene.py index ab83bd44..45d6112c 100644 --- a/examples/scene.py +++ b/examples/scene.py @@ -34,11 +34,11 @@ class CancellableScene(Scene): """ @on.message(F.text.casefold() == BUTTON_CANCEL.text.casefold(), after=After.exit()) - async def handle_cancel(self, message: Message): + async def handle_cancel(self, message: Message) -> None: await message.answer("Cancelled.", reply_markup=ReplyKeyboardRemove()) @on.message(F.text.casefold() == BUTTON_BACK.text.casefold(), after=After.back()) - async def handle_back(self, message: Message): + async def handle_back(self, message: Message) -> None: await message.answer("Back.") @@ -48,7 +48,7 @@ class LanguageScene(CancellableScene, state="language"): """ @on.message.enter() - async def on_enter(self, message: Message): + async def on_enter(self, message: Message) -> None: await message.answer( "What language do you prefer?", reply_markup=ReplyKeyboardMarkup( @@ -58,14 +58,14 @@ class LanguageScene(CancellableScene, state="language"): ) @on.message(F.text.casefold() == "python", after=After.exit()) - async def process_python(self, message: Message): + async def process_python(self, message: Message) -> None: await message.answer( - "Python, you say? That's the language that makes my circuits light up! 😉" + "Python, you say? That's the language that makes my circuits light up! 😉", ) await self.input_language(message) @on.message(after=After.exit()) - async def input_language(self, message: Message): + async def input_language(self, message: Message) -> None: data: FSMData = await self.wizard.get_data() await self.show_results(message, language=message.text, **data) @@ -83,7 +83,7 @@ class LikeBotsScene(CancellableScene, state="like_bots"): """ @on.message.enter() - async def on_enter(self, message: Message): + async def on_enter(self, message: Message) -> None: await message.answer( "Did you like to write bots?", reply_markup=ReplyKeyboardMarkup( @@ -96,18 +96,18 @@ class LikeBotsScene(CancellableScene, state="like_bots"): ) @on.message(F.text.casefold() == "yes", after=After.goto(LanguageScene)) - async def process_like_write_bots(self, message: Message): + async def process_like_write_bots(self, message: Message) -> None: await message.reply("Cool! I'm too!") @on.message(F.text.casefold() == "no", after=After.exit()) - async def process_dont_like_write_bots(self, message: Message): + async def process_dont_like_write_bots(self, message: Message) -> None: await message.answer( "Not bad not terrible.\nSee you soon.", reply_markup=ReplyKeyboardRemove(), ) @on.message() - async def input_like_bots(self, message: Message): + async def input_like_bots(self, message: Message) -> None: await message.answer("I don't understand you :(") @@ -117,25 +117,25 @@ class NameScene(CancellableScene, state="name"): """ @on.message.enter() # Marker for handler that should be called when a user enters the scene. - async def on_enter(self, message: Message): + async def on_enter(self, message: Message) -> None: await message.answer( "Hi there! What's your name?", reply_markup=ReplyKeyboardMarkup(keyboard=[[BUTTON_CANCEL]], resize_keyboard=True), ) @on.callback_query.enter() # different types of updates that start the scene also supported. - async def on_enter_callback(self, callback_query: CallbackQuery): + async def on_enter_callback(self, callback_query: CallbackQuery) -> None: await callback_query.answer() await self.on_enter(callback_query.message) @on.message.leave() # Marker for handler that should be called when a user leaves the scene. - async def on_leave(self, message: Message): + async def on_leave(self, message: Message) -> None: data: FSMData = await self.wizard.get_data() name = data.get("name", "Anonymous") await message.answer(f"Nice to meet you, {html.quote(name)}!") @on.message(after=After.goto(LikeBotsScene)) - async def input_name(self, message: Message): + async def input_name(self, message: Message) -> None: await self.wizard.update_data(name=message.text) @@ -154,22 +154,22 @@ class DefaultScene( start_demo = on.message(F.text.casefold() == "demo", after=After.goto(NameScene)) @on.message(Command("demo")) - async def demo(self, message: Message): + async def demo(self, message: Message) -> None: await message.answer( "Demo started", reply_markup=InlineKeyboardMarkup( - inline_keyboard=[[InlineKeyboardButton(text="Go to form", callback_data="start")]] + inline_keyboard=[[InlineKeyboardButton(text="Go to form", callback_data="start")]], ), ) @on.callback_query(F.data == "start", after=After.goto(NameScene)) - async def demo_callback(self, callback_query: CallbackQuery): + async def demo_callback(self, callback_query: CallbackQuery) -> None: await callback_query.answer(cache_time=0) await callback_query.message.delete_reply_markup() @on.message.enter() # Mark that this handler should be called when a user enters the scene. @on.message() - async def default_handler(self, message: Message): + async def default_handler(self, message: Message) -> None: await message.answer( "Start demo?\nYou can also start demo via command /demo", reply_markup=ReplyKeyboardMarkup( diff --git a/examples/specify_updates.py b/examples/specify_updates.py index c25613a2..d38ee7d6 100644 --- a/examples/specify_updates.py +++ b/examples/specify_updates.py @@ -33,7 +33,7 @@ async def command_start_handler(message: Message) -> None: await message.answer( f"Hello, {hbold(message.from_user.full_name)}!", reply_markup=InlineKeyboardMarkup( - inline_keyboard=[[InlineKeyboardButton(text="Tap me, bro", callback_data="*")]] + inline_keyboard=[[InlineKeyboardButton(text="Tap me, bro", callback_data="*")]], ), ) @@ -43,7 +43,7 @@ async def chat_member_update(chat_member: ChatMemberUpdated, bot: Bot) -> None: await bot.send_message( chat_member.chat.id, f"Member {hcode(chat_member.from_user.id)} was changed " - + f"from {chat_member.old_chat_member.status} to {chat_member.new_chat_member.status}", + f"from {chat_member.old_chat_member.status} to {chat_member.new_chat_member.status}", ) diff --git a/examples/web_app/handlers.py b/examples/web_app/handlers.py index 843f4c63..428d8376 100644 --- a/examples/web_app/handlers.py +++ b/examples/web_app/handlers.py @@ -12,7 +12,7 @@ my_router = Router() @my_router.message(CommandStart()) -async def command_start(message: Message, bot: Bot, base_url: str): +async def command_start(message: Message, bot: Bot, base_url: str) -> None: await bot.set_chat_menu_button( chat_id=message.chat.id, menu_button=MenuButtonWebApp(text="Open Menu", web_app=WebAppInfo(url=f"{base_url}/demo")), @@ -21,28 +21,29 @@ async def command_start(message: Message, bot: Bot, base_url: str): @my_router.message(Command("webview")) -async def command_webview(message: Message, base_url: str): +async def command_webview(message: Message, base_url: str) -> None: await message.answer( "Good. Now you can try to send it via Webview", reply_markup=InlineKeyboardMarkup( inline_keyboard=[ [ InlineKeyboardButton( - text="Open Webview", web_app=WebAppInfo(url=f"{base_url}/demo") - ) - ] - ] + text="Open Webview", + web_app=WebAppInfo(url=f"{base_url}/demo"), + ), + ], + ], ), ) @my_router.message(~F.message.via_bot) # Echo to all messages except messages via bot -async def echo_all(message: Message, base_url: str): +async def echo_all(message: Message, base_url: str) -> None: await message.answer( "Test webview", reply_markup=InlineKeyboardMarkup( inline_keyboard=[ - [InlineKeyboardButton(text="Open", web_app=WebAppInfo(url=f"{base_url}/demo"))] - ] + [InlineKeyboardButton(text="Open", web_app=WebAppInfo(url=f"{base_url}/demo"))], + ], ), ) diff --git a/examples/web_app/main.py b/examples/web_app/main.py index 06b64566..1e1938c6 100644 --- a/examples/web_app/main.py +++ b/examples/web_app/main.py @@ -4,28 +4,28 @@ from os import getenv from aiohttp.web import run_app from aiohttp.web_app import Application -from handlers import my_router -from routes import check_data_handler, demo_handler, send_message_handler from aiogram import Bot, Dispatcher from aiogram.client.default import DefaultBotProperties from aiogram.enums.parse_mode import ParseMode from aiogram.types import MenuButtonWebApp, WebAppInfo from aiogram.webhook.aiohttp_server import SimpleRequestHandler, setup_application +from handlers import my_router +from routes import check_data_handler, demo_handler, send_message_handler TOKEN = getenv("BOT_TOKEN") APP_BASE_URL = getenv("APP_BASE_URL") -async def on_startup(bot: Bot, base_url: str): +async def on_startup(bot: Bot, base_url: str) -> None: await bot.set_webhook(f"{base_url}/webhook") await bot.set_chat_menu_button( - menu_button=MenuButtonWebApp(text="Open Menu", web_app=WebAppInfo(url=f"{base_url}/demo")) + menu_button=MenuButtonWebApp(text="Open Menu", web_app=WebAppInfo(url=f"{base_url}/demo")), ) -def main(): +def main() -> None: bot = Bot(token=TOKEN, default=DefaultBotProperties(parse_mode=ParseMode.HTML)) dispatcher = Dispatcher() dispatcher["base_url"] = APP_BASE_URL diff --git a/examples/web_app/routes.py b/examples/web_app/routes.py index bd913a12..1537c4eb 100644 --- a/examples/web_app/routes.py +++ b/examples/web_app/routes.py @@ -1,10 +1,11 @@ +from __future__ import annotations + from pathlib import Path +from typing import TYPE_CHECKING from aiohttp.web_fileresponse import FileResponse -from aiohttp.web_request import Request from aiohttp.web_response import json_response -from aiogram import Bot from aiogram.types import ( InlineKeyboardButton, InlineKeyboardMarkup, @@ -14,12 +15,18 @@ from aiogram.types import ( ) from aiogram.utils.web_app import check_webapp_signature, safe_parse_webapp_init_data +if TYPE_CHECKING: + from aiohttp.web_request import Request + from aiohttp.web_response import Response -async def demo_handler(request: Request): + from aiogram import Bot + + +async def demo_handler(request: Request) -> FileResponse: return FileResponse(Path(__file__).parent.resolve() / "demo.html") -async def check_data_handler(request: Request): +async def check_data_handler(request: Request) -> Response: bot: Bot = request.app["bot"] data = await request.post() @@ -28,7 +35,7 @@ async def check_data_handler(request: Request): return json_response({"ok": False, "err": "Unauthorized"}, status=401) -async def send_message_handler(request: Request): +async def send_message_handler(request: Request) -> Response: bot: Bot = request.app["bot"] data = await request.post() try: @@ -43,10 +50,12 @@ async def send_message_handler(request: Request): [ InlineKeyboardButton( text="Open", - web_app=WebAppInfo(url=str(request.url.with_scheme("https"))), - ) - ] - ] + web_app=WebAppInfo( + url=str(request.url.with_scheme("https").with_path("demo")), + ), + ), + ], + ], ) await bot.answer_web_app_query( web_app_query_id=web_app_init_data.query_id, diff --git a/examples/without_dispatcher.py b/examples/without_dispatcher.py index 87e1d8e6..a48bb6d3 100644 --- a/examples/without_dispatcher.py +++ b/examples/without_dispatcher.py @@ -15,7 +15,7 @@ def create_parser() -> ArgumentParser: return parser -async def main(): +async def main() -> None: parser = create_parser() ns = parser.parse_args() diff --git a/pyproject.toml b/pyproject.toml index 97239f91..ca0c8c4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" name = "aiogram" description = 'Modern and fully asynchronous framework for Telegram Bot API' readme = "README.rst" -requires-python = ">=3.8" +requires-python = ">=3.10,<3.15" license = "MIT" authors = [ { name = "Alex Root Junior", email = "jroot.junior@gmail.com" }, @@ -30,11 +30,11 @@ classifiers = [ "Typing :: Typed", "Intended Audience :: Developers", "Intended Audience :: System Administrators", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", @@ -42,9 +42,9 @@ classifiers = [ ] dependencies = [ "magic-filter>=1.0.12,<1.1", - "aiohttp~=3.9.0", - "pydantic>=2.4.1,<2.9", - "aiofiles~=23.2.1", + "aiohttp>=3.9.0,<3.14", + "pydantic>=2.4.1,<2.13", + "aiofiles>=23.2.1,<26.0", "certifi>=2023.7.22", "typing-extensions>=4.7.0,<=5.0", ] @@ -55,60 +55,62 @@ path = "aiogram/__meta__.py" [project.optional-dependencies] fast = [ - "uvloop>=0.17.0; (sys_platform == 'darwin' or sys_platform == 'linux') and platform_python_implementation != 'PyPy'", + "uvloop>=0.17.0; (sys_platform == 'darwin' or sys_platform == 'linux') and platform_python_implementation != 'PyPy' and python_version < '3.13'", + "uvloop>=0.21.0; (sys_platform == 'darwin' or sys_platform == 'linux') and platform_python_implementation != 'PyPy' and python_version >= '3.13'", "aiodns>=3.0.0", ] redis = [ - "redis[hiredis]~=5.0.1", + "redis[hiredis]>=6.2.0,<8", ] mongo = [ - "motor~=3.3.2", + "motor>=3.3.2,<3.8", + "pymongo>4.5,<4.16", ] proxy = [ - "aiohttp-socks~=0.8.3", + "aiohttp-socks~=0.10.1", ] i18n = [ - "Babel~=2.13.0", + "Babel>=2.13.0,<3", ] cli = [ - "aiogram-cli~=1.0.3", + "aiogram-cli>=1.1.0,<2.0.0", ] -test = [ - "pytest~=7.4.2", - "pytest-html~=4.0.2", - "pytest-asyncio~=0.21.1", - "pytest-lazy-fixture~=0.6.3", - "pytest-mock~=3.12.0", - "pytest-mypy~=0.10.3", - "pytest-cov~=4.1.0", - "pytest-aiohttp~=1.0.5", - "aresponses~=2.1.6", - "pytz~=2023.3", - "pycryptodomex~=3.19.0", +signature = [ + "cryptography>=46.0.0", ] docs = [ - "Sphinx~=7.2.6", - "sphinx-intl~=2.1.0", - "sphinx-autobuild~=2021.3.14", + "Sphinx~=8.0.2", + "sphinx-intl~=2.2.0", + "sphinx-autobuild~=2024.9.3", "sphinx-copybutton~=0.5.2", - "furo~=2023.9.10", - "Sphinx-Substitution-Extensions~=2022.2.16", - "towncrier~=23.6.0", - "pygments~=2.16.1", + "furo~=2024.8.6", + "Sphinx-Substitution-Extensions~=2024.8.6", + "towncrier~=24.8.0", + "pygments~=2.18.0", "pymdown-extensions~=10.3", "markdown-include~=0.8.1", - "Pygments~=2.16.1", - "sphinxcontrib-towncrier~=0.3.2a0", + "sphinxcontrib-towncrier~=0.4.0a0", ] + +[dependency-groups] dev = [ - "black~=24.4.2", - "isort~=5.13.2", - "ruff~=0.4.9", - "mypy~=1.10.0", + "ruff~=0.14", + "mypy==1.10.1", "toml~=0.10.2", - "pre-commit~=3.5", - "packaging~=24.1", - "motor-types~=1.0.0b4", + "pre-commit~=4.3", + "packaging~=25.0", + "motor-types==1.0.0b4", +] +test = [ + "pytest==9.0.1", + "pytest-html==4.1.1", + "pytest-mock==3.15.1", + "pytest-mypy==1.0.1", + "pytest-cov==7.0.0", + "pytest-aiohttp==1.1.0", + "aresponses==3.0.0", + "pytz==2025.2", + "pycryptodomex==3.23.0", ] [project.urls] @@ -116,90 +118,6 @@ Homepage = "https://aiogram.dev/" Documentation = "https://docs.aiogram.dev/" Repository = "https://github.com/aiogram/aiogram/" -[tool.hatch.envs.default] -features = [ - "dev", - "fast", - "redis", - "mongo", - "proxy", - "i18n", - "cli", -] -post-install-commands = [ - "pre-commit install", -] - -[tool.hatch.envs.default.scripts] -reformat = [ - "black aiogram tests examples", - "isort aiogram tests examples", -] -lint = "ruff check aiogram tests examples" - -[tool.hatch.envs.docs] -features = [ - "fast", - "redis", - "mongo", - "proxy", - "i18n", - "docs", - "cli", -] -[tool.hatch.envs.docs.scripts] -serve = "sphinx-autobuild --watch aiogram/ --watch CHANGELOG.rst --watch README.rst docs/ docs/_build/ {args}" - -[tool.hatch.envs.dev] -python = "3.12" -features = [ - "dev", - "fast", - "redis", - "mongo", - "proxy", - "i18n", - "test", - "cli", -] - -[tool.hatch.envs.dev.scripts] -update = [ - "butcher parse", - "butcher refresh", - "butcher apply all", -] - -[tool.hatch.envs.test] -features = [ - "fast", - "redis", - "mongo", - "proxy", - "i18n", - "test", - "cli", -] - -[tool.hatch.envs.test.scripts] -cov = [ - "pytest --cov-config pyproject.toml --cov=aiogram --html=reports/py{matrix:python}/tests/index.html {args}", - "coverage html -d reports/py{matrix:python}/coverage", -] -cov-redis = [ - "pytest --cov-config pyproject.toml --cov=aiogram --html=reports/py{matrix:python}/tests/index.html --redis {env:REDIS_DNS:'redis://localhost:6379'} {args}", - "coverage html -d reports/py{matrix:python}/coverage", -] -cov-mongo = [ - "pytest --cov-config pyproject.toml --cov=aiogram --html=reports/py{matrix:python}/tests/index.html --mongo {env:MONGO_DNS:'mongodb://mongo:mongo@localhost:27017'} {args}", - "coverage html -d reports/py{matrix:python}/coverage", -] -view-cov = "google-chrome-stable reports/py{matrix:python}/coverage/index.html" - - -[[tool.hatch.envs.test.matrix]] -python = ["38", "39", "310", "311", "312"] - [tool.ruff] line-length = 99 src = ["aiogram", "tests"] @@ -215,21 +133,42 @@ exclude = [ "scripts", "*.egg-info", ] -target-version = "py310" [tool.ruff.lint] select = [ # "C", # TODO: mccabe - code complecity - "C4", - "E", - "F", - "T10", - "T20", - "Q", - "RET", + "A", # flake8-annotations + "B", # flake8-bugbear + "C4", # flake8-comprehensions + "DTZ", # flake8-datetimez + "E", # pycodestyle errors + "F", # pyflakes + "I", # isort + "PERF", # perflint + "PL", # pylint + "Q", # flake8-quotes + "RET", # flake8-return + "SIM", # flake8-simplify + "T10", # flake8-debugger + "T20", # flake8-print + "UP", # pyupgrade ] ignore = [ - "F401" + "F401", # unused-import (handled by other tools) + "A002", # builtin-argument-shadowing (common in API: type, id, format, etc.) + "A005", # stdlib-module-shadowing (Module `types` shadows a Python standard-library module) + "B008", # function-call-in-default-argument (Pydantic Field() defaults) + "PLC0415", # import-outside-top-level (needed for circular imports) + "PLC1901", # compare-to-empty-string (sometimes more explicit is better) + "PLR0904", # too-many-public-methods (Bot class has many API methods) + "PLR0911", # too-many-return-statements + "PLR0912", # too-many-branches + "PLR0913", # too-many-arguments (Telegram API methods have many params) + "PLR0915", # too-many-statements + "PLR0917", # too-many-positional-arguments (Telegram API design) + "PLR6301", # no-self-use (sometimes methods are intentionally not static) + "PLW2901", # redefined-loop-name (intentional pattern in this codebase) + "PLW3201", # bad-dunder-method-name (custom dunders for framework design) ] [tool.ruff.lint.isort] @@ -245,6 +184,20 @@ known-first-party = [ "aiogram/types/*" = ["E501"] "aiogram/methods/*" = ["E501"] "aiogram/enums/*" = ["E501"] +"tests/**" = [ + "PLR0124", + "PLR2004", + "DTZ005", + "DTZ006", + "A001", + "A004", + "B018", + "B020", + "B904", + "E501", + "F821", + "UP", +] [tool.pytest.ini_options] @@ -255,13 +208,18 @@ testpaths = [ filterwarnings = [ "error", "ignore::pytest.PytestUnraisableExceptionWarning", + # Remove when uvloop fixes the issue + # https://github.com/MagicStack/uvloop/issues/703 + # https://github.com/MagicStack/uvloop/pull/705 + "ignore:.*asyncio.iscoroutinefunction.*:DeprecationWarning" ] [tool.coverage.run] branch = false parallel = true omit = [ - "aiogram/__about__.py", + "aiogram/__meta__.py", + "aiogram/dispatcher/middlewares/data.py" ] [tool.coverage.report] @@ -271,11 +229,13 @@ exclude_lines = [ "if TYPE_CHECKING:", "@abstractmethod", "@overload", + "if sys.version_info", + "except ImportError:" ] [tool.mypy] plugins = "pydantic.mypy" -python_version = "3.8" +python_version = "3.10" show_error_codes = true show_error_context = true pretty = true @@ -303,27 +263,15 @@ module = [ "uvloop", "redis.*", "babel.*", + "aiohttp_socks.*", ] ignore_missing_imports = true disallow_untyped_defs = true -[tool.black] -line-length = 99 -target-version = ['py38', 'py39', 'py310', 'py311'] -exclude = ''' -( - \.eggs - | \.git - | \.tox - | build - | dist - | venv - | docs -) -''' - -[tool.isort] -profile = "black" +[tool.ruff.format] +quote-style = "double" +indent-style = "space" +line-ending = "auto" [tool.towncrier] package = "aiogram" @@ -331,6 +279,9 @@ filename = "CHANGES.rst" directory = "CHANGES/" template = "CHANGES/.template.rst.jinja2" issue_format = "`#{issue} `_" +ignore = [ + ".template.rst.jinja2", +] [[tool.towncrier.section]] path = "" diff --git a/scripts/bump_version.py b/scripts/bump_version.py new file mode 100644 index 00000000..3dc586c7 --- /dev/null +++ b/scripts/bump_version.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python3 +"""Version bumping script for aiogram (replaces hatch version).""" + +import re +import sys +from pathlib import Path + + +def bump_version(part: str) -> str: + """Bump version in __meta__.py.""" + meta_path = Path("aiogram/__meta__.py") + content = meta_path.read_text() + + # Extract current version + version_match = re.search(r'__version__ = "(\d+)\.(\d+)\.(\d+)"', content) + if not version_match: + raise ValueError("Could not find version in __meta__.py") + + major, minor, patch = map(int, version_match.groups()) + + # Bump appropriate part + if part == "major": + major += 1 + minor = 0 + patch = 0 + elif part == "minor": + minor += 1 + patch = 0 + elif part == "patch": + patch += 1 + elif part.startswith("to:"): + new_version = part.replace("to:", "") + content = re.sub( + r'__version__ = "\d+\.\d+\.\d+"', f'__version__ = "{new_version}"', content + ) + meta_path.write_text(content) + return new_version + else: + raise ValueError(f"Unknown part: {part}. Use major, minor, patch, or to:X.Y.Z") + + new_version = f"{major}.{minor}.{patch}" + content = re.sub(r'__version__ = "\d+\.\d+\.\d+"', f'__version__ = "{new_version}"', content) + meta_path.write_text(content) + return new_version + + +if __name__ == "__main__": + if len(sys.argv) != 2: # noqa: PLR2004 + print("Usage: python scripts/bump_version.py [major|minor|patch|to:X.Y.Z]") # noqa: T201 + sys.exit(1) + + new_version = bump_version(sys.argv[1]) + print(f"Bumped version to {new_version}") # noqa: T201 diff --git a/scripts/bump_versions.py b/scripts/bump_versions.py index 84f1f788..7174f422 100644 --- a/scripts/bump_versions.py +++ b/scripts/bump_versions.py @@ -1,3 +1,4 @@ +import json import re from pathlib import Path @@ -35,14 +36,16 @@ def get_package_version() -> str: def get_telegram_api_version() -> str: + path = Path.cwd() / ".butcher" / "schema" / "schema.json" + schema = json.loads(path.read_text()) + version = schema["api"]["version"] path = Path.cwd() / ".apiversion" - version = path.read_text().strip() + path.write_text(version + "\n") return version def replace_line(content: str, pattern: re.Pattern, new_value: str) -> str: - result = pattern.sub(f"\\g<1>{new_value}\\g<2>", content) - return result + return pattern.sub(f"\\g<1>{new_value}\\g<2>", content) def write_package_meta(api_version: str) -> None: @@ -51,7 +54,7 @@ def write_package_meta(api_version: str) -> None: content = replace_line(content, API_VERSION, api_version) - print(f"Write {path}") + print(f"Write {path}") # noqa: T201 path.write_text(content) @@ -60,7 +63,7 @@ def write_readme(api_version: str) -> None: content = path.read_text() content = replace_line(content, API_VERSION_BADGE, api_version) content = replace_line(content, API_VERSION_LINE, api_version) - print(f"Write {path}") + print(f"Write {path}") # noqa: T201 path.write_text(content) @@ -68,14 +71,14 @@ def write_docs_index(api_version: str) -> None: path = Path.cwd() / "docs" / "index.rst" content = path.read_text() content = replace_line(content, API_VERSION_BADGE, api_version) - print(f"Write {path}") + print(f"Write {path}") # noqa: T201 path.write_text(content) def main(): api_version = get_telegram_api_version() - print(f"Telegram Bot API version: {api_version}") + print(f"Telegram Bot API version: {api_version}") # noqa: T201 write_package_meta(api_version=api_version) write_readme(api_version=api_version) write_docs_index(api_version=api_version) diff --git a/tests/conftest.py b/tests/conftest.py index 497dd50f..9632a5c1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,5 @@ +import asyncio +import sys from pathlib import Path import pytest @@ -15,6 +17,7 @@ from aiogram.fsm.storage.memory import ( SimpleEventIsolation, ) from aiogram.fsm.storage.mongo import MongoStorage +from aiogram.fsm.storage.pymongo import PyMongoStorage from aiogram.fsm.storage.redis import RedisStorage from tests.mocked_bot import MockedBot @@ -36,6 +39,11 @@ def pytest_configure(config): config.addinivalue_line("markers", "redis: marked tests require redis connection to run") config.addinivalue_line("markers", "mongo: marked tests require mongo connection to run") + if sys.platform == "win32" and sys.version_info < (3, 14): + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) + else: + asyncio.set_event_loop_policy(asyncio.DefaultEventLoopPolicy()) + @pytest.fixture() def redis_server(request): @@ -47,7 +55,6 @@ def redis_server(request): @pytest.fixture() -@pytest.mark.redis async def redis_storage(redis_server): try: parse_redis_url(redis_server) @@ -76,7 +83,6 @@ def mongo_server(request): @pytest.fixture() -@pytest.mark.mongo async def mongo_storage(mongo_server): try: parse_mongo_url(mongo_server) @@ -97,6 +103,36 @@ async def mongo_storage(mongo_server): await storage.close() +@pytest.fixture() +def pymongo_server(request): + mongo_uri = request.config.getoption("--mongo") + if mongo_uri is None: + pytest.skip(SKIP_MESSAGE_PATTERN.format(db="mongo")) + else: + return mongo_uri + + +@pytest.fixture() +async def pymongo_storage(pymongo_server): + try: + parse_mongo_url(pymongo_server) + except InvalidURI as e: + raise UsageError(INVALID_URI_PATTERN.format(db="mongo", uri=pymongo_server, err=e)) + storage = PyMongoStorage.from_url( + url=pymongo_server, + connection_kwargs={"serverSelectionTimeoutMS": 2000}, + ) + try: + await storage._client.server_info() + except PyMongoError as e: + pytest.fail(str(e)) + else: + yield storage + await storage._client.drop_database(storage._database) + finally: + await storage.close() + + @pytest.fixture() async def memory_storage(): storage = MemoryStorage() @@ -107,10 +143,8 @@ async def memory_storage(): @pytest.fixture() -@pytest.mark.redis async def redis_isolation(redis_storage): - isolation = redis_storage.create_isolation() - return isolation + return redis_storage.create_isolation() @pytest.fixture() @@ -149,3 +183,20 @@ async def dispatcher(): yield dp finally: await dp.emit_shutdown() + + +@pytest.fixture() +def storage(request): + return request.getfixturevalue(request.param) + + +@pytest.fixture() +def isolation(request): + return request.getfixturevalue(request.param) + + +# @pytest.fixture(scope="session") +# def event_loop_policy(request): +# if sys.platform == "win32": +# return asyncio.WindowsSelectorEventLoopPolicy() +# return asyncio.DefaultEventLoopPolicy() diff --git a/tests/deprecated.py b/tests/deprecated.py index f030e515..138ef190 100644 --- a/tests/deprecated.py +++ b/tests/deprecated.py @@ -1,5 +1,4 @@ from contextlib import contextmanager -from typing import Type import pytest from packaging import version @@ -10,8 +9,8 @@ import aiogram @contextmanager def check_deprecated( max_version: str, - exception: Type[Exception], - warning: Type[Warning] = DeprecationWarning, + exception: type[Exception], + warning: type[Warning] = DeprecationWarning, ) -> None: """ Should be used for modules that are being deprecated or already removed from aiogram diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 895908ba..fbefdaba 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -1,13 +1,11 @@ -version: "3.9" - services: redis: - image: redis:6-alpine + image: redis:8-alpine ports: - "${REDIS_PORT-6379}:6379" mongo: - image: mongo:7.0.6 + image: mongo:8.0.14 environment: MONGO_INITDB_ROOT_USERNAME: mongo MONGO_INITDB_ROOT_PASSWORD: mongo diff --git a/tests/mocked_bot.py b/tests/mocked_bot.py index cd137aee..b7007029 100644 --- a/tests/mocked_bot.py +++ b/tests/mocked_bot.py @@ -1,5 +1,6 @@ from collections import deque -from typing import TYPE_CHECKING, Any, AsyncGenerator, Deque, Dict, Optional, Type +from collections.abc import AsyncGenerator +from typing import TYPE_CHECKING, Any from aiogram import Bot from aiogram.client.session.base import BaseSession @@ -10,9 +11,9 @@ from aiogram.types import UNSET_PARSE_MODE, ResponseParameters, User class MockedSession(BaseSession): def __init__(self): - super(MockedSession, self).__init__() - self.responses: Deque[Response[TelegramType]] = deque() - self.requests: Deque[TelegramMethod[TelegramType]] = deque() + super().__init__() + self.responses: deque[Response[TelegramType]] = deque() + self.requests: deque[TelegramMethod[TelegramType]] = deque() self.closed = True def add_result(self, response: Response[TelegramType]) -> Response[TelegramType]: @@ -29,7 +30,7 @@ class MockedSession(BaseSession): self, bot: Bot, method: TelegramMethod[TelegramType], - timeout: Optional[int] = UNSET_PARSE_MODE, + timeout: int | None = UNSET_PARSE_MODE, ) -> TelegramType: self.closed = False self.requests.append(method) @@ -45,7 +46,7 @@ class MockedSession(BaseSession): async def stream_content( self, url: str, - headers: Optional[Dict[str, Any]] = None, + headers: dict[str, Any] | None = None, timeout: int = 30, chunk_size: int = 65536, raise_for_status: bool = True, @@ -58,9 +59,7 @@ class MockedBot(Bot): session: MockedSession def __init__(self, **kwargs): - super(MockedBot, self).__init__( - kwargs.pop("token", "42:TEST"), session=MockedSession(), **kwargs - ) + super().__init__(kwargs.pop("token", "42:TEST"), session=MockedSession(), **kwargs) self._me = User( id=self.id, is_bot=True, @@ -72,13 +71,13 @@ class MockedBot(Bot): def add_result_for( self, - method: Type[TelegramMethod[TelegramType]], + method: type[TelegramMethod[TelegramType]], ok: bool, result: TelegramType = None, - description: Optional[str] = None, + description: str | None = None, error_code: int = 200, - migrate_to_chat_id: Optional[int] = None, - retry_after: Optional[int] = None, + migrate_to_chat_id: int | None = None, + retry_after: int | None = None, ) -> Response[TelegramType]: response = Response[method.__returning__]( # type: ignore ok=ok, diff --git a/tests/test_api/test_client/test_api_server.py b/tests/test_api/test_client/test_api_server.py index 118ea630..36fd5140 100644 --- a/tests/test_api/test_client/test_api_server.py +++ b/tests/test_api/test_client/test_api_server.py @@ -1,5 +1,7 @@ from pathlib import Path +import pytest + from aiogram.client.telegram import ( PRODUCTION, BareFilesPathWrapper, @@ -13,15 +15,17 @@ class TestAPIServer: method_url = PRODUCTION.api_url(token="42:TEST", method="apiMethod") assert method_url == "https://api.telegram.org/bot42:TEST/apiMethod" - def test_file_url(self): - file_url = PRODUCTION.file_url(token="42:TEST", path="path") + @pytest.mark.parametrize("path", ["path", Path("path")]) + def test_file_url(self, path): + file_url = PRODUCTION.file_url(token="42:TEST", path=path) assert file_url == "https://api.telegram.org/file/bot42:TEST/path" - def test_from_base(self): + @pytest.mark.parametrize("path", ["path", Path("path")]) + def test_from_base(self, path): local_server = TelegramAPIServer.from_base("http://localhost:8081", is_local=True) method_url = local_server.api_url("42:TEST", method="apiMethod") - file_url = local_server.file_url(token="42:TEST", path="path") + file_url = local_server.file_url(token="42:TEST", path=path) assert method_url == "http://localhost:8081/bot42:TEST/apiMethod" assert file_url == "http://localhost:8081/file/bot42:TEST/path" diff --git a/tests/test_api/test_client/test_bot.py b/tests/test_api/test_client/test_bot.py index 34593864..11a11c34 100644 --- a/tests/test_api/test_client/test_bot.py +++ b/tests/test_api/test_client/test_bot.py @@ -1,5 +1,6 @@ import io import os +from pathlib import Path from tempfile import mkstemp from unittest.mock import AsyncMock, MagicMock, patch @@ -112,7 +113,8 @@ class TestBot: mocked_close.assert_not_awaited() await session.close() - async def test_download_file(self, aresponses: ResponsesMockServer): + @pytest.mark.parametrize("file_path", ["file.png", Path("file.png")]) + async def test_download_file(self, aresponses: ResponsesMockServer, file_path): aresponses.add( method_pattern="get", response=aresponses.Response(status=200, body=b"\f" * 10), @@ -127,7 +129,7 @@ class TestBot: async with Bot("42:TEST").context() as bot: with patch("aiofiles.threadpool.sync_open", return_value=mock_file): - await bot.download_file("TEST", "file.png") + await bot.download_file("TEST", file_path) mock_file.write.assert_called_once_with(b"\f" * 10) async def test_download_file_default_destination( diff --git a/tests/test_api/test_client/test_default.py b/tests/test_api/test_client/test_default.py index 2445c435..7e354c89 100644 --- a/tests/test_api/test_client/test_default.py +++ b/tests/test_api/test_client/test_default.py @@ -24,6 +24,15 @@ class TestDefault: default = Default("test") assert repr(default) == "" + def test_eq_same_name(self): + assert Default("test") == Default("test") + + def test_eq_different_name(self): + assert Default("foo") != Default("bar") + + def test_hash(self): + assert hash(Default("test")) == hash(Default("test")) + class TestDefaultBotProperties: def test_post_init_empty(self): diff --git a/tests/test_api/test_client/test_session/test_aiohttp_session.py b/tests/test_api/test_client/test_session/test_aiohttp_session.py index 4d0e7153..a10b6a2e 100644 --- a/tests/test_api/test_client/test_session/test_aiohttp_session.py +++ b/tests/test_api/test_client/test_session/test_aiohttp_session.py @@ -1,12 +1,8 @@ import asyncio +from collections.abc import AsyncGenerator, AsyncIterable from typing import ( Any, AsyncContextManager, - AsyncGenerator, - AsyncIterable, - Dict, - List, - Union, ) from unittest.mock import AsyncMock, patch @@ -21,7 +17,7 @@ from aiogram.client.session import aiohttp from aiogram.client.session.aiohttp import AiohttpSession from aiogram.exceptions import TelegramNetworkError from aiogram.methods import TelegramMethod -from aiogram.types import UNSET_PARSE_MODE, InputFile +from aiogram.types import InputFile from tests.mocked_bot import MockedBot @@ -41,7 +37,7 @@ class TestAiohttpSession: async def test_create_proxy_session(self): auth = aiohttp.BasicAuth("login", "password", "encoding") - async with AiohttpSession(proxy=("socks5://proxy.url/", auth)) as session: + async with AiohttpSession(proxy=("socks5://proxy.url:1080/", auth)) as session: assert session._connector_type == aiohttp_socks.ProxyConnector assert isinstance(session._connector_init, dict) @@ -51,7 +47,7 @@ class TestAiohttpSession: assert isinstance(aiohttp_session.connector, aiohttp_socks.ProxyConnector) async def test_create_proxy_session_proxy_url(self): - async with AiohttpSession(proxy="socks4://proxy.url/") as session: + async with AiohttpSession(proxy="socks4://proxy.url:1080/") as session: assert isinstance(session.proxy, str) assert isinstance(session._connector_init, dict) @@ -62,8 +58,8 @@ class TestAiohttpSession: async def test_create_proxy_session_chained_proxies(self): proxy_chain = [ - "socks4://proxy.url/", - "socks5://proxy.url/", + "socks4://proxy.url:1080/", + "socks5://proxy.url:1080/", "http://user:password@127.0.0.1:3128", ] async with AiohttpSession(proxy=proxy_chain) as session: @@ -90,7 +86,7 @@ class TestAiohttpSession: assert session._should_reset_connector is False assert session.proxy is None - session.proxy = "socks5://auth:auth@proxy.url/" + session.proxy = "socks5://auth:auth@proxy.url:1080/" assert session._should_reset_connector await session.create_session() assert session._should_reset_connector is False @@ -115,10 +111,10 @@ class TestAiohttpSession: str_: str int_: int bool_: bool - unset_: Union[str, Default] = Default("parse_mode") + unset_: str | Default = Default("parse_mode") null_: None - list_: List[str] - dict_: Dict[str, Any] + list_: list[str] + dict_: dict[str, Any] session = AiohttpSession() form = session.build_form_data( @@ -248,13 +244,16 @@ class TestAiohttpSession: async with AiohttpSession() as session: assert isinstance(session, AsyncContextManager) - with patch( - "aiogram.client.session.aiohttp.AiohttpSession.create_session", - new_callable=AsyncMock, - ) as mocked_create_session, patch( - "aiogram.client.session.aiohttp.AiohttpSession.close", - new_callable=AsyncMock, - ) as mocked_close: + with ( + patch( + "aiogram.client.session.aiohttp.AiohttpSession.create_session", + new_callable=AsyncMock, + ) as mocked_create_session, + patch( + "aiogram.client.session.aiohttp.AiohttpSession.close", + new_callable=AsyncMock, + ) as mocked_close, + ): async with session as ctx: assert session == ctx mocked_close.assert_awaited_once() diff --git a/tests/test_api/test_client/test_session/test_base_session.py b/tests/test_api/test_client/test_session/test_base_session.py index 6bca619c..46d6bbc7 100644 --- a/tests/test_api/test_client/test_session/test_base_session.py +++ b/tests/test_api/test_client/test_session/test_base_session.py @@ -1,6 +1,7 @@ import datetime import json -from typing import Any, AsyncContextManager, AsyncGenerator, Dict, Optional +from collections.abc import AsyncGenerator +from typing import Any, AsyncContextManager from unittest.mock import AsyncMock, patch import pytest @@ -39,7 +40,7 @@ class CustomSession(BaseSession): self, token: str, method: TelegramMethod[TelegramType], - timeout: Optional[int] = UNSET_PARSE_MODE, + timeout: int | None = UNSET_PARSE_MODE, ) -> None: # type: ignore assert isinstance(token, str) assert isinstance(method, TelegramMethod) @@ -47,7 +48,7 @@ class CustomSession(BaseSession): async def stream_content( self, url: str, - headers: Optional[Dict[str, Any]] = None, + headers: dict[str, Any] | None = None, timeout: int = 30, chunk_size: int = 65536, raise_for_status: bool = True, diff --git a/tests/test_api/test_methods/test_add_sticker_to_set.py b/tests/test_api/test_methods/test_add_sticker_to_set.py index 84b7a9a8..bf388bf4 100644 --- a/tests/test_api/test_methods/test_add_sticker_to_set.py +++ b/tests/test_api/test_methods/test_add_sticker_to_set.py @@ -15,5 +15,5 @@ class TestAddStickerToSet: sticker="file id", format=StickerFormat.STATIC, emoji_list=[":)"] ), ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_answer_callback_query.py b/tests/test_api/test_methods/test_answer_callback_query.py index 98e9df17..8565237f 100644 --- a/tests/test_api/test_methods/test_answer_callback_query.py +++ b/tests/test_api/test_methods/test_answer_callback_query.py @@ -1,4 +1,4 @@ -from aiogram.methods import AnswerCallbackQuery, Request +from aiogram.methods import AnswerCallbackQuery from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestAnswerCallbackQuery: prepare_result = bot.add_result_for(AnswerCallbackQuery, ok=True, result=True) response: bool = await bot.answer_callback_query(callback_query_id="cq id", text="OK") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_answer_inline_query.py b/tests/test_api/test_methods/test_answer_inline_query.py index cd8ba266..da9d8c0a 100644 --- a/tests/test_api/test_methods/test_answer_inline_query.py +++ b/tests/test_api/test_methods/test_answer_inline_query.py @@ -1,11 +1,5 @@ -from aiogram import Bot -from aiogram.methods import AnswerInlineQuery, Request -from aiogram.types import ( - InlineQueryResult, - InlineQueryResultArticle, - InlineQueryResultPhoto, - InputTextMessageContent, -) +from aiogram.methods import AnswerInlineQuery +from aiogram.types import InlineQueryResultArticle, InputTextMessageContent from tests.mocked_bot import MockedBot @@ -23,5 +17,5 @@ class TestAnswerInlineQuery: ) ], ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_answer_pre_checkout_query.py b/tests/test_api/test_methods/test_answer_pre_checkout_query.py index b2a1f6c9..c31b1633 100644 --- a/tests/test_api/test_methods/test_answer_pre_checkout_query.py +++ b/tests/test_api/test_methods/test_answer_pre_checkout_query.py @@ -1,4 +1,4 @@ -from aiogram.methods import AnswerPreCheckoutQuery, Request +from aiogram.methods import AnswerPreCheckoutQuery from tests.mocked_bot import MockedBot @@ -9,5 +9,5 @@ class TestAnswerPreCheckoutQuery: response: bool = await bot.answer_pre_checkout_query( pre_checkout_query_id="query id", ok=True ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_answer_shipping_query.py b/tests/test_api/test_methods/test_answer_shipping_query.py index d31f41f8..5c1d8550 100644 --- a/tests/test_api/test_methods/test_answer_shipping_query.py +++ b/tests/test_api/test_methods/test_answer_shipping_query.py @@ -1,4 +1,4 @@ -from aiogram.methods import AnswerShippingQuery, Request +from aiogram.methods import AnswerShippingQuery from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestAnswerShippingQuery: prepare_result = bot.add_result_for(AnswerShippingQuery, ok=True, result=True) response: bool = await bot.answer_shipping_query(shipping_query_id="query id", ok=True) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_answer_web_app_query.py b/tests/test_api/test_methods/test_answer_web_app_query.py index a42640a8..f38d0938 100644 --- a/tests/test_api/test_methods/test_answer_web_app_query.py +++ b/tests/test_api/test_methods/test_answer_web_app_query.py @@ -15,5 +15,5 @@ class TestAnswerWebAppQuery: thumbnail_url="test", ), ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_approve_chat_join_request.py b/tests/test_api/test_methods/test_approve_chat_join_request.py index 6b097702..cea8c17f 100755 --- a/tests/test_api/test_methods/test_approve_chat_join_request.py +++ b/tests/test_api/test_methods/test_approve_chat_join_request.py @@ -1,4 +1,4 @@ -from aiogram.methods import ApproveChatJoinRequest, Request +from aiogram.methods import ApproveChatJoinRequest from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestApproveChatJoinRequest: chat_id=-42, user_id=42, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result 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..8d84f5fe --- /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, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_ban_chat_member.py b/tests/test_api/test_methods/test_ban_chat_member.py index 98ca951e..6809a596 100644 --- a/tests/test_api/test_methods/test_ban_chat_member.py +++ b/tests/test_api/test_methods/test_ban_chat_member.py @@ -1,4 +1,4 @@ -from aiogram.methods import BanChatMember, Request +from aiogram.methods import BanChatMember from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestKickChatMember: prepare_result = bot.add_result_for(BanChatMember, ok=True, result=True) response: bool = await bot.ban_chat_member(chat_id=-42, user_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_ban_chat_sender_chat.py b/tests/test_api/test_methods/test_ban_chat_sender_chat.py index 6811c975..feefbc8d 100755 --- a/tests/test_api/test_methods/test_ban_chat_sender_chat.py +++ b/tests/test_api/test_methods/test_ban_chat_sender_chat.py @@ -1,4 +1,4 @@ -from aiogram.methods import BanChatSenderChat, Request +from aiogram.methods import BanChatSenderChat from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestBanChatSenderChat: chat_id=-42, sender_chat_id=-1337, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_close.py b/tests/test_api/test_methods/test_close.py index e13223fa..fe2602e2 100644 --- a/tests/test_api/test_methods/test_close.py +++ b/tests/test_api/test_methods/test_close.py @@ -1,4 +1,4 @@ -from aiogram.methods import Close, Request +from aiogram.methods import Close from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestClose: prepare_result = bot.add_result_for(Close, ok=True, result=True) response: bool = await bot.close() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_close_forum_topic.py b/tests/test_api/test_methods/test_close_forum_topic.py index ff45c6ac..527ed511 100644 --- a/tests/test_api/test_methods/test_close_forum_topic.py +++ b/tests/test_api/test_methods/test_close_forum_topic.py @@ -1,4 +1,4 @@ -from aiogram.methods import CloseForumTopic, Request +from aiogram.methods import CloseForumTopic from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestCloseForumTopic: chat_id=42, message_thread_id=42, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_close_general_forum_topic.py b/tests/test_api/test_methods/test_close_general_forum_topic.py index b0a022ec..45133499 100644 --- a/tests/test_api/test_methods/test_close_general_forum_topic.py +++ b/tests/test_api/test_methods/test_close_general_forum_topic.py @@ -1,4 +1,4 @@ -from aiogram.methods import CloseGeneralForumTopic, Request +from aiogram.methods import CloseGeneralForumTopic from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestCloseGeneralForumTopic: prepare_result = bot.add_result_for(CloseGeneralForumTopic, ok=True, result=True) response: bool = await bot.close_general_forum_topic(chat_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_convert_gift_to_stars.py b/tests/test_api/test_methods/test_convert_gift_to_stars.py new file mode 100644 index 00000000..37fb4aa1 --- /dev/null +++ b/tests/test_api/test_methods/test_convert_gift_to_stars.py @@ -0,0 +1,13 @@ +from aiogram.methods import ConvertGiftToStars +from tests.mocked_bot import MockedBot + + +class TestConvertGiftToStars: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(ConvertGiftToStars, ok=True, result=True) + + response: bool = await bot.convert_gift_to_stars( + business_connection_id="test_connection_id", owned_gift_id="test_gift_id" + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_copy_message.py b/tests/test_api/test_methods/test_copy_message.py index bff6004b..f9425998 100644 --- a/tests/test_api/test_methods/test_copy_message.py +++ b/tests/test_api/test_methods/test_copy_message.py @@ -1,4 +1,4 @@ -from aiogram.methods import CopyMessage, Request +from aiogram.methods import CopyMessage from aiogram.types import MessageId from tests.mocked_bot import MockedBot @@ -12,5 +12,5 @@ class TestCopyMessage: from_chat_id=42, message_id=42, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_create_chat_invite_link.py b/tests/test_api/test_methods/test_create_chat_invite_link.py index 87a31be8..8247d8fc 100644 --- a/tests/test_api/test_methods/test_create_chat_invite_link.py +++ b/tests/test_api/test_methods/test_create_chat_invite_link.py @@ -1,4 +1,4 @@ -from aiogram.methods import CreateChatInviteLink, Request +from aiogram.methods import CreateChatInviteLink from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot @@ -20,5 +20,5 @@ class TestCreateChatInviteLink: response: ChatInviteLink = await bot.create_chat_invite_link( chat_id=-42, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_create_chat_subscruption_invite_link.py b/tests/test_api/test_methods/test_create_chat_subscruption_invite_link.py new file mode 100644 index 00000000..7d8b4d87 --- /dev/null +++ b/tests/test_api/test_methods/test_create_chat_subscruption_invite_link.py @@ -0,0 +1,28 @@ +from datetime import timedelta + +from aiogram.methods import CreateChatSubscriptionInviteLink +from aiogram.types import ChatInviteLink, User +from tests.mocked_bot import MockedBot + + +class TestCreateChatSubscriptionInviteLink: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + CreateChatSubscriptionInviteLink, + ok=True, + result=ChatInviteLink( + invite_link="https://t.me/username", + creator=User(id=42, is_bot=False, first_name="User"), + is_primary=False, + is_revoked=False, + creates_join_request=False, + ), + ) + + response: ChatInviteLink = await bot.create_chat_subscription_invite_link( + chat_id=-42, + subscription_period=timedelta(days=30), + subscription_price=42, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_create_forum_topic.py b/tests/test_api/test_methods/test_create_forum_topic.py index 071945ca..23e7ea87 100644 --- a/tests/test_api/test_methods/test_create_forum_topic.py +++ b/tests/test_api/test_methods/test_create_forum_topic.py @@ -1,4 +1,4 @@ -from aiogram.methods import CreateForumTopic, Request +from aiogram.methods import CreateForumTopic from aiogram.types import ForumTopic from tests.mocked_bot import MockedBot @@ -15,5 +15,5 @@ class TestCreateForumTopic: chat_id=42, name="test", ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_create_invoice_link.py b/tests/test_api/test_methods/test_create_invoice_link.py index 75a46326..9de395a4 100644 --- a/tests/test_api/test_methods/test_create_invoice_link.py +++ b/tests/test_api/test_methods/test_create_invoice_link.py @@ -1,4 +1,4 @@ -from aiogram.methods import CreateInvoiceLink, Request +from aiogram.methods import CreateInvoiceLink from aiogram.types import LabeledPrice from tests.mocked_bot import MockedBot @@ -17,5 +17,5 @@ class TestCreateInvoiceLink: currency="BTC", prices=[LabeledPrice(label="Test", amount=1)], ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_create_new_sticker_set.py b/tests/test_api/test_methods/test_create_new_sticker_set.py index 840f0c91..d5bfbd65 100644 --- a/tests/test_api/test_methods/test_create_new_sticker_set.py +++ b/tests/test_api/test_methods/test_create_new_sticker_set.py @@ -1,5 +1,5 @@ from aiogram.enums import StickerFormat -from aiogram.methods import CreateNewStickerSet, Request +from aiogram.methods import CreateNewStickerSet from aiogram.types import FSInputFile, InputSticker from tests.mocked_bot import MockedBot @@ -20,5 +20,5 @@ class TestCreateNewStickerSet: ], sticker_format=StickerFormat.STATIC, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_decline_chat_join_request.py b/tests/test_api/test_methods/test_decline_chat_join_request.py index f85c4375..5a5cf4a5 100755 --- a/tests/test_api/test_methods/test_decline_chat_join_request.py +++ b/tests/test_api/test_methods/test_decline_chat_join_request.py @@ -1,4 +1,4 @@ -from aiogram.methods import DeclineChatJoinRequest, Request +from aiogram.methods import DeclineChatJoinRequest from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestDeclineChatJoinRequest: chat_id=-42, user_id=42, ) - request = bot.get_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..8509c943 --- /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, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_business_messages.py b/tests/test_api/test_methods/test_delete_business_messages.py new file mode 100644 index 00000000..6f39e599 --- /dev/null +++ b/tests/test_api/test_methods/test_delete_business_messages.py @@ -0,0 +1,13 @@ +from aiogram.methods import DeleteBusinessMessages +from tests.mocked_bot import MockedBot + + +class TestDeleteBusinessMessages: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(DeleteBusinessMessages, ok=True, result=True) + + response: bool = await bot.delete_business_messages( + business_connection_id="test_connection_id", message_ids=[1, 2, 3] + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_chat_photo.py b/tests/test_api/test_methods/test_delete_chat_photo.py index df8c5eef..954bc9fc 100644 --- a/tests/test_api/test_methods/test_delete_chat_photo.py +++ b/tests/test_api/test_methods/test_delete_chat_photo.py @@ -1,4 +1,4 @@ -from aiogram.methods import DeleteChatPhoto, Request +from aiogram.methods import DeleteChatPhoto from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestDeleteChatPhoto: prepare_result = bot.add_result_for(DeleteChatPhoto, ok=True, result=True) response: bool = await bot.delete_chat_photo(chat_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_chat_sticker_set.py b/tests/test_api/test_methods/test_delete_chat_sticker_set.py index c8452d75..611fb5e9 100644 --- a/tests/test_api/test_methods/test_delete_chat_sticker_set.py +++ b/tests/test_api/test_methods/test_delete_chat_sticker_set.py @@ -1,4 +1,4 @@ -from aiogram.methods import DeleteChatStickerSet, Request +from aiogram.methods import DeleteChatStickerSet from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestDeleteChatStickerSet: prepare_result = bot.add_result_for(DeleteChatStickerSet, ok=True, result=True) response: bool = await bot.delete_chat_sticker_set(chat_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_forum_topic.py b/tests/test_api/test_methods/test_delete_forum_topic.py index 63cd629e..9af1b271 100644 --- a/tests/test_api/test_methods/test_delete_forum_topic.py +++ b/tests/test_api/test_methods/test_delete_forum_topic.py @@ -1,4 +1,4 @@ -from aiogram.methods import DeleteForumTopic, Request +from aiogram.methods import DeleteForumTopic from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestDeleteForumTopic: chat_id=42, message_thread_id=42, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_message.py b/tests/test_api/test_methods/test_delete_message.py index de8b44e4..e8531e34 100644 --- a/tests/test_api/test_methods/test_delete_message.py +++ b/tests/test_api/test_methods/test_delete_message.py @@ -1,4 +1,4 @@ -from aiogram.methods import DeleteMessage, Request +from aiogram.methods import DeleteMessage from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestDeleteMessage: prepare_result = bot.add_result_for(DeleteMessage, ok=True, result=True) response: bool = await bot.delete_message(chat_id=42, message_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_my_commands.py b/tests/test_api/test_methods/test_delete_my_commands.py index 86e4c47e..c771c4e2 100644 --- a/tests/test_api/test_methods/test_delete_my_commands.py +++ b/tests/test_api/test_methods/test_delete_my_commands.py @@ -1,4 +1,4 @@ -from aiogram.methods import DeleteMyCommands, Request +from aiogram.methods import DeleteMyCommands from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestKickChatMember: prepare_result = bot.add_result_for(DeleteMyCommands, ok=True, result=True) response: bool = await bot.delete_my_commands() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_sticker_from_set.py b/tests/test_api/test_methods/test_delete_sticker_from_set.py index b8e25153..a8e7b438 100644 --- a/tests/test_api/test_methods/test_delete_sticker_from_set.py +++ b/tests/test_api/test_methods/test_delete_sticker_from_set.py @@ -1,4 +1,4 @@ -from aiogram.methods import DeleteStickerFromSet, Request +from aiogram.methods import DeleteStickerFromSet from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestDeleteStickerFromSet: prepare_result = bot.add_result_for(DeleteStickerFromSet, ok=True, result=True) response: bool = await bot.delete_sticker_from_set(sticker="sticker id") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_sticker_set.py b/tests/test_api/test_methods/test_delete_sticker_set.py index b0f6391c..2f7fd06d 100644 --- a/tests/test_api/test_methods/test_delete_sticker_set.py +++ b/tests/test_api/test_methods/test_delete_sticker_set.py @@ -1,4 +1,4 @@ -from aiogram.methods import DeleteStickerSet, Request +from aiogram.methods import DeleteStickerSet from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestDeleteStickerSet: prepare_result = bot.add_result_for(DeleteStickerSet, ok=True, result=True) response: bool = await bot.delete_sticker_set(name="test") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_story.py b/tests/test_api/test_methods/test_delete_story.py new file mode 100644 index 00000000..4d1295e2 --- /dev/null +++ b/tests/test_api/test_methods/test_delete_story.py @@ -0,0 +1,13 @@ +from aiogram.methods import DeleteStory +from tests.mocked_bot import MockedBot + + +class TestDeleteStory: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(DeleteStory, ok=True, result=True) + + response: bool = await bot.delete_story( + business_connection_id="test_connection_id", story_id=42 + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_webhook.py b/tests/test_api/test_methods/test_delete_webhook.py index 3f755d73..713302da 100644 --- a/tests/test_api/test_methods/test_delete_webhook.py +++ b/tests/test_api/test_methods/test_delete_webhook.py @@ -1,4 +1,4 @@ -from aiogram.methods import DeleteWebhook, Request +from aiogram.methods import DeleteWebhook from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestDeleteWebhook: prepare_result = bot.add_result_for(DeleteWebhook, ok=True, result=True) response: bool = await bot.delete_webhook() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_chat_invite_link.py b/tests/test_api/test_methods/test_edit_chat_invite_link.py index 7bceffcd..f79514c5 100644 --- a/tests/test_api/test_methods/test_edit_chat_invite_link.py +++ b/tests/test_api/test_methods/test_edit_chat_invite_link.py @@ -1,4 +1,4 @@ -from aiogram.methods import EditChatInviteLink, Request +from aiogram.methods import EditChatInviteLink from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot @@ -20,5 +20,5 @@ class TestEditChatInviteLink: response: ChatInviteLink = await bot.edit_chat_invite_link( chat_id=-42, invite_link="https://t.me/username", member_limit=1 ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_chat_subscruption_invite_link.py b/tests/test_api/test_methods/test_edit_chat_subscruption_invite_link.py new file mode 100644 index 00000000..c5853734 --- /dev/null +++ b/tests/test_api/test_methods/test_edit_chat_subscruption_invite_link.py @@ -0,0 +1,26 @@ +from aiogram.methods import EditChatSubscriptionInviteLink +from aiogram.types import ChatInviteLink, User +from tests.mocked_bot import MockedBot + + +class TestEditChatSubscriptionInviteLink: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + EditChatSubscriptionInviteLink, + ok=True, + result=ChatInviteLink( + invite_link="https://t.me/username", + creator=User(id=42, is_bot=False, first_name="User"), + is_primary=False, + is_revoked=False, + creates_join_request=False, + ), + ) + + response: ChatInviteLink = await bot.edit_chat_subscription_invite_link( + chat_id=-42, + invite_link="https://t.me/username/test", + name="test", + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_forum_topic.py b/tests/test_api/test_methods/test_edit_forum_topic.py index 2dbb06f9..d68945b8 100644 --- a/tests/test_api/test_methods/test_edit_forum_topic.py +++ b/tests/test_api/test_methods/test_edit_forum_topic.py @@ -1,4 +1,4 @@ -from aiogram.methods import EditForumTopic, Request +from aiogram.methods import EditForumTopic from tests.mocked_bot import MockedBot @@ -12,5 +12,5 @@ class TestEditForumTopic: name="test", icon_custom_emoji_id="0", ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_general_forum_topic.py b/tests/test_api/test_methods/test_edit_general_forum_topic.py index cc3fc14f..ff4e8493 100644 --- a/tests/test_api/test_methods/test_edit_general_forum_topic.py +++ b/tests/test_api/test_methods/test_edit_general_forum_topic.py @@ -1,4 +1,4 @@ -from aiogram.methods import EditGeneralForumTopic, Request +from aiogram.methods import EditGeneralForumTopic from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestCloseGeneralForumTopic: prepare_result = bot.add_result_for(EditGeneralForumTopic, ok=True, result=True) response: bool = await bot.edit_general_forum_topic(chat_id=42, name="Test") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_caption.py b/tests/test_api/test_methods/test_edit_message_caption.py index 55ab5d6f..8713c673 100644 --- a/tests/test_api/test_methods/test_edit_message_caption.py +++ b/tests/test_api/test_methods/test_edit_message_caption.py @@ -1,7 +1,6 @@ import datetime -from typing import Union -from aiogram.methods import EditMessageCaption, Request +from aiogram.methods import EditMessageCaption from aiogram.types import Chat, Message from tests.mocked_bot import MockedBot @@ -19,6 +18,6 @@ class TestEditMessageCaption: ), ) - response: Union[Message, bool] = await bot.edit_message_caption() - request = bot.get_request() + response: Message | bool = await bot.edit_message_caption() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_checklist.py b/tests/test_api/test_methods/test_edit_message_checklist.py new file mode 100644 index 00000000..e3c4dd02 --- /dev/null +++ b/tests/test_api/test_methods/test_edit_message_checklist.py @@ -0,0 +1,35 @@ +import datetime + +from aiogram.methods import EditMessageChecklist +from aiogram.types import Chat, InputChecklist, InputChecklistTask, Message +from tests.mocked_bot import MockedBot + + +class TestEditMessageChecklist: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + EditMessageChecklist, + ok=True, + result=Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + ), + ) + + checklist = InputChecklist( + title="Updated Checklist", + tasks=[ + InputChecklistTask(id=1, text="Updated Task 1"), + InputChecklistTask(id=2, text="Updated Task 2"), + ], + ) + + response: Message = await bot.edit_message_checklist( + business_connection_id="test_connection", + chat_id=42, + message_id=42, + checklist=checklist, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_live_location.py b/tests/test_api/test_methods/test_edit_message_live_location.py index b9aee11a..89c6075e 100644 --- a/tests/test_api/test_methods/test_edit_message_live_location.py +++ b/tests/test_api/test_methods/test_edit_message_live_location.py @@ -1,6 +1,4 @@ -from typing import Union - -from aiogram.methods import EditMessageLiveLocation, Request +from aiogram.methods import EditMessageLiveLocation from aiogram.types import Message from tests.mocked_bot import MockedBot @@ -9,8 +7,8 @@ class TestEditMessageLiveLocation: async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditMessageLiveLocation, ok=True, result=True) - response: Union[Message, bool] = await bot.edit_message_live_location( + response: Message | bool = await bot.edit_message_live_location( latitude=3.141592, longitude=3.141592 ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_media.py b/tests/test_api/test_methods/test_edit_message_media.py index 57e74d45..562588f3 100644 --- a/tests/test_api/test_methods/test_edit_message_media.py +++ b/tests/test_api/test_methods/test_edit_message_media.py @@ -1,6 +1,4 @@ -from typing import Union - -from aiogram.methods import EditMessageMedia, Request +from aiogram.methods import EditMessageMedia from aiogram.types import BufferedInputFile, InputMediaPhoto, Message from tests.mocked_bot import MockedBot @@ -9,8 +7,8 @@ class TestEditMessageMedia: async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditMessageMedia, ok=True, result=True) - response: Union[Message, bool] = await bot.edit_message_media( + response: Message | bool = await bot.edit_message_media( media=InputMediaPhoto(media=BufferedInputFile(b"", "photo.png")) ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_reply_markup.py b/tests/test_api/test_methods/test_edit_message_reply_markup.py index 1f5d94be..2a4438e6 100644 --- a/tests/test_api/test_methods/test_edit_message_reply_markup.py +++ b/tests/test_api/test_methods/test_edit_message_reply_markup.py @@ -1,6 +1,4 @@ -from typing import Union - -from aiogram.methods import EditMessageReplyMarkup, Request +from aiogram.methods import EditMessageReplyMarkup from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message from tests.mocked_bot import MockedBot @@ -9,7 +7,7 @@ class TestEditMessageReplyMarkup: async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditMessageReplyMarkup, ok=True, result=True) - response: Union[Message, bool] = await bot.edit_message_reply_markup( + response: Message | bool = await bot.edit_message_reply_markup( chat_id=42, inline_message_id="inline message id", reply_markup=InlineKeyboardMarkup( @@ -18,5 +16,5 @@ class TestEditMessageReplyMarkup: ] ), ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_text.py b/tests/test_api/test_methods/test_edit_message_text.py index c9e203a8..6c22624b 100644 --- a/tests/test_api/test_methods/test_edit_message_text.py +++ b/tests/test_api/test_methods/test_edit_message_text.py @@ -1,6 +1,4 @@ -from typing import Union - -from aiogram.methods import EditMessageText, Request +from aiogram.methods import EditMessageText from aiogram.types import Message from tests.mocked_bot import MockedBot @@ -9,8 +7,8 @@ class TestEditMessageText: async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditMessageText, ok=True, result=True) - response: Union[Message, bool] = await bot.edit_message_text( + response: Message | bool = await bot.edit_message_text( chat_id=42, inline_message_id="inline message id", text="text" ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_story.py b/tests/test_api/test_methods/test_edit_story.py new file mode 100644 index 00000000..2203b5e5 --- /dev/null +++ b/tests/test_api/test_methods/test_edit_story.py @@ -0,0 +1,24 @@ +from aiogram.methods import EditStory +from aiogram.types import Chat, InputStoryContentPhoto, Story +from tests.mocked_bot import MockedBot + + +class TestEditStory: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + EditStory, + ok=True, + result=Story( + id=42, + chat=Chat(id=42, type="private"), + ), + ) + + response: Story = await bot.edit_story( + business_connection_id="test_connection_id", + story_id=42, + content=InputStoryContentPhoto(type="photo", photo="test_photo"), + caption="Test caption", + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_user_star_subscription.py b/tests/test_api/test_methods/test_edit_user_star_subscription.py new file mode 100644 index 00000000..695df9af --- /dev/null +++ b/tests/test_api/test_methods/test_edit_user_star_subscription.py @@ -0,0 +1,15 @@ +from aiogram.methods import EditUserStarSubscription +from tests.mocked_bot import MockedBot + + +class TestEditUserStarSubscription: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(EditUserStarSubscription, ok=True, result=True) + + response: bool = await bot.edit_user_star_subscription( + user_id=42, + telegram_payment_charge_id="telegram_payment_charge_id", + is_canceled=False, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_export_chat_invite_link.py b/tests/test_api/test_methods/test_export_chat_invite_link.py index ba85def7..56714362 100644 --- a/tests/test_api/test_methods/test_export_chat_invite_link.py +++ b/tests/test_api/test_methods/test_export_chat_invite_link.py @@ -1,4 +1,4 @@ -from aiogram.methods import ExportChatInviteLink, Request +from aiogram.methods import ExportChatInviteLink from tests.mocked_bot import MockedBot @@ -9,5 +9,5 @@ class TestExportChatInviteLink: ) response: str = await bot.export_chat_invite_link(chat_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_forward_message.py b/tests/test_api/test_methods/test_forward_message.py index daa434db..9b010a42 100644 --- a/tests/test_api/test_methods/test_forward_message.py +++ b/tests/test_api/test_methods/test_forward_message.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import ForwardMessage, Request +from aiogram.methods import ForwardMessage from aiogram.types import Chat, Message from tests.mocked_bot import MockedBot diff --git a/tests/test_api/test_methods/test_get_available_gifts.py b/tests/test_api/test_methods/test_get_available_gifts.py new file mode 100644 index 00000000..a3db3936 --- /dev/null +++ b/tests/test_api/test_methods/test_get_available_gifts.py @@ -0,0 +1,32 @@ +from aiogram.methods import GetAvailableGifts +from aiogram.types import Gift, Gifts, Sticker +from tests.mocked_bot import MockedBot + + +class TestGetAvailableGifts: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetAvailableGifts, + ok=True, + result=Gifts( + gifts=[ + Gift( + id="gift_id", + sticker=Sticker( + file_id="file_id", + file_unique_id="file_id", + type="regular", + width=512, + height=512, + is_animated=False, + is_video=False, + ), + star_count=1, + ) + ] + ), + ) + + response: Gifts = await bot.get_available_gifts() + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_business_account_gifts.py b/tests/test_api/test_methods/test_get_business_account_gifts.py new file mode 100644 index 00000000..712911cb --- /dev/null +++ b/tests/test_api/test_methods/test_get_business_account_gifts.py @@ -0,0 +1,41 @@ +import datetime + +from aiogram.methods import GetBusinessAccountGifts +from aiogram.types import Gift, OwnedGiftRegular, OwnedGifts, Sticker +from tests.mocked_bot import MockedBot + + +class TestGetBusinessAccountGifts: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetBusinessAccountGifts, + ok=True, + result=OwnedGifts( + total_count=1, + gifts=[ + OwnedGiftRegular( + gift=Gift( + id="test_gift_id", + sticker=Sticker( + file_id="test_file_id", + file_unique_id="test_file_unique_id", + type="regular", + width=512, + height=512, + is_animated=False, + is_video=False, + ), + star_count=100, + ), + send_date=int(datetime.datetime.now().timestamp()), + ) + ], + ), + ) + + response: OwnedGifts = await bot.get_business_account_gifts( + business_connection_id="test_connection_id", + limit=10, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_business_account_star_balance.py b/tests/test_api/test_methods/test_get_business_account_star_balance.py new file mode 100644 index 00000000..67bdb19e --- /dev/null +++ b/tests/test_api/test_methods/test_get_business_account_star_balance.py @@ -0,0 +1,21 @@ +from aiogram.methods import GetBusinessAccountStarBalance +from aiogram.types import StarAmount +from tests.mocked_bot import MockedBot + + +class TestGetBusinessAccountStarBalance: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetBusinessAccountStarBalance, + ok=True, + result=StarAmount( + amount=100, + nanostar_amount=500000000, + ), + ) + + response: StarAmount = await bot.get_business_account_star_balance( + business_connection_id="test_connection_id", + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_business_connection.py b/tests/test_api/test_methods/test_get_business_connection.py index 22776cb4..99bf1ba0 100644 --- a/tests/test_api/test_methods/test_get_business_connection.py +++ b/tests/test_api/test_methods/test_get_business_connection.py @@ -20,5 +20,5 @@ class TestGetBusinessConnection: response: BusinessConnection = await bot.get_business_connection( business_connection_id="test" ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat.py b/tests/test_api/test_methods/test_get_chat.py index 9f67b0c7..f02aa2e0 100644 --- a/tests/test_api/test_methods/test_get_chat.py +++ b/tests/test_api/test_methods/test_get_chat.py @@ -1,5 +1,5 @@ from aiogram.methods import GetChat -from aiogram.types import ChatFullInfo +from aiogram.types import AcceptedGiftTypes, ChatFullInfo from tests.mocked_bot import MockedBot @@ -14,9 +14,16 @@ class TestGetChat: title="chat", accent_color_id=0, max_reaction_count=0, + accepted_gift_types=AcceptedGiftTypes( + unlimited_gifts=True, + limited_gifts=True, + unique_gifts=True, + premium_subscription=True, + gifts_from_channels=True, + ), ), ) response: ChatFullInfo = await bot.get_chat(chat_id=-42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat_administrators.py b/tests/test_api/test_methods/test_get_chat_administrators.py index d8d57fc5..6026fa8c 100644 --- a/tests/test_api/test_methods/test_get_chat_administrators.py +++ b/tests/test_api/test_methods/test_get_chat_administrators.py @@ -1,6 +1,4 @@ -from typing import List - -from aiogram.methods import GetChatAdministrators, Request +from aiogram.methods import GetChatAdministrators from aiogram.types import ChatMember, ChatMemberOwner, User from tests.mocked_bot import MockedBot @@ -16,6 +14,6 @@ class TestGetChatAdministrators: ) ], ) - response: List[ChatMember] = await bot.get_chat_administrators(chat_id=-42) - request = bot.get_request() + response: list[ChatMember] = await bot.get_chat_administrators(chat_id=-42) + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat_gifts.py b/tests/test_api/test_methods/test_get_chat_gifts.py new file mode 100644 index 00000000..90111ac9 --- /dev/null +++ b/tests/test_api/test_methods/test_get_chat_gifts.py @@ -0,0 +1,41 @@ +import datetime + +from aiogram.methods import GetChatGifts +from aiogram.types import Gift, OwnedGiftRegular, OwnedGifts, Sticker +from tests.mocked_bot import MockedBot + + +class TestGetChatGifts: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetChatGifts, + ok=True, + result=OwnedGifts( + total_count=1, + gifts=[ + OwnedGiftRegular( + gift=Gift( + id="test_gift_id", + sticker=Sticker( + file_id="test_file_id", + file_unique_id="test_file_unique_id", + type="regular", + width=512, + height=512, + is_animated=False, + is_video=False, + ), + star_count=100, + ), + send_date=int(datetime.datetime.now().timestamp()), + ) + ], + ), + ) + + response: OwnedGifts = await bot.get_chat_gifts( + chat_id=42, + limit=10, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat_member.py b/tests/test_api/test_methods/test_get_chat_member.py index f59a491b..091f3391 100644 --- a/tests/test_api/test_methods/test_get_chat_member.py +++ b/tests/test_api/test_methods/test_get_chat_member.py @@ -1,5 +1,5 @@ -from aiogram.methods import GetChatMember, Request -from aiogram.types import ChatMember, ChatMemberOwner, User +from aiogram.methods import GetChatMember +from aiogram.types import ChatMemberOwner, User from tests.mocked_bot import MockedBot @@ -13,5 +13,5 @@ class TestGetChatMember: ), ) response = await bot.get_chat_member(chat_id=-42, user_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat_member_count.py b/tests/test_api/test_methods/test_get_chat_member_count.py index e1aea1ff..bec7ec16 100644 --- a/tests/test_api/test_methods/test_get_chat_member_count.py +++ b/tests/test_api/test_methods/test_get_chat_member_count.py @@ -1,4 +1,4 @@ -from aiogram.methods import GetChatMemberCount, Request +from aiogram.methods import GetChatMemberCount from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestGetChatMembersCount: prepare_result = bot.add_result_for(GetChatMemberCount, ok=True, result=42) response: int = await bot.get_chat_member_count(chat_id=-42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat_menu_button.py b/tests/test_api/test_methods/test_get_chat_menu_button.py index 63a29eec..dbfb0285 100644 --- a/tests/test_api/test_methods/test_get_chat_menu_button.py +++ b/tests/test_api/test_methods/test_get_chat_menu_button.py @@ -1,4 +1,4 @@ -from aiogram.methods import GetChatMenuButton, Request +from aiogram.methods import GetChatMenuButton from aiogram.types import MenuButton, MenuButtonDefault from tests.mocked_bot import MockedBot @@ -8,5 +8,5 @@ class TestGetChatMenuButton: prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) response: MenuButton = await bot.get_chat_menu_button() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_custom_emoji_stickers.py b/tests/test_api/test_methods/test_get_custom_emoji_stickers.py index 6db0f8f4..c29a0852 100644 --- a/tests/test_api/test_methods/test_get_custom_emoji_stickers.py +++ b/tests/test_api/test_methods/test_get_custom_emoji_stickers.py @@ -1,6 +1,4 @@ -from typing import List - -from aiogram.methods import GetCustomEmojiStickers, Request +from aiogram.methods import GetCustomEmojiStickers from aiogram.types import Sticker from tests.mocked_bot import MockedBot @@ -24,8 +22,8 @@ class TestGetCustomEmojiStickers: ], ) - response: List[Sticker] = await bot.get_custom_emoji_stickers( + response: list[Sticker] = await bot.get_custom_emoji_stickers( custom_emoji_ids=["1", "2"], ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_file.py b/tests/test_api/test_methods/test_get_file.py index 9c54ac38..71a85e2c 100644 --- a/tests/test_api/test_methods/test_get_file.py +++ b/tests/test_api/test_methods/test_get_file.py @@ -1,4 +1,4 @@ -from aiogram.methods import GetFile, Request +from aiogram.methods import GetFile from aiogram.types import File from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestGetFile: ) response: File = await bot.get_file(file_id="file id") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py b/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py index ab280abc..4e798113 100644 --- a/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py +++ b/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py @@ -1,6 +1,4 @@ -from typing import List - -from aiogram.methods import GetForumTopicIconStickers, Request +from aiogram.methods import GetForumTopicIconStickers from aiogram.types import Sticker from tests.mocked_bot import MockedBot @@ -9,6 +7,6 @@ class TestGetForumTopicIconStickers: async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[]) - response: List[Sticker] = await bot.get_forum_topic_icon_stickers() - request = bot.get_request() + response: list[Sticker] = await bot.get_forum_topic_icon_stickers() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_game_high_scores.py b/tests/test_api/test_methods/test_get_game_high_scores.py index 9dfaf5f4..075a2e66 100644 --- a/tests/test_api/test_methods/test_get_game_high_scores.py +++ b/tests/test_api/test_methods/test_get_game_high_scores.py @@ -1,6 +1,4 @@ -from typing import List - -from aiogram.methods import GetGameHighScores, Request +from aiogram.methods import GetGameHighScores from aiogram.types import GameHighScore, User from tests.mocked_bot import MockedBot @@ -17,6 +15,6 @@ class TestGetGameHighScores: ], ) - response: List[GameHighScore] = await bot.get_game_high_scores(user_id=42) - request = bot.get_request() + response: list[GameHighScore] = await bot.get_game_high_scores(user_id=42) + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_managed_bot_token.py b/tests/test_api/test_methods/test_get_managed_bot_token.py new file mode 100644 index 00000000..db1fe00f --- /dev/null +++ b/tests/test_api/test_methods/test_get_managed_bot_token.py @@ -0,0 +1,11 @@ +from aiogram.methods import GetManagedBotToken +from tests.mocked_bot import MockedBot + + +class TestGetManagedBotToken: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(GetManagedBotToken, ok=True, result="42:NEW_TOKEN") + + response: str = await bot.get_managed_bot_token(user_id=42) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_me.py b/tests/test_api/test_methods/test_get_me.py index e84ccd1e..ab86adce 100644 --- a/tests/test_api/test_methods/test_get_me.py +++ b/tests/test_api/test_methods/test_get_me.py @@ -1,4 +1,4 @@ -from aiogram.methods import GetMe, Request +from aiogram.methods import GetMe from aiogram.types import User from tests.mocked_bot import MockedBot @@ -9,7 +9,7 @@ class TestGetMe: GetMe, ok=True, result=User(id=42, is_bot=False, first_name="User") ) response: User = await bot.get_me() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result async def test_me_property(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_my_commands.py b/tests/test_api/test_methods/test_get_my_commands.py index 41a7a7d0..7b6633f7 100644 --- a/tests/test_api/test_methods/test_get_my_commands.py +++ b/tests/test_api/test_methods/test_get_my_commands.py @@ -1,6 +1,4 @@ -from typing import List - -from aiogram.methods import GetMyCommands, Request +from aiogram.methods import GetMyCommands from aiogram.types import BotCommand from tests.mocked_bot import MockedBot @@ -9,6 +7,6 @@ class TestGetMyCommands: async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetMyCommands, ok=True, result=None) - response: List[BotCommand] = await bot.get_my_commands() - request = bot.get_request() + response: list[BotCommand] = await bot.get_my_commands() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_my_default_administrator_rights.py b/tests/test_api/test_methods/test_get_my_default_administrator_rights.py index 9fbc1f93..75136c05 100644 --- a/tests/test_api/test_methods/test_get_my_default_administrator_rights.py +++ b/tests/test_api/test_methods/test_get_my_default_administrator_rights.py @@ -1,4 +1,4 @@ -from aiogram.methods import GetMyDefaultAdministratorRights, Request +from aiogram.methods import GetMyDefaultAdministratorRights from aiogram.types import ChatAdministratorRights from tests.mocked_bot import MockedBot @@ -24,5 +24,5 @@ class TestGetMyDefaultAdministratorRights: ) response: ChatAdministratorRights = await bot.get_my_default_administrator_rights() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_my_description.py b/tests/test_api/test_methods/test_get_my_description.py index 32277b43..9c08631a 100644 --- a/tests/test_api/test_methods/test_get_my_description.py +++ b/tests/test_api/test_methods/test_get_my_description.py @@ -1,4 +1,4 @@ -from aiogram.methods import GetMyDescription, Request +from aiogram.methods import GetMyDescription from aiogram.types import BotDescription from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestGetMyDescription: ) response: BotDescription = await bot.get_my_description() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_my_name.py b/tests/test_api/test_methods/test_get_my_name.py index 085ac0db..7ecb8f86 100644 --- a/tests/test_api/test_methods/test_get_my_name.py +++ b/tests/test_api/test_methods/test_get_my_name.py @@ -1,5 +1,5 @@ from aiogram.methods import GetMyName -from aiogram.types import BotDescription, BotName +from aiogram.types import BotName from tests.mocked_bot import MockedBot diff --git a/tests/test_api/test_methods/test_get_my_short_description.py b/tests/test_api/test_methods/test_get_my_short_description.py index 3b78be89..7f155a45 100644 --- a/tests/test_api/test_methods/test_get_my_short_description.py +++ b/tests/test_api/test_methods/test_get_my_short_description.py @@ -1,4 +1,4 @@ -from aiogram.methods import GetMyShortDescription, Request +from aiogram.methods import GetMyShortDescription from aiogram.types import BotShortDescription from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestGetMyShortDescription: ) response: BotShortDescription = await bot.get_my_short_description() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_my_star_balance.py b/tests/test_api/test_methods/test_get_my_star_balance.py new file mode 100644 index 00000000..22434e38 --- /dev/null +++ b/tests/test_api/test_methods/test_get_my_star_balance.py @@ -0,0 +1,18 @@ +from aiogram.methods import GetMyStarBalance +from aiogram.types import StarAmount +from tests.mocked_bot import MockedBot + + +class TestGetMyStarBalance: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetMyStarBalance, + ok=True, + result=StarAmount( + amount=100, + ), + ) + + response: StarAmount = await bot.get_my_star_balance() + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_star_transactions.py b/tests/test_api/test_methods/test_get_star_transactions.py index 5ced0fc6..9429f12f 100644 --- a/tests/test_api/test_methods/test_get_star_transactions.py +++ b/tests/test_api/test_methods/test_get_star_transactions.py @@ -1,8 +1,8 @@ from datetime import datetime +from aiogram.enums import TransactionPartnerUserTransactionTypeEnum from aiogram.methods import GetStarTransactions from aiogram.types import ( - File, StarTransaction, StarTransactions, TransactionPartnerUser, @@ -26,6 +26,7 @@ class TestGetStarTransactions: date=datetime.now(), source=TransactionPartnerUser( user=user, + transaction_type=TransactionPartnerUserTransactionTypeEnum.GIFT_PURCHASE, ), ), StarTransaction( @@ -35,12 +36,13 @@ class TestGetStarTransactions: date=datetime.now(), receiver=TransactionPartnerUser( user=user, + transaction_type=TransactionPartnerUserTransactionTypeEnum.GIFT_PURCHASE, ), ), ] ), ) - response: File = await bot.get_star_transactions(limit=10, offset=0) - request = bot.get_request() + response: StarTransactions = await bot.get_star_transactions(limit=10, offset=0) + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_sticker_set.py b/tests/test_api/test_methods/test_get_sticker_set.py index dd15e795..4881e6c5 100644 --- a/tests/test_api/test_methods/test_get_sticker_set.py +++ b/tests/test_api/test_methods/test_get_sticker_set.py @@ -1,4 +1,4 @@ -from aiogram.methods import GetStickerSet, Request +from aiogram.methods import GetStickerSet from aiogram.types import Sticker, StickerSet from tests.mocked_bot import MockedBot @@ -29,5 +29,5 @@ class TestGetStickerSet: ) response: StickerSet = await bot.get_sticker_set(name="test") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_updates.py b/tests/test_api/test_methods/test_get_updates.py index ad86ceed..7033c616 100644 --- a/tests/test_api/test_methods/test_get_updates.py +++ b/tests/test_api/test_methods/test_get_updates.py @@ -1,6 +1,4 @@ -from typing import List - -from aiogram.methods import GetUpdates, Request +from aiogram.methods import GetUpdates from aiogram.types import Update from tests.mocked_bot import MockedBot @@ -9,6 +7,6 @@ class TestGetUpdates: async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetUpdates, ok=True, result=[Update(update_id=42)]) - response: List[Update] = await bot.get_updates() - request = bot.get_request() + response: list[Update] = await bot.get_updates() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_url.py b/tests/test_api/test_methods/test_get_url.py index 9eec1017..87e25487 100644 --- a/tests/test_api/test_methods/test_get_url.py +++ b/tests/test_api/test_methods/test_get_url.py @@ -1,5 +1,4 @@ import datetime -from typing import Optional import pytest @@ -26,14 +25,14 @@ class TestGetMessageUrl: ["supergroup", -10012345678901, None, True, "https://t.me/c/12345678901/10"], ], ) - def test_method( + def test_get_url_non_topic_message( self, bot: MockedBot, chat_type: str, chat_id: int, - chat_username: Optional[str], + chat_username: str | None, force_private: bool, - expected_result: Optional[str], + expected_result: str | None, ): fake_chat = Chat(id=chat_id, username=chat_username, type=chat_type) fake_message_id = 10 @@ -46,5 +45,61 @@ class TestGetMessageUrl: if expected_result is None: assert fake_message.get_url(force_private=force_private) is None + assert ( + fake_message.get_url(force_private=force_private, include_thread_id=True) is None + ) else: assert fake_message.get_url(force_private=force_private) == expected_result + assert ( + fake_message.get_url(force_private=force_private, include_thread_id=True) + == expected_result + ) + + @pytest.mark.parametrize( + "chat_username,force_private,include_thread_id,fake_thread_id_topic,expected_result", + [ + [None, False, False, None, "https://t.me/c/1234567890/10"], + [None, False, False, 3, "https://t.me/c/1234567890/10"], + [None, False, True, None, "https://t.me/c/1234567890/10"], + [None, False, True, 3, "https://t.me/c/1234567890/3/10"], + [None, True, False, None, "https://t.me/c/1234567890/10"], + [None, True, False, 3, "https://t.me/c/1234567890/10"], + [None, True, True, None, "https://t.me/c/1234567890/10"], + [None, True, True, 3, "https://t.me/c/1234567890/3/10"], + ["name", False, False, None, "https://t.me/name/10"], + ["name", False, False, 3, "https://t.me/name/10"], + ["name", False, True, None, "https://t.me/name/10"], + ["name", False, True, 3, "https://t.me/name/3/10"], + ["name", True, False, None, "https://t.me/c/1234567890/10"], + ["name", True, False, 3, "https://t.me/c/1234567890/10"], + ["name", True, True, None, "https://t.me/c/1234567890/10"], + ["name", True, True, 3, "https://t.me/c/1234567890/3/10"], + ], + ) + def test_get_url_if_topic_message( + self, + bot: MockedBot, + chat_username: str | None, + force_private: bool, + include_thread_id: bool, + fake_thread_id_topic: int | None, + expected_result: str | None, + ): + fake_message_id = 10 + fake_chat_id = -1001234567890 + fake_chat_type = "supergroup" + fake_chat_with_topics = Chat( + id=fake_chat_id, username=chat_username, type=fake_chat_type, is_forum=True + ) + fake_message_from_topic = Message( + message_id=fake_message_id, + date=datetime.datetime.now(), + text="test", + chat=fake_chat_with_topics, + is_topic_message=True, + message_thread_id=fake_thread_id_topic, + ) + actual_result = fake_message_from_topic.get_url( + force_private=force_private, include_thread_id=include_thread_id + ) + assert actual_result == expected_result diff --git a/tests/test_api/test_methods/test_get_user_gifts.py b/tests/test_api/test_methods/test_get_user_gifts.py new file mode 100644 index 00000000..b9b6c076 --- /dev/null +++ b/tests/test_api/test_methods/test_get_user_gifts.py @@ -0,0 +1,41 @@ +import datetime + +from aiogram.methods import GetUserGifts +from aiogram.types import Gift, OwnedGiftRegular, OwnedGifts, Sticker +from tests.mocked_bot import MockedBot + + +class TestGetUserGifts: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetUserGifts, + ok=True, + result=OwnedGifts( + total_count=1, + gifts=[ + OwnedGiftRegular( + gift=Gift( + id="test_gift_id", + sticker=Sticker( + file_id="test_file_id", + file_unique_id="test_file_unique_id", + type="regular", + width=512, + height=512, + is_animated=False, + is_video=False, + ), + star_count=100, + ), + send_date=int(datetime.datetime.now().timestamp()), + ) + ], + ), + ) + + response: OwnedGifts = await bot.get_user_gifts( + user_id=42, + limit=10, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_user_profile_audios.py b/tests/test_api/test_methods/test_get_user_profile_audios.py new file mode 100644 index 00000000..b4f08905 --- /dev/null +++ b/tests/test_api/test_methods/test_get_user_profile_audios.py @@ -0,0 +1,19 @@ +from aiogram.methods import GetUserProfileAudios +from aiogram.types import Audio, UserProfileAudios +from tests.mocked_bot import MockedBot + + +class TestGetUserProfileAudios: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetUserProfileAudios, + ok=True, + result=UserProfileAudios( + total_count=1, + audios=[Audio(file_id="file_id", file_unique_id="file_unique_id", duration=120)], + ), + ) + + response: UserProfileAudios = await bot.get_user_profile_audios(user_id=42) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_user_profile_photos.py b/tests/test_api/test_methods/test_get_user_profile_photos.py index ed5329cc..df61db63 100644 --- a/tests/test_api/test_methods/test_get_user_profile_photos.py +++ b/tests/test_api/test_methods/test_get_user_profile_photos.py @@ -1,4 +1,4 @@ -from aiogram.methods import GetUserProfilePhotos, Request +from aiogram.methods import GetUserProfilePhotos from aiogram.types import PhotoSize, UserProfilePhotos from tests.mocked_bot import MockedBot @@ -17,5 +17,5 @@ class TestGetUserProfilePhotos: ) response: UserProfilePhotos = await bot.get_user_profile_photos(user_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_webhook_info.py b/tests/test_api/test_methods/test_get_webhook_info.py index d6723411..29f392ef 100644 --- a/tests/test_api/test_methods/test_get_webhook_info.py +++ b/tests/test_api/test_methods/test_get_webhook_info.py @@ -1,4 +1,4 @@ -from aiogram.methods import GetWebhookInfo, Request +from aiogram.methods import GetWebhookInfo from aiogram.types import WebhookInfo from tests.mocked_bot import MockedBot @@ -14,5 +14,5 @@ class TestGetWebhookInfo: ) response: WebhookInfo = await bot.get_webhook_info() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_gift_premium_subscription.py b/tests/test_api/test_methods/test_gift_premium_subscription.py new file mode 100644 index 00000000..bd60ec13 --- /dev/null +++ b/tests/test_api/test_methods/test_gift_premium_subscription.py @@ -0,0 +1,16 @@ +from aiogram.methods import GiftPremiumSubscription +from tests.mocked_bot import MockedBot + + +class TestGiftPremiumSubscription: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(GiftPremiumSubscription, ok=True, result=True) + + response: bool = await bot.gift_premium_subscription( + user_id=123456789, + month_count=3, + star_count=1000, + text="Enjoy your premium subscription!", + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_hide_general_forum_topic.py b/tests/test_api/test_methods/test_hide_general_forum_topic.py index d142ae5e..259fe03b 100644 --- a/tests/test_api/test_methods/test_hide_general_forum_topic.py +++ b/tests/test_api/test_methods/test_hide_general_forum_topic.py @@ -1,4 +1,4 @@ -from aiogram.methods import HideGeneralForumTopic, Request +from aiogram.methods import HideGeneralForumTopic from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestHideGeneralForumTopic: prepare_result = bot.add_result_for(HideGeneralForumTopic, ok=True, result=True) response: bool = await bot.hide_general_forum_topic(chat_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_leave_chat.py b/tests/test_api/test_methods/test_leave_chat.py index e65902ca..fc4b33d2 100644 --- a/tests/test_api/test_methods/test_leave_chat.py +++ b/tests/test_api/test_methods/test_leave_chat.py @@ -1,4 +1,4 @@ -from aiogram.methods import LeaveChat, Request +from aiogram.methods import LeaveChat from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestLeaveChat: prepare_result = bot.add_result_for(LeaveChat, ok=True, result=True) response: bool = await bot.leave_chat(chat_id=-42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_log_out.py b/tests/test_api/test_methods/test_log_out.py index bb066579..0f1462e1 100644 --- a/tests/test_api/test_methods/test_log_out.py +++ b/tests/test_api/test_methods/test_log_out.py @@ -1,4 +1,4 @@ -from aiogram.methods import LogOut, Request +from aiogram.methods import LogOut from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestLogOut: prepare_result = bot.add_result_for(LogOut, ok=True, result=True) response: bool = await bot.log_out() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_pin_chat_message.py b/tests/test_api/test_methods/test_pin_chat_message.py index 5f8a0eba..f9f44fff 100644 --- a/tests/test_api/test_methods/test_pin_chat_message.py +++ b/tests/test_api/test_methods/test_pin_chat_message.py @@ -1,4 +1,4 @@ -from aiogram.methods import PinChatMessage, Request +from aiogram.methods import PinChatMessage from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestPinChatMessage: prepare_result = bot.add_result_for(PinChatMessage, ok=True, result=True) response: bool = await bot.pin_chat_message(chat_id=-42, message_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_post_story.py b/tests/test_api/test_methods/test_post_story.py new file mode 100644 index 00000000..3a37e373 --- /dev/null +++ b/tests/test_api/test_methods/test_post_story.py @@ -0,0 +1,24 @@ +from aiogram.methods import PostStory +from aiogram.types import Chat, InputStoryContentPhoto, Story +from tests.mocked_bot import MockedBot + + +class TestPostStory: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + PostStory, + ok=True, + result=Story( + id=42, + chat=Chat(id=42, type="private"), + ), + ) + + response: Story = await bot.post_story( + business_connection_id="test_connection_id", + content=InputStoryContentPhoto(type="photo", photo="test_photo"), + active_period=6 * 3600, # 6 hours + caption="Test story caption", + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_promote_chat_member.py b/tests/test_api/test_methods/test_promote_chat_member.py index 8fa4a08f..1f19f3da 100644 --- a/tests/test_api/test_methods/test_promote_chat_member.py +++ b/tests/test_api/test_methods/test_promote_chat_member.py @@ -1,4 +1,4 @@ -from aiogram.methods import PromoteChatMember, Request +from aiogram.methods import PromoteChatMember from tests.mocked_bot import MockedBot @@ -6,6 +6,11 @@ class TestPromoteChatMember: async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(PromoteChatMember, ok=True, result=True) - response: bool = await bot.promote_chat_member(chat_id=-42, user_id=42) + response: bool = await bot.promote_chat_member( + chat_id=-42, + user_id=42, + can_manage_tags=True, + ) request = bot.get_request() + assert request.can_manage_tags is True assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_read_business_message.py b/tests/test_api/test_methods/test_read_business_message.py new file mode 100644 index 00000000..0f3b2db7 --- /dev/null +++ b/tests/test_api/test_methods/test_read_business_message.py @@ -0,0 +1,13 @@ +from aiogram.methods import ReadBusinessMessage +from tests.mocked_bot import MockedBot + + +class TestReadBusinessMessage: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(ReadBusinessMessage, ok=True, result=True) + + response: bool = await bot.read_business_message( + business_connection_id="test_connection_id", chat_id=123456789, message_id=42 + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_refund_star_payment.py b/tests/test_api/test_methods/test_refund_star_payment.py index 4e83f940..989d1cc4 100644 --- a/tests/test_api/test_methods/test_refund_star_payment.py +++ b/tests/test_api/test_methods/test_refund_star_payment.py @@ -1,6 +1,4 @@ -from aiogram.enums import StickerFormat -from aiogram.methods import AddStickerToSet, RefundStarPayment -from aiogram.types import InputSticker +from aiogram.methods import RefundStarPayment from tests.mocked_bot import MockedBot @@ -12,5 +10,5 @@ class TestRefundStarPayment: user_id=42, telegram_payment_charge_id="12345", ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_remove_business_account_profile_photo.py b/tests/test_api/test_methods/test_remove_business_account_profile_photo.py new file mode 100644 index 00000000..8ba1b691 --- /dev/null +++ b/tests/test_api/test_methods/test_remove_business_account_profile_photo.py @@ -0,0 +1,15 @@ +from aiogram.methods import RemoveBusinessAccountProfilePhoto +from tests.mocked_bot import MockedBot + + +class TestRemoveBusinessAccountProfilePhoto: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + RemoveBusinessAccountProfilePhoto, ok=True, result=True + ) + + response: bool = await bot.remove_business_account_profile_photo( + business_connection_id="test_connection_id", is_public=True + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_remove_chat_verification.py b/tests/test_api/test_methods/test_remove_chat_verification.py new file mode 100644 index 00000000..242daadb --- /dev/null +++ b/tests/test_api/test_methods/test_remove_chat_verification.py @@ -0,0 +1,11 @@ +from aiogram.methods import RemoveChatVerification +from tests.mocked_bot import MockedBot + + +class TestRemoveChatVerification: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(RemoveChatVerification, ok=True, result=True) + + response: bool = await bot.remove_chat_verification(chat_id=42) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_remove_my_profile_photo.py b/tests/test_api/test_methods/test_remove_my_profile_photo.py new file mode 100644 index 00000000..9be7b4b1 --- /dev/null +++ b/tests/test_api/test_methods/test_remove_my_profile_photo.py @@ -0,0 +1,11 @@ +from aiogram.methods import RemoveMyProfilePhoto +from tests.mocked_bot import MockedBot + + +class TestRemoveMyProfilePhoto: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(RemoveMyProfilePhoto, ok=True, result=True) + + response: bool = await bot.remove_my_profile_photo() + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_remove_user_verification.py b/tests/test_api/test_methods/test_remove_user_verification.py new file mode 100644 index 00000000..d5e32484 --- /dev/null +++ b/tests/test_api/test_methods/test_remove_user_verification.py @@ -0,0 +1,11 @@ +from aiogram.methods import RemoveUserVerification +from tests.mocked_bot import MockedBot + + +class TestRemoveUserVerification: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(RemoveUserVerification, ok=True, result=True) + + response: bool = await bot.remove_user_verification(user_id=42) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_reopen_forum_topic.py b/tests/test_api/test_methods/test_reopen_forum_topic.py index ff4c9b66..b71c5484 100644 --- a/tests/test_api/test_methods/test_reopen_forum_topic.py +++ b/tests/test_api/test_methods/test_reopen_forum_topic.py @@ -1,4 +1,4 @@ -from aiogram.methods import ReopenForumTopic, Request +from aiogram.methods import ReopenForumTopic from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestReopenForumTopic: chat_id=42, message_thread_id=42, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_reopen_general_forum_topic.py b/tests/test_api/test_methods/test_reopen_general_forum_topic.py index 6eceb7d7..8e35855f 100644 --- a/tests/test_api/test_methods/test_reopen_general_forum_topic.py +++ b/tests/test_api/test_methods/test_reopen_general_forum_topic.py @@ -1,4 +1,4 @@ -from aiogram.methods import ReopenGeneralForumTopic, Request +from aiogram.methods import ReopenGeneralForumTopic from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestReopenGeneralForumTopic: prepare_result = bot.add_result_for(ReopenGeneralForumTopic, ok=True, result=True) response: bool = await bot.reopen_general_forum_topic(chat_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_replace_managed_bot_token.py b/tests/test_api/test_methods/test_replace_managed_bot_token.py new file mode 100644 index 00000000..5f71afe2 --- /dev/null +++ b/tests/test_api/test_methods/test_replace_managed_bot_token.py @@ -0,0 +1,13 @@ +from aiogram.methods import ReplaceManagedBotToken +from tests.mocked_bot import MockedBot + + +class TestReplaceManagedBotToken: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + ReplaceManagedBotToken, ok=True, result="42:REPLACED_TOKEN" + ) + + response: str = await bot.replace_managed_bot_token(user_id=42) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_replace_sticker_in_set.py b/tests/test_api/test_methods/test_replace_sticker_in_set.py index e556919d..50e066bc 100644 --- a/tests/test_api/test_methods/test_replace_sticker_in_set.py +++ b/tests/test_api/test_methods/test_replace_sticker_in_set.py @@ -17,5 +17,5 @@ class TestReplaceStickerInSet: emoji_list=["test"], ), ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_repost_story.py b/tests/test_api/test_methods/test_repost_story.py new file mode 100644 index 00000000..0fab2c2f --- /dev/null +++ b/tests/test_api/test_methods/test_repost_story.py @@ -0,0 +1,24 @@ +from aiogram.methods import RepostStory +from aiogram.types import Chat, Story +from tests.mocked_bot import MockedBot + + +class TestRepostStory: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + RepostStory, + ok=True, + result=Story( + id=42, + chat=Chat(id=42, type="private"), + ), + ) + + response: Story = await bot.repost_story( + business_connection_id="test_connection_id", + from_chat_id=123, + from_story_id=456, + active_period=6 * 3600, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_restrict_chat_member.py b/tests/test_api/test_methods/test_restrict_chat_member.py index 716fa23d..96d7a676 100644 --- a/tests/test_api/test_methods/test_restrict_chat_member.py +++ b/tests/test_api/test_methods/test_restrict_chat_member.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, RestrictChatMember +from aiogram.methods import RestrictChatMember from aiogram.types import ChatPermissions from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestRestrictChatMember: response: bool = await bot.restrict_chat_member( chat_id=-42, user_id=42, permissions=ChatPermissions() ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_revoke_chat_invite_link.py b/tests/test_api/test_methods/test_revoke_chat_invite_link.py index 9d8c26b3..cbc51e2c 100644 --- a/tests/test_api/test_methods/test_revoke_chat_invite_link.py +++ b/tests/test_api/test_methods/test_revoke_chat_invite_link.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, RevokeChatInviteLink +from aiogram.methods import RevokeChatInviteLink from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot @@ -21,5 +21,5 @@ class TestRevokeChatInviteLink: chat_id=-42, invite_link="https://t.me/username", ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_save_prepared_inline_message.py b/tests/test_api/test_methods/test_save_prepared_inline_message.py new file mode 100644 index 00000000..6cf5b9f8 --- /dev/null +++ b/tests/test_api/test_methods/test_save_prepared_inline_message.py @@ -0,0 +1,34 @@ +from datetime import datetime, timedelta + +from aiogram.methods import SavePreparedInlineMessage +from aiogram.types import ( + InlineQueryResultArticle, + InputTextMessageContent, + PreparedInlineMessage, +) +from tests.mocked_bot import MockedBot + + +class TestSavePreparedInlineMessage: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SavePreparedInlineMessage, + ok=True, + result=PreparedInlineMessage( + id="id", + expiration_date=datetime.now() + timedelta(days=1), + ), + ) + + response: PreparedInlineMessage = await bot.save_prepared_inline_message( + user_id=42, + result=InlineQueryResultArticle( + id="id", + title="title", + input_message_content=InputTextMessageContent( + message_text="message_text", + ), + ), + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_save_prepared_keyboard_button.py b/tests/test_api/test_methods/test_save_prepared_keyboard_button.py new file mode 100644 index 00000000..04ca1e69 --- /dev/null +++ b/tests/test_api/test_methods/test_save_prepared_keyboard_button.py @@ -0,0 +1,22 @@ +from aiogram.methods import SavePreparedKeyboardButton +from aiogram.types import KeyboardButton, KeyboardButtonRequestManagedBot, PreparedKeyboardButton +from tests.mocked_bot import MockedBot + + +class TestSavePreparedKeyboardButton: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SavePreparedKeyboardButton, + ok=True, + result=PreparedKeyboardButton(id="test-id"), + ) + + response: PreparedKeyboardButton = await bot.save_prepared_keyboard_button( + user_id=42, + button=KeyboardButton( + text="Create bot", + request_managed_bot=KeyboardButtonRequestManagedBot(request_id=1), + ), + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_animation.py b/tests/test_api/test_methods/test_send_animation.py index b9f5508f..9f08eb8c 100644 --- a/tests/test_api/test_methods/test_send_animation.py +++ b/tests/test_api/test_methods/test_send_animation.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendAnimation +from aiogram.methods import SendAnimation from aiogram.types import Animation, Chat, Message from tests.mocked_bot import MockedBot @@ -21,5 +21,5 @@ class TestSendAnimation: ) response: Message = await bot.send_animation(chat_id=42, animation="file id") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_audio.py b/tests/test_api/test_methods/test_send_audio.py index b5b2a32b..8ba52624 100644 --- a/tests/test_api/test_methods/test_send_audio.py +++ b/tests/test_api/test_methods/test_send_audio.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendAudio +from aiogram.methods import SendAudio from aiogram.types import Audio, Chat, Message from tests.mocked_bot import MockedBot @@ -19,5 +19,5 @@ class TestSendAudio: ) response: Message = await bot.send_audio(chat_id=42, audio="file id") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_chat_action.py b/tests/test_api/test_methods/test_send_chat_action.py index 3c2d8ecb..95835f7b 100644 --- a/tests/test_api/test_methods/test_send_chat_action.py +++ b/tests/test_api/test_methods/test_send_chat_action.py @@ -1,5 +1,5 @@ from aiogram.enums import ChatAction -from aiogram.methods import Request, SendChatAction +from aiogram.methods import SendChatAction from tests.mocked_bot import MockedBot @@ -8,5 +8,5 @@ class TestSendChatAction: prepare_result = bot.add_result_for(SendChatAction, ok=True, result=True) response: bool = await bot.send_chat_action(chat_id=42, action=ChatAction.TYPING) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_checklist.py b/tests/test_api/test_methods/test_send_checklist.py new file mode 100644 index 00000000..b4677672 --- /dev/null +++ b/tests/test_api/test_methods/test_send_checklist.py @@ -0,0 +1,34 @@ +import datetime + +from aiogram.methods import SendChecklist +from aiogram.types import Chat, InputChecklist, InputChecklistTask, Message +from tests.mocked_bot import MockedBot + + +class TestSendChecklist: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SendChecklist, + ok=True, + result=Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + ), + ) + + checklist = InputChecklist( + title="Test Checklist", + tasks=[ + InputChecklistTask(id=1, text="Task 1"), + InputChecklistTask(id=2, text="Task 2"), + ], + ) + + response: Message = await bot.send_checklist( + business_connection_id="test_connection", + chat_id=42, + checklist=checklist, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_contact.py b/tests/test_api/test_methods/test_send_contact.py index 83c6f3ae..8cd1f1fc 100644 --- a/tests/test_api/test_methods/test_send_contact.py +++ b/tests/test_api/test_methods/test_send_contact.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendContact +from aiogram.methods import SendContact from aiogram.types import Chat, Contact, Message from tests.mocked_bot import MockedBot @@ -21,5 +21,5 @@ class TestSendContact: response: Message = await bot.send_contact( chat_id=42, phone_number="911", first_name="911" ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_dice.py b/tests/test_api/test_methods/test_send_dice.py index 35196ee6..00dcbdb9 100644 --- a/tests/test_api/test_methods/test_send_dice.py +++ b/tests/test_api/test_methods/test_send_dice.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SendDice +from aiogram.methods import SendDice from aiogram.types import Message from tests.mocked_bot import MockedBot @@ -8,5 +8,5 @@ class TestSendDice: prepare_result = bot.add_result_for(SendDice, ok=True, result=None) response: Message = await bot.send_dice(chat_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_document.py b/tests/test_api/test_methods/test_send_document.py index 54c0d712..17dd9cf1 100644 --- a/tests/test_api/test_methods/test_send_document.py +++ b/tests/test_api/test_methods/test_send_document.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendDocument +from aiogram.methods import SendDocument from aiogram.types import Chat, Document, Message from tests.mocked_bot import MockedBot @@ -19,5 +19,5 @@ class TestSendDocument: ) response: Message = await bot.send_document(chat_id=42, document="file id") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_game.py b/tests/test_api/test_methods/test_send_game.py index a0d1bb84..dfe8d10f 100644 --- a/tests/test_api/test_methods/test_send_game.py +++ b/tests/test_api/test_methods/test_send_game.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendGame +from aiogram.methods import SendGame from aiogram.types import Chat, Game, Message, PhotoSize from tests.mocked_bot import MockedBot @@ -25,5 +25,5 @@ class TestSendGame: ) response: Message = await bot.send_game(chat_id=42, game_short_name="game") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_gift.py b/tests/test_api/test_methods/test_send_gift.py new file mode 100644 index 00000000..6acd477d --- /dev/null +++ b/tests/test_api/test_methods/test_send_gift.py @@ -0,0 +1,11 @@ +from aiogram.methods import SendGift +from tests.mocked_bot import MockedBot + + +class TestSendGift: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SendGift, ok=True, result=True) + + response: bool = await bot.send_gift(user_id=42, gift_id="gift_id") + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_invoice.py b/tests/test_api/test_methods/test_send_invoice.py index 650c4a19..a079fe14 100644 --- a/tests/test_api/test_methods/test_send_invoice.py +++ b/tests/test_api/test_methods/test_send_invoice.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendInvoice +from aiogram.methods import SendInvoice from aiogram.types import Chat, Invoice, LabeledPrice, Message from tests.mocked_bot import MockedBot @@ -34,5 +34,5 @@ class TestSendInvoice: currency="BTC", prices=[LabeledPrice(amount=1, label="test")], ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_location.py b/tests/test_api/test_methods/test_send_location.py index b662106d..c6db81a5 100644 --- a/tests/test_api/test_methods/test_send_location.py +++ b/tests/test_api/test_methods/test_send_location.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendLocation +from aiogram.methods import SendLocation from aiogram.types import Chat, Location, Message from tests.mocked_bot import MockedBot @@ -19,5 +19,5 @@ class TestSendLocation: ) response: Message = await bot.send_location(chat_id=42, latitude=3.14, longitude=3.14) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_media_group.py b/tests/test_api/test_methods/test_send_media_group.py index 759184f7..63d8f7ab 100644 --- a/tests/test_api/test_methods/test_send_media_group.py +++ b/tests/test_api/test_methods/test_send_media_group.py @@ -1,7 +1,6 @@ import datetime -from typing import List -from aiogram.methods import Request, SendMediaGroup +from aiogram.methods import SendMediaGroup from aiogram.types import ( BufferedInputFile, Chat, @@ -45,12 +44,12 @@ class TestSendMediaGroup: ], ) - response: List[Message] = await bot.send_media_group( + response: list[Message] = await bot.send_media_group( chat_id=42, media=[ InputMediaPhoto(media="file id"), InputMediaVideo(media=BufferedInputFile(b"", "video.mp4")), ], ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_message.py b/tests/test_api/test_methods/test_send_message.py index 99242ca2..3a612148 100644 --- a/tests/test_api/test_methods/test_send_message.py +++ b/tests/test_api/test_methods/test_send_message.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendMessage +from aiogram.methods import SendMessage from aiogram.types import Chat, ForceReply, Message, ReplyKeyboardRemove from tests.mocked_bot import MockedBot @@ -19,7 +19,7 @@ class TestSendMessage: ) response: Message = await bot.send_message(chat_id=42, text="test") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result async def test_force_reply(self): diff --git a/tests/test_api/test_methods/test_send_message_draft.py b/tests/test_api/test_methods/test_send_message_draft.py new file mode 100644 index 00000000..5edf790b --- /dev/null +++ b/tests/test_api/test_methods/test_send_message_draft.py @@ -0,0 +1,19 @@ +from aiogram.methods import SendMessageDraft +from tests.mocked_bot import MockedBot + + +class TestSendMessageDraft: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SendMessageDraft, + ok=True, + result=True, + ) + + response: bool = await bot.send_message_draft( + chat_id=42, + draft_id=1, + text="test draft", + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_paid_media.py b/tests/test_api/test_methods/test_send_paid_media.py index 37ff2717..0039d88a 100755 --- a/tests/test_api/test_methods/test_send_paid_media.py +++ b/tests/test_api/test_methods/test_send_paid_media.py @@ -39,5 +39,5 @@ class TestSendPaidMedia: response: Message = await bot.send_paid_media( chat_id=-42, star_count=1, media=[InputPaidMediaPhoto(media="file_id")] ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_photo.py b/tests/test_api/test_methods/test_send_photo.py index 528a04a1..07eb2080 100644 --- a/tests/test_api/test_methods/test_send_photo.py +++ b/tests/test_api/test_methods/test_send_photo.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendPhoto +from aiogram.methods import SendPhoto from aiogram.types import Chat, Message, PhotoSize from tests.mocked_bot import MockedBot @@ -21,5 +21,5 @@ class TestSendPhoto: ) response: Message = await bot.send_photo(chat_id=42, photo="file id") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_poll.py b/tests/test_api/test_methods/test_send_poll.py index 4bc791fc..6e8ce7e9 100644 --- a/tests/test_api/test_methods/test_send_poll.py +++ b/tests/test_api/test_methods/test_send_poll.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendPoll +from aiogram.methods import SendPoll from aiogram.types import Chat, Message, Poll, PollOption from tests.mocked_bot import MockedBot @@ -17,13 +17,14 @@ class TestSendPoll: id="QA", question="Q", options=[ - PollOption(text="A", voter_count=0), - PollOption(text="B", voter_count=0), + PollOption(persistent_id="1", text="A", voter_count=0), + PollOption(persistent_id="2", text="B", voter_count=0), ], is_closed=False, is_anonymous=False, type="quiz", allows_multiple_answers=False, + allows_revoting=False, total_voter_count=0, correct_option_id=0, ), @@ -34,5 +35,5 @@ class TestSendPoll: response: Message = await bot.send_poll( chat_id=42, question="Q?", options=["A", "B"], correct_option_id=0, type="quiz" ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_sticker.py b/tests/test_api/test_methods/test_send_sticker.py index af847e08..add81076 100644 --- a/tests/test_api/test_methods/test_send_sticker.py +++ b/tests/test_api/test_methods/test_send_sticker.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendSticker +from aiogram.methods import SendSticker from aiogram.types import Chat, Message, Sticker from tests.mocked_bot import MockedBot @@ -27,5 +27,5 @@ class TestSendSticker: ) response: Message = await bot.send_sticker(chat_id=42, sticker="file id") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_venue.py b/tests/test_api/test_methods/test_send_venue.py index 4234c7a5..8eb733af 100644 --- a/tests/test_api/test_methods/test_send_venue.py +++ b/tests/test_api/test_methods/test_send_venue.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendVenue +from aiogram.methods import SendVenue from aiogram.types import Chat, Location, Message, Venue from tests.mocked_bot import MockedBot @@ -31,5 +31,5 @@ class TestSendVenue: address="Under the stairs, 4 Privet Drive, " "Little Whinging, Surrey, England, Great Britain", ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_video.py b/tests/test_api/test_methods/test_send_video.py index 16572b3e..3e412084 100644 --- a/tests/test_api/test_methods/test_send_video.py +++ b/tests/test_api/test_methods/test_send_video.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendVideo +from aiogram.methods import SendVideo from aiogram.types import Chat, Message, Video from tests.mocked_bot import MockedBot @@ -21,5 +21,5 @@ class TestSendVideo: ) response: Message = await bot.send_video(chat_id=42, video="file id") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_video_note.py b/tests/test_api/test_methods/test_send_video_note.py index 3da752f5..6bc52ddf 100644 --- a/tests/test_api/test_methods/test_send_video_note.py +++ b/tests/test_api/test_methods/test_send_video_note.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendVideoNote +from aiogram.methods import SendVideoNote from aiogram.types import BufferedInputFile, Chat, Message, VideoNote from tests.mocked_bot import MockedBot @@ -25,5 +25,5 @@ class TestSendVideoNote: video_note="file id", thumbnail=BufferedInputFile(b"", "file.png"), ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_voice.py b/tests/test_api/test_methods/test_send_voice.py index 2c55b07d..40e36df0 100644 --- a/tests/test_api/test_methods/test_send_voice.py +++ b/tests/test_api/test_methods/test_send_voice.py @@ -1,6 +1,6 @@ import datetime -from aiogram.methods import Request, SendVoice +from aiogram.methods import SendVoice from aiogram.types import Chat, Message, Voice from tests.mocked_bot import MockedBot @@ -19,5 +19,5 @@ class TestSendVoice: ) response: Message = await bot.send_voice(chat_id=42, voice="file id") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_business_account_bio.py b/tests/test_api/test_methods/test_set_business_account_bio.py new file mode 100644 index 00000000..e2cde8bc --- /dev/null +++ b/tests/test_api/test_methods/test_set_business_account_bio.py @@ -0,0 +1,14 @@ +from aiogram.methods import SetBusinessAccountBio +from tests.mocked_bot import MockedBot + + +class TestSetBusinessAccountBio: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetBusinessAccountBio, ok=True, result=True) + + response: bool = await bot.set_business_account_bio( + business_connection_id="test_connection_id", + bio="This is a test bio for the business account", + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_business_account_gift_settings.py b/tests/test_api/test_methods/test_set_business_account_gift_settings.py new file mode 100644 index 00000000..bd98a675 --- /dev/null +++ b/tests/test_api/test_methods/test_set_business_account_gift_settings.py @@ -0,0 +1,22 @@ +from aiogram.methods import SetBusinessAccountGiftSettings +from aiogram.types import AcceptedGiftTypes +from tests.mocked_bot import MockedBot + + +class TestSetBusinessAccountGiftSettings: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetBusinessAccountGiftSettings, ok=True, result=True) + + response: bool = await bot.set_business_account_gift_settings( + business_connection_id="test_connection_id", + show_gift_button=True, + accepted_gift_types=AcceptedGiftTypes( + gifts_from_channels=True, + unlimited_gifts=True, + limited_gifts=True, + unique_gifts=True, + premium_subscription=True, + ), + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_business_account_name.py b/tests/test_api/test_methods/test_set_business_account_name.py new file mode 100644 index 00000000..77a437b1 --- /dev/null +++ b/tests/test_api/test_methods/test_set_business_account_name.py @@ -0,0 +1,15 @@ +from aiogram.methods import SetBusinessAccountName +from tests.mocked_bot import MockedBot + + +class TestSetBusinessAccountName: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetBusinessAccountName, ok=True, result=True) + + response: bool = await bot.set_business_account_name( + business_connection_id="test_connection_id", + first_name="Test Business", + last_name="Account Name", + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_business_account_profile_photo.py b/tests/test_api/test_methods/test_set_business_account_profile_photo.py new file mode 100644 index 00000000..b7dbec3c --- /dev/null +++ b/tests/test_api/test_methods/test_set_business_account_profile_photo.py @@ -0,0 +1,16 @@ +from aiogram.methods import SetBusinessAccountProfilePhoto +from aiogram.types import InputProfilePhotoStatic +from tests.mocked_bot import MockedBot + + +class TestSetBusinessAccountProfilePhoto: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetBusinessAccountProfilePhoto, ok=True, result=True) + + response: bool = await bot.set_business_account_profile_photo( + business_connection_id="test_connection_id", + photo=InputProfilePhotoStatic(photo="test_photo_file_id"), + is_public=True, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_business_account_username.py b/tests/test_api/test_methods/test_set_business_account_username.py new file mode 100644 index 00000000..a7b050f5 --- /dev/null +++ b/tests/test_api/test_methods/test_set_business_account_username.py @@ -0,0 +1,13 @@ +from aiogram.methods import SetBusinessAccountUsername +from tests.mocked_bot import MockedBot + + +class TestSetBusinessAccountUsername: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetBusinessAccountUsername, ok=True, result=True) + + response: bool = await bot.set_business_account_username( + business_connection_id="test_connection_id", username="test_business_username" + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py b/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py index 7a759618..9aabcbb5 100644 --- a/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py +++ b/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetChatAdministratorCustomTitle +from aiogram.methods import SetChatAdministratorCustomTitle from tests.mocked_bot import MockedBot @@ -9,5 +9,5 @@ class TestSetChatTitle: response: bool = await bot.set_chat_administrator_custom_title( chat_id=-42, user_id=42, custom_title="test chat" ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_description.py b/tests/test_api/test_methods/test_set_chat_description.py index eb9885d2..95385606 100644 --- a/tests/test_api/test_methods/test_set_chat_description.py +++ b/tests/test_api/test_methods/test_set_chat_description.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetChatDescription +from aiogram.methods import SetChatDescription from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetChatDescription: prepare_result = bot.add_result_for(SetChatDescription, ok=True, result=True) response: bool = await bot.set_chat_description(chat_id=-42, description="awesome chat") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_member_tag.py b/tests/test_api/test_methods/test_set_chat_member_tag.py new file mode 100644 index 00000000..edc581cd --- /dev/null +++ b/tests/test_api/test_methods/test_set_chat_member_tag.py @@ -0,0 +1,14 @@ +from aiogram.methods import SetChatMemberTag +from tests.mocked_bot import MockedBot + + +class TestSetChatMemberTag: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetChatMemberTag, ok=True, result=True) + + response: bool = await bot.set_chat_member_tag(chat_id=-42, user_id=42, tag="test") + request = bot.get_request() + assert request.chat_id == -42 + assert request.user_id == 42 + assert request.tag == "test" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_menu_button.py b/tests/test_api/test_methods/test_set_chat_menu_button.py index 1cac7081..5ab8c51f 100644 --- a/tests/test_api/test_methods/test_set_chat_menu_button.py +++ b/tests/test_api/test_methods/test_set_chat_menu_button.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetChatMenuButton +from aiogram.methods import SetChatMenuButton from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetChatMenuButton: prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) response: bool = await bot.set_chat_menu_button() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_permissions.py b/tests/test_api/test_methods/test_set_chat_permissions.py index 1dcd64b9..1cb41c91 100644 --- a/tests/test_api/test_methods/test_set_chat_permissions.py +++ b/tests/test_api/test_methods/test_set_chat_permissions.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetChatPermissions +from aiogram.methods import SetChatPermissions from aiogram.types import ChatPermissions from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestSetChatPermissions: response: bool = await bot.set_chat_permissions( chat_id=-42, permissions=ChatPermissions(can_send_messages=False) ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_photo.py b/tests/test_api/test_methods/test_set_chat_photo.py index 68e0bbbc..8a4057a7 100644 --- a/tests/test_api/test_methods/test_set_chat_photo.py +++ b/tests/test_api/test_methods/test_set_chat_photo.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetChatPhoto +from aiogram.methods import SetChatPhoto from aiogram.types import BufferedInputFile from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestSetChatPhoto: response: bool = await bot.set_chat_photo( chat_id=-42, photo=BufferedInputFile(b"", filename="file.png") ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_sticker_set.py b/tests/test_api/test_methods/test_set_chat_sticker_set.py index c87be0cd..44f776ac 100644 --- a/tests/test_api/test_methods/test_set_chat_sticker_set.py +++ b/tests/test_api/test_methods/test_set_chat_sticker_set.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetChatStickerSet +from aiogram.methods import SetChatStickerSet from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetChatStickerSet: prepare_result = bot.add_result_for(SetChatStickerSet, ok=True, result=True) response: bool = await bot.set_chat_sticker_set(chat_id=-42, sticker_set_name="test") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_title.py b/tests/test_api/test_methods/test_set_chat_title.py index e45d24f2..056b0f2b 100644 --- a/tests/test_api/test_methods/test_set_chat_title.py +++ b/tests/test_api/test_methods/test_set_chat_title.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetChatTitle +from aiogram.methods import SetChatTitle from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetChatTitle: prepare_result = bot.add_result_for(SetChatTitle, ok=True, result=True) response: bool = await bot.set_chat_title(chat_id=-42, title="test chat") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py b/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py index 75d056df..4b92229f 100644 --- a/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py +++ b/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetCustomEmojiStickerSetThumbnail +from aiogram.methods import SetCustomEmojiStickerSetThumbnail from tests.mocked_bot import MockedBot @@ -11,5 +11,5 @@ class TestSetCustomEmojiStickerSetThumbnail: response: bool = await bot.set_custom_emoji_sticker_set_thumbnail( name="test", custom_emoji_id="custom id" ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_game_score.py b/tests/test_api/test_methods/test_set_game_score.py index 6da8e123..ea1db0c1 100644 --- a/tests/test_api/test_methods/test_set_game_score.py +++ b/tests/test_api/test_methods/test_set_game_score.py @@ -1,6 +1,4 @@ -from typing import Union - -from aiogram.methods import Request, SetGameScore +from aiogram.methods import SetGameScore from aiogram.types import Message from tests.mocked_bot import MockedBot @@ -9,8 +7,8 @@ class TestSetGameScore: async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetGameScore, ok=True, result=True) - response: Union[Message, bool] = await bot.set_game_score( + response: Message | bool = await bot.set_game_score( user_id=42, score=100500, inline_message_id="inline message" ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_commands.py b/tests/test_api/test_methods/test_set_my_commands.py index 16066b73..fa5fe3c3 100644 --- a/tests/test_api/test_methods/test_set_my_commands.py +++ b/tests/test_api/test_methods/test_set_my_commands.py @@ -1,5 +1,4 @@ -from aiogram.methods import Request, SetMyCommands -from aiogram.types import BotCommand +from aiogram.methods import SetMyCommands from tests.mocked_bot import MockedBot @@ -10,5 +9,5 @@ class TestSetMyCommands: response: bool = await bot.set_my_commands( commands=[], ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_default_administrator_rights.py b/tests/test_api/test_methods/test_set_my_default_administrator_rights.py index ac8e5d42..3f42071e 100644 --- a/tests/test_api/test_methods/test_set_my_default_administrator_rights.py +++ b/tests/test_api/test_methods/test_set_my_default_administrator_rights.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetMyDefaultAdministratorRights +from aiogram.methods import SetMyDefaultAdministratorRights from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetMyDefaultAdministratorRights: prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) response: bool = await bot.set_my_default_administrator_rights() - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_description.py b/tests/test_api/test_methods/test_set_my_description.py index 05e9bd7c..a2134cbc 100644 --- a/tests/test_api/test_methods/test_set_my_description.py +++ b/tests/test_api/test_methods/test_set_my_description.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetMyDescription +from aiogram.methods import SetMyDescription from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetMyDescription: prepare_result = bot.add_result_for(SetMyDescription, ok=True, result=True) response: bool = await bot.set_my_description(description="Test") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_profile_photo.py b/tests/test_api/test_methods/test_set_my_profile_photo.py new file mode 100644 index 00000000..2bf596f5 --- /dev/null +++ b/tests/test_api/test_methods/test_set_my_profile_photo.py @@ -0,0 +1,14 @@ +from aiogram.methods import SetMyProfilePhoto +from aiogram.types import InputProfilePhotoStatic +from tests.mocked_bot import MockedBot + + +class TestSetMyProfilePhoto: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetMyProfilePhoto, ok=True, result=True) + + response: bool = await bot.set_my_profile_photo( + photo=InputProfilePhotoStatic(photo="file_id") + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_short_description.py b/tests/test_api/test_methods/test_set_my_short_description.py index 9b40721d..729b2670 100644 --- a/tests/test_api/test_methods/test_set_my_short_description.py +++ b/tests/test_api/test_methods/test_set_my_short_description.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetMyDescription, SetMyShortDescription +from aiogram.methods import SetMyShortDescription from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetMyShortDescription: prepare_result = bot.add_result_for(SetMyShortDescription, ok=True, result=True) response: bool = await bot.set_my_short_description(short_description="Test") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_passport_data_errors.py b/tests/test_api/test_methods/test_set_passport_data_errors.py index 0e5647fb..e21b48ec 100644 --- a/tests/test_api/test_methods/test_set_passport_data_errors.py +++ b/tests/test_api/test_methods/test_set_passport_data_errors.py @@ -1,5 +1,5 @@ -from aiogram.methods import Request, SetPassportDataErrors -from aiogram.types import PassportElementError, PassportElementErrorFile +from aiogram.methods import SetPassportDataErrors +from aiogram.types import PassportElementErrorFile from tests.mocked_bot import MockedBot @@ -17,5 +17,5 @@ class TestSetPassportDataErrors: ) ], ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_emoji_list.py b/tests/test_api/test_methods/test_set_sticker_emoji_list.py index 76984264..97266d8e 100644 --- a/tests/test_api/test_methods/test_set_sticker_emoji_list.py +++ b/tests/test_api/test_methods/test_set_sticker_emoji_list.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetStickerEmojiList +from aiogram.methods import SetStickerEmojiList from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetStickerEmojiList: prepare_result = bot.add_result_for(SetStickerEmojiList, ok=True, result=True) response: bool = await bot.set_sticker_emoji_list(sticker="sticker id", emoji_list=["X"]) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_keywords.py b/tests/test_api/test_methods/test_set_sticker_keywords.py index ff9b31e4..21f70b2c 100644 --- a/tests/test_api/test_methods/test_set_sticker_keywords.py +++ b/tests/test_api/test_methods/test_set_sticker_keywords.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetStickerKeywords +from aiogram.methods import SetStickerKeywords from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetStickerKeywords: prepare_result = bot.add_result_for(SetStickerKeywords, ok=True, result=True) response: bool = await bot.set_sticker_keywords(sticker="sticker id", keywords=["X"]) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_mask_position.py b/tests/test_api/test_methods/test_set_sticker_mask_position.py index fa041461..3f842ceb 100644 --- a/tests/test_api/test_methods/test_set_sticker_mask_position.py +++ b/tests/test_api/test_methods/test_set_sticker_mask_position.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetStickerEmojiList, SetStickerMaskPosition +from aiogram.methods import SetStickerMaskPosition from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetStickerEmojiList: prepare_result = bot.add_result_for(SetStickerMaskPosition, ok=True, result=True) response: bool = await bot.set_sticker_mask_position(sticker="sticker id") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_position_in_set.py b/tests/test_api/test_methods/test_set_sticker_position_in_set.py index ce06652c..2646d24d 100644 --- a/tests/test_api/test_methods/test_set_sticker_position_in_set.py +++ b/tests/test_api/test_methods/test_set_sticker_position_in_set.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetStickerPositionInSet +from aiogram.methods import SetStickerPositionInSet from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetStickerPositionInSet: prepare_result = bot.add_result_for(SetStickerPositionInSet, ok=True, result=True) response: bool = await bot.set_sticker_position_in_set(sticker="sticker", position=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py b/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py index bfdfd808..45dc9700 100644 --- a/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py +++ b/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py @@ -1,5 +1,5 @@ from aiogram.enums import StickerFormat -from aiogram.methods import Request, SetStickerSetThumbnail +from aiogram.methods import SetStickerSetThumbnail from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestSetStickerSetThumbnail: response: bool = await bot.set_sticker_set_thumbnail( name="test", format=StickerFormat.STATIC, user_id=42 ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_set_title.py b/tests/test_api/test_methods/test_set_sticker_set_title.py index 2a9645cb..6c0b7d21 100644 --- a/tests/test_api/test_methods/test_set_sticker_set_title.py +++ b/tests/test_api/test_methods/test_set_sticker_set_title.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetStickerEmojiList, SetStickerSetTitle +from aiogram.methods import SetStickerSetTitle from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetStickerSetTitle: prepare_result = bot.add_result_for(SetStickerSetTitle, ok=True, result=True) response: bool = await bot.set_sticker_set_title(name="test", title="Test") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_user_emoji_status.py b/tests/test_api/test_methods/test_set_user_emoji_status.py new file mode 100644 index 00000000..1a03d5f7 --- /dev/null +++ b/tests/test_api/test_methods/test_set_user_emoji_status.py @@ -0,0 +1,17 @@ +from datetime import datetime, timedelta + +from aiogram.methods import SetUserEmojiStatus +from tests.mocked_bot import MockedBot + + +class TestSetUserEmojiStatus: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetUserEmojiStatus, ok=True, result=True) + + response: bool = await bot.set_user_emoji_status( + user_id=42, + emoji_status_custom_emoji_id="emoji_status_custom_emoji_id", + emoji_status_expiration_date=datetime.now() + timedelta(days=1), + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_webhook.py b/tests/test_api/test_methods/test_set_webhook.py index c38a2bfa..dd9f6902 100644 --- a/tests/test_api/test_methods/test_set_webhook.py +++ b/tests/test_api/test_methods/test_set_webhook.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, SetWebhook +from aiogram.methods import SetWebhook from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestSetWebhook: prepare_result = bot.add_result_for(SetWebhook, ok=True, result=True) response: bool = await bot.set_webhook(url="https://example.com") - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_stop_message_live_location.py b/tests/test_api/test_methods/test_stop_message_live_location.py index 99c8b675..46792924 100644 --- a/tests/test_api/test_methods/test_stop_message_live_location.py +++ b/tests/test_api/test_methods/test_stop_message_live_location.py @@ -1,6 +1,4 @@ -from typing import Union - -from aiogram.methods import Request, StopMessageLiveLocation +from aiogram.methods import StopMessageLiveLocation from aiogram.types import Message from tests.mocked_bot import MockedBot @@ -9,8 +7,8 @@ class TestStopMessageLiveLocation: async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(StopMessageLiveLocation, ok=True, result=True) - response: Union[Message, bool] = await bot.stop_message_live_location( + response: Message | bool = await bot.stop_message_live_location( inline_message_id="inline message id" ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_stop_poll.py b/tests/test_api/test_methods/test_stop_poll.py index ef2d36d6..93613218 100644 --- a/tests/test_api/test_methods/test_stop_poll.py +++ b/tests/test_api/test_methods/test_stop_poll.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, StopPoll +from aiogram.methods import StopPoll from aiogram.types import Poll, PollOption from tests.mocked_bot import MockedBot @@ -11,16 +11,20 @@ class TestStopPoll: result=Poll( id="QA", question="Q", - options=[PollOption(text="A", voter_count=0), PollOption(text="B", voter_count=0)], + options=[ + PollOption(persistent_id="1", text="A", voter_count=0), + PollOption(persistent_id="2", text="B", voter_count=0), + ], is_closed=False, is_anonymous=False, type="quiz", allows_multiple_answers=False, + allows_revoting=False, total_voter_count=0, correct_option_id=0, ), ) response: Poll = await bot.stop_poll(chat_id=42, message_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_transfer_business_account_stars.py b/tests/test_api/test_methods/test_transfer_business_account_stars.py new file mode 100644 index 00000000..d8253006 --- /dev/null +++ b/tests/test_api/test_methods/test_transfer_business_account_stars.py @@ -0,0 +1,13 @@ +from aiogram.methods import TransferBusinessAccountStars +from tests.mocked_bot import MockedBot + + +class TestTransferBusinessAccountStars: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(TransferBusinessAccountStars, ok=True, result=True) + + response: bool = await bot.transfer_business_account_stars( + business_connection_id="test_connection_id", star_count=100 + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_transfer_gift.py b/tests/test_api/test_methods/test_transfer_gift.py new file mode 100644 index 00000000..5de5db02 --- /dev/null +++ b/tests/test_api/test_methods/test_transfer_gift.py @@ -0,0 +1,16 @@ +from aiogram.methods import TransferGift +from tests.mocked_bot import MockedBot + + +class TestTransferGift: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(TransferGift, ok=True, result=True) + + response: bool = await bot.transfer_gift( + business_connection_id="test_connection_id", + owned_gift_id="test_gift_id", + new_owner_chat_id=123456789, + star_count=50, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unban_chat_member.py b/tests/test_api/test_methods/test_unban_chat_member.py index 291512fa..3a2acfee 100644 --- a/tests/test_api/test_methods/test_unban_chat_member.py +++ b/tests/test_api/test_methods/test_unban_chat_member.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, UnbanChatMember +from aiogram.methods import UnbanChatMember from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestUnbanChatMember: prepare_result = bot.add_result_for(UnbanChatMember, ok=True, result=True) response: bool = await bot.unban_chat_member(chat_id=-42, user_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unban_chat_sender_chat.py b/tests/test_api/test_methods/test_unban_chat_sender_chat.py index 54c334ab..0ca89e0a 100755 --- a/tests/test_api/test_methods/test_unban_chat_sender_chat.py +++ b/tests/test_api/test_methods/test_unban_chat_sender_chat.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, UnbanChatSenderChat +from aiogram.methods import UnbanChatSenderChat from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestUnbanChatSenderChat: chat_id=-42, sender_chat_id=-1337, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unhide_general_forum_topic.py b/tests/test_api/test_methods/test_unhide_general_forum_topic.py index eb69223b..9de88ad6 100644 --- a/tests/test_api/test_methods/test_unhide_general_forum_topic.py +++ b/tests/test_api/test_methods/test_unhide_general_forum_topic.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, UnhideGeneralForumTopic +from aiogram.methods import UnhideGeneralForumTopic from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestUnhideGeneralForumTopic: prepare_result = bot.add_result_for(UnhideGeneralForumTopic, ok=True, result=True) response: bool = await bot.unhide_general_forum_topic(chat_id=42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unpin_all_chat_messages.py b/tests/test_api/test_methods/test_unpin_all_chat_messages.py index 173ce711..ba92871d 100644 --- a/tests/test_api/test_methods/test_unpin_all_chat_messages.py +++ b/tests/test_api/test_methods/test_unpin_all_chat_messages.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, UnpinAllChatMessages +from aiogram.methods import UnpinAllChatMessages from tests.mocked_bot import MockedBot @@ -9,5 +9,5 @@ class TestUnpinAllChatMessages: response: bool = await bot.unpin_all_chat_messages( chat_id=42, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py b/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py index ac7b409c..74171470 100644 --- a/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py +++ b/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, UnpinAllForumTopicMessages +from aiogram.methods import UnpinAllForumTopicMessages from tests.mocked_bot import MockedBot @@ -10,5 +10,5 @@ class TestUnpinAllForumTopicMessages: chat_id=42, message_thread_id=42, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unpin_all_general_forum_topic_messages.py b/tests/test_api/test_methods/test_unpin_all_general_forum_topic_messages.py index fc2df936..21325a8f 100644 --- a/tests/test_api/test_methods/test_unpin_all_general_forum_topic_messages.py +++ b/tests/test_api/test_methods/test_unpin_all_general_forum_topic_messages.py @@ -1,8 +1,4 @@ -from aiogram.methods import ( - Request, - UnpinAllForumTopicMessages, - UnpinAllGeneralForumTopicMessages, -) +from aiogram.methods import UnpinAllGeneralForumTopicMessages from tests.mocked_bot import MockedBot @@ -15,5 +11,5 @@ class TestUnpinAllForumTopicMessages: response: bool = await bot.unpin_all_general_forum_topic_messages( chat_id=42, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unpin_chat_message.py b/tests/test_api/test_methods/test_unpin_chat_message.py index 804b3ae2..8506a021 100644 --- a/tests/test_api/test_methods/test_unpin_chat_message.py +++ b/tests/test_api/test_methods/test_unpin_chat_message.py @@ -1,4 +1,4 @@ -from aiogram.methods import Request, UnpinChatMessage +from aiogram.methods import UnpinChatMessage from tests.mocked_bot import MockedBot @@ -7,5 +7,5 @@ class TestUnpinChatMessage: prepare_result = bot.add_result_for(UnpinChatMessage, ok=True, result=True) response: bool = await bot.unpin_chat_message(chat_id=-42) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_upgrade_gift.py b/tests/test_api/test_methods/test_upgrade_gift.py new file mode 100644 index 00000000..4461b677 --- /dev/null +++ b/tests/test_api/test_methods/test_upgrade_gift.py @@ -0,0 +1,16 @@ +from aiogram.methods import UpgradeGift +from tests.mocked_bot import MockedBot + + +class TestUpgradeGift: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(UpgradeGift, ok=True, result=True) + + response: bool = await bot.upgrade_gift( + business_connection_id="test_connection_id", + owned_gift_id="test_gift_id", + keep_original_details=True, + star_count=100, + ) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_upload_sticker_file.py b/tests/test_api/test_methods/test_upload_sticker_file.py index fda4c4d0..31819054 100644 --- a/tests/test_api/test_methods/test_upload_sticker_file.py +++ b/tests/test_api/test_methods/test_upload_sticker_file.py @@ -1,5 +1,5 @@ from aiogram.enums import StickerFormat -from aiogram.methods import Request, UploadStickerFile +from aiogram.methods import UploadStickerFile from aiogram.types import BufferedInputFile, File from tests.mocked_bot import MockedBot @@ -15,5 +15,5 @@ class TestUploadStickerFile: sticker=BufferedInputFile(b"", "file.png"), sticker_format=StickerFormat.STATIC, ) - request = bot.get_request() + bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_verify_chat.py b/tests/test_api/test_methods/test_verify_chat.py new file mode 100644 index 00000000..17401621 --- /dev/null +++ b/tests/test_api/test_methods/test_verify_chat.py @@ -0,0 +1,11 @@ +from aiogram.methods import VerifyChat +from tests.mocked_bot import MockedBot + + +class TestVerifyChat: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(VerifyChat, ok=True, result=True) + + response: bool = await bot.verify_chat(chat_id=42) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_verify_user.py b/tests/test_api/test_methods/test_verify_user.py new file mode 100644 index 00000000..b69471a3 --- /dev/null +++ b/tests/test_api/test_methods/test_verify_user.py @@ -0,0 +1,11 @@ +from aiogram.methods import VerifyUser +from tests.mocked_bot import MockedBot + + +class TestVerifyUser: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(VerifyUser, ok=True, result=True) + + response: bool = await bot.verify_user(user_id=42) + bot.get_request() + assert response == prepare_result.result diff --git a/tests/test_api/test_types/test_callback_query.py b/tests/test_api/test_types/test_callback_query.py index f3716fe1..ed45d2b1 100644 --- a/tests/test_api/test_types/test_callback_query.py +++ b/tests/test_api/test_types/test_callback_query.py @@ -8,7 +8,7 @@ class TestCallbackQuery: id="id", from_user=User(id=42, is_bot=False, first_name="name"), chat_instance="chat" ) - kwargs = dict(text="foo", show_alert=True, url="https://foo.bar/", cache_time=123) + kwargs = {"text": "foo", "show_alert": True, "url": "https://foo.bar/", "cache_time": 123} api_method = callback_query.answer(**kwargs) diff --git a/tests/test_api/test_types/test_chat.py b/tests/test_api/test_types/test_chat.py index 14cc3dc2..b3e63854 100644 --- a/tests/test_api/test_types/test_chat.py +++ b/tests/test_api/test_types/test_chat.py @@ -1,5 +1,3 @@ -from typing import Optional - from pytest import mark, param from aiogram.enums import ChatAction @@ -117,6 +115,14 @@ class TestChat: method = chat.set_administrator_custom_title(user_id=1, custom_title="test") assert method.chat_id == chat.id + def test_set_member_tag(self): + chat = Chat(id=-42, type="supergroup") + + method = chat.set_member_tag(user_id=42, tag="test") + assert method.chat_id == chat.id + assert method.user_id == 42 + assert method.tag == "test" + def test_set_permissions(self): chat = Chat(id=-42, type="supergroup") @@ -199,9 +205,9 @@ class TestChat: ) def test_full_name( self, - first: Optional[str], - last: Optional[str], - title: Optional[str], + first: str | None, + last: str | None, + title: str | None, chat_type: str, result: str, ): diff --git a/tests/test_api/test_types/test_chat_join_request.py b/tests/test_api/test_types/test_chat_join_request.py index ec442cb1..3bb1fc3f 100644 --- a/tests/test_api/test_types/test_chat_join_request.py +++ b/tests/test_api/test_types/test_chat_join_request.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, Type, Union +from typing import Any import pytest @@ -59,45 +59,49 @@ class TestChatJoinRequest: @pytest.mark.parametrize( "alias_for_method,kwargs,method_class", [ - ["answer_animation", dict(animation="animation"), SendAnimation], - ["answer_audio", dict(audio="audio"), SendAudio], - ["answer_contact", dict(phone_number="+000000000000", first_name="Test"), SendContact], - ["answer_document", dict(document="document"), SendDocument], - ["answer_game", dict(game_short_name="game"), SendGame], + ["answer_animation", {"animation": "animation"}, SendAnimation], + ["answer_audio", {"audio": "audio"}, SendAudio], + [ + "answer_contact", + {"phone_number": "+000000000000", "first_name": "Test"}, + SendContact, + ], + ["answer_document", {"document": "document"}, SendDocument], + ["answer_game", {"game_short_name": "game"}, SendGame], [ "answer_invoice", - dict( - title="title", - description="description", - payload="payload", - provider_token="provider_token", - start_parameter="start_parameter", - currency="currency", - prices=[], - ), + { + "title": "title", + "description": "description", + "payload": "payload", + "provider_token": "provider_token", + "start_parameter": "start_parameter", + "currency": "currency", + "prices": [], + }, SendInvoice, ], - ["answer_location", dict(latitude=0.42, longitude=0.42), SendLocation], - ["answer_media_group", dict(media=[]), SendMediaGroup], - ["answer", dict(text="test"), SendMessage], - ["answer_photo", dict(photo="photo"), SendPhoto], - ["answer_poll", dict(question="Q?", options=[]), SendPoll], - ["answer_dice", dict(), SendDice], - ["answer_sticker", dict(sticker="sticker"), SendSticker], - ["answer_sticker", dict(sticker="sticker"), SendSticker], + ["answer_location", {"latitude": 0.42, "longitude": 0.42}, SendLocation], + ["answer_media_group", {"media": []}, SendMediaGroup], + ["answer", {"text": "test"}, SendMessage], + ["answer_photo", {"photo": "photo"}, SendPhoto], + ["answer_poll", {"question": "Q?", "options": []}, SendPoll], + ["answer_dice", {}, SendDice], + ["answer_sticker", {"sticker": "sticker"}, SendSticker], + ["answer_sticker", {"sticker": "sticker"}, SendSticker], [ "answer_venue", - dict( - latitude=0.42, - longitude=0.42, - title="title", - address="address", - ), + { + "latitude": 0.42, + "longitude": 0.42, + "title": "title", + "address": "address", + }, SendVenue, ], - ["answer_video", dict(video="video"), SendVideo], - ["answer_video_note", dict(video_note="video_note"), SendVideoNote], - ["answer_voice", dict(voice="voice"), SendVoice], + ["answer_video", {"video": "video"}, SendVideo], + ["answer_video_note", {"video_note": "video_note"}, SendVideoNote], + ["answer_voice", {"voice": "voice"}, SendVoice], ], ) @pytest.mark.parametrize("suffix", ["", "_pm"]) @@ -105,27 +109,25 @@ class TestChatJoinRequest: self, alias_for_method: str, suffix: str, - kwargs: Dict[str, Any], - method_class: Type[ - Union[ - SendAnimation, - SendAudio, - SendContact, - SendDocument, - SendGame, - SendInvoice, - SendLocation, - SendMediaGroup, - SendMessage, - SendPhoto, - SendPoll, - SendSticker, - SendSticker, - SendVenue, - SendVideo, - SendVideoNote, - SendVoice, - ] + kwargs: dict[str, Any], + method_class: type[ + SendAnimation + | SendAudio + | SendContact + | SendDocument + | SendGame + | SendInvoice + | SendLocation + | SendMediaGroup + | SendMessage + | SendPhoto + | SendPoll + | SendSticker + | SendSticker + | SendVenue + | SendVideo + | SendVideoNote + | SendVoice ], ): event = ChatJoinRequest( diff --git a/tests/test_api/test_types/test_chat_member_tag_permissions.py b/tests/test_api/test_types/test_chat_member_tag_permissions.py new file mode 100644 index 00000000..30aa5481 --- /dev/null +++ b/tests/test_api/test_types/test_chat_member_tag_permissions.py @@ -0,0 +1,84 @@ +from datetime import datetime + +from aiogram.types import ( + ChatAdministratorRights, + ChatMemberAdministrator, + ChatMemberMember, + ChatMemberRestricted, + ChatPermissions, + User, +) + + +class TestChatMemberTagPermissions: + def test_chat_administrator_rights_can_manage_tags(self): + rights = ChatAdministratorRights( + is_anonymous=False, + can_manage_chat=True, + can_delete_messages=True, + can_manage_video_chats=True, + can_restrict_members=True, + can_promote_members=True, + can_change_info=True, + can_invite_users=True, + can_post_stories=True, + can_edit_stories=True, + can_delete_stories=True, + can_manage_tags=True, + ) + assert rights.can_manage_tags is True + + def test_chat_member_administrator_can_manage_tags(self): + admin = ChatMemberAdministrator( + user=User(id=42, is_bot=False, first_name="User"), + can_be_edited=True, + is_anonymous=False, + can_manage_chat=True, + can_delete_messages=True, + can_manage_video_chats=True, + can_restrict_members=True, + can_promote_members=True, + can_change_info=True, + can_invite_users=True, + can_post_stories=True, + can_edit_stories=True, + can_delete_stories=True, + can_manage_tags=True, + ) + assert admin.can_manage_tags is True + + def test_chat_permissions_can_edit_tag(self): + permissions = ChatPermissions(can_edit_tag=True) + assert permissions.can_edit_tag is True + + def test_chat_member_member_tag(self): + member = ChatMemberMember( + user=User(id=42, is_bot=False, first_name="User"), + tag="premium", + ) + assert member.tag == "premium" + + def test_chat_member_restricted_can_edit_tag_and_tag(self): + restricted = ChatMemberRestricted( + user=User(id=42, is_bot=False, first_name="User"), + is_member=True, + can_send_messages=True, + can_send_audios=True, + can_send_documents=True, + can_send_photos=True, + can_send_videos=True, + can_send_video_notes=True, + can_send_voice_notes=True, + can_send_polls=True, + can_send_other_messages=True, + can_add_web_page_previews=True, + can_edit_tag=True, + can_change_info=True, + can_invite_users=True, + can_pin_messages=True, + can_manage_topics=True, + until_date=datetime.now(), + tag="premium", + ) + assert restricted.can_edit_tag is True + assert restricted.tag == "premium" diff --git a/tests/test_api/test_types/test_chat_member_updated.py b/tests/test_api/test_types/test_chat_member_updated.py index 2d9c9a94..a48e7a0d 100644 --- a/tests/test_api/test_types/test_chat_member_updated.py +++ b/tests/test_api/test_types/test_chat_member_updated.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, Type, Union +from typing import Any import pytest @@ -35,71 +35,73 @@ class TestChatMemberUpdated: @pytest.mark.parametrize( "alias_for_method,kwargs,method_class", [ - ["answer_animation", dict(animation="animation"), SendAnimation], - ["answer_audio", dict(audio="audio"), SendAudio], - ["answer_contact", dict(phone_number="+000000000000", first_name="Test"), SendContact], - ["answer_document", dict(document="document"), SendDocument], - ["answer_game", dict(game_short_name="game"), SendGame], + ["answer_animation", {"animation": "animation"}, SendAnimation], + ["answer_audio", {"audio": "audio"}, SendAudio], + [ + "answer_contact", + {"phone_number": "+000000000000", "first_name": "Test"}, + SendContact, + ], + ["answer_document", {"document": "document"}, SendDocument], + ["answer_game", {"game_short_name": "game"}, SendGame], [ "answer_invoice", - dict( - title="title", - description="description", - payload="payload", - provider_token="provider_token", - start_parameter="start_parameter", - currency="currency", - prices=[], - ), + { + "title": "title", + "description": "description", + "payload": "payload", + "provider_token": "provider_token", + "start_parameter": "start_parameter", + "currency": "currency", + "prices": [], + }, SendInvoice, ], - ["answer_location", dict(latitude=0.42, longitude=0.42), SendLocation], - ["answer_media_group", dict(media=[]), SendMediaGroup], - ["answer", dict(text="test"), SendMessage], - ["answer_photo", dict(photo="photo"), SendPhoto], - ["answer_poll", dict(question="Q?", options=[]), SendPoll], - ["answer_dice", dict(), SendDice], - ["answer_sticker", dict(sticker="sticker"), SendSticker], - ["answer_sticker", dict(sticker="sticker"), SendSticker], + ["answer_location", {"latitude": 0.42, "longitude": 0.42}, SendLocation], + ["answer_media_group", {"media": []}, SendMediaGroup], + ["answer", {"text": "test"}, SendMessage], + ["answer_photo", {"photo": "photo"}, SendPhoto], + ["answer_poll", {"question": "Q?", "options": []}, SendPoll], + ["answer_dice", {}, SendDice], + ["answer_sticker", {"sticker": "sticker"}, SendSticker], + ["answer_sticker", {"sticker": "sticker"}, SendSticker], [ "answer_venue", - dict( - latitude=0.42, - longitude=0.42, - title="title", - address="address", - ), + { + "latitude": 0.42, + "longitude": 0.42, + "title": "title", + "address": "address", + }, SendVenue, ], - ["answer_video", dict(video="video"), SendVideo], - ["answer_video_note", dict(video_note="video_note"), SendVideoNote], - ["answer_voice", dict(voice="voice"), SendVoice], + ["answer_video", {"video": "video"}, SendVideo], + ["answer_video_note", {"video_note": "video_note"}, SendVideoNote], + ["answer_voice", {"voice": "voice"}, SendVoice], ], ) def test_answer_aliases( self, alias_for_method: str, - kwargs: Dict[str, Any], - method_class: Type[ - Union[ - SendAnimation, - SendAudio, - SendContact, - SendDocument, - SendGame, - SendInvoice, - SendLocation, - SendMediaGroup, - SendMessage, - SendPhoto, - SendPoll, - SendSticker, - SendSticker, - SendVenue, - SendVideo, - SendVideoNote, - SendVoice, - ] + kwargs: dict[str, Any], + method_class: type[ + SendAnimation + | SendAudio + | SendContact + | SendDocument + | SendGame + | SendInvoice + | SendLocation + | SendMediaGroup + | SendMessage + | SendPhoto + | SendPoll + | SendSticker + | SendSticker + | SendVenue + | SendVideo + | SendVideoNote + | SendVoice ], ): user = User(id=42, is_bot=False, first_name="Test") diff --git a/tests/test_api/test_types/test_contact.py b/tests/test_api/test_types/test_contact.py new file mode 100644 index 00000000..bc555809 --- /dev/null +++ b/tests/test_api/test_types/test_contact.py @@ -0,0 +1,20 @@ +import pytest + +from aiogram.types import Contact + + +class TestContact: + @pytest.mark.parametrize( + "first,last,result", + [ + ["User", None, "User"], + ["", None, ""], + [" ", None, " "], + ["User", "Name", "User Name"], + ["User", " ", "User "], + [" ", " ", " "], + ], + ) + def test_full_name(self, first: str, last: str, result: bool): + contact = Contact(phone_number="911", first_name=first, last_name=last) + assert contact.full_name == result diff --git a/tests/test_api/test_types/test_inaccessible_message.py b/tests/test_api/test_types/test_inaccessible_message.py new file mode 100644 index 00000000..4719957d --- /dev/null +++ b/tests/test_api/test_types/test_inaccessible_message.py @@ -0,0 +1,150 @@ +from typing import Any + +import pytest + +from aiogram.methods import ( + SendAnimation, + SendAudio, + SendContact, + SendDice, + SendDocument, + SendGame, + SendInvoice, + SendLocation, + SendMediaGroup, + SendMessage, + SendPaidMedia, + SendPhoto, + SendPoll, + SendSticker, + SendVenue, + SendVideo, + SendVideoNote, + SendVoice, +) +from aiogram.types import Chat +from aiogram.types.inaccessible_message import InaccessibleMessage +from aiogram.types.message import ContentType + +TEST_MESSAGE_UNKNOWN = InaccessibleMessage( + message_id=42, + chat=Chat(id=42, type="private"), +) + +MESSAGES_AND_CONTENT_TYPES = [ + [TEST_MESSAGE_UNKNOWN, ContentType.UNKNOWN], +] + + +class TestMessage: + @pytest.mark.parametrize( + "message,content_type", + MESSAGES_AND_CONTENT_TYPES, + ) + def test_as_reply_parameters(self, message, content_type): + reply_parameters = message.as_reply_parameters() + assert reply_parameters.message_id == message.message_id + assert reply_parameters.chat_id == message.chat.id + + @pytest.mark.parametrize( + "alias_for_method,kwargs,method_class", + [ + ["animation", {"animation": "animation"}, SendAnimation], + ["audio", {"audio": "audio"}, SendAudio], + ["contact", {"phone_number": "+000000000000", "first_name": "Test"}, SendContact], + ["document", {"document": "document"}, SendDocument], + ["game", {"game_short_name": "game"}, SendGame], + [ + "invoice", + { + "title": "title", + "description": "description", + "payload": "payload", + "provider_token": "provider_token", + "start_parameter": "start_parameter", + "currency": "currency", + "prices": [], + }, + SendInvoice, + ], + ["location", {"latitude": 0.42, "longitude": 0.42}, SendLocation], + ["media_group", {"media": []}, SendMediaGroup], + ["", {"text": "test"}, SendMessage], + ["photo", {"photo": "photo"}, SendPhoto], + ["poll", {"question": "Q?", "options": []}, SendPoll], + ["dice", {}, SendDice], + ["sticker", {"sticker": "sticker"}, SendSticker], + ["sticker", {"sticker": "sticker"}, SendSticker], + [ + "venue", + { + "latitude": 0.42, + "longitude": 0.42, + "title": "title", + "address": "address", + }, + SendVenue, + ], + ["video", {"video": "video"}, SendVideo], + ["video_note", {"video_note": "video_note"}, SendVideoNote], + ["voice", {"voice": "voice"}, SendVoice], + ["paid_media", {"media": [], "star_count": 42}, SendPaidMedia], + ], + ) + @pytest.mark.parametrize("alias_type", ["reply", "answer"]) + def test_reply_answer_aliases( + self, + alias_for_method: str, + alias_type: str, + kwargs: dict[str, Any], + method_class: type[ + SendAnimation + | SendAudio + | SendContact + | SendDocument + | SendGame + | SendInvoice + | SendLocation + | SendMediaGroup + | SendMessage + | SendPhoto + | SendPoll + | SendSticker + | SendSticker + | SendVenue + | SendVideo + | SendVideoNote + | SendVoice + | SendPaidMedia + ], + ): + message = InaccessibleMessage( + message_id=42, + chat=Chat(id=42, type="private"), + ) + alias_name = "_".join(item for item in [alias_type, alias_for_method] if item) + + alias = getattr(message, alias_name) + assert callable(alias) + + api_method = alias(**kwargs) + assert isinstance(api_method, method_class) + + assert api_method.chat_id == message.chat.id + if alias_type == "reply": + assert api_method.reply_parameters + assert api_method.reply_parameters.message_id == message.message_id + assert api_method.reply_parameters.chat_id == message.chat.id + else: + assert api_method.reply_parameters is None + + if hasattr(api_method, "reply_parameters"): + if alias_type == "reply": + assert api_method.reply_parameters is not None + assert api_method.reply_parameters.message_id == message.message_id + assert api_method.reply_parameters.chat_id == message.chat.id + else: + assert api_method.reply_parameters is None + + for key, value in kwargs.items(): + assert getattr(api_method, key) == value diff --git a/tests/test_api/test_types/test_inline_query.py b/tests/test_api/test_types/test_inline_query.py index c822649d..088f0cc5 100644 --- a/tests/test_api/test_types/test_inline_query.py +++ b/tests/test_api/test_types/test_inline_query.py @@ -11,13 +11,13 @@ class TestInlineQuery: offset="", ) - kwargs = dict( - results=[], - cache_time=123, - next_offset="123", - switch_pm_text="foo", - switch_pm_parameter="foo", - ) + kwargs = { + "results": [], + "cache_time": 123, + "next_offset": "123", + "switch_pm_text": "foo", + "switch_pm_parameter": "foo", + } api_method = inline_query.answer(**kwargs) diff --git a/tests/test_api/test_types/test_input_file.py b/tests/test_api/test_types/test_input_file.py index e8716f84..cd0b94db 100644 --- a/tests/test_api/test_types/test_input_file.py +++ b/tests/test_api/test_types/test_input_file.py @@ -1,5 +1,3 @@ -from typing import AsyncIterable - from aresponses import ResponsesMockServer from aiogram import Bot diff --git a/tests/test_api/test_types/test_keyboard_button_request_managed_bot.py b/tests/test_api/test_types/test_keyboard_button_request_managed_bot.py new file mode 100644 index 00000000..053c2c5f --- /dev/null +++ b/tests/test_api/test_types/test_keyboard_button_request_managed_bot.py @@ -0,0 +1,19 @@ +from aiogram.types import KeyboardButtonRequestManagedBot + + +class TestKeyboardButtonRequestManagedBot: + def test_required_fields(self): + obj = KeyboardButtonRequestManagedBot(request_id=1) + assert obj.request_id == 1 + assert obj.suggested_name is None + assert obj.suggested_username is None + + def test_optional_fields(self): + obj = KeyboardButtonRequestManagedBot( + request_id=2, + suggested_name="My Bot", + suggested_username="my_bot", + ) + assert obj.request_id == 2 + assert obj.suggested_name == "My Bot" + assert obj.suggested_username == "my_bot" diff --git a/tests/test_api/test_types/test_managed_bot_created.py b/tests/test_api/test_types/test_managed_bot_created.py new file mode 100644 index 00000000..b2380d56 --- /dev/null +++ b/tests/test_api/test_types/test_managed_bot_created.py @@ -0,0 +1,9 @@ +from aiogram.types import ManagedBotCreated, User + + +class TestManagedBotCreated: + def test_fields(self): + bot_user = User(id=123, is_bot=True, first_name="TestBot") + obj = ManagedBotCreated(bot=bot_user) + assert obj.bot_user == bot_user + assert obj.bot_user.id == 123 diff --git a/tests/test_api/test_types/test_managed_bot_updated.py b/tests/test_api/test_types/test_managed_bot_updated.py new file mode 100644 index 00000000..59dec0ae --- /dev/null +++ b/tests/test_api/test_types/test_managed_bot_updated.py @@ -0,0 +1,10 @@ +from aiogram.types import ManagedBotUpdated, User + + +class TestManagedBotUpdated: + def test_fields(self): + user = User(id=42, is_bot=False, first_name="Creator") + bot_user = User(id=123, is_bot=True, first_name="TestBot") + obj = ManagedBotUpdated(user=user, bot=bot_user) + assert obj.user == user + assert obj.bot_user == bot_user diff --git a/tests/test_api/test_types/test_message.py b/tests/test_api/test_types/test_message.py index 16771f6b..a13d810a 100644 --- a/tests/test_api/test_types/test_message.py +++ b/tests/test_api/test_types/test_message.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, Optional, Type, Union +from typing import Any import pytest @@ -46,9 +46,16 @@ from aiogram.types import ( Chat, ChatBackground, ChatBoostAdded, + ChatOwnerChanged, + ChatOwnerLeft, ChatShared, + Checklist, + ChecklistTask, + ChecklistTasksAdded, + ChecklistTasksDone, Contact, Dice, + DirectMessagePriceChanged, Document, EncryptedCredentials, ForumTopicClosed, @@ -58,6 +65,8 @@ from aiogram.types import ( Game, GeneralForumTopicHidden, GeneralForumTopicUnhidden, + Gift, + GiftInfo, Giveaway, GiveawayCompleted, GiveawayCreated, @@ -67,20 +76,37 @@ from aiogram.types import ( InputMediaPhoto, Invoice, Location, + ManagedBotCreated, MessageAutoDeleteTimerChanged, MessageEntity, PaidMediaInfo, PaidMediaPhoto, + PaidMessagePriceChanged, PassportData, PhotoSize, Poll, PollOption, + PollOptionAdded, + PollOptionDeleted, ProximityAlertTriggered, ReactionTypeCustomEmoji, + RefundedPayment, SharedUser, Sticker, Story, SuccessfulPayment, + SuggestedPostApprovalFailed, + SuggestedPostApproved, + SuggestedPostDeclined, + SuggestedPostPaid, + SuggestedPostPrice, + SuggestedPostRefunded, + UniqueGift, + UniqueGiftBackdrop, + UniqueGiftBackdropColors, + UniqueGiftInfo, + UniqueGiftModel, + UniqueGiftSymbol, User, UserShared, UsersShared, @@ -232,6 +258,31 @@ TEST_MESSAGE_LEFT_CHAT_MEMBER = Message( chat=Chat(id=42, type="private"), from_user=User(id=42, is_bot=False, first_name="Test"), ) +TEST_MESSAGE_CHAT_OWNER_LEFT = Message( + message_id=42, + date=datetime.datetime.now(), + chat_owner_left=ChatOwnerLeft( + new_owner=User(id=43, is_bot=False, first_name="NewOwner"), + ), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), +) +TEST_MESSAGE_CHAT_OWNER_LEFT_NO_SUCCESSOR = Message( + message_id=42, + date=datetime.datetime.now(), + chat_owner_left=ChatOwnerLeft(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), +) +TEST_MESSAGE_CHAT_OWNER_CHANGED = Message( + message_id=42, + date=datetime.datetime.now(), + chat_owner_changed=ChatOwnerChanged( + new_owner=User(id=43, is_bot=False, first_name="NewOwner"), + ), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), +) TEST_MESSAGE_INVOICE = Message( message_id=42, date=datetime.datetime.now(), @@ -378,13 +429,14 @@ TEST_MESSAGE_POLL = Message( id="QA", question="Q", options=[ - PollOption(text="A", voter_count=0), - PollOption(text="B", voter_count=0), + PollOption(persistent_id="1", text="A", voter_count=0), + PollOption(persistent_id="2", text="B", voter_count=0), ], is_closed=False, is_anonymous=False, type="quiz", allows_multiple_answers=False, + allows_revoting=False, total_voter_count=0, correct_option_id=1, ), @@ -526,7 +578,7 @@ TEST_MESSAGE_GIVEAWAY_CREATED = Message( date=datetime.datetime.now(), chat=Chat(id=42, type="private"), from_user=None, - giveaway_created=GiveawayCreated(), + giveaway_created=GiveawayCreated(prize_star_count=42), ) TEST_MESSAGE_GIVEAWAY_WINNERS = Message( message_id=42, @@ -587,12 +639,258 @@ TEST_CHAT_BACKGROUND_SET = Message( ) ), ) +TEST_REFUND_PAYMENT = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="User"), + refunded_payment=RefundedPayment( + total_amount=42, + provider_payment_charge_id="payment", + telegram_payment_charge_id="charge", + invoice_payload="payload", + ), +) TEST_MESSAGE_UNKNOWN = 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"), ) +TEST_MESSAGE_GIFT = 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"), + gift=GiftInfo( + gift=Gift( + id="test_gift_id", + sticker=Sticker( + file_id="test_file_id", + file_unique_id="test_file_unique_id", + type="regular", + width=512, + height=512, + is_animated=False, + is_video=False, + ), + star_count=100, + ), + owned_gift_id="test_owned_gift_id", + convert_star_count=50, + prepaid_upgrade_star_count=25, + can_be_upgraded=True, + text="Test gift message", + is_private=False, + ), +) +TEST_MESSAGE_UNIQUE_GIFT = 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"), + unique_gift=UniqueGiftInfo( + gift=UniqueGift( + gift_id="test_gift_id", + base_name="test_gift", + name="test_unique_gift", + number=1, + model=UniqueGiftModel( + name="test_model", + sticker=Sticker( + file_id="test_file_id", + file_unique_id="test_file_unique_id", + type="regular", + width=512, + height=512, + is_animated=False, + is_video=False, + ), + rarity_per_mille=100, + ), + symbol=UniqueGiftSymbol( + name="test_symbol", + sticker=Sticker( + file_id="test_file_id", + file_unique_id="test_file_unique_id", + type="regular", + width=512, + height=512, + is_animated=False, + is_video=False, + ), + rarity_per_mille=100, + ), + backdrop=UniqueGiftBackdrop( + name="test_backdrop", + colors=UniqueGiftBackdropColors( + center_color=0xFFFFFF, + edge_color=0x000000, + symbol_color=0xFF0000, + text_color=0x0000FF, + ), + rarity_per_mille=100, + ), + ), + origin="upgrade", + ), +) +TEST_MESSAGE_GIFT_UPGRADE_SENT = Message( + message_id=42, + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + date=datetime.datetime.now(), + gift_upgrade_sent=GiftInfo( + gift=Gift( + id="test_gift_id", + sticker=Sticker( + file_id="test_file_id", + file_unique_id="test_file_unique_id", + type="regular", + width=512, + height=512, + is_animated=False, + is_video=False, + ), + star_count=100, + ), + owned_gift_id="test_owned_gift_id", + convert_star_count=50, + prepaid_upgrade_star_count=25, + can_be_upgraded=True, + text="Test gift message", + is_private=False, + ), +) +TEST_MESSAGE_CHECKLIST = Message( + message_id=42, + date=datetime.datetime.now(), + chat=Chat(id=42, type="private"), + from_user=User(id=42, is_bot=False, first_name="Test"), + checklist=Checklist( + title="Test Checklist", + tasks=[ + ChecklistTask( + id=1, + text="Task 1", + ), + ChecklistTask( + id=2, + text="Task 2", + ), + ], + ), +) +TEST_MESSAGE_CHECKLIST_TASKS_DONE = 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"), + checklist_tasks_done=ChecklistTasksDone( + marked_as_done_task_ids=[1, 2], + ), +) +TEST_MESSAGE_CHECKLIST_TASKS_ADDED = 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"), + checklist_tasks_added=ChecklistTasksAdded( + tasks=[ + ChecklistTask( + id=3, + text="New Task", + ), + ], + ), +) +TEST_MESSAGE_DIRECT_MESSAGE_PRICE_CHANGED = 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"), + direct_message_price_changed=DirectMessagePriceChanged( + are_direct_messages_enabled=True, + direct_message_star_count=50, + ), +) +TEST_MESSAGE_PAID_MESSAGE_PRICE_CHANGED = 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"), + paid_message_price_changed=PaidMessagePriceChanged( + 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"), +) +TEST_MESSAGE_MANAGED_BOT_CREATED = 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"), + managed_bot_created=ManagedBotCreated( + bot_user=User(id=100, is_bot=True, first_name="ManagedBot"), + ), +) +TEST_MESSAGE_POLL_OPTION_ADDED = 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"), + poll_option_added=PollOptionAdded( + option_persistent_id="1", + option_text="New option", + ), +) +TEST_MESSAGE_POLL_OPTION_DELETED = 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"), + poll_option_deleted=PollOptionDeleted( + option_persistent_id="1", + option_text="Deleted option", + ), +) MESSAGES_AND_CONTENT_TYPES = [ [TEST_MESSAGE_TEXT, ContentType.TEXT], @@ -605,11 +903,14 @@ MESSAGES_AND_CONTENT_TYPES = [ [TEST_MESSAGE_VIDEO, ContentType.VIDEO], [TEST_MESSAGE_VIDEO_NOTE, ContentType.VIDEO_NOTE], [TEST_MESSAGE_VOICE, ContentType.VOICE], + [TEST_MESSAGE_CHECKLIST, ContentType.CHECKLIST], [TEST_MESSAGE_CONTACT, ContentType.CONTACT], [TEST_MESSAGE_VENUE, ContentType.VENUE], [TEST_MESSAGE_LOCATION, ContentType.LOCATION], [TEST_MESSAGE_NEW_CHAT_MEMBERS, ContentType.NEW_CHAT_MEMBERS], [TEST_MESSAGE_LEFT_CHAT_MEMBER, ContentType.LEFT_CHAT_MEMBER], + [TEST_MESSAGE_CHAT_OWNER_LEFT, ContentType.CHAT_OWNER_LEFT], + [TEST_MESSAGE_CHAT_OWNER_CHANGED, ContentType.CHAT_OWNER_CHANGED], [TEST_MESSAGE_INVOICE, ContentType.INVOICE], [TEST_MESSAGE_SUCCESSFUL_PAYMENT, ContentType.SUCCESSFUL_PAYMENT], [TEST_MESSAGE_CONNECTED_WEBSITE, ContentType.CONNECTED_WEBSITE], @@ -656,6 +957,22 @@ MESSAGES_AND_CONTENT_TYPES = [ [TEST_MESSAGE_WRITE_ACCESS_ALLOWED, ContentType.WRITE_ACCESS_ALLOWED], [TEST_MESSAGE_BOOST_ADDED, ContentType.BOOST_ADDED], [TEST_CHAT_BACKGROUND_SET, ContentType.CHAT_BACKGROUND_SET], + [TEST_MESSAGE_CHECKLIST_TASKS_DONE, ContentType.CHECKLIST_TASKS_DONE], + [TEST_MESSAGE_CHECKLIST_TASKS_ADDED, ContentType.CHECKLIST_TASKS_ADDED], + [TEST_MESSAGE_DIRECT_MESSAGE_PRICE_CHANGED, ContentType.DIRECT_MESSAGE_PRICE_CHANGED], + [TEST_REFUND_PAYMENT, ContentType.REFUNDED_PAYMENT], + [TEST_MESSAGE_GIFT, ContentType.GIFT], + [TEST_MESSAGE_UNIQUE_GIFT, ContentType.UNIQUE_GIFT], + [TEST_MESSAGE_GIFT_UPGRADE_SENT, ContentType.GIFT_UPGRADE_SENT], + [TEST_MESSAGE_PAID_MESSAGE_PRICE_CHANGED, ContentType.PAID_MESSAGE_PRICE_CHANGED], + [TEST_MESSAGE_SUGGESTED_POST_APPROVED, ContentType.SUGGESTED_POST_APPROVED], + [TEST_MESSAGE_SUGGESTED_POST_APPROVAL_FAILED, ContentType.SUGGESTED_POST_APPROVAL_FAILED], + [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_MANAGED_BOT_CREATED, ContentType.MANAGED_BOT_CREATED], + [TEST_MESSAGE_POLL_OPTION_ADDED, ContentType.POLL_OPTION_ADDED], + [TEST_MESSAGE_POLL_OPTION_DELETED, ContentType.POLL_OPTION_DELETED], [TEST_MESSAGE_UNKNOWN, ContentType.UNKNOWN], ] @@ -671,12 +988,15 @@ MESSAGES_AND_COPY_METHODS = [ [TEST_MESSAGE_VIDEO, SendVideo], [TEST_MESSAGE_VIDEO_NOTE, SendVideoNote], [TEST_MESSAGE_VOICE, SendVoice], + [TEST_MESSAGE_CHECKLIST, None], [TEST_MESSAGE_CONTACT, SendContact], [TEST_MESSAGE_VENUE, SendVenue], [TEST_MESSAGE_LOCATION, SendLocation], [TEST_MESSAGE_STORY, ForwardMessage], [TEST_MESSAGE_NEW_CHAT_MEMBERS, None], [TEST_MESSAGE_LEFT_CHAT_MEMBER, None], + [TEST_MESSAGE_CHAT_OWNER_LEFT, None], + [TEST_MESSAGE_CHAT_OWNER_CHANGED, None], [TEST_MESSAGE_INVOICE, None], [TEST_MESSAGE_SUCCESSFUL_PAYMENT, None], [TEST_MESSAGE_CONNECTED_WEBSITE, None], @@ -716,6 +1036,22 @@ MESSAGES_AND_COPY_METHODS = [ [TEST_MESSAGE_GIVEAWAY_WINNERS, None], [TEST_MESSAGE_BOOST_ADDED, None], [TEST_CHAT_BACKGROUND_SET, None], + [TEST_MESSAGE_CHECKLIST_TASKS_DONE, None], + [TEST_MESSAGE_CHECKLIST_TASKS_ADDED, None], + [TEST_MESSAGE_DIRECT_MESSAGE_PRICE_CHANGED, None], + [TEST_REFUND_PAYMENT, None], + [TEST_MESSAGE_GIFT, None], + [TEST_MESSAGE_UNIQUE_GIFT, None], + [TEST_MESSAGE_GIFT_UPGRADE_SENT, None], + [TEST_MESSAGE_PAID_MESSAGE_PRICE_CHANGED, None], + [TEST_MESSAGE_SUGGESTED_POST_APPROVED, None], + [TEST_MESSAGE_SUGGESTED_POST_APPROVAL_FAILED, None], + [TEST_MESSAGE_SUGGESTED_POST_DECLINED, None], + [TEST_MESSAGE_SUGGESTED_POST_PAID, None], + [TEST_MESSAGE_SUGGESTED_POST_REFUNDED, None], + [TEST_MESSAGE_MANAGED_BOT_CREATED, None], + [TEST_MESSAGE_POLL_OPTION_ADDED, None], + [TEST_MESSAGE_POLL_OPTION_DELETED, None], [TEST_MESSAGE_UNKNOWN, None], ] @@ -723,7 +1059,7 @@ MESSAGES_AND_COPY_METHODS = [ class TestAllMessageTypesTested: @pytest.fixture(scope="function") def known_content_types(self): - content_types = {t for t in ContentType} + content_types = set(ContentType) content_types.remove(ContentType.ANY) return content_types @@ -757,49 +1093,62 @@ class TestMessage: def test_content_type(self, message: Message, content_type: str): assert message.content_type == content_type + def test_chat_owner_left_no_successor(self): + assert ( + TEST_MESSAGE_CHAT_OWNER_LEFT_NO_SUCCESSOR.content_type == ContentType.CHAT_OWNER_LEFT + ) + + def test_as_reply_parameters(self): + message = Message( + message_id=42, chat=Chat(id=42, type="private"), date=datetime.datetime.now() + ) + reply_parameters = message.as_reply_parameters() + assert reply_parameters.message_id == message.message_id + assert reply_parameters.chat_id == message.chat.id + @pytest.mark.parametrize( "alias_for_method,kwargs,method_class", [ - ["animation", dict(animation="animation"), SendAnimation], - ["audio", dict(audio="audio"), SendAudio], - ["contact", dict(phone_number="+000000000000", first_name="Test"), SendContact], - ["document", dict(document="document"), SendDocument], - ["game", dict(game_short_name="game"), SendGame], + ["animation", {"animation": "animation"}, SendAnimation], + ["audio", {"audio": "audio"}, SendAudio], + ["contact", {"phone_number": "+000000000000", "first_name": "Test"}, SendContact], + ["document", {"document": "document"}, SendDocument], + ["game", {"game_short_name": "game"}, SendGame], [ "invoice", - dict( - title="title", - description="description", - payload="payload", - provider_token="provider_token", - start_parameter="start_parameter", - currency="currency", - prices=[], - ), + { + "title": "title", + "description": "description", + "payload": "payload", + "provider_token": "provider_token", + "start_parameter": "start_parameter", + "currency": "currency", + "prices": [], + }, SendInvoice, ], - ["location", dict(latitude=0.42, longitude=0.42), SendLocation], - ["media_group", dict(media=[]), SendMediaGroup], - ["", dict(text="test"), SendMessage], - ["photo", dict(photo="photo"), SendPhoto], - ["poll", dict(question="Q?", options=[]), SendPoll], - ["dice", dict(), SendDice], - ["sticker", dict(sticker="sticker"), SendSticker], - ["sticker", dict(sticker="sticker"), SendSticker], + ["location", {"latitude": 0.42, "longitude": 0.42}, SendLocation], + ["media_group", {"media": []}, SendMediaGroup], + ["", {"text": "test"}, SendMessage], + ["photo", {"photo": "photo"}, SendPhoto], + ["poll", {"question": "Q?", "options": []}, SendPoll], + ["dice", {}, SendDice], + ["sticker", {"sticker": "sticker"}, SendSticker], + ["sticker", {"sticker": "sticker"}, SendSticker], [ "venue", - dict( - latitude=0.42, - longitude=0.42, - title="title", - address="address", - ), + { + "latitude": 0.42, + "longitude": 0.42, + "title": "title", + "address": "address", + }, SendVenue, ], - ["video", dict(video="video"), SendVideo], - ["video_note", dict(video_note="video_note"), SendVideoNote], - ["voice", dict(voice="voice"), SendVoice], - ["paid_media", dict(media=[], star_count=42), SendPaidMedia], + ["video", {"video": "video"}, SendVideo], + ["video_note", {"video_note": "video_note"}, SendVideoNote], + ["voice", {"voice": "voice"}, SendVoice], + ["paid_media", {"media": [], "star_count": 42}, SendPaidMedia], ], ) @pytest.mark.parametrize("alias_type", ["reply", "answer"]) @@ -807,34 +1156,28 @@ class TestMessage: self, alias_for_method: str, alias_type: str, - kwargs: Dict[str, Any], - method_class: Type[ - Union[ - SendAnimation, - SendAudio, - SendContact, - SendDocument, - SendGame, - SendInvoice, - SendLocation, - SendMediaGroup, - SendMessage, - SendPhoto, - SendPoll, - SendSticker, - SendSticker, - SendVenue, - SendVideo, - SendVideoNote, - SendVoice, - SendPaidMedia, - ] + kwargs: dict[str, Any], + method_class: type[ + SendAnimation + | SendAudio + | SendContact + | SendDocument + | SendGame + | SendInvoice + | SendLocation + | SendMediaGroup + | SendMessage + | SendPhoto + | SendPoll + | SendSticker + | SendSticker + | SendVenue + | SendVideo + | SendVideoNote + | SendVoice + | SendPaidMedia ], ): - if alias_for_method == "paid_media" and alias_type == "reply": - # Replies should be completely reworked - pytest.skip("Reply alias for paid media is not implemented yet.") - message = Message( message_id=42, chat=Chat(id=42, type="private"), date=datetime.datetime.now() ) @@ -847,11 +1190,15 @@ class TestMessage: assert isinstance(api_method, method_class) assert api_method.chat_id == message.chat.id + if alias_type == "reply": + assert api_method.reply_parameters + assert api_method.reply_parameters.message_id == message.message_id + assert api_method.reply_parameters.chat_id == message.chat.id + else: + assert api_method.reply_parameters is None + if hasattr(api_method, "reply_to_message_id"): - if alias_type == "reply": - assert api_method.reply_to_message_id == message.message_id - else: - assert api_method.reply_to_message_id is None + assert api_method.reply_to_message_id is None for key, value in kwargs.items(): assert getattr(api_method, key) == value @@ -871,7 +1218,7 @@ class TestMessage: def test_send_copy( self, message: Message, - expected_method: Optional[Type[TelegramMethod]], + expected_method: type[TelegramMethod] | None, ): if expected_method is None: with pytest.raises(TypeError, match="This type of message can't be copied."): @@ -907,8 +1254,8 @@ class TestMessage: def test_send_copy_custom_parse_mode( self, message: Message, - expected_method: Optional[Type[TelegramMethod]], - custom_parse_mode: Optional[str], + expected_method: type[TelegramMethod] | None, + custom_parse_mode: str | None, ): method = message.send_copy( chat_id=42, diff --git a/tests/test_api/test_types/test_poll_option_added.py b/tests/test_api/test_types/test_poll_option_added.py new file mode 100644 index 00000000..4a790b6e --- /dev/null +++ b/tests/test_api/test_types/test_poll_option_added.py @@ -0,0 +1,18 @@ +from aiogram.types import PollOptionAdded + + +class TestPollOptionAdded: + def test_required_fields(self): + obj = PollOptionAdded(option_persistent_id="opt1", option_text="Option A") + assert obj.option_persistent_id == "opt1" + assert obj.option_text == "Option A" + assert obj.poll_message is None + assert obj.option_text_entities is None + + def test_optional_fields(self): + obj = PollOptionAdded( + option_persistent_id="opt2", + option_text="Option B", + option_text_entities=[], + ) + assert obj.option_text_entities == [] diff --git a/tests/test_api/test_types/test_poll_option_deleted.py b/tests/test_api/test_types/test_poll_option_deleted.py new file mode 100644 index 00000000..853cedf3 --- /dev/null +++ b/tests/test_api/test_types/test_poll_option_deleted.py @@ -0,0 +1,18 @@ +from aiogram.types import PollOptionDeleted + + +class TestPollOptionDeleted: + def test_required_fields(self): + obj = PollOptionDeleted(option_persistent_id="opt1", option_text="Option A") + assert obj.option_persistent_id == "opt1" + assert obj.option_text == "Option A" + assert obj.poll_message is None + assert obj.option_text_entities is None + + def test_optional_fields(self): + obj = PollOptionDeleted( + option_persistent_id="opt2", + option_text="Option B", + option_text_entities=[], + ) + assert obj.option_text_entities == [] diff --git a/tests/test_api/test_types/test_pre_checkout_query.py b/tests/test_api/test_types/test_pre_checkout_query.py index ef6c9865..a003c274 100644 --- a/tests/test_api/test_types/test_pre_checkout_query.py +++ b/tests/test_api/test_types/test_pre_checkout_query.py @@ -12,7 +12,7 @@ class TestPreCheckoutQuery: invoice_payload="payload", ) - kwargs = dict(ok=True, error_message="foo") + kwargs = {"ok": True, "error_message": "foo"} api_method = pre_checkout_query.answer(**kwargs) diff --git a/tests/test_api/test_types/test_prepared_keyboard_button.py b/tests/test_api/test_types/test_prepared_keyboard_button.py new file mode 100644 index 00000000..1a50d7a8 --- /dev/null +++ b/tests/test_api/test_types/test_prepared_keyboard_button.py @@ -0,0 +1,7 @@ +from aiogram.types import PreparedKeyboardButton + + +class TestPreparedKeyboardButton: + def test_fields(self): + obj = PreparedKeyboardButton(id="abc123") + assert obj.id == "abc123" diff --git a/tests/test_api/test_types/test_reply_keyboard_remove.py b/tests/test_api/test_types/test_reply_keyboard_remove.py index 1d252cc5..1e14fd2c 100644 --- a/tests/test_api/test_types/test_reply_keyboard_remove.py +++ b/tests/test_api/test_types/test_reply_keyboard_remove.py @@ -1,5 +1,3 @@ -from typing import Dict - import pytest from aiogram.types import ReplyKeyboardRemove @@ -11,13 +9,13 @@ class TestReplyKeyboardRemove: """ def test_remove_keyboard_default_is_true(self): - assert ( - ReplyKeyboardRemove.model_fields["remove_keyboard"].default is True - ), "Remove keyboard has incorrect default value!" + assert ReplyKeyboardRemove.model_fields["remove_keyboard"].default is True, ( + "Remove keyboard has incorrect default value!" + ) @pytest.mark.parametrize( "kwargs,expected", [[{}, True], [{"remove_keyboard": True}, True]], ) - def test_remove_keyboard_values(self, kwargs: Dict[str, bool], expected: bool): + def test_remove_keyboard_values(self, kwargs: dict[str, bool], expected: bool): assert ReplyKeyboardRemove(**kwargs).remove_keyboard is expected diff --git a/tests/test_api/test_types/test_shipping_query.py b/tests/test_api/test_types/test_shipping_query.py index 76668b15..aa3537c5 100644 --- a/tests/test_api/test_types/test_shipping_query.py +++ b/tests/test_api/test_types/test_shipping_query.py @@ -28,7 +28,7 @@ class TestInlineQuery: ShippingOption(id="id", title="foo", prices=[LabeledPrice(label="foo", amount=123)]) ] - kwargs = dict(ok=True, shipping_options=shipping_options, error_message="foo") + kwargs = {"ok": True, "shipping_options": shipping_options, "error_message": "foo"} api_method = shipping_query.answer(**kwargs) diff --git a/tests/test_api/test_types/test_user.py b/tests/test_api/test_types/test_user.py index 9f28175b..610fcd9c 100644 --- a/tests/test_api/test_types/test_user.py +++ b/tests/test_api/test_types/test_user.py @@ -56,3 +56,9 @@ class TestUser: method = user.get_profile_photos(description="test") assert method.user_id == user.id + + def test_get_profile_audios(self): + user = User(id=42, is_bot=False, first_name="Test", last_name="User") + + method = user.get_profile_audios(description="test") + assert method.user_id == user.id diff --git a/tests/test_api/test_types/test_video_quality.py b/tests/test_api/test_types/test_video_quality.py new file mode 100644 index 00000000..20144911 --- /dev/null +++ b/tests/test_api/test_types/test_video_quality.py @@ -0,0 +1,61 @@ +import pytest + +from aiogram.types import Video, VideoQuality + + +@pytest.fixture() +def video_quality(): + return VideoQuality( + file_id="abc123", + file_unique_id="unique123", + width=1920, + height=1080, + codec="h264", + ) + + +class TestVideoQuality: + def test_instantiation(self, video_quality: VideoQuality): + assert video_quality.file_id == "abc123" + assert video_quality.file_unique_id == "unique123" + assert video_quality.width == 1920 + assert video_quality.height == 1080 + assert video_quality.codec == "h264" + assert video_quality.file_size is None + + def test_instantiation_with_file_size(self): + file_size = 1048576 + vq = VideoQuality( + file_id="abc123", + file_unique_id="unique123", + width=1920, + height=1080, + codec="h265", + file_size=file_size, + ) + assert vq.file_size == file_size + + def test_video_with_qualities(self, video_quality: VideoQuality): + file_size = 524288 + video = Video( + file_id="video123", + file_unique_id="unique_video123", + width=1920, + height=1080, + duration=120, + qualities=[ + video_quality, + VideoQuality( + file_id="q2", + file_unique_id="uq2", + width=1280, + height=720, + codec="h264", + file_size=file_size, + ), + ], + ) + assert video.qualities is not None + assert len(video.qualities) == 2 + assert video.qualities[0].width == 1920 + assert video.qualities[1].file_size == file_size diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 98467934..014f44d3 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -5,6 +5,7 @@ import time import warnings from asyncio import Event from collections import Counter +from contextlib import suppress from typing import Any from unittest.mock import AsyncMock, patch @@ -29,9 +30,11 @@ from aiogram.types import ( ChatMemberUpdated, ChosenInlineResult, InlineQuery, + ManagedBotUpdated, Message, MessageReactionCountUpdated, MessageReactionUpdated, + PaidMediaPurchased, Poll, PollAnswer, PollOption, @@ -197,7 +200,7 @@ class TestDispatcher: async def test_process_update_empty(self, bot: MockedBot): dispatcher = Dispatcher() - with pytest.warns(RuntimeWarning, match="Detected unknown update type") as record: + with pytest.warns(RuntimeWarning, match="Detected unknown update type"): result = await dispatcher._process_update(bot=bot, update=Update(update_id=42)) assert not result @@ -378,13 +381,14 @@ class TestDispatcher: id="poll id", question="Q?", options=[ - PollOption(text="A1", voter_count=2), - PollOption(text="A2", voter_count=3), + PollOption(persistent_id="1", text="A1", voter_count=2), + PollOption(persistent_id="2", text="A2", voter_count=3), ], is_closed=False, is_anonymous=False, type="quiz", allows_multiple_answers=False, + allows_revoting=False, total_voter_count=0, correct_option_id=1, ), @@ -400,6 +404,7 @@ class TestDispatcher: poll_id="poll id", user=User(id=42, is_bot=False, first_name="Test"), option_ids=[42], + option_persistent_ids=["1"], ), ), False, @@ -586,6 +591,30 @@ class TestDispatcher: True, True, ), + pytest.param( + "purchased_paid_media", + Update( + update_id=42, + purchased_paid_media=PaidMediaPurchased( + paid_media_payload="payload", + from_user=User(id=42, is_bot=False, first_name="Test"), + ), + ), + False, + True, + ), + pytest.param( + "managed_bot", + Update( + update_id=42, + managed_bot=ManagedBotUpdated( + user=User(id=42, is_bot=False, first_name="Test"), + bot_user=User(id=100, is_bot=True, first_name="ManagedBot"), + ), + ), + False, + True, + ), ], ) async def test_listen_update( @@ -641,13 +670,14 @@ class TestDispatcher: id="poll id", question="Q?", options=[ - PollOption(text="A1", voter_count=2), - PollOption(text="A2", voter_count=3), + PollOption(persistent_id="1", text="A1", voter_count=2), + PollOption(persistent_id="2", text="A2", voter_count=3), ], is_closed=False, is_anonymous=False, type="quiz", allows_multiple_answers=False, + allows_revoting=False, total_voter_count=0, correct_option_id=0, ), @@ -765,11 +795,14 @@ class TestDispatcher: async def _mock_updates(*_): yield Update(update_id=42) - with patch( - "aiogram.dispatcher.dispatcher.Dispatcher._process_update", new_callable=AsyncMock - ) as mocked_process_update, patch( - "aiogram.dispatcher.dispatcher.Dispatcher._listen_updates" - ) as patched_listen_updates: + with ( + patch( + "aiogram.dispatcher.dispatcher.Dispatcher._process_update", new_callable=AsyncMock + ) as mocked_process_update, + patch( + "aiogram.dispatcher.dispatcher.Dispatcher._listen_updates" + ) as patched_listen_updates, + ): patched_listen_updates.return_value = _mock_updates() await dispatcher._polling(bot=bot, handle_as_tasks=as_task) if as_task: @@ -777,6 +810,163 @@ class TestDispatcher: else: mocked_process_update.assert_awaited() + @pytest.mark.parametrize( + "handle_as_tasks,tasks_concurrency_limit,should_create_semaphore", + [ + (True, 10, True), + (True, None, False), + (False, 10, False), + (False, None, False), + ], + ) + async def test_polling_with_semaphore( + self, + bot: MockedBot, + handle_as_tasks: bool, + tasks_concurrency_limit: int, + should_create_semaphore: bool, + ): + """Test that semaphore is created only when handle_as_tasks=True and tasks_concurrency_limit is not None""" + dispatcher = Dispatcher() + + async def _mock_updates(*_): + yield Update(update_id=42) + + with ( + patch( + "aiogram.dispatcher.dispatcher.Dispatcher._process_update", new_callable=AsyncMock + ), + patch( + "aiogram.dispatcher.dispatcher.Dispatcher._listen_updates" + ) as patched_listen_updates, + patch("asyncio.Semaphore") as mocked_semaphore, + ): + patched_listen_updates.return_value = _mock_updates() + + # Set up the mock semaphore + if should_create_semaphore: + mock_semaphore_instance = AsyncMock() + mock_semaphore_instance.acquire.return_value = asyncio.Future() + mock_semaphore_instance.acquire.return_value.set_result(None) + mocked_semaphore.return_value = mock_semaphore_instance + + await dispatcher._polling( + bot=bot, + handle_as_tasks=handle_as_tasks, + tasks_concurrency_limit=tasks_concurrency_limit, + ) + + if should_create_semaphore: + mocked_semaphore.assert_called_once_with(tasks_concurrency_limit) + else: + mocked_semaphore.assert_not_called() + + async def test_process_with_semaphore(self): + """Test that _process_with_semaphore correctly processes updates and releases the semaphore""" + dispatcher = Dispatcher() + + # Create a real coroutine for handle_update + async def mock_handle_update(): + return "test result" + + # Create a mock for the semaphore + semaphore = AsyncMock() + semaphore.release = AsyncMock() + + # Call the _process_with_semaphore method + await dispatcher._process_with_semaphore(mock_handle_update(), semaphore) + + # Verify that semaphore.release was called, which indicates that the coroutine was awaited + semaphore.release.assert_called_once() + + async def test_process_with_semaphore_exception(self): + """Test that _process_with_semaphore releases the semaphore even if an exception occurs""" + dispatcher = Dispatcher() + + # Create a real coroutine that raises an exception + async def mock_handle_update_with_exception(): + raise Exception("Test exception") + + # Create a mock for the semaphore + semaphore = AsyncMock() + semaphore.release = AsyncMock() + + # Call the _process_with_semaphore method and expect an exception + with pytest.raises(Exception, match="Test exception"): + await dispatcher._process_with_semaphore( + mock_handle_update_with_exception(), semaphore + ) + + # Verify that semaphore.release was called even though an exception occurred + semaphore.release.assert_called_once() + + async def test_concurrent_updates_limit(self, bot: MockedBot): + """Test that concurrent updates are limited when using the semaphore""" + dispatcher = Dispatcher() + tasks_concurrency_limit = 2 + + # Create a real semaphore for this test + semaphore = asyncio.Semaphore(tasks_concurrency_limit) + + # Create a list to track when updates are processed + processed_updates = [] + + async def mock_process_update(*args, **kwargs): + # Record that an update is being processed + update_id = len(processed_updates) + processed_updates.append(f"start_{update_id}") + # Simulate some processing time + await asyncio.sleep(0.1) + processed_updates.append(f"end_{update_id}") + return True + + # Create mock updates + async def _mock_updates(*_): + for i in range(5): # Send 5 updates + yield Update(update_id=i) + + with ( + patch( + "aiogram.dispatcher.dispatcher.Dispatcher._process_update", + side_effect=mock_process_update, + ), + patch( + "aiogram.dispatcher.dispatcher.Dispatcher._listen_updates" + ) as patched_listen_updates, + patch( + "asyncio.Semaphore", + return_value=semaphore, + ), + ): + patched_listen_updates.return_value = _mock_updates() + + # Start polling with concurrent_updates_limit + polling_task = asyncio.create_task( + dispatcher._polling( + bot=bot, handle_as_tasks=True, tasks_concurrency_limit=tasks_concurrency_limit + ) + ) + + # Wait longer for all updates to be processed + await asyncio.sleep(0.6) + + # Cancel the polling task + polling_task.cancel() + with suppress(asyncio.CancelledError): + await polling_task + + # Check that at most concurrent_updates_limit updates were being processed at the same time + # This is a bit tricky to test precisely, but we can check that we have the expected number + # of start/end pairs in the processed_updates list + starts = [item for item in processed_updates if item.startswith("start_")] + ends = [item for item in processed_updates if item.startswith("end_")] + + # We should have an equal number of starts and ends + assert len(starts) == len(ends) + + # The semaphore should have been acquired and released the same number of times + assert semaphore._value == tasks_concurrency_limit + async def test_exception_handler_catch_exceptions(self, bot: MockedBot): dp = Dispatcher() router = Router() @@ -839,15 +1029,20 @@ class TestDispatcher: async def _mock_updates(*_): yield Update(update_id=42) - with patch( - "aiogram.dispatcher.dispatcher.Dispatcher._process_update", new_callable=AsyncMock - ) as mocked_process_update, patch( - "aiogram.dispatcher.router.Router.emit_startup", new_callable=AsyncMock - ) as mocked_emit_startup, patch( - "aiogram.dispatcher.router.Router.emit_shutdown", new_callable=AsyncMock - ) as mocked_emit_shutdown, patch( - "aiogram.dispatcher.dispatcher.Dispatcher._listen_updates" - ) as patched_listen_updates: + with ( + patch( + "aiogram.dispatcher.dispatcher.Dispatcher._process_update", new_callable=AsyncMock + ) as mocked_process_update, + patch( + "aiogram.dispatcher.router.Router.emit_startup", new_callable=AsyncMock + ) as mocked_emit_startup, + patch( + "aiogram.dispatcher.router.Router.emit_shutdown", new_callable=AsyncMock + ) as mocked_emit_shutdown, + patch( + "aiogram.dispatcher.dispatcher.Dispatcher._listen_updates" + ) as patched_listen_updates, + ): patched_listen_updates.return_value = _mock_updates() await dispatcher.start_polling(bot) @@ -903,11 +1098,14 @@ class TestDispatcher: yield Update(update_id=42) await asyncio.sleep(1) - with patch( - "aiogram.dispatcher.dispatcher.Dispatcher._process_update", new_callable=AsyncMock - ) as mocked_process_update, patch( - "aiogram.dispatcher.dispatcher.Dispatcher._listen_updates", - return_value=_mock_updates(), + with ( + patch( + "aiogram.dispatcher.dispatcher.Dispatcher._process_update", new_callable=AsyncMock + ) as mocked_process_update, + patch( + "aiogram.dispatcher.dispatcher.Dispatcher._listen_updates", + return_value=_mock_updates(), + ), ): task = asyncio.ensure_future(dispatcher.start_polling(bot)) await running.wait() diff --git a/tests/test_dispatcher/test_event/test_handler.py b/tests/test_dispatcher/test_event/test_handler.py index 1f8be4af..5b5bc4c9 100644 --- a/tests/test_dispatcher/test_event/test_handler.py +++ b/tests/test_dispatcher/test_event/test_handler.py @@ -1,5 +1,6 @@ import functools -from typing import Any, Callable, Dict, Set, Union +from collections.abc import Callable +from typing import Any import pytest from magic_filter import F as A @@ -29,7 +30,7 @@ async def callback4(foo: int, *, bar: int, baz: int): class TestFilter(Filter): - async def __call__(self, foo: int, bar: int, baz: int) -> Union[bool, Dict[str, Any]]: + async def __call__(self, foo: int, bar: int, baz: int) -> bool | dict[str, Any]: return locals() @@ -57,11 +58,11 @@ class TestCallableObject: pytest.param(callback1, {"foo", "bar", "baz"}), pytest.param(callback2, {"foo", "bar", "baz"}), pytest.param(callback3, {"foo"}), - pytest.param(TestFilter(), {"self", "foo", "bar", "baz"}), - pytest.param(SyncCallable(), {"self", "foo", "bar", "baz"}), + pytest.param(TestFilter(), {"foo", "bar", "baz"}), + pytest.param(SyncCallable(), {"foo", "bar", "baz"}), ], ) - def test_init_args_spec(self, callback: Callable, args: Set[str]): + def test_init_args_spec(self, callback: Callable, args: set[str]): obj = CallableObject(callback) assert set(obj.params) == args @@ -125,7 +126,7 @@ class TestCallableObject: ], ) def test_prepare_kwargs( - self, callback: Callable, kwargs: Dict[str, Any], result: Dict[str, Any] + self, callback: Callable, kwargs: dict[str, Any], result: dict[str, Any] ): obj = CallableObject(callback) assert obj._prepare_kwargs(kwargs) == result @@ -147,7 +148,6 @@ class TestFilterObject: def test_post_init(self): case = F.test filter_obj = FilterObject(callback=case) - print(filter_obj.callback) assert filter_obj.callback == case.resolve diff --git a/tests/test_dispatcher/test_event/test_telegram.py b/tests/test_dispatcher/test_event/test_telegram.py index 713aabb8..36c13ee4 100644 --- a/tests/test_dispatcher/test_event/test_telegram.py +++ b/tests/test_dispatcher/test_event/test_telegram.py @@ -1,6 +1,6 @@ import datetime import functools -from typing import Any, Dict, NoReturn, Optional, Union +from typing import Any, NoReturn import pytest from pydantic import BaseModel @@ -31,7 +31,7 @@ async def pipe_handler(*args, **kwargs): class MyFilter1(Filter, BaseModel): test: str - async def __call__(self, *args: Any, **kwargs: Any) -> Union[bool, Dict[str, Any]]: + async def __call__(self, *args: Any, **kwargs: Any) -> bool | dict[str, Any]: return True @@ -44,16 +44,16 @@ class MyFilter3(MyFilter1): class OptionalFilter(Filter, BaseModel): - optional: Optional[str] + optional: str | None - async def __call__(self, *args: Any, **kwargs: Any) -> Union[bool, Dict[str, Any]]: + async def __call__(self, *args: Any, **kwargs: Any) -> bool | dict[str, Any]: return True class DefaultFilter(Filter, BaseModel): default: str = "Default" - async def __call__(self, *args: Any, **kwargs: Any) -> Union[bool, Dict[str, Any]]: + async def __call__(self, *args: Any, **kwargs: Any) -> bool | dict[str, Any]: return True diff --git a/tests/test_dispatcher/test_middlewares/test_user_context.py b/tests/test_dispatcher/test_middlewares/test_user_context.py index b3818fbe..124bee61 100644 --- a/tests/test_dispatcher/test_middlewares/test_user_context.py +++ b/tests/test_dispatcher/test_middlewares/test_user_context.py @@ -1,3 +1,4 @@ +from datetime import datetime from unittest.mock import patch import pytest @@ -6,7 +7,16 @@ from aiogram.dispatcher.middlewares.user_context import ( EventContext, UserContextMiddleware, ) -from aiogram.types import Chat, Update, User +from aiogram.types import ( + Chat, + ChatBoost, + ChatBoostSourceGiftCode, + ChatBoostSourceGiveaway, + ChatBoostSourcePremium, + ChatBoostUpdated, + Update, + User, +) async def next_handler(*args, **kwargs): @@ -41,3 +51,38 @@ class TestUserContextMiddleware: assert data["event_chat"] is chat assert data["event_from_user"] is user assert data["event_thread_id"] == thread_id + + @pytest.mark.parametrize( + "source, expected_user", + [ + ( + ChatBoostSourcePremium(user=User(id=2, first_name="Test", is_bot=False)), + User(id=2, first_name="Test", is_bot=False), + ), + (ChatBoostSourceGiftCode(user=User(id=2, first_name="Test", is_bot=False)), None), + ( + ChatBoostSourceGiveaway( + giveaway_message_id=1, user=User(id=2, first_name="Test", is_bot=False) + ), + None, + ), + ], + ) + async def test_resolve_event_context(self, source, expected_user): + middleware = UserContextMiddleware() + data = {} + + chat = Chat(id=1, type="private", title="Test") + add_date = datetime.now() + expiration_date = datetime.now() + + boost = ChatBoost( + boost_id="Test", add_date=add_date, expiration_date=expiration_date, source=source + ) + update = Update(update_id=42, chat_boost=ChatBoostUpdated(chat=chat, boost=boost)) + + await middleware(next_handler, update, data) + + event_context = data["event_context"] + assert isinstance(event_context, EventContext) + assert event_context.user == expected_user diff --git a/tests/test_dispatcher/test_router.py b/tests/test_dispatcher/test_router.py index 1ac78480..2c9f7820 100644 --- a/tests/test_dispatcher/test_router.py +++ b/tests/test_dispatcher/test_router.py @@ -50,7 +50,9 @@ class TestRouter: def test_include_router_by_string_bad_type(self): router = Router() - with pytest.raises(ValueError, match=r"router should be instance of Router"): + with pytest.raises( + ValueError, match=r"router should be instance of Router not 'TestRouter'" + ): router.include_router(self) def test_set_parent_router_bad_type(self): @@ -71,6 +73,7 @@ class TestRouter: assert router.observers["shipping_query"] == router.shipping_query assert router.observers["pre_checkout_query"] == router.pre_checkout_query assert router.observers["poll"] == router.poll + assert router.observers["managed_bot"] == router.managed_bot async def test_emit_startup(self): router1 = Router() diff --git a/tests/test_filters/test_base.py b/tests/test_filters/test_base.py index 36d5bbee..131cf1b0 100644 --- a/tests/test_filters/test_base.py +++ b/tests/test_filters/test_base.py @@ -1,4 +1,4 @@ -from typing import Awaitable +from collections.abc import Awaitable from unittest.mock import AsyncMock, patch from aiogram.filters import Filter diff --git a/tests/test_filters/test_callback_data.py b/tests/test_filters/test_callback_data.py index 635b8e9f..79ca5929 100644 --- a/tests/test_filters/test_callback_data.py +++ b/tests/test_filters/test_callback_data.py @@ -92,23 +92,35 @@ class TestCallbackData: assert MyCallback(foo="test", bar=42).pack() == "test:test:42" + def test_pack_uuid(self): + class MyCallbackWithUUID(CallbackData, prefix="test"): + foo: str + bar: UUID + + callback = MyCallbackWithUUID( + foo="test", + bar=UUID("123e4567-e89b-12d3-a456-426655440000"), + ) + + assert callback.pack() == "test:test:123e4567e89b12d3a456426655440000" + def test_pack_optional(self): class MyCallback1(CallbackData, prefix="test1"): foo: str - bar: Optional[int] = None + bar: int | None = None assert MyCallback1(foo="spam").pack() == "test1:spam:" assert MyCallback1(foo="spam", bar=42).pack() == "test1:spam:42" class MyCallback2(CallbackData, prefix="test2"): - foo: Optional[str] = None + foo: str | None = None bar: int assert MyCallback2(bar=42).pack() == "test2::42" assert MyCallback2(foo="spam", bar=42).pack() == "test2:spam:42" class MyCallback3(CallbackData, prefix="test3"): - foo: Optional[str] = "experiment" + foo: str | None = "experiment" bar: int assert MyCallback3(bar=42).pack() == "test3:experiment:42" @@ -129,25 +141,32 @@ class TestCallbackData: class MyCallback1(CallbackData, prefix="test1"): foo: str - bar: Optional[int] = None + bar: int | None = None assert MyCallback1.unpack("test1:spam:") == MyCallback1(foo="spam") assert MyCallback1.unpack("test1:spam:42") == MyCallback1(foo="spam", bar=42) class MyCallback2(CallbackData, prefix="test2"): - foo: Optional[str] = None + foo: str | None = None bar: int assert MyCallback2.unpack("test2::42") == MyCallback2(bar=42) assert MyCallback2.unpack("test2:spam:42") == MyCallback2(foo="spam", bar=42) class MyCallback3(CallbackData, prefix="test3"): - foo: Optional[str] = "experiment" + foo: str | None = "experiment" bar: int assert MyCallback3.unpack("test3:experiment:42") == MyCallback3(bar=42) assert MyCallback3.unpack("test3:spam:42") == MyCallback3(foo="spam", bar=42) + class MyCallback4(CallbackData, prefix="test4"): + foo: str | None = "" + bar: str | None = None + + assert MyCallback4.unpack("test4::") == MyCallback4(foo="", bar=None) + assert MyCallback4.unpack("test4::") == MyCallback4() + @pytest.mark.parametrize( "hint", [ diff --git a/tests/test_filters/test_chat_member_updated.py b/tests/test_filters/test_chat_member_updated.py index 2a608c8f..4582f052 100644 --- a/tests/test_filters/test_chat_member_updated.py +++ b/tests/test_filters/test_chat_member_updated.py @@ -1,5 +1,4 @@ from datetime import datetime -from typing import Optional import pytest @@ -27,7 +26,7 @@ from aiogram.types import ( class ChatMemberCustom(ChatMember): status: str - is_member: Optional[bool] = None + is_member: bool | None = None class TestMemberStatusMarker: @@ -315,6 +314,7 @@ class TestChatMemberUpdatedStatusFilter: "can_send_polls": True, "can_send_other_messages": True, "can_add_web_page_previews": True, + "can_edit_tag": True, "can_post_stories": True, "can_edit_stories": True, "can_delete_stories": True, diff --git a/tests/test_filters/test_command.py b/tests/test_filters/test_command.py index ec79098a..2c01e151 100644 --- a/tests/test_filters/test_command.py +++ b/tests/test_filters/test_command.py @@ -85,6 +85,9 @@ class TestCommandFilter: False, ], ["/start test", CommandStart(), True], + ["/start", CommandStart(), True], + ["/start", CommandStart(deep_link=False), True], + ["/start test", CommandStart(deep_link=False), False], ["/start", CommandStart(deep_link=True), False], ["/start test", CommandStart(deep_link=True), True], ["/start test", CommandStart(deep_link=True, deep_link_encoded=True), False], @@ -175,7 +178,7 @@ class TestCommandStart: cmd = CommandStart() assert ( str(cmd) - == "CommandStart(ignore_case=False, ignore_mention=False, deep_link=False, deep_link_encoded=False)" + == "CommandStart(ignore_case=False, ignore_mention=False, deep_link_encoded=False)" ) diff --git a/tests/test_filters/test_state.py b/tests/test_filters/test_state.py index 16124ef9..de7ad72d 100644 --- a/tests/test_filters/test_state.py +++ b/tests/test_filters/test_state.py @@ -56,7 +56,7 @@ class TestStateFilter: assert SG.state == copy(SG.state) assert SG.state == "SG:state" - assert "SG:state" == SG.state + assert SG.state == "SG:state" assert State() == State() assert SG.state != 1 diff --git a/tests/test_fsm/storage/test_isolation.py b/tests/test_fsm/storage/test_isolation.py index 867362c1..2624ad26 100644 --- a/tests/test_fsm/storage/test_isolation.py +++ b/tests/test_fsm/storage/test_isolation.py @@ -1,4 +1,3 @@ -from unittest import mock from unittest.mock import AsyncMock, patch import pytest @@ -9,11 +8,8 @@ from aiogram.fsm.storage.redis import RedisEventIsolation, RedisStorage @pytest.mark.parametrize( "isolation", - [ - pytest.lazy_fixture("redis_isolation"), - pytest.lazy_fixture("lock_isolation"), - pytest.lazy_fixture("disabled_isolation"), - ], + ["redis_isolation", "lock_isolation", "disabled_isolation"], + indirect=True, ) class TestIsolations: async def test_lock( diff --git a/tests/test_fsm/storage/test_key_builder.py b/tests/test_fsm/storage/test_key_builder.py index f62ac505..43df2a0e 100644 --- a/tests/test_fsm/storage/test_key_builder.py +++ b/tests/test_fsm/storage/test_key_builder.py @@ -1,4 +1,4 @@ -from typing import Literal, Optional +from typing import Literal import pytest @@ -67,7 +67,7 @@ class TestDefaultKeyBuilder: async def test_generate_key( self, key_builder: DefaultKeyBuilder, - field: Optional[Literal["data", "state", "lock"]], + field: Literal["data", "state", "lock"] | None, result: str, ): key = StorageKey( diff --git a/tests/test_fsm/storage/test_pymongo.py b/tests/test_fsm/storage/test_pymongo.py new file mode 100644 index 00000000..574e7357 --- /dev/null +++ b/tests/test_fsm/storage/test_pymongo.py @@ -0,0 +1,218 @@ +import pytest +from pymongo.errors import PyMongoError + +from aiogram.fsm.state import State +from aiogram.fsm.storage.pymongo import PyMongoStorage, StorageKey +from tests.conftest import CHAT_ID, USER_ID + +PREFIX = "fsm" + + +async def test_get_storage_passing_only_url(pymongo_server): + storage = PyMongoStorage.from_url(url=pymongo_server) + try: + await storage._client.server_info() + except PyMongoError as e: + pytest.fail(str(e)) + + +async def test_pymongo_storage_close_does_not_throw(pymongo_server): + storage = PyMongoStorage.from_url(url=pymongo_server) + try: + assert await storage.close() is None + except Exception as e: + pytest.fail(f"close() raised an exception: {e}") + + +async def test_update_not_existing_data_with_empty_dictionary( + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, +): + assert await pymongo_storage._collection.find_one({}) is None + assert await pymongo_storage.update_data(key=storage_key, data={}) == {} + assert await pymongo_storage._collection.find_one({}) is None + + +async def test_update_not_existing_data_with_non_empty_dictionary( + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, +): + assert await pymongo_storage._collection.find_one({}) is None + assert await pymongo_storage.update_data(key=storage_key, data={"key": "value"}) == { + "key": "value" + } + assert await pymongo_storage._collection.find_one({}) == { + "_id": f"{PREFIX}:{CHAT_ID}:{USER_ID}", + "data": {"key": "value"}, + } + await pymongo_storage._collection.delete_one({}) + + +async def test_update_existing_data_with_empty_dictionary( + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, +): + assert await pymongo_storage._collection.find_one({}) is None + await pymongo_storage.set_data(key=storage_key, data={"key": "value"}) + assert await pymongo_storage.update_data(key=storage_key, data={}) == {"key": "value"} + assert await pymongo_storage._collection.find_one({}) == { + "_id": f"{PREFIX}:{CHAT_ID}:{USER_ID}", + "data": {"key": "value"}, + } + await pymongo_storage._collection.delete_one({}) + + +async def test_update_existing_data_with_non_empty_dictionary( + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, +): + assert await pymongo_storage._collection.find_one({}) is None + await pymongo_storage.set_data(key=storage_key, data={"key": "value"}) + assert await pymongo_storage.update_data(key=storage_key, data={"key": "new_value"}) == { + "key": "new_value" + } + assert await pymongo_storage._collection.find_one({}) == { + "_id": f"{PREFIX}:{CHAT_ID}:{USER_ID}", + "data": {"key": "new_value"}, + } + await pymongo_storage._collection.delete_one({}) + + +async def test_document_life_cycle( + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, +): + assert await pymongo_storage._collection.find_one({}) is None + await pymongo_storage.set_state(storage_key, "test") + await pymongo_storage.set_data(storage_key, {"key": "value"}) + assert await pymongo_storage._collection.find_one({}) == { + "_id": f"{PREFIX}:{CHAT_ID}:{USER_ID}", + "state": "test", + "data": {"key": "value"}, + } + await pymongo_storage.set_state(storage_key, None) + assert await pymongo_storage._collection.find_one({}) == { + "_id": f"{PREFIX}:{CHAT_ID}:{USER_ID}", + "data": {"key": "value"}, + } + await pymongo_storage.set_data(storage_key, {}) + assert await pymongo_storage._collection.find_one({}) is None + + +class TestStateAndDataDoNotAffectEachOther: + async def test_state_and_data_do_not_affect_each_other_while_getting( + self, + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, + ): + assert await pymongo_storage._collection.find_one({}) is None + await pymongo_storage.set_state(storage_key, "test") + await pymongo_storage.set_data(storage_key, {"key": "value"}) + assert await pymongo_storage.get_state(storage_key) == "test" + assert await pymongo_storage.get_data(storage_key) == {"key": "value"} + + async def test_data_do_not_affect_to_deleted_state_getting( + self, + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, + ): + await pymongo_storage.set_state(storage_key, "test") + await pymongo_storage.set_data(storage_key, {"key": "value"}) + await pymongo_storage.set_state(storage_key, None) + assert await pymongo_storage.get_state(storage_key) is None + + async def test_state_do_not_affect_to_deleted_data_getting( + self, + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, + ): + await pymongo_storage.set_state(storage_key, "test") + await pymongo_storage.set_data(storage_key, {"key": "value"}) + await pymongo_storage.set_data(storage_key, {}) + assert await pymongo_storage.get_data(storage_key) == {} + + async def test_state_do_not_affect_to_updating_not_existing_data_with_empty_dictionary( + self, + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, + ): + await pymongo_storage.set_state(storage_key, "test") + assert await pymongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test" + } + assert await pymongo_storage.update_data(key=storage_key, data={}) == {} + assert await pymongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test" + } + + async def test_state_do_not_affect_to_updating_not_existing_data_with_non_empty_dictionary( + self, + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, + ): + await pymongo_storage.set_state(storage_key, "test") + assert await pymongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test" + } + assert await pymongo_storage.update_data( + key=storage_key, + data={"key": "value"}, + ) == {"key": "value"} + assert await pymongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test", + "data": {"key": "value"}, + } + + async def test_state_do_not_affect_to_updating_existing_data_with_empty_dictionary( + self, + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, + ): + await pymongo_storage.set_state(storage_key, "test") + await pymongo_storage.set_data(storage_key, {"key": "value"}) + assert await pymongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test", + "data": {"key": "value"}, + } + assert await pymongo_storage.update_data(key=storage_key, data={}) == {"key": "value"} + assert await pymongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test", + "data": {"key": "value"}, + } + + async def test_state_do_not_affect_to_updating_existing_data_with_non_empty_dictionary( + self, + pymongo_storage: PyMongoStorage, + storage_key: StorageKey, + ): + await pymongo_storage.set_state(storage_key, "test") + await pymongo_storage.set_data(storage_key, {"key": "value"}) + assert await pymongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test", + "data": {"key": "value"}, + } + assert await pymongo_storage.update_data( + key=storage_key, + data={"key": "VALUE", "key_2": "value_2"}, + ) == {"key": "VALUE", "key_2": "value_2"} + assert await pymongo_storage._collection.find_one({}, projection={"_id": 0}) == { + "state": "test", + "data": {"key": "VALUE", "key_2": "value_2"}, + } + + +@pytest.mark.parametrize( + "value,result", + [ + [None, None], + ["", ""], + ["text", "text"], + [State(), None], + [State(state="*"), "*"], + [State("text"), "@:text"], + [State("test", group_name="Test"), "Test:test"], + [[1, 2, 3], "[1, 2, 3]"], + ], +) +def test_resolve_state(value, result, pymongo_storage: PyMongoStorage): + assert pymongo_storage.resolve_state(value) == result diff --git a/tests/test_fsm/storage/test_storages.py b/tests/test_fsm/storage/test_storages.py index 690bc791..e374448b 100644 --- a/tests/test_fsm/storage/test_storages.py +++ b/tests/test_fsm/storage/test_storages.py @@ -1,15 +1,15 @@ +from typing import TypedDict + import pytest +from aiogram.exceptions import DataNotDictLikeError from aiogram.fsm.storage.base import BaseStorage, StorageKey @pytest.mark.parametrize( "storage", - [ - pytest.lazy_fixture("redis_storage"), - pytest.lazy_fixture("mongo_storage"), - pytest.lazy_fixture("memory_storage"), - ], + ["memory_storage", "redis_storage", "mongo_storage", "pymongo_storage"], + indirect=True, ) class TestStorages: async def test_set_state(self, storage: BaseStorage, storage_key: StorageKey): @@ -22,11 +22,42 @@ class TestStorages: async def test_set_data(self, storage: BaseStorage, storage_key: StorageKey): assert await storage.get_data(key=storage_key) == {} + assert await storage.get_value(storage_key=storage_key, dict_key="foo") is None + assert ( + await storage.get_value(storage_key=storage_key, dict_key="foo", default="baz") + == "baz" + ) await storage.set_data(key=storage_key, data={"foo": "bar"}) assert await storage.get_data(key=storage_key) == {"foo": "bar"} + assert await storage.get_value(storage_key=storage_key, dict_key="foo") == "bar" + assert ( + await storage.get_value(storage_key=storage_key, dict_key="foo", default="baz") + == "bar" + ) + await storage.set_data(key=storage_key, data={}) assert await storage.get_data(key=storage_key) == {} + assert await storage.get_value(storage_key=storage_key, dict_key="foo") is None + assert ( + await storage.get_value(storage_key=storage_key, dict_key="foo", default="baz") + == "baz" + ) + + class CustomTypedDict(TypedDict, total=False): + foo: str + bar: str + + await storage.set_data(key=storage_key, data=CustomTypedDict(foo="bar", bar="baz")) + assert await storage.get_data(key=storage_key) == {"foo": "bar", "bar": "baz"} + assert await storage.get_value(storage_key=storage_key, dict_key="foo") == "bar" + assert ( + await storage.get_value(storage_key=storage_key, dict_key="foo", default="baz") + == "bar" + ) + + with pytest.raises(DataNotDictLikeError): + await storage.set_data(key=storage_key, data=()) async def test_update_data(self, storage: BaseStorage, storage_key: StorageKey): assert await storage.get_data(key=storage_key) == {} diff --git a/tests/test_fsm/test_context.py b/tests/test_fsm/test_context.py index f0c29911..76126d31 100644 --- a/tests/test_fsm/test_context.py +++ b/tests/test_fsm/test_context.py @@ -34,6 +34,10 @@ class TestFSMContext: assert await state2.get_data() == {} assert await state3.get_data() == {} + assert await state.get_value("foo") == "bar" + assert await state2.get_value("foo") is None + assert await state3.get_value("foo", "baz") == "baz" + await state2.set_state("experiments") assert await state.get_state() == "test" assert await state3.get_state() is None diff --git a/tests/test_fsm/test_middleware.py b/tests/test_fsm/test_middleware.py new file mode 100644 index 00000000..82ef93b2 --- /dev/null +++ b/tests/test_fsm/test_middleware.py @@ -0,0 +1,90 @@ +from aiogram.fsm.middleware import FSMContextMiddleware +from aiogram.fsm.storage.memory import DisabledEventIsolation, MemoryStorage +from aiogram.fsm.strategy import FSMStrategy +from tests.mocked_bot import MockedBot + +CHANNEL_ID = -1001234567890 +THREAD_ID = 42 + + +def create_middleware(strategy: FSMStrategy) -> FSMContextMiddleware: + return FSMContextMiddleware( + storage=MemoryStorage(), + events_isolation=DisabledEventIsolation(), + strategy=strategy, + ) + + +class TestFSMContextMiddleware: + def test_resolve_context_for_channel_in_chat_strategy(self): + bot = MockedBot() + middleware = create_middleware(FSMStrategy.CHAT) + + context = middleware.resolve_context( + bot=bot, + chat_id=CHANNEL_ID, + user_id=None, + ) + + assert context is not None + assert context.key.chat_id == CHANNEL_ID + assert context.key.user_id == CHANNEL_ID + + def test_resolve_context_with_missing_user_in_chat_topic_strategy_uses_chat_id_for_user_id( + self, + ): + """ + When user_id is absent (e.g., channel-like updates), chat-scoped strategies + should still build a stable FSM key by mirroring chat_id into user_id. + """ + bot = MockedBot() + middleware = create_middleware(FSMStrategy.CHAT_TOPIC) + + context = middleware.resolve_context( + bot=bot, + chat_id=CHANNEL_ID, + user_id=None, + thread_id=THREAD_ID, + ) + + assert context is not None + assert context.key.chat_id == CHANNEL_ID + assert context.key.user_id == CHANNEL_ID + assert context.key.thread_id == THREAD_ID + + def test_resolve_context_for_channel_in_user_in_chat_strategy(self): + bot = MockedBot() + middleware = create_middleware(FSMStrategy.USER_IN_CHAT) + + context = middleware.resolve_context( + bot=bot, + chat_id=CHANNEL_ID, + user_id=None, + ) + + assert context is None + + def test_resolve_context_for_channel_in_global_user_strategy(self): + bot = MockedBot() + middleware = create_middleware(FSMStrategy.GLOBAL_USER) + + context = middleware.resolve_context( + bot=bot, + chat_id=CHANNEL_ID, + user_id=None, + ) + + assert context is None + + def test_resolve_context_for_channel_in_user_in_topic_strategy(self): + bot = MockedBot() + middleware = create_middleware(FSMStrategy.USER_IN_TOPIC) + + context = middleware.resolve_context( + bot=bot, + chat_id=CHANNEL_ID, + user_id=None, + thread_id=THREAD_ID, + ) + + assert context is None diff --git a/tests/test_fsm/test_scene.py b/tests/test_fsm/test_scene.py index 2bb2cf0a..ba601325 100644 --- a/tests/test_fsm/test_scene.py +++ b/tests/test_fsm/test_scene.py @@ -1,5 +1,4 @@ import inspect -import platform from datetime import datetime from unittest.mock import ANY, AsyncMock, patch @@ -7,8 +6,9 @@ import pytest from aiogram import Dispatcher, F, Router from aiogram.dispatcher.event.bases import NextMiddlewareType +from aiogram.enums import UpdateType from aiogram.exceptions import SceneException -from aiogram.filters import StateFilter +from aiogram.filters import Command, StateFilter from aiogram.fsm.context import FSMContext from aiogram.fsm.scene import ( ActionContainer, @@ -253,6 +253,7 @@ class TestSceneHandlerWrapper: state_mock = AsyncMock(spec=FSMContext) scenes_mock = AsyncMock(spec=ScenesManager) + scenes_mock.data = {} event_update_mock = Update( update_id=42, message=Message( @@ -282,6 +283,7 @@ class TestSceneHandlerWrapper: state_mock = AsyncMock(spec=FSMContext) scenes_mock = AsyncMock(spec=ScenesManager) + scenes_mock.data = {} event_update_mock = Update( update_id=42, message=Message( @@ -309,6 +311,34 @@ class TestSceneHandlerWrapper: # Check whether result is correct assert result == 42 + async def test_scene_handler_wrapper_call_without_scene_context(self): + class MyScene(Scene): + pass + + async def handler_mock(*args, **kwargs): + return 42 + + event_update_mock = Update( + update_id=42, + message=Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat( + type="private", + id=42, + ), + ), + ) + + scene_handler_wrapper = SceneHandlerWrapper(MyScene, handler_mock) + + with pytest.raises( + SceneException, + match="Scene context key 'state' is not available. Ensure FSM is enabled and pipeline is intact.", + ): + await scene_handler_wrapper(event_update_mock, event_update=event_update_mock) + def test_scene_handler_wrapper_str(self): class MyScene(Scene): pass @@ -685,6 +715,44 @@ class TestScene: scenes.enter.assert_called_once_with(MyScene, **kwargs) + async def test_scene_as_handler_enter_with_middleware_data(self): + """Test that middleware data is correctly passed to the scene when using as_handler().""" + + class MyScene(Scene): + @on.message.enter() + def test_handler(self, *args, **kwargs): + pass + + event = AsyncMock() + + scenes = ScenesManager( + registry=SceneRegistry(Router()), + update_type="message", + event=event, + state=FSMContext( + storage=MemoryStorage(), key=StorageKey(bot_id=42, chat_id=-42, user_id=42) + ), + data={}, + ) + scenes.enter = AsyncMock() + + # Kwargs passed to as_handler + handler_kwargs = {"handler_kwarg": "handler_value", "mixed_kwarg": "handler_value"} + handler = MyScene.as_handler(**handler_kwargs) + + # Middleware data that would be passed to the handler + middleware_data = { + "middleware_data": "middleware_value", + "mixed_kwarg": "middleware_value", + } + + # Call the handler with middleware data + await handler(event, scenes, **middleware_data) + + # Verify that both handler kwargs and middleware data are passed to scenes.enter + expected_kwargs = {**handler_kwargs, **middleware_data} + scenes.enter.assert_called_once_with(MyScene, **expected_kwargs) + class TestSceneWizard: async def test_scene_wizard_enter_with_reset_data_on_enter(self): @@ -1004,6 +1072,24 @@ class TestSceneWizard: wizard.state.get_data.assert_called_once_with() + async def test_scene_wizard_get_value_with_default(self): + wizard = SceneWizard( + scene_config=AsyncMock(), + manager=AsyncMock(), + state=AsyncMock(), + update_type="message", + event=AsyncMock(), + data={}, + ) + args = ("test_key", "test_default") + value = "test_value" + wizard.state.get_value = AsyncMock(return_value=value) + + result = await wizard.get_value(*args) + wizard.state.get_value.assert_called_once_with(*args) + + assert result == value + async def test_scene_wizard_update_data_if_data(self): wizard = SceneWizard( scene_config=AsyncMock(), @@ -1434,7 +1520,9 @@ class TestSceneRegistry: registry = SceneRegistry(router, register_on_add) registry.add(MyScene) - with pytest.raises(SceneException, match="Scene must be a subclass of Scene or a string"): + with pytest.raises( + SceneException, match="Scene must be a subclass of Scene, State or a string" + ): registry.get(MyScene) def test_scene_registry_get_scene_not_registered(self): @@ -1500,6 +1588,27 @@ class TestSceneRegistry: handler.assert_called_once_with(event, data) assert result == handler.return_value + async def test_scene_registry_update_middleware_without_state(self): + router = Router() + registry = SceneRegistry(router) + handler = AsyncMock(spec=NextMiddlewareType) + event = Update( + update_id=42, + message=Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat(id=42, type="private"), + ), + ) + data = {} + + result = await registry._update_middleware(handler, event, data) + + assert "scenes" not in data + handler.assert_called_once_with(event, data) + assert result == handler.return_value + async def test_scene_registry_update_middleware_not_update(self, bot: MockedBot): router = Router() registry = SceneRegistry(router) @@ -1545,3 +1654,208 @@ class TestSceneRegistry: assert isinstance(data["scenes"], ScenesManager) handler.assert_called_once_with(event, data) assert result == handler.return_value + + async def test_scene_registry_middleware_without_state(self): + router = Router() + registry = SceneRegistry(router) + handler = AsyncMock(spec=NextMiddlewareType) + event = Message( + message_id=42, + text="test", + date=datetime.now(), + chat=Chat(id=42, type="private"), + ) + data = {} + + result = await registry._middleware(handler, event, data) + + assert "scenes" not in data + handler.assert_called_once_with(event, data) + assert result == handler.return_value + + +class TestSceneInheritance: + def test_inherit_handlers(self): + class ParentScene(Scene): + @on.message(Command("exit")) + async def command_exit(self, message: Message) -> None: + pass + + class ChildScene(ParentScene): + pass + + assert len(ParentScene.__scene_config__.handlers) == 1 + assert len(ChildScene.__scene_config__.handlers) == 1 + + parent_command_handler = ParentScene.__scene_config__.handlers[0] + child_command_handler = ChildScene.__scene_config__.handlers[0] + + assert parent_command_handler.handler is ParentScene.command_exit + assert child_command_handler.handler is ParentScene.command_exit + + def test_override_handlers(self): + class ParentScene(Scene): + @on.message(Command("exit")) + async def command_exit(self, message: Message) -> int: + return 1 + + class ChildScene(ParentScene): + @on.message(Command("exit")) + async def command_exit(self, message: Message) -> int: + return 2 + + assert len(ParentScene.__scene_config__.handlers) == 1 + assert len(ChildScene.__scene_config__.handlers) == 1 + + parent_command_handler = ParentScene.__scene_config__.handlers[0] + child_command_handler = ChildScene.__scene_config__.handlers[0] + + assert parent_command_handler.handler is ParentScene.command_exit + assert child_command_handler.handler is not ParentScene.command_exit + assert child_command_handler.handler is ChildScene.command_exit + + def test_inherit_actions(self): + class ParentScene(Scene): + @on.message.enter() + async def on_enter(self, message: Message) -> None: + pass + + class ChildScene(ParentScene): + pass + + parent_enter_action = ParentScene.__scene_config__.actions[SceneAction.enter][ + UpdateType.MESSAGE + ] + child_enter_action = ChildScene.__scene_config__.actions[SceneAction.enter][ + UpdateType.MESSAGE + ] + + assert parent_enter_action.callback is ParentScene.on_enter + assert child_enter_action.callback is ParentScene.on_enter + assert child_enter_action.callback is ChildScene.on_enter + + def test_override_actions(self): + class ParentScene(Scene): + @on.message.enter() + async def on_enter(self, message: Message) -> int: + return 1 + + class ChildScene(ParentScene): + @on.message.enter() + async def on_enter(self, message: Message) -> int: + return 2 + + parent_enter_action = ParentScene.__scene_config__.actions[SceneAction.enter][ + UpdateType.MESSAGE + ] + child_enter_action = ChildScene.__scene_config__.actions[SceneAction.enter][ + UpdateType.MESSAGE + ] + + assert parent_enter_action.callback is ParentScene.on_enter + assert child_enter_action.callback is not ParentScene.on_enter + assert child_enter_action.callback is ChildScene.on_enter + + def test_override_non_function_handler_by_function(self): + class ParentScene(Scene): + do_exit = on.message(Command("exit"), after=After.exit) + + class ChildScene1(ParentScene): + pass + + class ChildScene2(ParentScene): + do_exit = on.message(Command("exit"), after=After.back) + + class ChildScene3(ParentScene): + @on.message(Command("exit"), after=After.back) + async def do_exit(self, message: Message) -> None: + pass + + assert len(ParentScene.__scene_config__.handlers) == 1 + assert len(ChildScene1.__scene_config__.handlers) == 1 + assert len(ChildScene2.__scene_config__.handlers) == 1 + assert len(ChildScene3.__scene_config__.handlers) == 1 + + parent_handler = ParentScene.__scene_config__.handlers[0] + child_1_handler = ChildScene1.__scene_config__.handlers[0] + child_2_handler = ChildScene2.__scene_config__.handlers[0] + child_3_handler = ChildScene3.__scene_config__.handlers[0] + + assert child_1_handler.handler is parent_handler.handler + assert child_1_handler.after == parent_handler.after + assert child_1_handler.handler is _empty_handler + + assert child_2_handler.after != parent_handler.after + assert child_2_handler.handler is _empty_handler + + assert child_3_handler.handler is not _empty_handler + + +def collect_handler_names(scene): + return [handler.handler.__name__ for handler in scene.__scene_config__.handlers] + + +class TestSceneHandlersOrdering: + def test_correct_ordering(self): + class Scene1(Scene): + @on.message() + async def handler1(self, message: Message) -> None: + pass + + @on.message() + async def handler2(self, message: Message) -> None: + pass + + class Scene2(Scene): + @on.message() + async def handler2(self, message: Message) -> None: + pass + + @on.message() + async def handler1(self, message: Message) -> None: + pass + + assert collect_handler_names(Scene1) == ["handler1", "handler2"] + assert collect_handler_names(Scene2) == ["handler2", "handler1"] + + def test_inherited_handlers_follow_mro_order(self): + class Scene1(Scene): + @on.message() + async def handler1(self, message: Message) -> None: + pass + + @on.message() + async def handler2(self, message: Message) -> None: + pass + + class Scene2(Scene1): + @on.message() + async def handler3(self, message: Message) -> None: + pass + + @on.message() + async def handler4(self, message: Message) -> None: + pass + + assert collect_handler_names(Scene2) == ["handler3", "handler4", "handler1", "handler2"] + + def test_inherited_overwrite_follow_mro_order(self): + class Scene1(Scene): + @on.message() + async def handler1(self, message: Message) -> None: + pass + + @on.message() + async def handler2(self, message: Message) -> None: + pass + + class Scene2(Scene1): + @on.message() + async def handler2(self, message: Message) -> None: + pass + + @on.message() + async def handler3(self, message: Message) -> None: + pass + + assert collect_handler_names(Scene2) == ["handler3", "handler1", "handler2"] diff --git a/tests/test_handler/test_poll.py b/tests/test_handler/test_poll.py index b070874d..9288b265 100644 --- a/tests/test_handler/test_poll.py +++ b/tests/test_handler/test_poll.py @@ -9,11 +9,12 @@ class TestShippingQueryHandler: event = Poll( id="query", question="Q?", - options=[PollOption(text="A1", voter_count=1)], + options=[PollOption(persistent_id="1", text="A1", voter_count=1)], is_closed=True, is_anonymous=False, type="quiz", allows_multiple_answers=False, + allows_revoting=False, total_voter_count=0, correct_option_id=0, ) diff --git a/tests/test_issues/test_1672_middleware_data_in_scene.py b/tests/test_issues/test_1672_middleware_data_in_scene.py new file mode 100644 index 00000000..0935c3f9 --- /dev/null +++ b/tests/test_issues/test_1672_middleware_data_in_scene.py @@ -0,0 +1,74 @@ +from collections.abc import Awaitable, Callable +from datetime import datetime +from typing import Any +from unittest.mock import AsyncMock + +import pytest + +from aiogram import BaseMiddleware, Dispatcher, F +from aiogram.enums import ChatType +from aiogram.filters import Command +from aiogram.fsm.scene import Scene, SceneRegistry, ScenesManager, on +from aiogram.types import Chat, Message, TelegramObject, Update, User +from tests.mocked_bot import MockedBot + + +class EchoScene(Scene, state="test"): + @on.message.enter() + async def greetings(self, message: Message, test_context: str): + await message.answer(f"Echo mode enabled. Context: {test_context}.") + + @on.message(F.text) + async def echo(self, message: Message, test_context: str): + await message.reply(f"Your input: {message.text} and Context: {test_context}.") + + +class TestMiddleware(BaseMiddleware): + async def __call__( + self, + handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]], + event: TelegramObject, + data: dict[str, Any], + ) -> Any: + data["test_context"] = "Custom context here" + return await handler(event, data) + + +@pytest.mark.asyncio +async def test_middleware_data_passed_to_scene(bot: MockedBot): + """Test that middleware data is correctly passed to the scene when using as_handler().""" + # Create a dispatcher + dp = Dispatcher() + + # Register the scene handler with the command filter + dp.message.register(EchoScene.as_handler(), Command("test")) + + # Register the scene with the registry + scene_registry = SceneRegistry(dp) + scene_registry.add(EchoScene) + + # Register the middleware + dp.message.outer_middleware.register(TestMiddleware()) + + # Create a proper message with the command + chat = Chat(id=123, type=ChatType.PRIVATE) + user = User(id=456, is_bot=False, first_name="Test User") + message = Message(message_id=1, date=datetime.now(), from_user=user, chat=chat, text="/test") + update = Update(message=message, update_id=1) + + # Mock the ScenesManager.enter method + original_enter = ScenesManager.enter + ScenesManager.enter = AsyncMock() + + try: + # Process the update + await dp.feed_update(bot, update) + + # Verify that ScenesManager.enter was called with the test_context from middleware + ScenesManager.enter.assert_called_once() + args, kwargs = ScenesManager.enter.call_args + assert "test_context" in kwargs + assert kwargs["test_context"] == "Custom context here" + finally: + # Restore the original method + ScenesManager.enter = original_enter diff --git a/tests/test_issues/test_1687_scene_goto_loses_middleware_data.py b/tests/test_issues/test_1687_scene_goto_loses_middleware_data.py new file mode 100644 index 00000000..d0433298 --- /dev/null +++ b/tests/test_issues/test_1687_scene_goto_loses_middleware_data.py @@ -0,0 +1,106 @@ +from collections.abc import Awaitable, Callable +from datetime import datetime +from typing import Any + +from aiogram import BaseMiddleware, Dispatcher +from aiogram.enums import ChatType +from aiogram.filters import CommandStart +from aiogram.fsm.scene import After, Scene, SceneRegistry, on +from aiogram.types import Chat, Message, TelegramObject, Update, User +from tests.mocked_bot import MockedBot + + +class TestContextMiddleware(BaseMiddleware): + async def __call__( + self, + handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]], + event: TelegramObject, + data: dict[str, Any], + ) -> Any: + data["test_context"] = "context from middleware" + return await handler(event, data) + + +class TargetScene(Scene, state="target"): + entered_with_context: str | None = None + + @on.message.enter() + async def on_enter(self, message: Message, test_context: str) -> None: + type(self).entered_with_context = test_context + + +class StartScene(Scene, state="start"): + @on.message.enter() + async def on_start(self, message: Message) -> None: + await self.wizard.goto(TargetScene) + + +class StartSceneWithAfter(Scene, state="start_with_after"): + @on.message(after=After.goto(TargetScene)) + async def goto_target_with_after(self, message: Message) -> None: + pass + + +async def test_scene_goto_preserves_message_middleware_data(bot: MockedBot) -> None: + dp = Dispatcher() + registry = SceneRegistry(dp) + registry.add(StartScene, TargetScene) + dp.message.register(StartScene.as_handler(), CommandStart()) + dp.message.middleware(TestContextMiddleware()) + + TargetScene.entered_with_context = None + + update = Update( + update_id=1, + message=Message( + message_id=1, + date=datetime.now(), + chat=Chat(id=42, type=ChatType.PRIVATE), + from_user=User(id=42, is_bot=False, first_name="Test"), + text="/start", + ), + ) + + await dp.feed_update(bot, update) + + assert TargetScene.entered_with_context == "context from middleware" + + +async def test_scene_after_goto_preserves_message_middleware_data(bot: MockedBot) -> None: + dp = Dispatcher() + registry = SceneRegistry(dp) + registry.add(StartSceneWithAfter, TargetScene) + dp.message.register(StartSceneWithAfter.as_handler(), CommandStart()) + dp.message.middleware(TestContextMiddleware()) + + TargetScene.entered_with_context = None + + await dp.feed_update( + bot, + Update( + update_id=1, + message=Message( + message_id=1, + date=datetime.now(), + chat=Chat(id=42, type=ChatType.PRIVATE), + from_user=User(id=42, is_bot=False, first_name="Test"), + text="/start", + ), + ), + ) + + await dp.feed_update( + bot, + Update( + update_id=2, + message=Message( + message_id=2, + date=datetime.now(), + chat=Chat(id=42, type=ChatType.PRIVATE), + from_user=User(id=42, is_bot=False, first_name="Test"), + text="go", + ), + ), + ) + + assert TargetScene.entered_with_context == "context from middleware" diff --git a/tests/test_issues/test_1741_forward_ref_in_callbacks.py b/tests/test_issues/test_1741_forward_ref_in_callbacks.py new file mode 100644 index 00000000..cf3fdde8 --- /dev/null +++ b/tests/test_issues/test_1741_forward_ref_in_callbacks.py @@ -0,0 +1,27 @@ +from sys import version_info +from typing import TYPE_CHECKING + +import pytest + +from aiogram.dispatcher.event.handler import HandlerObject + + +@pytest.mark.skipif( + version_info < (3, 14), reason="Requires Python >=3.14 for TypeError on unresolved ForwardRef" +) +def test_forward_ref_in_callback(): + if TYPE_CHECKING: + from aiogram.types import Message + + def my_handler(message: Message): + pass + + HandlerObject(callback=my_handler) + + +def test_forward_ref_in_callback_with_str_annotation(): + def my_handler(message: "Message"): + pass + + handler = HandlerObject(callback=my_handler) + assert "message" in handler.params diff --git a/tests/test_issues/test_1743_channel_post_with_scenes.py b/tests/test_issues/test_1743_channel_post_with_scenes.py new file mode 100644 index 00000000..cdaf58a7 --- /dev/null +++ b/tests/test_issues/test_1743_channel_post_with_scenes.py @@ -0,0 +1,118 @@ +from datetime import datetime + +import pytest + +from aiogram import Dispatcher, F, Router +from aiogram.fsm.context import FSMContext +from aiogram.fsm.scene import Scene, SceneRegistry, on +from aiogram.fsm.strategy import FSMStrategy +from aiogram.types import Chat, Message, Update +from tests.mocked_bot import MockedBot + +CHANNEL_ID = -1001234567890 + + +class BrowseScene(Scene, state="browse"): + pass + + +class ChannelStateScene(Scene, state="channel_state"): + @on.channel_post() + async def save_message_id( + self, + message: Message, + state: FSMContext, + ) -> int: + await state.update_data(last_message_id=message.message_id) + return message.message_id + + +@pytest.mark.parametrize("update_type", ["channel_post", "edited_channel_post"]) +async def test_channel_events_with_scenes_do_not_require_fsm_state( + bot: MockedBot, + update_type: str, +): + dispatcher = Dispatcher() + channel_router = Router() + + if update_type == "channel_post": + channel_router.channel_post.filter(F.chat.id == CHANNEL_ID) + + @channel_router.channel_post() + async def on_channel_post(message: Message): + return message.message_id + else: + channel_router.edited_channel_post.filter(F.chat.id == CHANNEL_ID) + + @channel_router.edited_channel_post() + async def on_edited_channel_post(message: Message): + return message.message_id + + dispatcher.include_router(channel_router) + SceneRegistry(dispatcher).add(BrowseScene) + + message = Message( + message_id=1, + date=datetime.now(), + chat=Chat(id=CHANNEL_ID, type="channel"), + text="test", + ) + + kwargs = {"update_id": 1, update_type: message} + update = Update(**kwargs) + + result = await dispatcher.feed_update(bot, update) + assert result == 1 + + +async def test_channel_scene_has_fsm_state_with_chat_strategy(bot: MockedBot): + dispatcher = Dispatcher(fsm_strategy=FSMStrategy.CHAT) + router = Router() + + @router.channel_post((F.chat.id == CHANNEL_ID) & (F.text == "enter")) + async def enter_channel_state(message: Message, state: FSMContext): + await state.set_state(ChannelStateScene.__scene_config__.state) + return message.message_id + + dispatcher.include_router(router) + SceneRegistry(dispatcher).add(ChannelStateScene) + + initial_update = Update( + update_id=1, + channel_post=Message( + message_id=10, + date=datetime.now(), + chat=Chat(id=CHANNEL_ID, type="channel"), + text="enter", + ), + ) + await dispatcher.feed_update(bot, initial_update) + + active_state = await dispatcher.fsm.storage.get_state( + key=dispatcher.fsm.get_context( + bot=bot, + chat_id=CHANNEL_ID, + user_id=CHANNEL_ID, + ).key + ) + assert active_state == ChannelStateScene.__scene_config__.state + + scene_update = Update( + update_id=2, + channel_post=Message( + message_id=11, + date=datetime.now(), + chat=Chat(id=CHANNEL_ID, type="channel"), + text="scene", + ), + ) + result = await dispatcher.feed_update(bot, scene_update) + assert result == 11 + state_data = await dispatcher.fsm.storage.get_data( + key=dispatcher.fsm.get_context( + bot=bot, + chat_id=CHANNEL_ID, + user_id=CHANNEL_ID, + ).key + ) + assert state_data["last_message_id"] == 11 diff --git a/tests/test_utils/test_backoff.py b/tests/test_utils/test_backoff.py index 57e7269f..13a0f256 100644 --- a/tests/test_utils/test_backoff.py +++ b/tests/test_utils/test_backoff.py @@ -9,10 +9,15 @@ class TestBackoffConfig: @pytest.mark.parametrize( "kwargs", [ - dict(min_delay=1.0, max_delay=1.0, factor=2.0, jitter=0.1), # equals min and max - dict(min_delay=1.0, max_delay=1.0, factor=1.0, jitter=0.1), # factor == 1 - dict(min_delay=1.0, max_delay=2.0, factor=0.5, jitter=0.1), # factor < 1 - dict(min_delay=2.0, max_delay=1.0, factor=2.0, jitter=0.1), # min > max + { + "min_delay": 1.0, + "max_delay": 1.0, + "factor": 2.0, + "jitter": 0.1, + }, # equals min and max + {"min_delay": 1.0, "max_delay": 1.0, "factor": 1.0, "jitter": 0.1}, # factor == 1 + {"min_delay": 1.0, "max_delay": 2.0, "factor": 0.5, "jitter": 0.1}, # factor < 1 + {"min_delay": 2.0, "max_delay": 1.0, "factor": 2.0, "jitter": 0.1}, # min > max ], ) def test_incorrect_post_init(self, kwargs): @@ -21,7 +26,7 @@ class TestBackoffConfig: @pytest.mark.parametrize( "kwargs", - [dict(min_delay=1.0, max_delay=2.0, factor=1.2, jitter=0.1)], + [{"min_delay": 1.0, "max_delay": 2.0, "factor": 1.2, "jitter": 0.1}], ) def test_correct_post_init(self, kwargs): assert BackoffConfig(**kwargs) diff --git a/tests/test_utils/test_callback_answer.py b/tests/test_utils/test_callback_answer.py index cf641f46..8c0d76c2 100644 --- a/tests/test_utils/test_callback_answer.py +++ b/tests/test_utils/test_callback_answer.py @@ -198,13 +198,16 @@ class TestCallbackAnswerMiddleware: stack.append("answer") middleware = CallbackAnswerMiddleware() - with patch( - "aiogram.utils.callback_answer.CallbackAnswerMiddleware.construct_callback_answer", - new_callable=MagicMock, - side_effect=lambda **kwargs: CallbackAnswer(**{"answered": False, **properties}), - ), patch( - "aiogram.utils.callback_answer.CallbackAnswerMiddleware.answer", - new=answer, + with ( + patch( + "aiogram.utils.callback_answer.CallbackAnswerMiddleware.construct_callback_answer", + new_callable=MagicMock, + side_effect=lambda **kwargs: CallbackAnswer(**{"answered": False, **properties}), + ), + patch( + "aiogram.utils.callback_answer.CallbackAnswerMiddleware.answer", + new=answer, + ), ): await middleware(handler, event, {}) diff --git a/tests/test_utils/test_chat_action.py b/tests/test_utils/test_chat_action.py index b5c0a965..d893b074 100644 --- a/tests/test_utils/test_chat_action.py +++ b/tests/test_utils/test_chat_action.py @@ -13,9 +13,10 @@ from tests.mocked_bot import MockedBot class TestChatActionSender: - async def test_wait(self, bot: Bot, event_loop: asyncio.BaseEventLoop): + async def test_wait(self, bot: Bot): sender = ChatActionSender.typing(bot=bot, chat_id=42) - event_loop.call_soon(sender._close_event.set) + loop = asyncio.get_running_loop() + loop.call_soon(sender._close_event.set) start = time.monotonic() await sender._wait(1) assert time.monotonic() - start < 1 @@ -95,13 +96,16 @@ class TestChatActionMiddleware: handler1 = flags.chat_action(value)(handler) middleware = ChatActionMiddleware() - with patch( - "aiogram.utils.chat_action.ChatActionSender._run", - new_callable=AsyncMock, - ) as mocked_run, patch( - "aiogram.utils.chat_action.ChatActionSender._stop", - new_callable=AsyncMock, - ) as mocked_stop: + with ( + patch( + "aiogram.utils.chat_action.ChatActionSender._run", + new_callable=AsyncMock, + ) as mocked_run, + patch( + "aiogram.utils.chat_action.ChatActionSender._stop", + new_callable=AsyncMock, + ) as mocked_stop, + ): data = {"handler": HandlerObject(callback=handler1), "bot": bot} message = Message( chat=Chat(id=42, type="private", title="Test"), diff --git a/tests/test_utils/test_chat_member.py b/tests/test_utils/test_chat_member.py index 2f0f9eef..34f32d1c 100644 --- a/tests/test_utils/test_chat_member.py +++ b/tests/test_utils/test_chat_member.py @@ -1,5 +1,4 @@ from datetime import datetime -from typing import Type import pytest @@ -71,6 +70,7 @@ CHAT_MEMBER_RESTRICTED = ChatMemberRestricted( can_send_polls=False, can_send_other_messages=False, can_add_web_page_previews=False, + can_edit_tag=False, can_change_info=False, can_invite_users=False, can_pin_messages=False, @@ -90,6 +90,6 @@ CHAT_MEMBER_RESTRICTED = ChatMemberRestricted( (CHAT_MEMBER_RESTRICTED, ChatMemberRestricted), ], ) -def test_chat_member_resolution(data: dict, resolved_type: Type[ChatMember]) -> None: +def test_chat_member_resolution(data: dict, resolved_type: type[ChatMember]) -> None: chat_member = ChatMemberAdapter.validate_python(data) assert isinstance(chat_member, resolved_type) diff --git a/tests/test_utils/test_class_attrs_resolver.py b/tests/test_utils/test_class_attrs_resolver.py new file mode 100644 index 00000000..aecf3257 --- /dev/null +++ b/tests/test_utils/test_class_attrs_resolver.py @@ -0,0 +1,81 @@ +import pytest + +from aiogram.utils.class_attrs_resolver import ( + get_reversed_mro_unique_attrs_resolver, + get_sorted_mro_attrs_resolver, + inspect_members_resolver, +) + + +class SimpleClass1: + def method1(self): + pass + + def method2(self): + pass + + +class SimpleClass2: + def method2(self): + pass + + def method1(self): + pass + + +class InheritedClass1(SimpleClass1): + def method3(self): + pass + + def method4(self): + pass + + +class InheritedClass2(SimpleClass1): + def method2(self): + pass + + def method3(self): + pass + + +class TestClassAttrsResolver: + @pytest.mark.parametrize( + "cls, resolver, expected", + [ + # inspect_members_resolver + (SimpleClass1, inspect_members_resolver, ["method1", "method2"]), + (SimpleClass2, inspect_members_resolver, ["method1", "method2"]), + ( + InheritedClass1, + inspect_members_resolver, + ["method1", "method2", "method3", "method4"], + ), + (InheritedClass2, inspect_members_resolver, ["method1", "method2", "method3"]), + # get_reversed_mro_unique_attrs_resolver + (SimpleClass1, get_reversed_mro_unique_attrs_resolver, ["method1", "method2"]), + (SimpleClass2, get_reversed_mro_unique_attrs_resolver, ["method2", "method1"]), + ( + InheritedClass1, + get_reversed_mro_unique_attrs_resolver, + ["method1", "method2", "method3", "method4"], + ), + ( + InheritedClass2, + get_reversed_mro_unique_attrs_resolver, + ["method1", "method2", "method3"], + ), + # get_sorted_mro_attrs_resolver + (SimpleClass1, get_sorted_mro_attrs_resolver, ["method1", "method2"]), + (SimpleClass2, get_sorted_mro_attrs_resolver, ["method2", "method1"]), + ( + InheritedClass1, + get_sorted_mro_attrs_resolver, + ["method3", "method4", "method1", "method2"], + ), + (InheritedClass2, get_sorted_mro_attrs_resolver, ["method3", "method1", "method2"]), + ], + ) + def test_resolve_class_attrs(self, cls, resolver, expected): + names = [name for name, _ in resolver(cls) if not name.startswith("__")] + assert names == expected diff --git a/tests/test_utils/test_dataclass.py b/tests/test_utils/test_dataclass.py new file mode 100644 index 00000000..9beeadb4 --- /dev/null +++ b/tests/test_utils/test_dataclass.py @@ -0,0 +1,48 @@ +from unittest.mock import patch + +import pytest + +from aiogram.utils.dataclass import dataclass_kwargs + +ALL_VERSIONS = { + "init": True, + "repr": True, + "eq": True, + "order": True, + "unsafe_hash": True, + "frozen": True, +} +ADDED_IN_3_10 = {"match_args": True, "kw_only": True, "slots": True} +ADDED_IN_3_11 = {"weakref_slot": True} + +PY_310 = {**ALL_VERSIONS, **ADDED_IN_3_10} +PY_311 = {**PY_310, **ADDED_IN_3_11} +LATEST_PY = PY_311 + + +class TestDataclassKwargs: + @pytest.mark.parametrize( + "py_version,expected", + [ + ((3, 10, 2), PY_310), + ((3, 11, 0), PY_311), + ((4, 13, 0), LATEST_PY), + ], + ) + def test_dataclass_kwargs(self, py_version, expected): + with patch("sys.version_info", py_version): + assert ( + dataclass_kwargs( + init=True, + repr=True, + eq=True, + order=True, + unsafe_hash=True, + frozen=True, + match_args=True, + kw_only=True, + slots=True, + weakref_slot=True, + ) + == expected + ) diff --git a/tests/test_utils/test_deep_linking.py b/tests/test_utils/test_deep_linking.py index 85a6027b..e90bcaf3 100644 --- a/tests/test_utils/test_deep_linking.py +++ b/tests/test_utils/test_deep_linking.py @@ -1,6 +1,10 @@ import pytest -from aiogram.utils.deep_linking import create_start_link, create_startgroup_link +from aiogram.utils.deep_linking import ( + create_start_link, + create_startapp_link, + create_startgroup_link, +) from aiogram.utils.payload import decode_payload, encode_payload from tests.mocked_bot import MockedBot @@ -10,12 +14,14 @@ PAYLOADS = [ "aaBBccDDeeFF5544332211", -12345678901234567890, 12345678901234567890, + "underscore_and-dash", ] WRONG_PAYLOADS = [ "@BotFather", "Some:special$characters#=", "spaces spaces spaces", 1234567890123456789.0, + "has`backtick", ] @@ -42,6 +48,14 @@ class TestDeepLinking: link = await create_startgroup_link(bot, payload) assert link == f"https://t.me/tbot?startgroup={payload}" + async def test_get_startapp_link(self, bot: MockedBot, payload: str): + link = await create_startapp_link(bot, payload) + assert link == f"https://t.me/tbot?startapp={payload}" + + async def test_get_startapp_link_with_app_name(self, bot: MockedBot, payload: str): + link = await create_startapp_link(bot, payload, app_name="app") + assert link == f"https://t.me/tbot/app?startapp={payload}" + async def test_filter_encode_and_decode(self, payload: str): encoded = encode_payload(payload) decoded = decode_payload(encoded) @@ -83,6 +97,26 @@ class TestDeepLinking: assert link == f"https://t.me/tbot?start={encoded_payload}" + async def test_get_startapp_link_with_encoding(self, bot: MockedBot, wrong_payload: str): + # define link + link = await create_startapp_link(bot, wrong_payload, encode=True) + + # define reference link + encoded_payload = encode_payload(wrong_payload) + + assert link == f"https://t.me/tbot?startapp={encoded_payload}" + + async def test_get_startapp_link_with_app_name_and_encoding( + self, bot: MockedBot, wrong_payload: str + ): + # define link + link = await create_startapp_link(bot, wrong_payload, encode=True, app_name="app") + + # define reference link + encoded_payload = encode_payload(wrong_payload) + + assert link == f"https://t.me/tbot/app?startapp={encoded_payload}" + async def test_64_len_payload(self, bot: MockedBot): payload = "p" * 64 link = await create_start_link(bot, payload) diff --git a/tests/test_utils/test_formatting.py b/tests/test_utils/test_formatting.py index dbe07d17..25a81ba2 100644 --- a/tests/test_utils/test_formatting.py +++ b/tests/test_utils/test_formatting.py @@ -1,3 +1,5 @@ +from datetime import datetime, timezone + import pytest from aiogram.enums import MessageEntityType @@ -9,6 +11,7 @@ from aiogram.utils.formatting import ( CashTag, Code, CustomEmoji, + DateTime, Email, ExpandableBlockQuote, HashTag, @@ -93,7 +96,7 @@ class TestNode: ], [ Pre("test", language="python"), - '
test
', + '
test
', ], [ TextLink("test", url="https://example.com"), @@ -115,6 +118,14 @@ class TestNode: ExpandableBlockQuote("test"), "
test
", ], + [ + DateTime("test", unix_time=42, date_time_format="yMd"), + 'test', + ], + [ + DateTime("test", unix_time=42), + 'test', + ], ], ) def test_render_plain_only(self, node: Text, result: str): @@ -172,6 +183,34 @@ class TestNode: assert "parse_mode" not in result assert "custom_parse_mode" in result + def test_as_caption_kwargs(self): + node = Text("Hello, ", Bold("World"), "!") + result = node.as_caption_kwargs() + assert "caption" in result + assert "caption_entities" in result + assert "parse_mode" in result + + def test_as_poll_question_kwargs(self): + node = Text("Hello, ", Bold("World"), "!") + result = node.as_poll_question_kwargs() + assert "question" in result + assert "question_entities" in result + assert "question_parse_mode" in result + + def test_as_poll_explanation_kwargs(self): + node = Text("Hello, ", Bold("World"), "!") + result = node.as_poll_explanation_kwargs() + assert "explanation" in result + assert "explanation_entities" in result + assert "explanation_parse_mode" in result + + def test_as_as_gift_text_kwargs_kwargs(self): + node = Text("Hello, ", Bold("World"), "!") + result = node.as_gift_text_kwargs() + assert "text" in result + assert "text_entities" in result + assert "text_parse_mode" in result + def test_as_html(self): node = Text("Hello, ", Bold("World"), "!") assert node.as_html() == "Hello, World!" @@ -330,6 +369,38 @@ class TestUtils: assert isinstance(node, Bold) assert node._body == ("test",) + def test_apply_entity_date_time(self): + node = _apply_entity( + MessageEntity( + type=MessageEntityType.DATE_TIME, + offset=0, + length=4, + unix_time=42, + date_time_format="yMd", + ), + "test", + ) + assert isinstance(node, DateTime) + assert node._body == ("test",) + assert node._params["unix_time"] == 42 + assert node._params["date_time_format"] == "yMd" + + def test_date_time_with_datetime_object(self): + dt = datetime(2024, 1, 1, 0, 0, 0, tzinfo=timezone.utc) + node = DateTime("test", unix_time=dt) + assert isinstance(node, DateTime) + assert node._params["unix_time"] == 1704067200 + + def test_date_time_with_datetime_and_format(self): + dt = datetime(2024, 1, 1, 0, 0, 0, tzinfo=timezone.utc) + node = DateTime("test", unix_time=dt, date_time_format="yMd") + assert node._params["unix_time"] == 1704067200 + assert node._params["date_time_format"] == "yMd" + + def test_date_time_as_markdown(self): + node = DateTime("test", unix_time=42, date_time_format="yMd") + assert node.as_markdown() == "![test](tg://time?unix=42&format=yMd)" + def test_as_line(self): node = as_line("test", "test", "test") assert isinstance(node, Text) diff --git a/tests/test_utils/test_i18n.py b/tests/test_utils/test_i18n.py index aaf58b9e..d6dc2444 100644 --- a/tests/test_utils/test_i18n.py +++ b/tests/test_utils/test_i18n.py @@ -1,4 +1,4 @@ -from typing import Any, Dict +from typing import Any import pytest @@ -27,6 +27,10 @@ class TestI18nCore: def test_init(self, i18n: I18n): assert set(i18n.available_locales) == {"en", "uk"} + def test_init_relative(self): + i18n_relative = I18n(path="tests/data/locales") + assert set(i18n_relative.available_locales) == {"en", "uk"} + def test_reload(self, i18n: I18n): i18n.reload() assert set(i18n.available_locales) == {"en", "uk"} @@ -76,7 +80,7 @@ class TestI18nCore: ["it", {"singular": "test", "plural": "test2", "n": 2}, "test2"], ], ) - def test_gettext(self, i18n: I18n, locale: str, case: Dict[str, Any], result: str): + def test_gettext(self, i18n: I18n, locale: str, case: dict[str, Any], result: str): if locale is not None: i18n.current_locale = locale with i18n.context(): diff --git a/tests/test_utils/test_keyboard.py b/tests/test_utils/test_keyboard.py index 27aeb1ac..b374e7ac 100644 --- a/tests/test_utils/test_keyboard.py +++ b/tests/test_utils/test_keyboard.py @@ -170,6 +170,16 @@ class TestKeyboardBuilder: if last_columns: assert len(markup[-1]) == last_columns + def test_add_wo_max_width(self): + builder = KeyboardBuilder(button_type=KeyboardButton) + builder.max_width = 0 + count = 42 + + for index in range(count): + builder.add(KeyboardButton(text=f"btn-{index}")) + + assert len(list(builder.buttons)) == count + def test_row( self, ): @@ -197,21 +207,73 @@ class TestKeyboardBuilder: markup = builder.export() assert len(markup) == len(shape) - for row, expected_size in zip(markup, shape): + for row, expected_size in zip(markup, shape, strict=False): assert len(row) == expected_size @pytest.mark.parametrize( "builder_type,kwargs,expected", [ - [ReplyKeyboardBuilder, dict(text="test"), KeyboardButton(text="test")], + [ReplyKeyboardBuilder, {"text": "test"}, KeyboardButton(text="test")], + [ + ReplyKeyboardBuilder, + {"text": "test", "icon_custom_emoji_id": "emoji-id"}, + KeyboardButton(text="test", icon_custom_emoji_id="emoji-id"), + ], + [ + ReplyKeyboardBuilder, + {"text": "test", "style": "success"}, + KeyboardButton(text="test", style="success"), + ], + [ + ReplyKeyboardBuilder, + {"text": "test", "icon_custom_emoji_id": "emoji-id", "style": "success"}, + KeyboardButton( + text="test", + icon_custom_emoji_id="emoji-id", + style="success", + ), + ], [ InlineKeyboardBuilder, - dict(text="test", callback_data="callback"), + {"text": "test", "callback_data": "callback"}, InlineKeyboardButton(text="test", callback_data="callback"), ], [ InlineKeyboardBuilder, - dict(text="test", callback_data=MyCallback(value="test")), + { + "text": "test", + "icon_custom_emoji_id": "emoji-id", + "callback_data": "callback", + }, + InlineKeyboardButton( + text="test", + icon_custom_emoji_id="emoji-id", + callback_data="callback", + ), + ], + [ + InlineKeyboardBuilder, + {"text": "test", "style": "primary", "callback_data": "callback"}, + InlineKeyboardButton(text="test", style="primary", callback_data="callback"), + ], + [ + InlineKeyboardBuilder, + { + "text": "test", + "icon_custom_emoji_id": "emoji-id", + "style": "primary", + "callback_data": "callback", + }, + InlineKeyboardButton( + text="test", + icon_custom_emoji_id="emoji-id", + style="primary", + callback_data="callback", + ), + ], + [ + InlineKeyboardBuilder, + {"text": "test", "callback_data": MyCallback(value="test")}, InlineKeyboardButton(text="test", callback_data="test:test"), ], ], @@ -232,6 +294,45 @@ class TestKeyboardBuilder: def test_as_markup(self, builder, expected): assert isinstance(builder.as_markup(), expected) + @pytest.mark.parametrize( + "builder,button_kwargs,icon_custom_emoji_id,style", + [ + [ + ReplyKeyboardBuilder(), + {"text": "test", "icon_custom_emoji_id": "emoji-id", "style": "success"}, + "emoji-id", + "success", + ], + [ + InlineKeyboardBuilder(), + { + "text": "test", + "icon_custom_emoji_id": "emoji-id", + "style": "primary", + "callback_data": "callback", + }, + "emoji-id", + "primary", + ], + ], + ) + def test_as_markup_preserves_icon_and_style( + self, + builder, + button_kwargs, + icon_custom_emoji_id, + style, + ): + builder.button(**button_kwargs) + markup = builder.as_markup() + if isinstance(markup, ReplyKeyboardMarkup): + button = markup.keyboard[0][0] + else: + button = markup.inline_keyboard[0][0] + + assert button.icon_custom_emoji_id == icon_custom_emoji_id + assert button.style == style + @pytest.mark.parametrize( "markup,builder_type", [ diff --git a/tests/test_utils/test_link.py b/tests/test_utils/test_link.py index f0276703..c2ac5514 100644 --- a/tests/test_utils/test_link.py +++ b/tests/test_utils/test_link.py @@ -1,5 +1,5 @@ from itertools import product -from typing import Any, Dict +from typing import Any from urllib.parse import parse_qs import pytest @@ -18,7 +18,7 @@ class TestLink: "base,params,result", [["user", {"id": 42}, "tg://user?id=42"]], ) - def test_create_tg_link(self, base: str, params: Dict[str, Any], result: str): + def test_create_tg_link(self, base: str, params: dict[str, Any], result: str): assert create_tg_link(base, **params) == result @pytest.mark.parametrize( @@ -28,7 +28,7 @@ class TestLink: ["username", {"start": "test"}, "https://t.me/username?start=test"], ], ) - def test_create_telegram_link(self, base: str, params: Dict[str, Any], result: str): + def test_create_telegram_link(self, base: str, params: dict[str, Any], result: str): assert create_telegram_link(base, **params) == result def test_fragment(self): @@ -70,8 +70,8 @@ class TestCreateChannelBotLink: } variants = product([True, False], repeat=len(params)) - for index, variants in enumerate(variants): - kwargs = {k: v for k, v in zip(params, variants) if v} + for _index, variants in enumerate(variants): + kwargs = {k: v for k, v in zip(params, variants, strict=False) if v} if not kwargs: # Variant without additional arguments is already covered continue diff --git a/tests/test_utils/test_markdown.py b/tests/test_utils/test_markdown.py index 786cc321..7759ab4c 100644 --- a/tests/test_utils/test_markdown.py +++ b/tests/test_utils/test_markdown.py @@ -1,4 +1,5 @@ -from typing import Any, Callable, Optional, Tuple +from collections.abc import Callable +from typing import Any import pytest @@ -75,6 +76,6 @@ class TestMarkdown: ], ) def test_formatter( - self, func: Callable[[Any], Any], args: Tuple[str], sep: Optional[str], result: str + self, func: Callable[[Any], Any], args: tuple[str], sep: str | None, result: str ): assert func(*args, **({"sep": sep} if sep is not None else {})) == result # type: ignore diff --git a/tests/test_utils/test_text_decorations.py b/tests/test_utils/test_text_decorations.py index 50623447..4ebd5f3a 100644 --- a/tests/test_utils/test_text_decorations.py +++ b/tests/test_utils/test_text_decorations.py @@ -1,4 +1,4 @@ -from typing import List, Optional +from datetime import datetime, timezone import pytest @@ -27,7 +27,7 @@ class TestTextDecoration: [ html_decoration, MessageEntity(type="pre", offset=0, length=5, language="python"), - '
test
', + '
test
', ], [html_decoration, MessageEntity(type="underline", offset=0, length=5), "test"], [ @@ -76,6 +76,17 @@ class TestTextDecoration: MessageEntity(type="expandable_blockquote", offset=0, length=5), "
test
", ], + [ + html_decoration, + MessageEntity( + type="date_time", + offset=0, + length=5, + unix_time=42, + date_time_format="yMd", + ), + 'test', + ], [markdown_decoration, MessageEntity(type="bold", offset=0, length=5), "*test*"], [markdown_decoration, MessageEntity(type="italic", offset=0, length=5), "_\rtest_\r"], [markdown_decoration, MessageEntity(type="code", offset=0, length=5), "`test`"], @@ -104,7 +115,7 @@ class TestTextDecoration: [ markdown_decoration, MessageEntity(type="custom_emoji", offset=0, length=5, custom_emoji_id="42"), - "![test](tg://emoji?id=42)", + "![test](tg://emoji?emoji_id=42)", ], [ markdown_decoration, @@ -126,6 +137,27 @@ class TestTextDecoration: MessageEntity(type="expandable_blockquote", offset=0, length=5), ">test||", ], + [ + markdown_decoration, + MessageEntity( + type="date_time", + offset=0, + length=5, + unix_time=42, + date_time_format="yMd", + ), + "![test](tg://time?unix=42&format=yMd)", + ], + [ + html_decoration, + MessageEntity(type="date_time", offset=0, length=5, unix_time=42), + 'test', + ], + [ + markdown_decoration, + MessageEntity(type="date_time", offset=0, length=5, unix_time=42), + "![test](tg://time?unix=42)", + ], ], ) def test_apply_single_entity( @@ -133,6 +165,38 @@ class TestTextDecoration: ): assert decorator.apply_entity(entity, "test") == result + @pytest.mark.parametrize( + "decorator,date_time_format,expected", + [ + ( + html_decoration, + None, + 'test', + ), + ( + html_decoration, + "yMd", + 'test', + ), + ( + markdown_decoration, + None, + "![test](tg://time?unix=1704067200)", + ), + ( + markdown_decoration, + "yMd", + "![test](tg://time?unix=1704067200&format=yMd)", + ), + ], + ) + def test_date_time_with_datetime_object( + self, decorator: TextDecoration, date_time_format: str | None, expected: str + ): + dt = datetime(2024, 1, 1, 0, 0, 0, tzinfo=timezone.utc) + result = decorator.date_time("test", unix_time=dt, date_time_format=date_time_format) + assert result == expected + def test_unknown_apply_entity(self): assert ( html_decoration.apply_entity( @@ -298,13 +362,29 @@ class TestTextDecoration: ], "test@example.com", ], + [ + html_decoration, + "test", + [MessageEntity(type="date_time", offset=0, length=4, unix_time=42)], + 'test', + ], + [ + html_decoration, + "test", + [ + MessageEntity( + type="date_time", offset=0, length=4, unix_time=42, date_time_format="yMd" + ) + ], + 'test', + ], ], ) def test_unparse( self, decorator: TextDecoration, text: str, - entities: Optional[List[MessageEntity]], + entities: list[MessageEntity] | None, result: str, ): assert decorator.unparse(text, entities) == result diff --git a/tests/test_utils/test_web_app_signature.py b/tests/test_utils/test_web_app_signature.py new file mode 100644 index 00000000..247fc32e --- /dev/null +++ b/tests/test_utils/test_web_app_signature.py @@ -0,0 +1,63 @@ +import pytest + +from aiogram.utils.web_app import WebAppInitData +from aiogram.utils.web_app_signature import ( + check_webapp_signature, + safe_check_webapp_init_data_from_signature, +) + +PRIVATE_KEY = bytes.fromhex("c80e09dc60f5efcf2e1f8d0793358e0ea3371267bef0024588f7bf67cf48dfb9") +PUBLIC_KEY = bytes.fromhex("4112765021341e5415e772cd65903f6b94e3ea1c2ab669e6d3e18ee2db00da61") + + +class TestWebAppSignature: + @pytest.mark.parametrize( + "bot_id,case,result", + [ + [ + 42, + "auth_date=1650385342&user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D&query_id=test&signature=JQ0JR2tjC65yq_jNZV0wuJVX6J-SWPMV0mprUXG34g-NvxL4RcF1Rz5n4VVo00VRghEUBf5t___uoeb1-jU_Cw", + True, + ], + [ + 42, + "auth_date=1650385342&user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D&query_id=test&signature=JQ0JR2tjC65yq_jNZV0wuJVX6J-SWPMV0mprUXG34g-NvxL4RcF1Rz5n4VVo00VRghEUBf5t___uoeb1-j1U_w", + False, + ], + [ + 42, + "auth_date=1650385342&user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D&query_id=test", + False, + ], + [ + 42, + "", + False, + ], + [42, "test&foo=bar=baz", False], + ], + ) + def test_check_webapp_signature(self, bot_id: int, case: str, result: bool): + assert check_webapp_signature(bot_id, case, PUBLIC_KEY) is result + + def test_safe_check_webapp_init_data_from_signature(self): + result = safe_check_webapp_init_data_from_signature( + 42, + "auth_date=1650385342&user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D&query_id=test&hash=123&signature=JQ0JR2tjC65yq_jNZV0wuJVX6J-SWPMV0mprUXG34g-NvxL4RcF1Rz5n4VVo00VRghEUBf5t___uoeb1-jU_Cw", + PUBLIC_KEY, + ) + assert isinstance(result, WebAppInitData) + assert result.user is not None + assert result.user.id == 42 + assert result.user.first_name == "Test" + assert result.query_id == "test" + assert result.auth_date.year == 2022 + assert result.hash == "123" + + def test_safe_check_webapp_init_data_from_signature_invalid(self): + with pytest.raises(ValueError): + safe_check_webapp_init_data_from_signature( + 42, + "auth_date=1650385342&user=%7B%22id%22%3A42%2C%22first_name%22%3A%22Test%22%7D&query_id=test&hash=123&signature=JQ0JR2tjC65yq_jNZV0wuJVX6J-SWPMV0mprUXG34g-NvxL4RcF1Rz5n4VVo00VRghEUBf5t___uoeb1-j1U_w", + PUBLIC_KEY, + ) diff --git a/tests/test_webhook/test_aiohtt_server.py b/tests/test_webhook/test_aiohttp_server.py similarity index 96% rename from tests/test_webhook/test_aiohtt_server.py rename to tests/test_webhook/test_aiohttp_server.py index f29895ba..881e8fc7 100644 --- a/tests/test_webhook/test_aiohtt_server.py +++ b/tests/test_webhook/test_aiohttp_server.py @@ -2,7 +2,7 @@ import asyncio import time from asyncio import Event from dataclasses import dataclass -from typing import Any, Dict +from typing import Any from unittest.mock import AsyncMock, patch import pytest @@ -150,13 +150,9 @@ class TestSimpleRequestHandler: resp = await self.make_reqest(client=client, text="spam") assert resp.status == 200 - assert resp.content_type == "multipart/form-data" - result = {} - reader = MultipartReader.from_response(resp) - while part := await reader.next(): - value = await part.read() - result[part.name] = value.decode() - assert not result + assert resp.content_type == "application/json" + expected_result = {} + assert await resp.json() == expected_result async def test_reply_into_webhook_background(self, bot: MockedBot, aiohttp_client): app = Application() @@ -189,8 +185,8 @@ class TestSimpleRequestHandler: handler_event.clear() resp = await self.make_reqest(client=client) assert resp.status == 200 - await asyncio.wait_for(handler_event.wait(), timeout=1) - await asyncio.wait_for(method_called_event.wait(), timeout=1) + await asyncio.wait_for(handler_event.wait(), timeout=3) + await asyncio.wait_for(method_called_event.wait(), timeout=3) # Python 3.12 had some changes to asyncio which make it quite a bit faster. But # probably because of that the assert_awaited call is consistently scheduled before the # silent_call_request call - failing the test. So we wait for the method to be called @@ -255,7 +251,7 @@ class TestTokenBasedRequestHandler: @dataclass class FakeRequest: - match_info: Dict[str, Any] + match_info: dict[str, Any] bot1 = await handler.resolve_bot(request=FakeRequest(match_info={"bot_token": "42:TEST"})) assert bot1.id == 42 diff --git a/uv.lock b/uv.lock new file mode 100644 index 00000000..913926a4 --- /dev/null +++ b/uv.lock @@ -0,0 +1,2826 @@ +version = 1 +revision = 3 +requires-python = ">=3.10, <3.15" +resolution-markers = [ + "(python_full_version >= '3.14' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin') or (python_full_version >= '3.14' and platform_python_implementation != 'PyPy' and sys_platform == 'linux')", + "(python_full_version == '3.13.*' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin') or (python_full_version == '3.13.*' and platform_python_implementation != 'PyPy' and sys_platform == 'linux')", + "(python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin') or (python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'linux')", + "(python_full_version < '3.12' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin') or (python_full_version < '3.12' and platform_python_implementation != 'PyPy' and sys_platform == 'linux')", + "(python_full_version >= '3.14' and platform_python_implementation == 'PyPy' and sys_platform == 'darwin') or (python_full_version >= '3.14' and platform_python_implementation == 'PyPy' and sys_platform == 'linux') or (python_full_version >= '3.14' and sys_platform != 'darwin' and sys_platform != 'linux')", + "(python_full_version >= '3.12' and python_full_version < '3.14' and platform_python_implementation == 'PyPy' and sys_platform == 'darwin') or (python_full_version >= '3.12' and python_full_version < '3.14' and platform_python_implementation == 'PyPy' and sys_platform == 'linux') or (python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'darwin' and sys_platform != 'linux')", + "(python_full_version < '3.12' and platform_python_implementation == 'PyPy' and sys_platform == 'darwin') or (python_full_version < '3.12' and platform_python_implementation == 'PyPy' and sys_platform == 'linux') or (python_full_version < '3.12' and sys_platform != 'darwin' and sys_platform != 'linux')", +] + +[[package]] +name = "aiodns" +version = "3.6.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pycares" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/85/2f/9d1ee4f937addda60220f47925dac6c6b3782f6851fd578987284a8d2491/aiodns-3.6.1.tar.gz", hash = "sha256:b0e9ce98718a5b8f7ca8cd16fc393163374bc2412236b91f6c851d066e3324b6", size = 15143, upload-time = "2025-12-11T12:53:07.785Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/09/e3/9f777774ebe8f664bcd564f9de3936490a16effa82a969372161c9b0fb21/aiodns-3.6.1-py3-none-any.whl", hash = "sha256:46233ccad25f2037903828c5d05b64590eaa756e51d12b4a5616e2defcbc98c7", size = 7975, upload-time = "2025-12-11T12:53:06.387Z" }, +] + +[[package]] +name = "aiofiles" +version = "25.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/41/c3/534eac40372d8ee36ef40df62ec129bee4fdb5ad9706e58a29be53b2c970/aiofiles-25.1.0.tar.gz", hash = "sha256:a8d728f0a29de45dc521f18f07297428d56992a742f0cd2701ba86e44d23d5b2", size = 46354, upload-time = "2025-10-09T20:51:04.358Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bc/8a/340a1555ae33d7354dbca4faa54948d76d89a27ceef032c8c3bc661d003e/aiofiles-25.1.0-py3-none-any.whl", hash = "sha256:abe311e527c862958650f9438e859c1fa7568a141b22abcd015e120e86a85695", size = 14668, upload-time = "2025-10-09T20:51:03.174Z" }, +] + +[[package]] +name = "aiogram" +source = { editable = "." } +dependencies = [ + { name = "aiofiles" }, + { name = "aiohttp" }, + { name = "certifi" }, + { name = "magic-filter" }, + { name = "pydantic" }, + { name = "typing-extensions" }, +] + +[package.optional-dependencies] +cli = [ + { name = "aiogram-cli" }, +] +docs = [ + { name = "furo" }, + { name = "markdown-include" }, + { name = "pygments" }, + { name = "pymdown-extensions" }, + { name = "sphinx" }, + { name = "sphinx-autobuild" }, + { name = "sphinx-copybutton" }, + { name = "sphinx-intl" }, + { name = "sphinx-substitution-extensions" }, + { name = "sphinxcontrib-towncrier" }, + { name = "towncrier" }, +] +fast = [ + { name = "aiodns" }, + { name = "uvloop", marker = "(platform_python_implementation != 'PyPy' and sys_platform == 'darwin') or (platform_python_implementation != 'PyPy' and sys_platform == 'linux')" }, +] +i18n = [ + { name = "babel" }, +] +mongo = [ + { name = "motor" }, + { name = "pymongo" }, +] +proxy = [ + { name = "aiohttp-socks" }, +] +redis = [ + { name = "redis", extra = ["hiredis"] }, +] +signature = [ + { name = "cryptography" }, +] + +[package.dev-dependencies] +dev = [ + { name = "motor-types" }, + { name = "mypy" }, + { name = "packaging" }, + { name = "pre-commit" }, + { name = "ruff" }, + { name = "toml" }, +] +test = [ + { name = "aresponses" }, + { name = "pycryptodomex" }, + { name = "pytest" }, + { name = "pytest-aiohttp" }, + { name = "pytest-cov" }, + { name = "pytest-html" }, + { name = "pytest-mock" }, + { name = "pytest-mypy" }, + { name = "pytz" }, +] + +[package.metadata] +requires-dist = [ + { name = "aiodns", marker = "extra == 'fast'", specifier = ">=3.0.0" }, + { name = "aiofiles", specifier = ">=23.2.1,<26.0" }, + { name = "aiogram-cli", marker = "extra == 'cli'", specifier = ">=1.1.0,<2.0.0" }, + { name = "aiohttp", specifier = ">=3.9.0,<3.14" }, + { name = "aiohttp-socks", marker = "extra == 'proxy'", specifier = "~=0.10.1" }, + { name = "babel", marker = "extra == 'i18n'", specifier = ">=2.13.0,<3" }, + { name = "certifi", specifier = ">=2023.7.22" }, + { name = "cryptography", marker = "extra == 'signature'", specifier = ">=46.0.0" }, + { name = "furo", marker = "extra == 'docs'", specifier = "~=2024.8.6" }, + { name = "magic-filter", specifier = ">=1.0.12,<1.1" }, + { name = "markdown-include", marker = "extra == 'docs'", specifier = "~=0.8.1" }, + { name = "motor", marker = "extra == 'mongo'", specifier = ">=3.3.2,<3.8" }, + { name = "pydantic", specifier = ">=2.4.1,<2.13" }, + { name = "pygments", marker = "extra == 'docs'", specifier = "~=2.18.0" }, + { name = "pymdown-extensions", marker = "extra == 'docs'", specifier = "~=10.3" }, + { name = "pymongo", marker = "extra == 'mongo'", specifier = ">4.5,<4.16" }, + { name = "redis", extras = ["hiredis"], marker = "extra == 'redis'", specifier = ">=6.2.0,<8" }, + { name = "sphinx", marker = "extra == 'docs'", specifier = "~=8.0.2" }, + { name = "sphinx-autobuild", marker = "extra == 'docs'", specifier = "~=2024.9.3" }, + { name = "sphinx-copybutton", marker = "extra == 'docs'", specifier = "~=0.5.2" }, + { name = "sphinx-intl", marker = "extra == 'docs'", specifier = "~=2.2.0" }, + { name = "sphinx-substitution-extensions", marker = "extra == 'docs'", specifier = "~=2024.8.6" }, + { name = "sphinxcontrib-towncrier", marker = "extra == 'docs'", specifier = "~=0.4.0a0" }, + { name = "towncrier", marker = "extra == 'docs'", specifier = "~=24.8.0" }, + { name = "typing-extensions", specifier = ">=4.7.0,<=5.0" }, + { name = "uvloop", marker = "(python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin' and extra == 'fast') or (python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'linux' and extra == 'fast')", specifier = ">=0.21.0" }, + { name = "uvloop", marker = "(python_full_version < '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin' and extra == 'fast') or (python_full_version < '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'linux' and extra == 'fast')", specifier = ">=0.17.0" }, +] +provides-extras = ["cli", "docs", "fast", "i18n", "mongo", "proxy", "redis", "signature"] + +[package.metadata.requires-dev] +dev = [ + { name = "motor-types", specifier = "==1.0.0b4" }, + { name = "mypy", specifier = "==1.10.1" }, + { name = "packaging", specifier = "~=25.0" }, + { name = "pre-commit", specifier = "~=4.3" }, + { name = "ruff", specifier = "~=0.14" }, + { name = "toml", specifier = "~=0.10.2" }, +] +test = [ + { name = "aresponses", specifier = "==3.0.0" }, + { name = "pycryptodomex", specifier = "==3.23.0" }, + { name = "pytest", specifier = "==9.0.1" }, + { name = "pytest-aiohttp", specifier = "==1.1.0" }, + { name = "pytest-cov", specifier = "==7.0.0" }, + { name = "pytest-html", specifier = "==4.1.1" }, + { name = "pytest-mock", specifier = "==3.15.1" }, + { name = "pytest-mypy", specifier = "==1.0.1" }, + { name = "pytz", specifier = "==2025.2" }, +] + +[[package]] +name = "aiogram-cli" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiogram" }, + { name = "click" }, + { name = "click-plugins" }, + { name = "colorama" }, + { name = "watchfiles" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c4/ac/718fd49a582bfe2af85469ddf064692286410f39c68525b30a21c51f5920/aiogram_cli-1.1.0.tar.gz", hash = "sha256:52e54adccc4defecbb0cd653b800241063f5f80a6291ebdea90ae02a3b93d498", size = 9743, upload-time = "2024-05-31T23:07:01.899Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a3/38/fd2ef47bbb45380ac4b94bf1f5c5ef25351010003173bbc50d2c1480183f/aiogram_cli-1.1.0-py3-none-any.whl", hash = "sha256:41c960ff5fe0cf9dd0ebf37ab49494880b7f322c9ef8086077247a6964725f8e", size = 11889, upload-time = "2024-05-31T23:07:00.881Z" }, +] + +[[package]] +name = "aiohappyeyeballs" +version = "2.6.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz", hash = "sha256:c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558", size = 22760, upload-time = "2025-03-12T01:42:48.764Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0f/15/5bf3b99495fb160b63f95972b81750f18f7f4e02ad051373b669d17d44f2/aiohappyeyeballs-2.6.1-py3-none-any.whl", hash = "sha256:f349ba8f4b75cb25c99c5c2d84e997e485204d2902a9597802b0371f09331fb8", size = 15265, upload-time = "2025-03-12T01:42:47.083Z" }, +] + +[[package]] +name = "aiohttp" +version = "3.13.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiohappyeyeballs" }, + { name = "aiosignal" }, + { name = "async-timeout", marker = "python_full_version < '3.11'" }, + { name = "attrs" }, + { name = "frozenlist" }, + { name = "multidict" }, + { name = "propcache" }, + { name = "yarl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/1c/ce/3b83ebba6b3207a7135e5fcaba49706f8a4b6008153b4e30540c982fae26/aiohttp-3.13.2.tar.gz", hash = "sha256:40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca", size = 7837994, upload-time = "2025-10-28T20:59:39.937Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/34/939730e66b716b76046dedfe0842995842fa906ccc4964bba414ff69e429/aiohttp-3.13.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2372b15a5f62ed37789a6b383ff7344fc5b9f243999b0cd9b629d8bc5f5b4155", size = 736471, upload-time = "2025-10-28T20:55:27.924Z" }, + { url = "https://files.pythonhosted.org/packages/fd/cf/dcbdf2df7f6ca72b0bb4c0b4509701f2d8942cf54e29ca197389c214c07f/aiohttp-3.13.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e7f8659a48995edee7229522984bd1009c1213929c769c2daa80b40fe49a180c", size = 493985, upload-time = "2025-10-28T20:55:29.456Z" }, + { url = "https://files.pythonhosted.org/packages/9d/87/71c8867e0a1d0882dcbc94af767784c3cb381c1c4db0943ab4aae4fed65e/aiohttp-3.13.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:939ced4a7add92296b0ad38892ce62b98c619288a081170695c6babe4f50e636", size = 489274, upload-time = "2025-10-28T20:55:31.134Z" }, + { url = "https://files.pythonhosted.org/packages/38/0f/46c24e8dae237295eaadd113edd56dee96ef6462adf19b88592d44891dc5/aiohttp-3.13.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6315fb6977f1d0dd41a107c527fee2ed5ab0550b7d885bc15fee20ccb17891da", size = 1668171, upload-time = "2025-10-28T20:55:36.065Z" }, + { url = "https://files.pythonhosted.org/packages/eb/c6/4cdfb4440d0e28483681a48f69841fa5e39366347d66ef808cbdadddb20e/aiohttp-3.13.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6e7352512f763f760baaed2637055c49134fd1d35b37c2dedfac35bfe5cf8725", size = 1636036, upload-time = "2025-10-28T20:55:37.576Z" }, + { url = "https://files.pythonhosted.org/packages/84/37/8708cf678628216fb678ab327a4e1711c576d6673998f4f43e86e9ae90dd/aiohttp-3.13.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e09a0a06348a2dd73e7213353c90d709502d9786219f69b731f6caa0efeb46f5", size = 1727975, upload-time = "2025-10-28T20:55:39.457Z" }, + { url = "https://files.pythonhosted.org/packages/e6/2e/3ebfe12fdcb9b5f66e8a0a42dffcd7636844c8a018f261efb2419f68220b/aiohttp-3.13.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a09a6d073fb5789456545bdee2474d14395792faa0527887f2f4ec1a486a59d3", size = 1815823, upload-time = "2025-10-28T20:55:40.958Z" }, + { url = "https://files.pythonhosted.org/packages/a1/4f/ca2ef819488cbb41844c6cf92ca6dd15b9441e6207c58e5ae0e0fc8d70ad/aiohttp-3.13.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b59d13c443f8e049d9e94099c7e412e34610f1f49be0f230ec656a10692a5802", size = 1669374, upload-time = "2025-10-28T20:55:42.745Z" }, + { url = "https://files.pythonhosted.org/packages/f8/fe/1fe2e1179a0d91ce09c99069684aab619bf2ccde9b20bd6ca44f8837203e/aiohttp-3.13.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:20db2d67985d71ca033443a1ba2001c4b5693fe09b0e29f6d9358a99d4d62a8a", size = 1555315, upload-time = "2025-10-28T20:55:44.264Z" }, + { url = "https://files.pythonhosted.org/packages/5a/2b/f3781899b81c45d7cbc7140cddb8a3481c195e7cbff8e36374759d2ab5a5/aiohttp-3.13.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:960c2fc686ba27b535f9fd2b52d87ecd7e4fd1cf877f6a5cba8afb5b4a8bd204", size = 1639140, upload-time = "2025-10-28T20:55:46.626Z" }, + { url = "https://files.pythonhosted.org/packages/72/27/c37e85cd3ece6f6c772e549bd5a253d0c122557b25855fb274224811e4f2/aiohttp-3.13.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:6c00dbcf5f0d88796151e264a8eab23de2997c9303dd7c0bf622e23b24d3ce22", size = 1645496, upload-time = "2025-10-28T20:55:48.933Z" }, + { url = "https://files.pythonhosted.org/packages/66/20/3af1ab663151bd3780b123e907761cdb86ec2c4e44b2d9b195ebc91fbe37/aiohttp-3.13.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fed38a5edb7945f4d1bcabe2fcd05db4f6ec7e0e82560088b754f7e08d93772d", size = 1697625, upload-time = "2025-10-28T20:55:50.377Z" }, + { url = "https://files.pythonhosted.org/packages/95/eb/ae5cab15efa365e13d56b31b0d085a62600298bf398a7986f8388f73b598/aiohttp-3.13.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:b395bbca716c38bef3c764f187860e88c724b342c26275bc03e906142fc5964f", size = 1542025, upload-time = "2025-10-28T20:55:51.861Z" }, + { url = "https://files.pythonhosted.org/packages/e9/2d/1683e8d67ec72d911397fe4e575688d2a9b8f6a6e03c8fdc9f3fd3d4c03f/aiohttp-3.13.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:204ffff2426c25dfda401ba08da85f9c59525cdc42bda26660463dd1cbcfec6f", size = 1714918, upload-time = "2025-10-28T20:55:53.515Z" }, + { url = "https://files.pythonhosted.org/packages/99/a2/ffe8e0e1c57c5e542d47ffa1fcf95ef2b3ea573bf7c4d2ee877252431efc/aiohttp-3.13.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:05c4dd3c48fb5f15db31f57eb35374cb0c09afdde532e7fb70a75aede0ed30f6", size = 1656113, upload-time = "2025-10-28T20:55:55.438Z" }, + { url = "https://files.pythonhosted.org/packages/0d/42/d511aff5c3a2b06c09d7d214f508a4ad8ac7799817f7c3d23e7336b5e896/aiohttp-3.13.2-cp310-cp310-win32.whl", hash = "sha256:e574a7d61cf10351d734bcddabbe15ede0eaa8a02070d85446875dc11189a251", size = 432290, upload-time = "2025-10-28T20:55:56.96Z" }, + { url = "https://files.pythonhosted.org/packages/8b/ea/1c2eb7098b5bad4532994f2b7a8228d27674035c9b3234fe02c37469ef14/aiohttp-3.13.2-cp310-cp310-win_amd64.whl", hash = "sha256:364f55663085d658b8462a1c3f17b2b84a5c2e1ba858e1b79bff7b2e24ad1514", size = 455075, upload-time = "2025-10-28T20:55:58.373Z" }, + { url = "https://files.pythonhosted.org/packages/35/74/b321e7d7ca762638cdf8cdeceb39755d9c745aff7a64c8789be96ddf6e96/aiohttp-3.13.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4647d02df098f6434bafd7f32ad14942f05a9caa06c7016fdcc816f343997dd0", size = 743409, upload-time = "2025-10-28T20:56:00.354Z" }, + { url = "https://files.pythonhosted.org/packages/99/3d/91524b905ec473beaf35158d17f82ef5a38033e5809fe8742e3657cdbb97/aiohttp-3.13.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e3403f24bcb9c3b29113611c3c16a2a447c3953ecf86b79775e7be06f7ae7ccb", size = 497006, upload-time = "2025-10-28T20:56:01.85Z" }, + { url = "https://files.pythonhosted.org/packages/eb/d3/7f68bc02a67716fe80f063e19adbd80a642e30682ce74071269e17d2dba1/aiohttp-3.13.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:43dff14e35aba17e3d6d5ba628858fb8cb51e30f44724a2d2f0c75be492c55e9", size = 493195, upload-time = "2025-10-28T20:56:03.314Z" }, + { url = "https://files.pythonhosted.org/packages/98/31/913f774a4708775433b7375c4f867d58ba58ead833af96c8af3621a0d243/aiohttp-3.13.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e2a9ea08e8c58bb17655630198833109227dea914cd20be660f52215f6de5613", size = 1747759, upload-time = "2025-10-28T20:56:04.904Z" }, + { url = "https://files.pythonhosted.org/packages/e8/63/04efe156f4326f31c7c4a97144f82132c3bb21859b7bb84748d452ccc17c/aiohttp-3.13.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:53b07472f235eb80e826ad038c9d106c2f653584753f3ddab907c83f49eedead", size = 1704456, upload-time = "2025-10-28T20:56:06.986Z" }, + { url = "https://files.pythonhosted.org/packages/8e/02/4e16154d8e0a9cf4ae76f692941fd52543bbb148f02f098ca73cab9b1c1b/aiohttp-3.13.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e736c93e9c274fce6419af4aac199984d866e55f8a4cec9114671d0ea9688780", size = 1807572, upload-time = "2025-10-28T20:56:08.558Z" }, + { url = "https://files.pythonhosted.org/packages/34/58/b0583defb38689e7f06798f0285b1ffb3a6fb371f38363ce5fd772112724/aiohttp-3.13.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ff5e771f5dcbc81c64898c597a434f7682f2259e0cd666932a913d53d1341d1a", size = 1895954, upload-time = "2025-10-28T20:56:10.545Z" }, + { url = "https://files.pythonhosted.org/packages/6b/f3/083907ee3437425b4e376aa58b2c915eb1a33703ec0dc30040f7ae3368c6/aiohttp-3.13.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a3b6fb0c207cc661fa0bf8c66d8d9b657331ccc814f4719468af61034b478592", size = 1747092, upload-time = "2025-10-28T20:56:12.118Z" }, + { url = "https://files.pythonhosted.org/packages/ac/61/98a47319b4e425cc134e05e5f3fc512bf9a04bf65aafd9fdcda5d57ec693/aiohttp-3.13.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:97a0895a8e840ab3520e2288db7cace3a1981300d48babeb50e7425609e2e0ab", size = 1606815, upload-time = "2025-10-28T20:56:14.191Z" }, + { url = "https://files.pythonhosted.org/packages/97/4b/e78b854d82f66bb974189135d31fce265dee0f5344f64dd0d345158a5973/aiohttp-3.13.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9e8f8afb552297aca127c90cb840e9a1d4bfd6a10d7d8f2d9176e1acc69bad30", size = 1723789, upload-time = "2025-10-28T20:56:16.101Z" }, + { url = "https://files.pythonhosted.org/packages/ed/fc/9d2ccc794fc9b9acd1379d625c3a8c64a45508b5091c546dea273a41929e/aiohttp-3.13.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:ed2f9c7216e53c3df02264f25d824b079cc5914f9e2deba94155190ef648ee40", size = 1718104, upload-time = "2025-10-28T20:56:17.655Z" }, + { url = "https://files.pythonhosted.org/packages/66/65/34564b8765ea5c7d79d23c9113135d1dd3609173da13084830f1507d56cf/aiohttp-3.13.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:99c5280a329d5fa18ef30fd10c793a190d996567667908bef8a7f81f8202b948", size = 1785584, upload-time = "2025-10-28T20:56:19.238Z" }, + { url = "https://files.pythonhosted.org/packages/30/be/f6a7a426e02fc82781afd62016417b3948e2207426d90a0e478790d1c8a4/aiohttp-3.13.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:2ca6ffef405fc9c09a746cb5d019c1672cd7f402542e379afc66b370833170cf", size = 1595126, upload-time = "2025-10-28T20:56:20.836Z" }, + { url = "https://files.pythonhosted.org/packages/e5/c7/8e22d5d28f94f67d2af496f14a83b3c155d915d1fe53d94b66d425ec5b42/aiohttp-3.13.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:47f438b1a28e926c37632bff3c44df7d27c9b57aaf4e34b1def3c07111fdb782", size = 1800665, upload-time = "2025-10-28T20:56:22.922Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/91133c8b68b1da9fc16555706aa7276fdf781ae2bb0876c838dd86b8116e/aiohttp-3.13.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9acda8604a57bb60544e4646a4615c1866ee6c04a8edef9b8ee6fd1d8fa2ddc8", size = 1739532, upload-time = "2025-10-28T20:56:25.924Z" }, + { url = "https://files.pythonhosted.org/packages/17/6b/3747644d26a998774b21a616016620293ddefa4d63af6286f389aedac844/aiohttp-3.13.2-cp311-cp311-win32.whl", hash = "sha256:868e195e39b24aaa930b063c08bb0c17924899c16c672a28a65afded9c46c6ec", size = 431876, upload-time = "2025-10-28T20:56:27.524Z" }, + { url = "https://files.pythonhosted.org/packages/c3/63/688462108c1a00eb9f05765331c107f95ae86f6b197b865d29e930b7e462/aiohttp-3.13.2-cp311-cp311-win_amd64.whl", hash = "sha256:7fd19df530c292542636c2a9a85854fab93474396a52f1695e799186bbd7f24c", size = 456205, upload-time = "2025-10-28T20:56:29.062Z" }, + { url = "https://files.pythonhosted.org/packages/29/9b/01f00e9856d0a73260e86dd8ed0c2234a466c5c1712ce1c281548df39777/aiohttp-3.13.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:b1e56bab2e12b2b9ed300218c351ee2a3d8c8fdab5b1ec6193e11a817767e47b", size = 737623, upload-time = "2025-10-28T20:56:30.797Z" }, + { url = "https://files.pythonhosted.org/packages/5a/1b/4be39c445e2b2bd0aab4ba736deb649fabf14f6757f405f0c9685019b9e9/aiohttp-3.13.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:364e25edaabd3d37b1db1f0cbcee8c73c9a3727bfa262b83e5e4cf3489a2a9dc", size = 492664, upload-time = "2025-10-28T20:56:32.708Z" }, + { url = "https://files.pythonhosted.org/packages/28/66/d35dcfea8050e131cdd731dff36434390479b4045a8d0b9d7111b0a968f1/aiohttp-3.13.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c5c94825f744694c4b8db20b71dba9a257cd2ba8e010a803042123f3a25d50d7", size = 491808, upload-time = "2025-10-28T20:56:34.57Z" }, + { url = "https://files.pythonhosted.org/packages/00/29/8e4609b93e10a853b65f8291e64985de66d4f5848c5637cddc70e98f01f8/aiohttp-3.13.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba2715d842ffa787be87cbfce150d5e88c87a98e0b62e0f5aa489169a393dbbb", size = 1738863, upload-time = "2025-10-28T20:56:36.377Z" }, + { url = "https://files.pythonhosted.org/packages/9d/fa/4ebdf4adcc0def75ced1a0d2d227577cd7b1b85beb7edad85fcc87693c75/aiohttp-3.13.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:585542825c4bc662221fb257889e011a5aa00f1ae4d75d1d246a5225289183e3", size = 1700586, upload-time = "2025-10-28T20:56:38.034Z" }, + { url = "https://files.pythonhosted.org/packages/da/04/73f5f02ff348a3558763ff6abe99c223381b0bace05cd4530a0258e52597/aiohttp-3.13.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:39d02cb6025fe1aabca329c5632f48c9532a3dabccd859e7e2f110668972331f", size = 1768625, upload-time = "2025-10-28T20:56:39.75Z" }, + { url = "https://files.pythonhosted.org/packages/f8/49/a825b79ffec124317265ca7d2344a86bcffeb960743487cb11988ffb3494/aiohttp-3.13.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e67446b19e014d37342f7195f592a2a948141d15a312fe0e700c2fd2f03124f6", size = 1867281, upload-time = "2025-10-28T20:56:41.471Z" }, + { url = "https://files.pythonhosted.org/packages/b9/48/adf56e05f81eac31edcfae45c90928f4ad50ef2e3ea72cb8376162a368f8/aiohttp-3.13.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4356474ad6333e41ccefd39eae869ba15a6c5299c9c01dfdcfdd5c107be4363e", size = 1752431, upload-time = "2025-10-28T20:56:43.162Z" }, + { url = "https://files.pythonhosted.org/packages/30/ab/593855356eead019a74e862f21523db09c27f12fd24af72dbc3555b9bfd9/aiohttp-3.13.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:eeacf451c99b4525f700f078becff32c32ec327b10dcf31306a8a52d78166de7", size = 1562846, upload-time = "2025-10-28T20:56:44.85Z" }, + { url = "https://files.pythonhosted.org/packages/39/0f/9f3d32271aa8dc35036e9668e31870a9d3b9542dd6b3e2c8a30931cb27ae/aiohttp-3.13.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d8a9b889aeabd7a4e9af0b7f4ab5ad94d42e7ff679aaec6d0db21e3b639ad58d", size = 1699606, upload-time = "2025-10-28T20:56:46.519Z" }, + { url = "https://files.pythonhosted.org/packages/2c/3c/52d2658c5699b6ef7692a3f7128b2d2d4d9775f2a68093f74bca06cf01e1/aiohttp-3.13.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:fa89cb11bc71a63b69568d5b8a25c3ca25b6d54c15f907ca1c130d72f320b76b", size = 1720663, upload-time = "2025-10-28T20:56:48.528Z" }, + { url = "https://files.pythonhosted.org/packages/9b/d4/8f8f3ff1fb7fb9e3f04fcad4e89d8a1cd8fc7d05de67e3de5b15b33008ff/aiohttp-3.13.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8aa7c807df234f693fed0ecd507192fc97692e61fee5702cdc11155d2e5cadc8", size = 1737939, upload-time = "2025-10-28T20:56:50.77Z" }, + { url = "https://files.pythonhosted.org/packages/03/d3/ddd348f8a27a634daae39a1b8e291ff19c77867af438af844bf8b7e3231b/aiohttp-3.13.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:9eb3e33fdbe43f88c3c75fa608c25e7c47bbd80f48d012763cb67c47f39a7e16", size = 1555132, upload-time = "2025-10-28T20:56:52.568Z" }, + { url = "https://files.pythonhosted.org/packages/39/b8/46790692dc46218406f94374903ba47552f2f9f90dad554eed61bfb7b64c/aiohttp-3.13.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9434bc0d80076138ea986833156c5a48c9c7a8abb0c96039ddbb4afc93184169", size = 1764802, upload-time = "2025-10-28T20:56:54.292Z" }, + { url = "https://files.pythonhosted.org/packages/ba/e4/19ce547b58ab2a385e5f0b8aa3db38674785085abcf79b6e0edd1632b12f/aiohttp-3.13.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ff15c147b2ad66da1f2cbb0622313f2242d8e6e8f9b79b5206c84523a4473248", size = 1719512, upload-time = "2025-10-28T20:56:56.428Z" }, + { url = "https://files.pythonhosted.org/packages/70/30/6355a737fed29dcb6dfdd48682d5790cb5eab050f7b4e01f49b121d3acad/aiohttp-3.13.2-cp312-cp312-win32.whl", hash = "sha256:27e569eb9d9e95dbd55c0fc3ec3a9335defbf1d8bc1d20171a49f3c4c607b93e", size = 426690, upload-time = "2025-10-28T20:56:58.736Z" }, + { url = "https://files.pythonhosted.org/packages/0a/0d/b10ac09069973d112de6ef980c1f6bb31cb7dcd0bc363acbdad58f927873/aiohttp-3.13.2-cp312-cp312-win_amd64.whl", hash = "sha256:8709a0f05d59a71f33fd05c17fc11fcb8c30140506e13c2f5e8ee1b8964e1b45", size = 453465, upload-time = "2025-10-28T20:57:00.795Z" }, + { url = "https://files.pythonhosted.org/packages/bf/78/7e90ca79e5aa39f9694dcfd74f4720782d3c6828113bb1f3197f7e7c4a56/aiohttp-3.13.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7519bdc7dfc1940d201651b52bf5e03f5503bda45ad6eacf64dda98be5b2b6be", size = 732139, upload-time = "2025-10-28T20:57:02.455Z" }, + { url = "https://files.pythonhosted.org/packages/db/ed/1f59215ab6853fbaa5c8495fa6cbc39edfc93553426152b75d82a5f32b76/aiohttp-3.13.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:088912a78b4d4f547a1f19c099d5a506df17eacec3c6f4375e2831ec1d995742", size = 490082, upload-time = "2025-10-28T20:57:04.784Z" }, + { url = "https://files.pythonhosted.org/packages/68/7b/fe0fe0f5e05e13629d893c760465173a15ad0039c0a5b0d0040995c8075e/aiohttp-3.13.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5276807b9de9092af38ed23ce120539ab0ac955547b38563a9ba4f5b07b95293", size = 489035, upload-time = "2025-10-28T20:57:06.894Z" }, + { url = "https://files.pythonhosted.org/packages/d2/04/db5279e38471b7ac801d7d36a57d1230feeee130bbe2a74f72731b23c2b1/aiohttp-3.13.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1237c1375eaef0db4dcd7c2559f42e8af7b87ea7d295b118c60c36a6e61cb811", size = 1720387, upload-time = "2025-10-28T20:57:08.685Z" }, + { url = "https://files.pythonhosted.org/packages/31/07/8ea4326bd7dae2bd59828f69d7fdc6e04523caa55e4a70f4a8725a7e4ed2/aiohttp-3.13.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:96581619c57419c3d7d78703d5b78c1e5e5fc0172d60f555bdebaced82ded19a", size = 1688314, upload-time = "2025-10-28T20:57:10.693Z" }, + { url = "https://files.pythonhosted.org/packages/48/ab/3d98007b5b87ffd519d065225438cc3b668b2f245572a8cb53da5dd2b1bc/aiohttp-3.13.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a2713a95b47374169409d18103366de1050fe0ea73db358fc7a7acb2880422d4", size = 1756317, upload-time = "2025-10-28T20:57:12.563Z" }, + { url = "https://files.pythonhosted.org/packages/97/3d/801ca172b3d857fafb7b50c7c03f91b72b867a13abca982ed6b3081774ef/aiohttp-3.13.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:228a1cd556b3caca590e9511a89444925da87d35219a49ab5da0c36d2d943a6a", size = 1858539, upload-time = "2025-10-28T20:57:14.623Z" }, + { url = "https://files.pythonhosted.org/packages/f7/0d/4764669bdf47bd472899b3d3db91fffbe925c8e3038ec591a2fd2ad6a14d/aiohttp-3.13.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ac6cde5fba8d7d8c6ac963dbb0256a9854e9fafff52fbcc58fdf819357892c3e", size = 1739597, upload-time = "2025-10-28T20:57:16.399Z" }, + { url = "https://files.pythonhosted.org/packages/c4/52/7bd3c6693da58ba16e657eb904a5b6decfc48ecd06e9ac098591653b1566/aiohttp-3.13.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f2bef8237544f4e42878c61cef4e2839fee6346dc60f5739f876a9c50be7fcdb", size = 1555006, upload-time = "2025-10-28T20:57:18.288Z" }, + { url = "https://files.pythonhosted.org/packages/48/30/9586667acec5993b6f41d2ebcf96e97a1255a85f62f3c653110a5de4d346/aiohttp-3.13.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:16f15a4eac3bc2d76c45f7ebdd48a65d41b242eb6c31c2245463b40b34584ded", size = 1683220, upload-time = "2025-10-28T20:57:20.241Z" }, + { url = "https://files.pythonhosted.org/packages/71/01/3afe4c96854cfd7b30d78333852e8e851dceaec1c40fd00fec90c6402dd2/aiohttp-3.13.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:bb7fb776645af5cc58ab804c58d7eba545a97e047254a52ce89c157b5af6cd0b", size = 1712570, upload-time = "2025-10-28T20:57:22.253Z" }, + { url = "https://files.pythonhosted.org/packages/11/2c/22799d8e720f4697a9e66fd9c02479e40a49de3de2f0bbe7f9f78a987808/aiohttp-3.13.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e1b4951125ec10c70802f2cb09736c895861cd39fd9dcb35107b4dc8ae6220b8", size = 1733407, upload-time = "2025-10-28T20:57:24.37Z" }, + { url = "https://files.pythonhosted.org/packages/34/cb/90f15dd029f07cebbd91f8238a8b363978b530cd128488085b5703683594/aiohttp-3.13.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:550bf765101ae721ee1d37d8095f47b1f220650f85fe1af37a90ce75bab89d04", size = 1550093, upload-time = "2025-10-28T20:57:26.257Z" }, + { url = "https://files.pythonhosted.org/packages/69/46/12dce9be9d3303ecbf4d30ad45a7683dc63d90733c2d9fe512be6716cd40/aiohttp-3.13.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:fe91b87fc295973096251e2d25a811388e7d8adf3bd2b97ef6ae78bc4ac6c476", size = 1758084, upload-time = "2025-10-28T20:57:28.349Z" }, + { url = "https://files.pythonhosted.org/packages/f9/c8/0932b558da0c302ffd639fc6362a313b98fdf235dc417bc2493da8394df7/aiohttp-3.13.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e0c8e31cfcc4592cb200160344b2fb6ae0f9e4effe06c644b5a125d4ae5ebe23", size = 1716987, upload-time = "2025-10-28T20:57:30.233Z" }, + { url = "https://files.pythonhosted.org/packages/5d/8b/f5bd1a75003daed099baec373aed678f2e9b34f2ad40d85baa1368556396/aiohttp-3.13.2-cp313-cp313-win32.whl", hash = "sha256:0740f31a60848d6edb296a0df827473eede90c689b8f9f2a4cdde74889eb2254", size = 425859, upload-time = "2025-10-28T20:57:32.105Z" }, + { url = "https://files.pythonhosted.org/packages/5d/28/a8a9fc6957b2cee8902414e41816b5ab5536ecf43c3b1843c10e82c559b2/aiohttp-3.13.2-cp313-cp313-win_amd64.whl", hash = "sha256:a88d13e7ca367394908f8a276b89d04a3652044612b9a408a0bb22a5ed976a1a", size = 452192, upload-time = "2025-10-28T20:57:34.166Z" }, + { url = "https://files.pythonhosted.org/packages/9b/36/e2abae1bd815f01c957cbf7be817b3043304e1c87bad526292a0410fdcf9/aiohttp-3.13.2-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:2475391c29230e063ef53a66669b7b691c9bfc3f1426a0f7bcdf1216bdbac38b", size = 735234, upload-time = "2025-10-28T20:57:36.415Z" }, + { url = "https://files.pythonhosted.org/packages/ca/e3/1ee62dde9b335e4ed41db6bba02613295a0d5b41f74a783c142745a12763/aiohttp-3.13.2-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:f33c8748abef4d8717bb20e8fb1b3e07c6adacb7fd6beaae971a764cf5f30d61", size = 490733, upload-time = "2025-10-28T20:57:38.205Z" }, + { url = "https://files.pythonhosted.org/packages/1a/aa/7a451b1d6a04e8d15a362af3e9b897de71d86feac3babf8894545d08d537/aiohttp-3.13.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ae32f24bbfb7dbb485a24b30b1149e2f200be94777232aeadba3eecece4d0aa4", size = 491303, upload-time = "2025-10-28T20:57:40.122Z" }, + { url = "https://files.pythonhosted.org/packages/57/1e/209958dbb9b01174870f6a7538cd1f3f28274fdbc88a750c238e2c456295/aiohttp-3.13.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5d7f02042c1f009ffb70067326ef183a047425bb2ff3bc434ead4dd4a4a66a2b", size = 1717965, upload-time = "2025-10-28T20:57:42.28Z" }, + { url = "https://files.pythonhosted.org/packages/08/aa/6a01848d6432f241416bc4866cae8dc03f05a5a884d2311280f6a09c73d6/aiohttp-3.13.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:93655083005d71cd6c072cdab54c886e6570ad2c4592139c3fb967bfc19e4694", size = 1667221, upload-time = "2025-10-28T20:57:44.869Z" }, + { url = "https://files.pythonhosted.org/packages/87/4f/36c1992432d31bbc789fa0b93c768d2e9047ec8c7177e5cd84ea85155f36/aiohttp-3.13.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0db1e24b852f5f664cd728db140cf11ea0e82450471232a394b3d1a540b0f906", size = 1757178, upload-time = "2025-10-28T20:57:47.216Z" }, + { url = "https://files.pythonhosted.org/packages/ac/b4/8e940dfb03b7e0f68a82b88fd182b9be0a65cb3f35612fe38c038c3112cf/aiohttp-3.13.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b009194665bcd128e23eaddef362e745601afa4641930848af4c8559e88f18f9", size = 1838001, upload-time = "2025-10-28T20:57:49.337Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ef/39f3448795499c440ab66084a9db7d20ca7662e94305f175a80f5b7e0072/aiohttp-3.13.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c038a8fdc8103cd51dbd986ecdce141473ffd9775a7a8057a6ed9c3653478011", size = 1716325, upload-time = "2025-10-28T20:57:51.327Z" }, + { url = "https://files.pythonhosted.org/packages/d7/51/b311500ffc860b181c05d91c59a1313bdd05c82960fdd4035a15740d431e/aiohttp-3.13.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:66bac29b95a00db411cd758fea0e4b9bdba6d549dfe333f9a945430f5f2cc5a6", size = 1547978, upload-time = "2025-10-28T20:57:53.554Z" }, + { url = "https://files.pythonhosted.org/packages/31/64/b9d733296ef79815226dab8c586ff9e3df41c6aff2e16c06697b2d2e6775/aiohttp-3.13.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4ebf9cfc9ba24a74cf0718f04aac2a3bbe745902cc7c5ebc55c0f3b5777ef213", size = 1682042, upload-time = "2025-10-28T20:57:55.617Z" }, + { url = "https://files.pythonhosted.org/packages/3f/30/43d3e0f9d6473a6db7d472104c4eff4417b1e9df01774cb930338806d36b/aiohttp-3.13.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:a4b88ebe35ce54205c7074f7302bd08a4cb83256a3e0870c72d6f68a3aaf8e49", size = 1680085, upload-time = "2025-10-28T20:57:57.59Z" }, + { url = "https://files.pythonhosted.org/packages/16/51/c709f352c911b1864cfd1087577760ced64b3e5bee2aa88b8c0c8e2e4972/aiohttp-3.13.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:98c4fb90bb82b70a4ed79ca35f656f4281885be076f3f970ce315402b53099ae", size = 1728238, upload-time = "2025-10-28T20:57:59.525Z" }, + { url = "https://files.pythonhosted.org/packages/19/e2/19bd4c547092b773caeb48ff5ae4b1ae86756a0ee76c16727fcfd281404b/aiohttp-3.13.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:ec7534e63ae0f3759df3a1ed4fa6bc8f75082a924b590619c0dd2f76d7043caa", size = 1544395, upload-time = "2025-10-28T20:58:01.914Z" }, + { url = "https://files.pythonhosted.org/packages/cf/87/860f2803b27dfc5ed7be532832a3498e4919da61299b4a1f8eb89b8ff44d/aiohttp-3.13.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5b927cf9b935a13e33644cbed6c8c4b2d0f25b713d838743f8fe7191b33829c4", size = 1742965, upload-time = "2025-10-28T20:58:03.972Z" }, + { url = "https://files.pythonhosted.org/packages/67/7f/db2fc7618925e8c7a601094d5cbe539f732df4fb570740be88ed9e40e99a/aiohttp-3.13.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:88d6c017966a78c5265d996c19cdb79235be5e6412268d7e2ce7dee339471b7a", size = 1697585, upload-time = "2025-10-28T20:58:06.189Z" }, + { url = "https://files.pythonhosted.org/packages/0c/07/9127916cb09bb38284db5036036042b7b2c514c8ebaeee79da550c43a6d6/aiohttp-3.13.2-cp314-cp314-win32.whl", hash = "sha256:f7c183e786e299b5d6c49fb43a769f8eb8e04a2726a2bd5887b98b5cc2d67940", size = 431621, upload-time = "2025-10-28T20:58:08.636Z" }, + { url = "https://files.pythonhosted.org/packages/fb/41/554a8a380df6d3a2bba8a7726429a23f4ac62aaf38de43bb6d6cde7b4d4d/aiohttp-3.13.2-cp314-cp314-win_amd64.whl", hash = "sha256:fe242cd381e0fb65758faf5ad96c2e460df6ee5b2de1072fe97e4127927e00b4", size = 457627, upload-time = "2025-10-28T20:58:11Z" }, + { url = "https://files.pythonhosted.org/packages/c7/8e/3824ef98c039d3951cb65b9205a96dd2b20f22241ee17d89c5701557c826/aiohttp-3.13.2-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:f10d9c0b0188fe85398c61147bbd2a657d616c876863bfeff43376e0e3134673", size = 767360, upload-time = "2025-10-28T20:58:13.358Z" }, + { url = "https://files.pythonhosted.org/packages/a4/0f/6a03e3fc7595421274fa34122c973bde2d89344f8a881b728fa8c774e4f1/aiohttp-3.13.2-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:e7c952aefdf2460f4ae55c5e9c3e80aa72f706a6317e06020f80e96253b1accd", size = 504616, upload-time = "2025-10-28T20:58:15.339Z" }, + { url = "https://files.pythonhosted.org/packages/c6/aa/ed341b670f1bc8a6f2c6a718353d13b9546e2cef3544f573c6a1ff0da711/aiohttp-3.13.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c20423ce14771d98353d2e25e83591fa75dfa90a3c1848f3d7c68243b4fbded3", size = 509131, upload-time = "2025-10-28T20:58:17.693Z" }, + { url = "https://files.pythonhosted.org/packages/7f/f0/c68dac234189dae5c4bbccc0f96ce0cc16b76632cfc3a08fff180045cfa4/aiohttp-3.13.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e96eb1a34396e9430c19d8338d2ec33015e4a87ef2b4449db94c22412e25ccdf", size = 1864168, upload-time = "2025-10-28T20:58:20.113Z" }, + { url = "https://files.pythonhosted.org/packages/8f/65/75a9a76db8364b5d0e52a0c20eabc5d52297385d9af9c35335b924fafdee/aiohttp-3.13.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:23fb0783bc1a33640036465019d3bba069942616a6a2353c6907d7fe1ccdaf4e", size = 1719200, upload-time = "2025-10-28T20:58:22.583Z" }, + { url = "https://files.pythonhosted.org/packages/f5/55/8df2ed78d7f41d232f6bd3ff866b6f617026551aa1d07e2f03458f964575/aiohttp-3.13.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2e1a9bea6244a1d05a4e57c295d69e159a5c50d8ef16aa390948ee873478d9a5", size = 1843497, upload-time = "2025-10-28T20:58:24.672Z" }, + { url = "https://files.pythonhosted.org/packages/e9/e0/94d7215e405c5a02ccb6a35c7a3a6cfff242f457a00196496935f700cde5/aiohttp-3.13.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0a3d54e822688b56e9f6b5816fb3de3a3a64660efac64e4c2dc435230ad23bad", size = 1935703, upload-time = "2025-10-28T20:58:26.758Z" }, + { url = "https://files.pythonhosted.org/packages/0b/78/1eeb63c3f9b2d1015a4c02788fb543141aad0a03ae3f7a7b669b2483f8d4/aiohttp-3.13.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7a653d872afe9f33497215745da7a943d1dc15b728a9c8da1c3ac423af35178e", size = 1792738, upload-time = "2025-10-28T20:58:29.787Z" }, + { url = "https://files.pythonhosted.org/packages/41/75/aaf1eea4c188e51538c04cc568040e3082db263a57086ea74a7d38c39e42/aiohttp-3.13.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:56d36e80d2003fa3fc0207fac644216d8532e9504a785ef9a8fd013f84a42c61", size = 1624061, upload-time = "2025-10-28T20:58:32.529Z" }, + { url = "https://files.pythonhosted.org/packages/9b/c2/3b6034de81fbcc43de8aeb209073a2286dfb50b86e927b4efd81cf848197/aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:78cd586d8331fb8e241c2dd6b2f4061778cc69e150514b39a9e28dd050475661", size = 1789201, upload-time = "2025-10-28T20:58:34.618Z" }, + { url = "https://files.pythonhosted.org/packages/c9/38/c15dcf6d4d890217dae79d7213988f4e5fe6183d43893a9cf2fe9e84ca8d/aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:20b10bbfbff766294fe99987f7bb3b74fdd2f1a2905f2562132641ad434dcf98", size = 1776868, upload-time = "2025-10-28T20:58:38.835Z" }, + { url = "https://files.pythonhosted.org/packages/04/75/f74fd178ac81adf4f283a74847807ade5150e48feda6aef024403716c30c/aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:9ec49dff7e2b3c85cdeaa412e9d438f0ecd71676fde61ec57027dd392f00c693", size = 1790660, upload-time = "2025-10-28T20:58:41.507Z" }, + { url = "https://files.pythonhosted.org/packages/e7/80/7368bd0d06b16b3aba358c16b919e9c46cf11587dc572091031b0e9e3ef0/aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:94f05348c4406450f9d73d38efb41d669ad6cd90c7ee194810d0eefbfa875a7a", size = 1617548, upload-time = "2025-10-28T20:58:43.674Z" }, + { url = "https://files.pythonhosted.org/packages/7d/4b/a6212790c50483cb3212e507378fbe26b5086d73941e1ec4b56a30439688/aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:fa4dcb605c6f82a80c7f95713c2b11c3b8e9893b3ebd2bc9bde93165ed6107be", size = 1817240, upload-time = "2025-10-28T20:58:45.787Z" }, + { url = "https://files.pythonhosted.org/packages/ff/f7/ba5f0ba4ea8d8f3c32850912944532b933acbf0f3a75546b89269b9b7dde/aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cf00e5db968c3f67eccd2778574cf64d8b27d95b237770aa32400bd7a1ca4f6c", size = 1762334, upload-time = "2025-10-28T20:58:47.936Z" }, + { url = "https://files.pythonhosted.org/packages/7e/83/1a5a1856574588b1cad63609ea9ad75b32a8353ac995d830bf5da9357364/aiohttp-3.13.2-cp314-cp314t-win32.whl", hash = "sha256:d23b5fe492b0805a50d3371e8a728a9134d8de5447dce4c885f5587294750734", size = 464685, upload-time = "2025-10-28T20:58:50.642Z" }, + { url = "https://files.pythonhosted.org/packages/9f/4d/d22668674122c08f4d56972297c51a624e64b3ed1efaa40187607a7cb66e/aiohttp-3.13.2-cp314-cp314t-win_amd64.whl", hash = "sha256:ff0a7b0a82a7ab905cbda74006318d1b12e37c797eb1b0d4eb3e316cf47f658f", size = 498093, upload-time = "2025-10-28T20:58:52.782Z" }, +] + +[[package]] +name = "aiohttp-socks" +version = "0.10.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiohttp" }, + { name = "python-socks", extra = ["asyncio"] }, +] +sdist = { url = "https://files.pythonhosted.org/packages/75/07/1598f292433bcdceb069515811ba5221034f4f12535d06c3372a1b71a785/aiohttp_socks-0.10.2.tar.gz", hash = "sha256:942d7c86e2e579418fc7a734610dd97daaf00707c7462f6ccf679b2325767930", size = 11307, upload-time = "2025-11-10T08:50:44.723Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7f/51/906d2ef2e9dfe2f3e76e53696f2d73c508f99b54c05d7e9acd8e7033d505/aiohttp_socks-0.10.2-py3-none-any.whl", hash = "sha256:84b29d14356bcda4affa03ef267108416390e1c9029922c66be18ef4b106f980", size = 10470, upload-time = "2025-11-10T08:50:42.065Z" }, +] + +[[package]] +name = "aiosignal" +version = "1.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "frozenlist" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz", hash = "sha256:f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7", size = 25007, upload-time = "2025-07-03T22:54:43.528Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fb/76/641ae371508676492379f16e2fa48f4e2c11741bd63c48be4b12a6b09cba/aiosignal-1.4.0-py3-none-any.whl", hash = "sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e", size = 7490, upload-time = "2025-07-03T22:54:42.156Z" }, +] + +[[package]] +name = "alabaster" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a6/f8/d9c74d0daf3f742840fd818d69cfae176fa332022fd44e3469487d5a9420/alabaster-1.0.0.tar.gz", hash = "sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e", size = 24210, upload-time = "2024-07-26T18:15:03.762Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/b3/6b4067be973ae96ba0d615946e314c5ae35f9f993eca561b356540bb0c2b/alabaster-1.0.0-py3-none-any.whl", hash = "sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b", size = 13929, upload-time = "2024-07-26T18:15:02.05Z" }, +] + +[[package]] +name = "annotated-types" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" }, +] + +[[package]] +name = "anyio" +version = "4.12.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, + { name = "idna" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/16/ce/8a777047513153587e5434fd752e89334ac33e379aa3497db860eeb60377/anyio-4.12.0.tar.gz", hash = "sha256:73c693b567b0c55130c104d0b43a9baf3aa6a31fc6110116509f27bf75e21ec0", size = 228266, upload-time = "2025-11-28T23:37:38.911Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7f/9c/36c5c37947ebfb8c7f22e0eb6e4d188ee2d53aa3880f3f2744fb894f0cb1/anyio-4.12.0-py3-none-any.whl", hash = "sha256:dad2376a628f98eeca4881fc56cd06affd18f659b17a747d3ff0307ced94b1bb", size = 113362, upload-time = "2025-11-28T23:36:57.897Z" }, +] + +[[package]] +name = "aresponses" +version = "3.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiohttp" }, + { name = "pytest-asyncio" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ed/96/99b3f8c2ad6a5547bcb4726e572513564c23d4a3a3e21a03038dd3a84fe4/aresponses-3.0.0.tar.gz", hash = "sha256:8731d0609fe4c954e21f17753dc868dca9e2e002b020a33dc9212004599b11e7", size = 14796, upload-time = "2024-01-12T05:36:34.323Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/00/e6/554d29eb029da3b0ce3642483fce758043f3132b94ab54ecd1053eee29ee/aresponses-3.0.0-py3-none-any.whl", hash = "sha256:8093ab4758eb4aba91c765a50295b269ecfc0a9e7c7158954760bc0c23503970", size = 9879, upload-time = "2024-01-12T05:36:33.097Z" }, +] + +[[package]] +name = "async-timeout" +version = "5.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a5/ae/136395dfbfe00dfc94da3f3e136d0b13f394cba8f4841120e34226265780/async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3", size = 9274, upload-time = "2024-11-06T16:41:39.6Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fe/ba/e2081de779ca30d473f21f5b30e0e737c438205440784c7dfc81efc2b029/async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c", size = 6233, upload-time = "2024-11-06T16:41:37.9Z" }, +] + +[[package]] +name = "attrs" +version = "25.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz", hash = "sha256:16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11", size = 934251, upload-time = "2025-10-06T13:54:44.725Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3a/2a/7cc015f5b9f5db42b7d48157e23356022889fc354a2813c15934b7cb5c0e/attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373", size = 67615, upload-time = "2025-10-06T13:54:43.17Z" }, +] + +[[package]] +name = "babel" +version = "2.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d", size = 9951852, upload-time = "2025-02-01T15:17:41.026Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/b8/3fe70c75fe32afc4bb507f75563d39bc5642255d1d94f1f23604725780bf/babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2", size = 10182537, upload-time = "2025-02-01T15:17:37.39Z" }, +] + +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8e/ff/70dca7d7cb1cbc0edb2c6cc0c38b65cba36cccc491eca64cabd5fe7f8670/backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162", size = 69893, upload-time = "2025-07-02T02:27:15.685Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/59/76ab57e3fe74484f48a53f8e337171b4a2349e506eabe136d7e01d059086/backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5", size = 12313, upload-time = "2025-07-02T02:27:14.263Z" }, +] + +[[package]] +name = "beautifulsoup4" +version = "4.14.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "soupsieve" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c3/b0/1c6a16426d389813b48d95e26898aff79abbde42ad353958ad95cc8c9b21/beautifulsoup4-4.14.3.tar.gz", hash = "sha256:6292b1c5186d356bba669ef9f7f051757099565ad9ada5dd630bd9de5fa7fb86", size = 627737, upload-time = "2025-11-30T15:08:26.084Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1a/39/47f9197bdd44df24d67ac8893641e16f386c984a0619ef2ee4c51fbbc019/beautifulsoup4-4.14.3-py3-none-any.whl", hash = "sha256:0918bfe44902e6ad8d57732ba310582e98da931428d231a5ecb9e7c703a735bb", size = 107721, upload-time = "2025-11-30T15:08:24.087Z" }, +] + +[[package]] +name = "certifi" +version = "2025.11.12" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/8c/58f469717fa48465e4a50c014a0400602d3c437d7c0c468e17ada824da3a/certifi-2025.11.12.tar.gz", hash = "sha256:d8ab5478f2ecd78af242878415affce761ca6bc54a22a27e026d7c25357c3316", size = 160538, upload-time = "2025-11-12T02:54:51.517Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/70/7d/9bc192684cea499815ff478dfcdc13835ddf401365057044fb721ec6bddb/certifi-2025.11.12-py3-none-any.whl", hash = "sha256:97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b", size = 159438, upload-time = "2025-11-12T02:54:49.735Z" }, +] + +[[package]] +name = "cffi" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pycparser", marker = "implementation_name != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529", size = 523588, upload-time = "2025-09-08T23:24:04.541Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/93/d7/516d984057745a6cd96575eea814fe1edd6646ee6efd552fb7b0921dec83/cffi-2.0.0-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:0cf2d91ecc3fcc0625c2c530fe004f82c110405f101548512cce44322fa8ac44", size = 184283, upload-time = "2025-09-08T23:22:08.01Z" }, + { url = "https://files.pythonhosted.org/packages/9e/84/ad6a0b408daa859246f57c03efd28e5dd1b33c21737c2db84cae8c237aa5/cffi-2.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f73b96c41e3b2adedc34a7356e64c8eb96e03a3782b535e043a986276ce12a49", size = 180504, upload-time = "2025-09-08T23:22:10.637Z" }, + { url = "https://files.pythonhosted.org/packages/50/bd/b1a6362b80628111e6653c961f987faa55262b4002fcec42308cad1db680/cffi-2.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c", size = 208811, upload-time = "2025-09-08T23:22:12.267Z" }, + { url = "https://files.pythonhosted.org/packages/4f/27/6933a8b2562d7bd1fb595074cf99cc81fc3789f6a6c05cdabb46284a3188/cffi-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb", size = 216402, upload-time = "2025-09-08T23:22:13.455Z" }, + { url = "https://files.pythonhosted.org/packages/05/eb/b86f2a2645b62adcfff53b0dd97e8dfafb5c8aa864bd0d9a2c2049a0d551/cffi-2.0.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0", size = 203217, upload-time = "2025-09-08T23:22:14.596Z" }, + { url = "https://files.pythonhosted.org/packages/9f/e0/6cbe77a53acf5acc7c08cc186c9928864bd7c005f9efd0d126884858a5fe/cffi-2.0.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4", size = 203079, upload-time = "2025-09-08T23:22:15.769Z" }, + { url = "https://files.pythonhosted.org/packages/98/29/9b366e70e243eb3d14a5cb488dfd3a0b6b2f1fb001a203f653b93ccfac88/cffi-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453", size = 216475, upload-time = "2025-09-08T23:22:17.427Z" }, + { url = "https://files.pythonhosted.org/packages/21/7a/13b24e70d2f90a322f2900c5d8e1f14fa7e2a6b3332b7309ba7b2ba51a5a/cffi-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495", size = 218829, upload-time = "2025-09-08T23:22:19.069Z" }, + { url = "https://files.pythonhosted.org/packages/60/99/c9dc110974c59cc981b1f5b66e1d8af8af764e00f0293266824d9c4254bc/cffi-2.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5", size = 211211, upload-time = "2025-09-08T23:22:20.588Z" }, + { url = "https://files.pythonhosted.org/packages/49/72/ff2d12dbf21aca1b32a40ed792ee6b40f6dc3a9cf1644bd7ef6e95e0ac5e/cffi-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb", size = 218036, upload-time = "2025-09-08T23:22:22.143Z" }, + { url = "https://files.pythonhosted.org/packages/e2/cc/027d7fb82e58c48ea717149b03bcadcbdc293553edb283af792bd4bcbb3f/cffi-2.0.0-cp310-cp310-win32.whl", hash = "sha256:1f72fb8906754ac8a2cc3f9f5aaa298070652a0ffae577e0ea9bd480dc3c931a", size = 172184, upload-time = "2025-09-08T23:22:23.328Z" }, + { url = "https://files.pythonhosted.org/packages/33/fa/072dd15ae27fbb4e06b437eb6e944e75b068deb09e2a2826039e49ee2045/cffi-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:b18a3ed7d5b3bd8d9ef7a8cb226502c6bf8308df1525e1cc676c3680e7176739", size = 182790, upload-time = "2025-09-08T23:22:24.752Z" }, + { url = "https://files.pythonhosted.org/packages/12/4a/3dfd5f7850cbf0d06dc84ba9aa00db766b52ca38d8b86e3a38314d52498c/cffi-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe", size = 184344, upload-time = "2025-09-08T23:22:26.456Z" }, + { url = "https://files.pythonhosted.org/packages/4f/8b/f0e4c441227ba756aafbe78f117485b25bb26b1c059d01f137fa6d14896b/cffi-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c", size = 180560, upload-time = "2025-09-08T23:22:28.197Z" }, + { url = "https://files.pythonhosted.org/packages/b1/b7/1200d354378ef52ec227395d95c2576330fd22a869f7a70e88e1447eb234/cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92", size = 209613, upload-time = "2025-09-08T23:22:29.475Z" }, + { url = "https://files.pythonhosted.org/packages/b8/56/6033f5e86e8cc9bb629f0077ba71679508bdf54a9a5e112a3c0b91870332/cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93", size = 216476, upload-time = "2025-09-08T23:22:31.063Z" }, + { url = "https://files.pythonhosted.org/packages/dc/7f/55fecd70f7ece178db2f26128ec41430d8720f2d12ca97bf8f0a628207d5/cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5", size = 203374, upload-time = "2025-09-08T23:22:32.507Z" }, + { url = "https://files.pythonhosted.org/packages/84/ef/a7b77c8bdc0f77adc3b46888f1ad54be8f3b7821697a7b89126e829e676a/cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664", size = 202597, upload-time = "2025-09-08T23:22:34.132Z" }, + { url = "https://files.pythonhosted.org/packages/d7/91/500d892b2bf36529a75b77958edfcd5ad8e2ce4064ce2ecfeab2125d72d1/cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26", size = 215574, upload-time = "2025-09-08T23:22:35.443Z" }, + { url = "https://files.pythonhosted.org/packages/44/64/58f6255b62b101093d5df22dcb752596066c7e89dd725e0afaed242a61be/cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9", size = 218971, upload-time = "2025-09-08T23:22:36.805Z" }, + { url = "https://files.pythonhosted.org/packages/ab/49/fa72cebe2fd8a55fbe14956f9970fe8eb1ac59e5df042f603ef7c8ba0adc/cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414", size = 211972, upload-time = "2025-09-08T23:22:38.436Z" }, + { url = "https://files.pythonhosted.org/packages/0b/28/dd0967a76aab36731b6ebfe64dec4e981aff7e0608f60c2d46b46982607d/cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743", size = 217078, upload-time = "2025-09-08T23:22:39.776Z" }, + { url = "https://files.pythonhosted.org/packages/2b/c0/015b25184413d7ab0a410775fdb4a50fca20f5589b5dab1dbbfa3baad8ce/cffi-2.0.0-cp311-cp311-win32.whl", hash = "sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5", size = 172076, upload-time = "2025-09-08T23:22:40.95Z" }, + { url = "https://files.pythonhosted.org/packages/ae/8f/dc5531155e7070361eb1b7e4c1a9d896d0cb21c49f807a6c03fd63fc877e/cffi-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5", size = 182820, upload-time = "2025-09-08T23:22:42.463Z" }, + { url = "https://files.pythonhosted.org/packages/95/5c/1b493356429f9aecfd56bc171285a4c4ac8697f76e9bbbbb105e537853a1/cffi-2.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d", size = 177635, upload-time = "2025-09-08T23:22:43.623Z" }, + { url = "https://files.pythonhosted.org/packages/ea/47/4f61023ea636104d4f16ab488e268b93008c3d0bb76893b1b31db1f96802/cffi-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d", size = 185271, upload-time = "2025-09-08T23:22:44.795Z" }, + { url = "https://files.pythonhosted.org/packages/df/a2/781b623f57358e360d62cdd7a8c681f074a71d445418a776eef0aadb4ab4/cffi-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c", size = 181048, upload-time = "2025-09-08T23:22:45.938Z" }, + { url = "https://files.pythonhosted.org/packages/ff/df/a4f0fbd47331ceeba3d37c2e51e9dfc9722498becbeec2bd8bc856c9538a/cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe", size = 212529, upload-time = "2025-09-08T23:22:47.349Z" }, + { url = "https://files.pythonhosted.org/packages/d5/72/12b5f8d3865bf0f87cf1404d8c374e7487dcf097a1c91c436e72e6badd83/cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062", size = 220097, upload-time = "2025-09-08T23:22:48.677Z" }, + { url = "https://files.pythonhosted.org/packages/c2/95/7a135d52a50dfa7c882ab0ac17e8dc11cec9d55d2c18dda414c051c5e69e/cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e", size = 207983, upload-time = "2025-09-08T23:22:50.06Z" }, + { url = "https://files.pythonhosted.org/packages/3a/c8/15cb9ada8895957ea171c62dc78ff3e99159ee7adb13c0123c001a2546c1/cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037", size = 206519, upload-time = "2025-09-08T23:22:51.364Z" }, + { url = "https://files.pythonhosted.org/packages/78/2d/7fa73dfa841b5ac06c7b8855cfc18622132e365f5b81d02230333ff26e9e/cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba", size = 219572, upload-time = "2025-09-08T23:22:52.902Z" }, + { url = "https://files.pythonhosted.org/packages/07/e0/267e57e387b4ca276b90f0434ff88b2c2241ad72b16d31836adddfd6031b/cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94", size = 222963, upload-time = "2025-09-08T23:22:54.518Z" }, + { url = "https://files.pythonhosted.org/packages/b6/75/1f2747525e06f53efbd878f4d03bac5b859cbc11c633d0fb81432d98a795/cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187", size = 221361, upload-time = "2025-09-08T23:22:55.867Z" }, + { url = "https://files.pythonhosted.org/packages/7b/2b/2b6435f76bfeb6bbf055596976da087377ede68df465419d192acf00c437/cffi-2.0.0-cp312-cp312-win32.whl", hash = "sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18", size = 172932, upload-time = "2025-09-08T23:22:57.188Z" }, + { url = "https://files.pythonhosted.org/packages/f8/ed/13bd4418627013bec4ed6e54283b1959cf6db888048c7cf4b4c3b5b36002/cffi-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5", size = 183557, upload-time = "2025-09-08T23:22:58.351Z" }, + { url = "https://files.pythonhosted.org/packages/95/31/9f7f93ad2f8eff1dbc1c3656d7ca5bfd8fb52c9d786b4dcf19b2d02217fa/cffi-2.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6", size = 177762, upload-time = "2025-09-08T23:22:59.668Z" }, + { url = "https://files.pythonhosted.org/packages/4b/8d/a0a47a0c9e413a658623d014e91e74a50cdd2c423f7ccfd44086ef767f90/cffi-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb", size = 185230, upload-time = "2025-09-08T23:23:00.879Z" }, + { url = "https://files.pythonhosted.org/packages/4a/d2/a6c0296814556c68ee32009d9c2ad4f85f2707cdecfd7727951ec228005d/cffi-2.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca", size = 181043, upload-time = "2025-09-08T23:23:02.231Z" }, + { url = "https://files.pythonhosted.org/packages/b0/1e/d22cc63332bd59b06481ceaac49d6c507598642e2230f201649058a7e704/cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b", size = 212446, upload-time = "2025-09-08T23:23:03.472Z" }, + { url = "https://files.pythonhosted.org/packages/a9/f5/a2c23eb03b61a0b8747f211eb716446c826ad66818ddc7810cc2cc19b3f2/cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b", size = 220101, upload-time = "2025-09-08T23:23:04.792Z" }, + { url = "https://files.pythonhosted.org/packages/f2/7f/e6647792fc5850d634695bc0e6ab4111ae88e89981d35ac269956605feba/cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2", size = 207948, upload-time = "2025-09-08T23:23:06.127Z" }, + { url = "https://files.pythonhosted.org/packages/cb/1e/a5a1bd6f1fb30f22573f76533de12a00bf274abcdc55c8edab639078abb6/cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3", size = 206422, upload-time = "2025-09-08T23:23:07.753Z" }, + { url = "https://files.pythonhosted.org/packages/98/df/0a1755e750013a2081e863e7cd37e0cdd02664372c754e5560099eb7aa44/cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26", size = 219499, upload-time = "2025-09-08T23:23:09.648Z" }, + { url = "https://files.pythonhosted.org/packages/50/e1/a969e687fcf9ea58e6e2a928ad5e2dd88cc12f6f0ab477e9971f2309b57c/cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c", size = 222928, upload-time = "2025-09-08T23:23:10.928Z" }, + { url = "https://files.pythonhosted.org/packages/36/54/0362578dd2c9e557a28ac77698ed67323ed5b9775ca9d3fe73fe191bb5d8/cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b", size = 221302, upload-time = "2025-09-08T23:23:12.42Z" }, + { url = "https://files.pythonhosted.org/packages/eb/6d/bf9bda840d5f1dfdbf0feca87fbdb64a918a69bca42cfa0ba7b137c48cb8/cffi-2.0.0-cp313-cp313-win32.whl", hash = "sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27", size = 172909, upload-time = "2025-09-08T23:23:14.32Z" }, + { url = "https://files.pythonhosted.org/packages/37/18/6519e1ee6f5a1e579e04b9ddb6f1676c17368a7aba48299c3759bbc3c8b3/cffi-2.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75", size = 183402, upload-time = "2025-09-08T23:23:15.535Z" }, + { url = "https://files.pythonhosted.org/packages/cb/0e/02ceeec9a7d6ee63bb596121c2c8e9b3a9e150936f4fbef6ca1943e6137c/cffi-2.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91", size = 177780, upload-time = "2025-09-08T23:23:16.761Z" }, + { url = "https://files.pythonhosted.org/packages/92/c4/3ce07396253a83250ee98564f8d7e9789fab8e58858f35d07a9a2c78de9f/cffi-2.0.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5", size = 185320, upload-time = "2025-09-08T23:23:18.087Z" }, + { url = "https://files.pythonhosted.org/packages/59/dd/27e9fa567a23931c838c6b02d0764611c62290062a6d4e8ff7863daf9730/cffi-2.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13", size = 181487, upload-time = "2025-09-08T23:23:19.622Z" }, + { url = "https://files.pythonhosted.org/packages/d6/43/0e822876f87ea8a4ef95442c3d766a06a51fc5298823f884ef87aaad168c/cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b", size = 220049, upload-time = "2025-09-08T23:23:20.853Z" }, + { url = "https://files.pythonhosted.org/packages/b4/89/76799151d9c2d2d1ead63c2429da9ea9d7aac304603de0c6e8764e6e8e70/cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c", size = 207793, upload-time = "2025-09-08T23:23:22.08Z" }, + { url = "https://files.pythonhosted.org/packages/bb/dd/3465b14bb9e24ee24cb88c9e3730f6de63111fffe513492bf8c808a3547e/cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef", size = 206300, upload-time = "2025-09-08T23:23:23.314Z" }, + { url = "https://files.pythonhosted.org/packages/47/d9/d83e293854571c877a92da46fdec39158f8d7e68da75bf73581225d28e90/cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775", size = 219244, upload-time = "2025-09-08T23:23:24.541Z" }, + { url = "https://files.pythonhosted.org/packages/2b/0f/1f177e3683aead2bb00f7679a16451d302c436b5cbf2505f0ea8146ef59e/cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205", size = 222828, upload-time = "2025-09-08T23:23:26.143Z" }, + { url = "https://files.pythonhosted.org/packages/c6/0f/cafacebd4b040e3119dcb32fed8bdef8dfe94da653155f9d0b9dc660166e/cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1", size = 220926, upload-time = "2025-09-08T23:23:27.873Z" }, + { url = "https://files.pythonhosted.org/packages/3e/aa/df335faa45b395396fcbc03de2dfcab242cd61a9900e914fe682a59170b1/cffi-2.0.0-cp314-cp314-win32.whl", hash = "sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f", size = 175328, upload-time = "2025-09-08T23:23:44.61Z" }, + { url = "https://files.pythonhosted.org/packages/bb/92/882c2d30831744296ce713f0feb4c1cd30f346ef747b530b5318715cc367/cffi-2.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25", size = 185650, upload-time = "2025-09-08T23:23:45.848Z" }, + { url = "https://files.pythonhosted.org/packages/9f/2c/98ece204b9d35a7366b5b2c6539c350313ca13932143e79dc133ba757104/cffi-2.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad", size = 180687, upload-time = "2025-09-08T23:23:47.105Z" }, + { url = "https://files.pythonhosted.org/packages/3e/61/c768e4d548bfa607abcda77423448df8c471f25dbe64fb2ef6d555eae006/cffi-2.0.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9", size = 188773, upload-time = "2025-09-08T23:23:29.347Z" }, + { url = "https://files.pythonhosted.org/packages/2c/ea/5f76bce7cf6fcd0ab1a1058b5af899bfbef198bea4d5686da88471ea0336/cffi-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d", size = 185013, upload-time = "2025-09-08T23:23:30.63Z" }, + { url = "https://files.pythonhosted.org/packages/be/b4/c56878d0d1755cf9caa54ba71e5d049479c52f9e4afc230f06822162ab2f/cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c", size = 221593, upload-time = "2025-09-08T23:23:31.91Z" }, + { url = "https://files.pythonhosted.org/packages/e0/0d/eb704606dfe8033e7128df5e90fee946bbcb64a04fcdaa97321309004000/cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8", size = 209354, upload-time = "2025-09-08T23:23:33.214Z" }, + { url = "https://files.pythonhosted.org/packages/d8/19/3c435d727b368ca475fb8742ab97c9cb13a0de600ce86f62eab7fa3eea60/cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc", size = 208480, upload-time = "2025-09-08T23:23:34.495Z" }, + { url = "https://files.pythonhosted.org/packages/d0/44/681604464ed9541673e486521497406fadcc15b5217c3e326b061696899a/cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592", size = 221584, upload-time = "2025-09-08T23:23:36.096Z" }, + { url = "https://files.pythonhosted.org/packages/25/8e/342a504ff018a2825d395d44d63a767dd8ebc927ebda557fecdaca3ac33a/cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512", size = 224443, upload-time = "2025-09-08T23:23:37.328Z" }, + { url = "https://files.pythonhosted.org/packages/e1/5e/b666bacbbc60fbf415ba9988324a132c9a7a0448a9a8f125074671c0f2c3/cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4", size = 223437, upload-time = "2025-09-08T23:23:38.945Z" }, + { url = "https://files.pythonhosted.org/packages/a0/1d/ec1a60bd1a10daa292d3cd6bb0b359a81607154fb8165f3ec95fe003b85c/cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e", size = 180487, upload-time = "2025-09-08T23:23:40.423Z" }, + { url = "https://files.pythonhosted.org/packages/bf/41/4c1168c74fac325c0c8156f04b6749c8b6a8f405bbf91413ba088359f60d/cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6", size = 191726, upload-time = "2025-09-08T23:23:41.742Z" }, + { url = "https://files.pythonhosted.org/packages/ae/3a/dbeec9d1ee0844c679f6bb5d6ad4e9f198b1224f4e7a32825f47f6192b0c/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9", size = 184195, upload-time = "2025-09-08T23:23:43.004Z" }, +] + +[[package]] +name = "cfgv" +version = "3.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4e/b5/721b8799b04bf9afe054a3899c6cf4e880fcf8563cc71c15610242490a0c/cfgv-3.5.0.tar.gz", hash = "sha256:d5b1034354820651caa73ede66a6294d6e95c1b00acc5e9b098e917404669132", size = 7334, upload-time = "2025-11-19T20:55:51.612Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/db/3c/33bac158f8ab7f89b2e59426d5fe2e4f63f7ed25df84c036890172b412b5/cfgv-3.5.0-py2.py3-none-any.whl", hash = "sha256:a8dc6b26ad22ff227d2634a65cb388215ce6cc96bbcc5cfde7641ae87e8dacc0", size = 7445, upload-time = "2025-11-19T20:55:50.744Z" }, +] + +[[package]] +name = "charset-normalizer" +version = "3.4.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", size = 129418, upload-time = "2025-10-14T04:42:32.879Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1f/b8/6d51fc1d52cbd52cd4ccedd5b5b2f0f6a11bbf6765c782298b0f3e808541/charset_normalizer-3.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d", size = 209709, upload-time = "2025-10-14T04:40:11.385Z" }, + { url = "https://files.pythonhosted.org/packages/5c/af/1f9d7f7faafe2ddfb6f72a2e07a548a629c61ad510fe60f9630309908fef/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8", size = 148814, upload-time = "2025-10-14T04:40:13.135Z" }, + { url = "https://files.pythonhosted.org/packages/79/3d/f2e3ac2bbc056ca0c204298ea4e3d9db9b4afe437812638759db2c976b5f/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:027f6de494925c0ab2a55eab46ae5129951638a49a34d87f4c3eda90f696b4ad", size = 144467, upload-time = "2025-10-14T04:40:14.728Z" }, + { url = "https://files.pythonhosted.org/packages/ec/85/1bf997003815e60d57de7bd972c57dc6950446a3e4ccac43bc3070721856/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f820802628d2694cb7e56db99213f930856014862f3fd943d290ea8438d07ca8", size = 162280, upload-time = "2025-10-14T04:40:16.14Z" }, + { url = "https://files.pythonhosted.org/packages/3e/8e/6aa1952f56b192f54921c436b87f2aaf7c7a7c3d0d1a765547d64fd83c13/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:798d75d81754988d2565bff1b97ba5a44411867c0cf32b77a7e8f8d84796b10d", size = 159454, upload-time = "2025-10-14T04:40:17.567Z" }, + { url = "https://files.pythonhosted.org/packages/36/3b/60cbd1f8e93aa25d1c669c649b7a655b0b5fb4c571858910ea9332678558/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d1bb833febdff5c8927f922386db610b49db6e0d4f4ee29601d71e7c2694313", size = 153609, upload-time = "2025-10-14T04:40:19.08Z" }, + { url = "https://files.pythonhosted.org/packages/64/91/6a13396948b8fd3c4b4fd5bc74d045f5637d78c9675585e8e9fbe5636554/charset_normalizer-3.4.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9cd98cdc06614a2f768d2b7286d66805f94c48cde050acdbbb7db2600ab3197e", size = 151849, upload-time = "2025-10-14T04:40:20.607Z" }, + { url = "https://files.pythonhosted.org/packages/b7/7a/59482e28b9981d105691e968c544cc0df3b7d6133152fb3dcdc8f135da7a/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:077fbb858e903c73f6c9db43374fd213b0b6a778106bc7032446a8e8b5b38b93", size = 151586, upload-time = "2025-10-14T04:40:21.719Z" }, + { url = "https://files.pythonhosted.org/packages/92/59/f64ef6a1c4bdd2baf892b04cd78792ed8684fbc48d4c2afe467d96b4df57/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:244bfb999c71b35de57821b8ea746b24e863398194a4014e4c76adc2bbdfeff0", size = 145290, upload-time = "2025-10-14T04:40:23.069Z" }, + { url = "https://files.pythonhosted.org/packages/6b/63/3bf9f279ddfa641ffa1962b0db6a57a9c294361cc2f5fcac997049a00e9c/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:64b55f9dce520635f018f907ff1b0df1fdc31f2795a922fb49dd14fbcdf48c84", size = 163663, upload-time = "2025-10-14T04:40:24.17Z" }, + { url = "https://files.pythonhosted.org/packages/ed/09/c9e38fc8fa9e0849b172b581fd9803bdf6e694041127933934184e19f8c3/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:faa3a41b2b66b6e50f84ae4a68c64fcd0c44355741c6374813a800cd6695db9e", size = 151964, upload-time = "2025-10-14T04:40:25.368Z" }, + { url = "https://files.pythonhosted.org/packages/d2/d1/d28b747e512d0da79d8b6a1ac18b7ab2ecfd81b2944c4c710e166d8dd09c/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6515f3182dbe4ea06ced2d9e8666d97b46ef4c75e326b79bb624110f122551db", size = 161064, upload-time = "2025-10-14T04:40:26.806Z" }, + { url = "https://files.pythonhosted.org/packages/bb/9a/31d62b611d901c3b9e5500c36aab0ff5eb442043fb3a1c254200d3d397d9/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc00f04ed596e9dc0da42ed17ac5e596c6ccba999ba6bd92b0e0aef2f170f2d6", size = 155015, upload-time = "2025-10-14T04:40:28.284Z" }, + { url = "https://files.pythonhosted.org/packages/1f/f3/107e008fa2bff0c8b9319584174418e5e5285fef32f79d8ee6a430d0039c/charset_normalizer-3.4.4-cp310-cp310-win32.whl", hash = "sha256:f34be2938726fc13801220747472850852fe6b1ea75869a048d6f896838c896f", size = 99792, upload-time = "2025-10-14T04:40:29.613Z" }, + { url = "https://files.pythonhosted.org/packages/eb/66/e396e8a408843337d7315bab30dbf106c38966f1819f123257f5520f8a96/charset_normalizer-3.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:a61900df84c667873b292c3de315a786dd8dac506704dea57bc957bd31e22c7d", size = 107198, upload-time = "2025-10-14T04:40:30.644Z" }, + { url = "https://files.pythonhosted.org/packages/b5/58/01b4f815bf0312704c267f2ccb6e5d42bcc7752340cd487bc9f8c3710597/charset_normalizer-3.4.4-cp310-cp310-win_arm64.whl", hash = "sha256:cead0978fc57397645f12578bfd2d5ea9138ea0fac82b2f63f7f7c6877986a69", size = 100262, upload-time = "2025-10-14T04:40:32.108Z" }, + { url = "https://files.pythonhosted.org/packages/ed/27/c6491ff4954e58a10f69ad90aca8a1b6fe9c5d3c6f380907af3c37435b59/charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8", size = 206988, upload-time = "2025-10-14T04:40:33.79Z" }, + { url = "https://files.pythonhosted.org/packages/94/59/2e87300fe67ab820b5428580a53cad894272dbb97f38a7a814a2a1ac1011/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0", size = 147324, upload-time = "2025-10-14T04:40:34.961Z" }, + { url = "https://files.pythonhosted.org/packages/07/fb/0cf61dc84b2b088391830f6274cb57c82e4da8bbc2efeac8c025edb88772/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3", size = 142742, upload-time = "2025-10-14T04:40:36.105Z" }, + { url = "https://files.pythonhosted.org/packages/62/8b/171935adf2312cd745d290ed93cf16cf0dfe320863ab7cbeeae1dcd6535f/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc", size = 160863, upload-time = "2025-10-14T04:40:37.188Z" }, + { url = "https://files.pythonhosted.org/packages/09/73/ad875b192bda14f2173bfc1bc9a55e009808484a4b256748d931b6948442/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897", size = 157837, upload-time = "2025-10-14T04:40:38.435Z" }, + { url = "https://files.pythonhosted.org/packages/6d/fc/de9cce525b2c5b94b47c70a4b4fb19f871b24995c728e957ee68ab1671ea/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381", size = 151550, upload-time = "2025-10-14T04:40:40.053Z" }, + { url = "https://files.pythonhosted.org/packages/55/c2/43edd615fdfba8c6f2dfbd459b25a6b3b551f24ea21981e23fb768503ce1/charset_normalizer-3.4.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815", size = 149162, upload-time = "2025-10-14T04:40:41.163Z" }, + { url = "https://files.pythonhosted.org/packages/03/86/bde4ad8b4d0e9429a4e82c1e8f5c659993a9a863ad62c7df05cf7b678d75/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0", size = 150019, upload-time = "2025-10-14T04:40:42.276Z" }, + { url = "https://files.pythonhosted.org/packages/1f/86/a151eb2af293a7e7bac3a739b81072585ce36ccfb4493039f49f1d3cae8c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161", size = 143310, upload-time = "2025-10-14T04:40:43.439Z" }, + { url = "https://files.pythonhosted.org/packages/b5/fe/43dae6144a7e07b87478fdfc4dbe9efd5defb0e7ec29f5f58a55aeef7bf7/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4", size = 162022, upload-time = "2025-10-14T04:40:44.547Z" }, + { url = "https://files.pythonhosted.org/packages/80/e6/7aab83774f5d2bca81f42ac58d04caf44f0cc2b65fc6db2b3b2e8a05f3b3/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89", size = 149383, upload-time = "2025-10-14T04:40:46.018Z" }, + { url = "https://files.pythonhosted.org/packages/4f/e8/b289173b4edae05c0dde07f69f8db476a0b511eac556dfe0d6bda3c43384/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569", size = 159098, upload-time = "2025-10-14T04:40:47.081Z" }, + { url = "https://files.pythonhosted.org/packages/d8/df/fe699727754cae3f8478493c7f45f777b17c3ef0600e28abfec8619eb49c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224", size = 152991, upload-time = "2025-10-14T04:40:48.246Z" }, + { url = "https://files.pythonhosted.org/packages/1a/86/584869fe4ddb6ffa3bd9f491b87a01568797fb9bd8933f557dba9771beaf/charset_normalizer-3.4.4-cp311-cp311-win32.whl", hash = "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a", size = 99456, upload-time = "2025-10-14T04:40:49.376Z" }, + { url = "https://files.pythonhosted.org/packages/65/f6/62fdd5feb60530f50f7e38b4f6a1d5203f4d16ff4f9f0952962c044e919a/charset_normalizer-3.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016", size = 106978, upload-time = "2025-10-14T04:40:50.844Z" }, + { url = "https://files.pythonhosted.org/packages/7a/9d/0710916e6c82948b3be62d9d398cb4fcf4e97b56d6a6aeccd66c4b2f2bd5/charset_normalizer-3.4.4-cp311-cp311-win_arm64.whl", hash = "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1", size = 99969, upload-time = "2025-10-14T04:40:52.272Z" }, + { url = "https://files.pythonhosted.org/packages/f3/85/1637cd4af66fa687396e757dec650f28025f2a2f5a5531a3208dc0ec43f2/charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394", size = 208425, upload-time = "2025-10-14T04:40:53.353Z" }, + { url = "https://files.pythonhosted.org/packages/9d/6a/04130023fef2a0d9c62d0bae2649b69f7b7d8d24ea5536feef50551029df/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25", size = 148162, upload-time = "2025-10-14T04:40:54.558Z" }, + { url = "https://files.pythonhosted.org/packages/78/29/62328d79aa60da22c9e0b9a66539feae06ca0f5a4171ac4f7dc285b83688/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef", size = 144558, upload-time = "2025-10-14T04:40:55.677Z" }, + { url = "https://files.pythonhosted.org/packages/86/bb/b32194a4bf15b88403537c2e120b817c61cd4ecffa9b6876e941c3ee38fe/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d", size = 161497, upload-time = "2025-10-14T04:40:57.217Z" }, + { url = "https://files.pythonhosted.org/packages/19/89/a54c82b253d5b9b111dc74aca196ba5ccfcca8242d0fb64146d4d3183ff1/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8", size = 159240, upload-time = "2025-10-14T04:40:58.358Z" }, + { url = "https://files.pythonhosted.org/packages/c0/10/d20b513afe03acc89ec33948320a5544d31f21b05368436d580dec4e234d/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86", size = 153471, upload-time = "2025-10-14T04:40:59.468Z" }, + { url = "https://files.pythonhosted.org/packages/61/fa/fbf177b55bdd727010f9c0a3c49eefa1d10f960e5f09d1d887bf93c2e698/charset_normalizer-3.4.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a", size = 150864, upload-time = "2025-10-14T04:41:00.623Z" }, + { url = "https://files.pythonhosted.org/packages/05/12/9fbc6a4d39c0198adeebbde20b619790e9236557ca59fc40e0e3cebe6f40/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f", size = 150647, upload-time = "2025-10-14T04:41:01.754Z" }, + { url = "https://files.pythonhosted.org/packages/ad/1f/6a9a593d52e3e8c5d2b167daf8c6b968808efb57ef4c210acb907c365bc4/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc", size = 145110, upload-time = "2025-10-14T04:41:03.231Z" }, + { url = "https://files.pythonhosted.org/packages/30/42/9a52c609e72471b0fc54386dc63c3781a387bb4fe61c20231a4ebcd58bdd/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf", size = 162839, upload-time = "2025-10-14T04:41:04.715Z" }, + { url = "https://files.pythonhosted.org/packages/c4/5b/c0682bbf9f11597073052628ddd38344a3d673fda35a36773f7d19344b23/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15", size = 150667, upload-time = "2025-10-14T04:41:05.827Z" }, + { url = "https://files.pythonhosted.org/packages/e4/24/a41afeab6f990cf2daf6cb8c67419b63b48cf518e4f56022230840c9bfb2/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9", size = 160535, upload-time = "2025-10-14T04:41:06.938Z" }, + { url = "https://files.pythonhosted.org/packages/2a/e5/6a4ce77ed243c4a50a1fecca6aaaab419628c818a49434be428fe24c9957/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0", size = 154816, upload-time = "2025-10-14T04:41:08.101Z" }, + { url = "https://files.pythonhosted.org/packages/a8/ef/89297262b8092b312d29cdb2517cb1237e51db8ecef2e9af5edbe7b683b1/charset_normalizer-3.4.4-cp312-cp312-win32.whl", hash = "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26", size = 99694, upload-time = "2025-10-14T04:41:09.23Z" }, + { url = "https://files.pythonhosted.org/packages/3d/2d/1e5ed9dd3b3803994c155cd9aacb60c82c331bad84daf75bcb9c91b3295e/charset_normalizer-3.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525", size = 107131, upload-time = "2025-10-14T04:41:10.467Z" }, + { url = "https://files.pythonhosted.org/packages/d0/d9/0ed4c7098a861482a7b6a95603edce4c0d9db2311af23da1fb2b75ec26fc/charset_normalizer-3.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3", size = 100390, upload-time = "2025-10-14T04:41:11.915Z" }, + { url = "https://files.pythonhosted.org/packages/97/45/4b3a1239bbacd321068ea6e7ac28875b03ab8bc0aa0966452db17cd36714/charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794", size = 208091, upload-time = "2025-10-14T04:41:13.346Z" }, + { url = "https://files.pythonhosted.org/packages/7d/62/73a6d7450829655a35bb88a88fca7d736f9882a27eacdca2c6d505b57e2e/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed", size = 147936, upload-time = "2025-10-14T04:41:14.461Z" }, + { url = "https://files.pythonhosted.org/packages/89/c5/adb8c8b3d6625bef6d88b251bbb0d95f8205831b987631ab0c8bb5d937c2/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72", size = 144180, upload-time = "2025-10-14T04:41:15.588Z" }, + { url = "https://files.pythonhosted.org/packages/91/ed/9706e4070682d1cc219050b6048bfd293ccf67b3d4f5a4f39207453d4b99/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328", size = 161346, upload-time = "2025-10-14T04:41:16.738Z" }, + { url = "https://files.pythonhosted.org/packages/d5/0d/031f0d95e4972901a2f6f09ef055751805ff541511dc1252ba3ca1f80cf5/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede", size = 158874, upload-time = "2025-10-14T04:41:17.923Z" }, + { url = "https://files.pythonhosted.org/packages/f5/83/6ab5883f57c9c801ce5e5677242328aa45592be8a00644310a008d04f922/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894", size = 153076, upload-time = "2025-10-14T04:41:19.106Z" }, + { url = "https://files.pythonhosted.org/packages/75/1e/5ff781ddf5260e387d6419959ee89ef13878229732732ee73cdae01800f2/charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1", size = 150601, upload-time = "2025-10-14T04:41:20.245Z" }, + { url = "https://files.pythonhosted.org/packages/d7/57/71be810965493d3510a6ca79b90c19e48696fb1ff964da319334b12677f0/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490", size = 150376, upload-time = "2025-10-14T04:41:21.398Z" }, + { url = "https://files.pythonhosted.org/packages/e5/d5/c3d057a78c181d007014feb7e9f2e65905a6c4ef182c0ddf0de2924edd65/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44", size = 144825, upload-time = "2025-10-14T04:41:22.583Z" }, + { url = "https://files.pythonhosted.org/packages/e6/8c/d0406294828d4976f275ffbe66f00266c4b3136b7506941d87c00cab5272/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133", size = 162583, upload-time = "2025-10-14T04:41:23.754Z" }, + { url = "https://files.pythonhosted.org/packages/d7/24/e2aa1f18c8f15c4c0e932d9287b8609dd30ad56dbe41d926bd846e22fb8d/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3", size = 150366, upload-time = "2025-10-14T04:41:25.27Z" }, + { url = "https://files.pythonhosted.org/packages/e4/5b/1e6160c7739aad1e2df054300cc618b06bf784a7a164b0f238360721ab86/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e", size = 160300, upload-time = "2025-10-14T04:41:26.725Z" }, + { url = "https://files.pythonhosted.org/packages/7a/10/f882167cd207fbdd743e55534d5d9620e095089d176d55cb22d5322f2afd/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc", size = 154465, upload-time = "2025-10-14T04:41:28.322Z" }, + { url = "https://files.pythonhosted.org/packages/89/66/c7a9e1b7429be72123441bfdbaf2bc13faab3f90b933f664db506dea5915/charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac", size = 99404, upload-time = "2025-10-14T04:41:29.95Z" }, + { url = "https://files.pythonhosted.org/packages/c4/26/b9924fa27db384bdcd97ab83b4f0a8058d96ad9626ead570674d5e737d90/charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14", size = 107092, upload-time = "2025-10-14T04:41:31.188Z" }, + { url = "https://files.pythonhosted.org/packages/af/8f/3ed4bfa0c0c72a7ca17f0380cd9e4dd842b09f664e780c13cff1dcf2ef1b/charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2", size = 100408, upload-time = "2025-10-14T04:41:32.624Z" }, + { url = "https://files.pythonhosted.org/packages/2a/35/7051599bd493e62411d6ede36fd5af83a38f37c4767b92884df7301db25d/charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd", size = 207746, upload-time = "2025-10-14T04:41:33.773Z" }, + { url = "https://files.pythonhosted.org/packages/10/9a/97c8d48ef10d6cd4fcead2415523221624bf58bcf68a802721a6bc807c8f/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb", size = 147889, upload-time = "2025-10-14T04:41:34.897Z" }, + { url = "https://files.pythonhosted.org/packages/10/bf/979224a919a1b606c82bd2c5fa49b5c6d5727aa47b4312bb27b1734f53cd/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e", size = 143641, upload-time = "2025-10-14T04:41:36.116Z" }, + { url = "https://files.pythonhosted.org/packages/ba/33/0ad65587441fc730dc7bd90e9716b30b4702dc7b617e6ba4997dc8651495/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14", size = 160779, upload-time = "2025-10-14T04:41:37.229Z" }, + { url = "https://files.pythonhosted.org/packages/67/ed/331d6b249259ee71ddea93f6f2f0a56cfebd46938bde6fcc6f7b9a3d0e09/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191", size = 159035, upload-time = "2025-10-14T04:41:38.368Z" }, + { url = "https://files.pythonhosted.org/packages/67/ff/f6b948ca32e4f2a4576aa129d8bed61f2e0543bf9f5f2b7fc3758ed005c9/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838", size = 152542, upload-time = "2025-10-14T04:41:39.862Z" }, + { url = "https://files.pythonhosted.org/packages/16/85/276033dcbcc369eb176594de22728541a925b2632f9716428c851b149e83/charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6", size = 149524, upload-time = "2025-10-14T04:41:41.319Z" }, + { url = "https://files.pythonhosted.org/packages/9e/f2/6a2a1f722b6aba37050e626530a46a68f74e63683947a8acff92569f979a/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e", size = 150395, upload-time = "2025-10-14T04:41:42.539Z" }, + { url = "https://files.pythonhosted.org/packages/60/bb/2186cb2f2bbaea6338cad15ce23a67f9b0672929744381e28b0592676824/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c", size = 143680, upload-time = "2025-10-14T04:41:43.661Z" }, + { url = "https://files.pythonhosted.org/packages/7d/a5/bf6f13b772fbb2a90360eb620d52ed8f796f3c5caee8398c3b2eb7b1c60d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090", size = 162045, upload-time = "2025-10-14T04:41:44.821Z" }, + { url = "https://files.pythonhosted.org/packages/df/c5/d1be898bf0dc3ef9030c3825e5d3b83f2c528d207d246cbabe245966808d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152", size = 149687, upload-time = "2025-10-14T04:41:46.442Z" }, + { url = "https://files.pythonhosted.org/packages/a5/42/90c1f7b9341eef50c8a1cb3f098ac43b0508413f33affd762855f67a410e/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828", size = 160014, upload-time = "2025-10-14T04:41:47.631Z" }, + { url = "https://files.pythonhosted.org/packages/76/be/4d3ee471e8145d12795ab655ece37baed0929462a86e72372fd25859047c/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec", size = 154044, upload-time = "2025-10-14T04:41:48.81Z" }, + { url = "https://files.pythonhosted.org/packages/b0/6f/8f7af07237c34a1defe7defc565a9bc1807762f672c0fde711a4b22bf9c0/charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9", size = 99940, upload-time = "2025-10-14T04:41:49.946Z" }, + { url = "https://files.pythonhosted.org/packages/4b/51/8ade005e5ca5b0d80fb4aff72a3775b325bdc3d27408c8113811a7cbe640/charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c", size = 107104, upload-time = "2025-10-14T04:41:51.051Z" }, + { url = "https://files.pythonhosted.org/packages/da/5f/6b8f83a55bb8278772c5ae54a577f3099025f9ade59d0136ac24a0df4bde/charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2", size = 100743, upload-time = "2025-10-14T04:41:52.122Z" }, + { url = "https://files.pythonhosted.org/packages/0a/4c/925909008ed5a988ccbb72dcc897407e5d6d3bd72410d69e051fc0c14647/charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", size = 53402, upload-time = "2025-10-14T04:42:31.76Z" }, +] + +[[package]] +name = "click" +version = "8.1.8" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593, upload-time = "2024-12-21T18:38:44.339Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2", size = 98188, upload-time = "2024-12-21T18:38:41.666Z" }, +] + +[[package]] +name = "click-plugins" +version = "1.1.1.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c3/a4/34847b59150da33690a36da3681d6bbc2ec14ee9a846bc30a6746e5984e4/click_plugins-1.1.1.2.tar.gz", hash = "sha256:d7af3984a99d243c131aa1a828331e7630f4a88a9741fd05c927b204bcf92261", size = 8343, upload-time = "2025-06-25T00:47:37.555Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3d/9a/2abecb28ae875e39c8cad711eb1186d8d14eab564705325e77e4e6ab9ae5/click_plugins-1.1.1.2-py2.py3-none-any.whl", hash = "sha256:008d65743833ffc1f5417bf0e78e8d2c23aab04d9745ba817bd3e71b0feb6aa6", size = 11051, upload-time = "2025-06-25T00:47:36.731Z" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "coverage" +version = "7.13.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/23/f9/e92df5e07f3fc8d4c7f9a0f146ef75446bf870351cd37b788cf5897f8079/coverage-7.13.1.tar.gz", hash = "sha256:b7593fe7eb5feaa3fbb461ac79aac9f9fc0387a5ca8080b0c6fe2ca27b091afd", size = 825862, upload-time = "2025-12-28T15:42:56.969Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2d/9a/3742e58fd04b233df95c012ee9f3dfe04708a5e1d32613bd2d47d4e1be0d/coverage-7.13.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e1fa280b3ad78eea5be86f94f461c04943d942697e0dac889fa18fff8f5f9147", size = 218633, upload-time = "2025-12-28T15:40:10.165Z" }, + { url = "https://files.pythonhosted.org/packages/7e/45/7e6bdc94d89cd7c8017ce735cf50478ddfe765d4fbf0c24d71d30ea33d7a/coverage-7.13.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c3d8c679607220979434f494b139dfb00131ebf70bb406553d69c1ff01a5c33d", size = 219147, upload-time = "2025-12-28T15:40:12.069Z" }, + { url = "https://files.pythonhosted.org/packages/f7/38/0d6a258625fd7f10773fe94097dc16937a5f0e3e0cdf3adef67d3ac6baef/coverage-7.13.1-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:339dc63b3eba969067b00f41f15ad161bf2946613156fb131266d8debc8e44d0", size = 245894, upload-time = "2025-12-28T15:40:13.556Z" }, + { url = "https://files.pythonhosted.org/packages/27/58/409d15ea487986994cbd4d06376e9860e9b157cfbfd402b1236770ab8dd2/coverage-7.13.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:db622b999ffe49cb891f2fff3b340cdc2f9797d01a0a202a0973ba2562501d90", size = 247721, upload-time = "2025-12-28T15:40:15.37Z" }, + { url = "https://files.pythonhosted.org/packages/da/bf/6e8056a83fd7a96c93341f1ffe10df636dd89f26d5e7b9ca511ce3bcf0df/coverage-7.13.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1443ba9acbb593fa7c1c29e011d7c9761545fe35e7652e85ce7f51a16f7e08d", size = 249585, upload-time = "2025-12-28T15:40:17.226Z" }, + { url = "https://files.pythonhosted.org/packages/f4/15/e1daff723f9f5959acb63cbe35b11203a9df77ee4b95b45fffd38b318390/coverage-7.13.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c832ec92c4499ac463186af72f9ed4d8daec15499b16f0a879b0d1c8e5cf4a3b", size = 246597, upload-time = "2025-12-28T15:40:19.028Z" }, + { url = "https://files.pythonhosted.org/packages/74/a6/1efd31c5433743a6ddbc9d37ac30c196bb07c7eab3d74fbb99b924c93174/coverage-7.13.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:562ec27dfa3f311e0db1ba243ec6e5f6ab96b1edfcfc6cf86f28038bc4961ce6", size = 247626, upload-time = "2025-12-28T15:40:20.846Z" }, + { url = "https://files.pythonhosted.org/packages/6d/9f/1609267dd3e749f57fdd66ca6752567d1c13b58a20a809dc409b263d0b5f/coverage-7.13.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:4de84e71173d4dada2897e5a0e1b7877e5eefbfe0d6a44edee6ce31d9b8ec09e", size = 245629, upload-time = "2025-12-28T15:40:22.397Z" }, + { url = "https://files.pythonhosted.org/packages/e2/f6/6815a220d5ec2466383d7cc36131b9fa6ecbe95c50ec52a631ba733f306a/coverage-7.13.1-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:a5a68357f686f8c4d527a2dc04f52e669c2fc1cbde38f6f7eb6a0e58cbd17cae", size = 245901, upload-time = "2025-12-28T15:40:23.836Z" }, + { url = "https://files.pythonhosted.org/packages/ac/58/40576554cd12e0872faf6d2c0eb3bc85f71d78427946ddd19ad65201e2c0/coverage-7.13.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:77cc258aeb29a3417062758975521eae60af6f79e930d6993555eeac6a8eac29", size = 246505, upload-time = "2025-12-28T15:40:25.421Z" }, + { url = "https://files.pythonhosted.org/packages/3b/77/9233a90253fba576b0eee81707b5781d0e21d97478e5377b226c5b096c0f/coverage-7.13.1-cp310-cp310-win32.whl", hash = "sha256:bb4f8c3c9a9f34423dba193f241f617b08ffc63e27f67159f60ae6baf2dcfe0f", size = 221257, upload-time = "2025-12-28T15:40:27.217Z" }, + { url = "https://files.pythonhosted.org/packages/e0/43/e842ff30c1a0a623ec80db89befb84a3a7aad7bfe44a6ea77d5a3e61fedd/coverage-7.13.1-cp310-cp310-win_amd64.whl", hash = "sha256:c8e2706ceb622bc63bac98ebb10ef5da80ed70fbd8a7999a5076de3afaef0fb1", size = 222191, upload-time = "2025-12-28T15:40:28.916Z" }, + { url = "https://files.pythonhosted.org/packages/b4/9b/77baf488516e9ced25fc215a6f75d803493fc3f6a1a1227ac35697910c2a/coverage-7.13.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a55d509a1dc5a5b708b5dad3b5334e07a16ad4c2185e27b40e4dba796ab7f88", size = 218755, upload-time = "2025-12-28T15:40:30.812Z" }, + { url = "https://files.pythonhosted.org/packages/d7/cd/7ab01154e6eb79ee2fab76bf4d89e94c6648116557307ee4ebbb85e5c1bf/coverage-7.13.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4d010d080c4888371033baab27e47c9df7d6fb28d0b7b7adf85a4a49be9298b3", size = 219257, upload-time = "2025-12-28T15:40:32.333Z" }, + { url = "https://files.pythonhosted.org/packages/01/d5/b11ef7863ffbbdb509da0023fad1e9eda1c0eaea61a6d2ea5b17d4ac706e/coverage-7.13.1-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:d938b4a840fb1523b9dfbbb454f652967f18e197569c32266d4d13f37244c3d9", size = 249657, upload-time = "2025-12-28T15:40:34.1Z" }, + { url = "https://files.pythonhosted.org/packages/f7/7c/347280982982383621d29b8c544cf497ae07ac41e44b1ca4903024131f55/coverage-7.13.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:bf100a3288f9bb7f919b87eb84f87101e197535b9bd0e2c2b5b3179633324fee", size = 251581, upload-time = "2025-12-28T15:40:36.131Z" }, + { url = "https://files.pythonhosted.org/packages/82/f6/ebcfed11036ade4c0d75fa4453a6282bdd225bc073862766eec184a4c643/coverage-7.13.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ef6688db9bf91ba111ae734ba6ef1a063304a881749726e0d3575f5c10a9facf", size = 253691, upload-time = "2025-12-28T15:40:37.626Z" }, + { url = "https://files.pythonhosted.org/packages/02/92/af8f5582787f5d1a8b130b2dcba785fa5e9a7a8e121a0bb2220a6fdbdb8a/coverage-7.13.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0b609fc9cdbd1f02e51f67f51e5aee60a841ef58a68d00d5ee2c0faf357481a3", size = 249799, upload-time = "2025-12-28T15:40:39.47Z" }, + { url = "https://files.pythonhosted.org/packages/24/aa/0e39a2a3b16eebf7f193863323edbff38b6daba711abaaf807d4290cf61a/coverage-7.13.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c43257717611ff5e9a1d79dce8e47566235ebda63328718d9b65dd640bc832ef", size = 251389, upload-time = "2025-12-28T15:40:40.954Z" }, + { url = "https://files.pythonhosted.org/packages/73/46/7f0c13111154dc5b978900c0ccee2e2ca239b910890e674a77f1363d483e/coverage-7.13.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e09fbecc007f7b6afdfb3b07ce5bd9f8494b6856dd4f577d26c66c391b829851", size = 249450, upload-time = "2025-12-28T15:40:42.489Z" }, + { url = "https://files.pythonhosted.org/packages/ac/ca/e80da6769e8b669ec3695598c58eef7ad98b0e26e66333996aee6316db23/coverage-7.13.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:a03a4f3a19a189919c7055098790285cc5c5b0b3976f8d227aea39dbf9f8bfdb", size = 249170, upload-time = "2025-12-28T15:40:44.279Z" }, + { url = "https://files.pythonhosted.org/packages/af/18/9e29baabdec1a8644157f572541079b4658199cfd372a578f84228e860de/coverage-7.13.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3820778ea1387c2b6a818caec01c63adc5b3750211af6447e8dcfb9b6f08dbba", size = 250081, upload-time = "2025-12-28T15:40:45.748Z" }, + { url = "https://files.pythonhosted.org/packages/00/f8/c3021625a71c3b2f516464d322e41636aea381018319050a8114105872ee/coverage-7.13.1-cp311-cp311-win32.whl", hash = "sha256:ff10896fa55167371960c5908150b434b71c876dfab97b69478f22c8b445ea19", size = 221281, upload-time = "2025-12-28T15:40:47.232Z" }, + { url = "https://files.pythonhosted.org/packages/27/56/c216625f453df6e0559ed666d246fcbaaa93f3aa99eaa5080cea1229aa3d/coverage-7.13.1-cp311-cp311-win_amd64.whl", hash = "sha256:a998cc0aeeea4c6d5622a3754da5a493055d2d95186bad877b0a34ea6e6dbe0a", size = 222215, upload-time = "2025-12-28T15:40:49.19Z" }, + { url = "https://files.pythonhosted.org/packages/5c/9a/be342e76f6e531cae6406dc46af0d350586f24d9b67fdfa6daee02df71af/coverage-7.13.1-cp311-cp311-win_arm64.whl", hash = "sha256:fea07c1a39a22614acb762e3fbbb4011f65eedafcb2948feeef641ac78b4ee5c", size = 220886, upload-time = "2025-12-28T15:40:51.067Z" }, + { url = "https://files.pythonhosted.org/packages/ce/8a/87af46cccdfa78f53db747b09f5f9a21d5fc38d796834adac09b30a8ce74/coverage-7.13.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6f34591000f06e62085b1865c9bc5f7858df748834662a51edadfd2c3bfe0dd3", size = 218927, upload-time = "2025-12-28T15:40:52.814Z" }, + { url = "https://files.pythonhosted.org/packages/82/a8/6e22fdc67242a4a5a153f9438d05944553121c8f4ba70cb072af4c41362e/coverage-7.13.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b67e47c5595b9224599016e333f5ec25392597a89d5744658f837d204e16c63e", size = 219288, upload-time = "2025-12-28T15:40:54.262Z" }, + { url = "https://files.pythonhosted.org/packages/d0/0a/853a76e03b0f7c4375e2ca025df45c918beb367f3e20a0a8e91967f6e96c/coverage-7.13.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3e7b8bd70c48ffb28461ebe092c2345536fb18bbbf19d287c8913699735f505c", size = 250786, upload-time = "2025-12-28T15:40:56.059Z" }, + { url = "https://files.pythonhosted.org/packages/ea/b4/694159c15c52b9f7ec7adf49d50e5f8ee71d3e9ef38adb4445d13dd56c20/coverage-7.13.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:c223d078112e90dc0e5c4e35b98b9584164bea9fbbd221c0b21c5241f6d51b62", size = 253543, upload-time = "2025-12-28T15:40:57.585Z" }, + { url = "https://files.pythonhosted.org/packages/96/b2/7f1f0437a5c855f87e17cf5d0dc35920b6440ff2b58b1ba9788c059c26c8/coverage-7.13.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:794f7c05af0763b1bbd1b9e6eff0e52ad068be3b12cd96c87de037b01390c968", size = 254635, upload-time = "2025-12-28T15:40:59.443Z" }, + { url = "https://files.pythonhosted.org/packages/e9/d1/73c3fdb8d7d3bddd9473c9c6a2e0682f09fc3dfbcb9c3f36412a7368bcab/coverage-7.13.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0642eae483cc8c2902e4af7298bf886d605e80f26382124cddc3967c2a3df09e", size = 251202, upload-time = "2025-12-28T15:41:01.328Z" }, + { url = "https://files.pythonhosted.org/packages/66/3c/f0edf75dcc152f145d5598329e864bbbe04ab78660fe3e8e395f9fff010f/coverage-7.13.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9f5e772ed5fef25b3de9f2008fe67b92d46831bd2bc5bdc5dd6bfd06b83b316f", size = 252566, upload-time = "2025-12-28T15:41:03.319Z" }, + { url = "https://files.pythonhosted.org/packages/17/b3/e64206d3c5f7dcbceafd14941345a754d3dbc78a823a6ed526e23b9cdaab/coverage-7.13.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:45980ea19277dc0a579e432aef6a504fe098ef3a9032ead15e446eb0f1191aee", size = 250711, upload-time = "2025-12-28T15:41:06.411Z" }, + { url = "https://files.pythonhosted.org/packages/dc/ad/28a3eb970a8ef5b479ee7f0c484a19c34e277479a5b70269dc652b730733/coverage-7.13.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:e4f18eca6028ffa62adbd185a8f1e1dd242f2e68164dba5c2b74a5204850b4cf", size = 250278, upload-time = "2025-12-28T15:41:08.285Z" }, + { url = "https://files.pythonhosted.org/packages/54/e3/c8f0f1a93133e3e1291ca76cbb63565bd4b5c5df63b141f539d747fff348/coverage-7.13.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f8dca5590fec7a89ed6826fce625595279e586ead52e9e958d3237821fbc750c", size = 252154, upload-time = "2025-12-28T15:41:09.969Z" }, + { url = "https://files.pythonhosted.org/packages/d0/bf/9939c5d6859c380e405b19e736321f1c7d402728792f4c752ad1adcce005/coverage-7.13.1-cp312-cp312-win32.whl", hash = "sha256:ff86d4e85188bba72cfb876df3e11fa243439882c55957184af44a35bd5880b7", size = 221487, upload-time = "2025-12-28T15:41:11.468Z" }, + { url = "https://files.pythonhosted.org/packages/fa/dc/7282856a407c621c2aad74021680a01b23010bb8ebf427cf5eacda2e876f/coverage-7.13.1-cp312-cp312-win_amd64.whl", hash = "sha256:16cc1da46c04fb0fb128b4dc430b78fa2aba8a6c0c9f8eb391fd5103409a6ac6", size = 222299, upload-time = "2025-12-28T15:41:13.386Z" }, + { url = "https://files.pythonhosted.org/packages/10/79/176a11203412c350b3e9578620013af35bcdb79b651eb976f4a4b32044fa/coverage-7.13.1-cp312-cp312-win_arm64.whl", hash = "sha256:8d9bc218650022a768f3775dd7fdac1886437325d8d295d923ebcfef4892ad5c", size = 220941, upload-time = "2025-12-28T15:41:14.975Z" }, + { url = "https://files.pythonhosted.org/packages/a3/a4/e98e689347a1ff1a7f67932ab535cef82eb5e78f32a9e4132e114bbb3a0a/coverage-7.13.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:cb237bfd0ef4d5eb6a19e29f9e528ac67ac3be932ea6b44fb6cc09b9f3ecff78", size = 218951, upload-time = "2025-12-28T15:41:16.653Z" }, + { url = "https://files.pythonhosted.org/packages/32/33/7cbfe2bdc6e2f03d6b240d23dc45fdaf3fd270aaf2d640be77b7f16989ab/coverage-7.13.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1dcb645d7e34dcbcc96cd7c132b1fc55c39263ca62eb961c064eb3928997363b", size = 219325, upload-time = "2025-12-28T15:41:18.609Z" }, + { url = "https://files.pythonhosted.org/packages/59/f6/efdabdb4929487baeb7cb2a9f7dac457d9356f6ad1b255be283d58b16316/coverage-7.13.1-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3d42df8201e00384736f0df9be2ced39324c3907607d17d50d50116c989d84cd", size = 250309, upload-time = "2025-12-28T15:41:20.629Z" }, + { url = "https://files.pythonhosted.org/packages/12/da/91a52516e9d5aea87d32d1523f9cdcf7a35a3b298e6be05d6509ba3cfab2/coverage-7.13.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fa3edde1aa8807de1d05934982416cb3ec46d1d4d91e280bcce7cca01c507992", size = 252907, upload-time = "2025-12-28T15:41:22.257Z" }, + { url = "https://files.pythonhosted.org/packages/75/38/f1ea837e3dc1231e086db1638947e00d264e7e8c41aa8ecacf6e1e0c05f4/coverage-7.13.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9edd0e01a343766add6817bc448408858ba6b489039eaaa2018474e4001651a4", size = 254148, upload-time = "2025-12-28T15:41:23.87Z" }, + { url = "https://files.pythonhosted.org/packages/7f/43/f4f16b881aaa34954ba446318dea6b9ed5405dd725dd8daac2358eda869a/coverage-7.13.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:985b7836931d033570b94c94713c6dba5f9d3ff26045f72c3e5dbc5fe3361e5a", size = 250515, upload-time = "2025-12-28T15:41:25.437Z" }, + { url = "https://files.pythonhosted.org/packages/84/34/8cba7f00078bd468ea914134e0144263194ce849ec3baad187ffb6203d1c/coverage-7.13.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ffed1e4980889765c84a5d1a566159e363b71d6b6fbaf0bebc9d3c30bc016766", size = 252292, upload-time = "2025-12-28T15:41:28.459Z" }, + { url = "https://files.pythonhosted.org/packages/8c/a4/cffac66c7652d84ee4ac52d3ccb94c015687d3b513f9db04bfcac2ac800d/coverage-7.13.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:8842af7f175078456b8b17f1b73a0d16a65dcbdc653ecefeb00a56b3c8c298c4", size = 250242, upload-time = "2025-12-28T15:41:30.02Z" }, + { url = "https://files.pythonhosted.org/packages/f4/78/9a64d462263dde416f3c0067efade7b52b52796f489b1037a95b0dc389c9/coverage-7.13.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:ccd7a6fca48ca9c131d9b0a2972a581e28b13416fc313fb98b6d24a03ce9a398", size = 250068, upload-time = "2025-12-28T15:41:32.007Z" }, + { url = "https://files.pythonhosted.org/packages/69/c8/a8994f5fece06db7c4a97c8fc1973684e178599b42e66280dded0524ef00/coverage-7.13.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0403f647055de2609be776965108447deb8e384fe4a553c119e3ff6bfbab4784", size = 251846, upload-time = "2025-12-28T15:41:33.946Z" }, + { url = "https://files.pythonhosted.org/packages/cc/f7/91fa73c4b80305c86598a2d4e54ba22df6bf7d0d97500944af7ef155d9f7/coverage-7.13.1-cp313-cp313-win32.whl", hash = "sha256:549d195116a1ba1e1ae2f5ca143f9777800f6636eab917d4f02b5310d6d73461", size = 221512, upload-time = "2025-12-28T15:41:35.519Z" }, + { url = "https://files.pythonhosted.org/packages/45/0b/0768b4231d5a044da8f75e097a8714ae1041246bb765d6b5563bab456735/coverage-7.13.1-cp313-cp313-win_amd64.whl", hash = "sha256:5899d28b5276f536fcf840b18b61a9fce23cc3aec1d114c44c07fe94ebeaa500", size = 222321, upload-time = "2025-12-28T15:41:37.371Z" }, + { url = "https://files.pythonhosted.org/packages/9b/b8/bdcb7253b7e85157282450262008f1366aa04663f3e3e4c30436f596c3e2/coverage-7.13.1-cp313-cp313-win_arm64.whl", hash = "sha256:868a2fae76dfb06e87291bcbd4dcbcc778a8500510b618d50496e520bd94d9b9", size = 220949, upload-time = "2025-12-28T15:41:39.553Z" }, + { url = "https://files.pythonhosted.org/packages/70/52/f2be52cc445ff75ea8397948c96c1b4ee14f7f9086ea62fc929c5ae7b717/coverage-7.13.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:67170979de0dacac3f3097d02b0ad188d8edcea44ccc44aaa0550af49150c7dc", size = 219643, upload-time = "2025-12-28T15:41:41.567Z" }, + { url = "https://files.pythonhosted.org/packages/47/79/c85e378eaa239e2edec0c5523f71542c7793fe3340954eafb0bc3904d32d/coverage-7.13.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:f80e2bb21bfab56ed7405c2d79d34b5dc0bc96c2c1d2a067b643a09fb756c43a", size = 219997, upload-time = "2025-12-28T15:41:43.418Z" }, + { url = "https://files.pythonhosted.org/packages/fe/9b/b1ade8bfb653c0bbce2d6d6e90cc6c254cbb99b7248531cc76253cb4da6d/coverage-7.13.1-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f83351e0f7dcdb14d7326c3d8d8c4e915fa685cbfdc6281f9470d97a04e9dfe4", size = 261296, upload-time = "2025-12-28T15:41:45.207Z" }, + { url = "https://files.pythonhosted.org/packages/1f/af/ebf91e3e1a2473d523e87e87fd8581e0aa08741b96265730e2d79ce78d8d/coverage-7.13.1-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:bb3f6562e89bad0110afbe64e485aac2462efdce6232cdec7862a095dc3412f6", size = 263363, upload-time = "2025-12-28T15:41:47.163Z" }, + { url = "https://files.pythonhosted.org/packages/c4/8b/fb2423526d446596624ac7fde12ea4262e66f86f5120114c3cfd0bb2befa/coverage-7.13.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:77545b5dcda13b70f872c3b5974ac64c21d05e65b1590b441c8560115dc3a0d1", size = 265783, upload-time = "2025-12-28T15:41:49.03Z" }, + { url = "https://files.pythonhosted.org/packages/9b/26/ef2adb1e22674913b89f0fe7490ecadcef4a71fa96f5ced90c60ec358789/coverage-7.13.1-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a4d240d260a1aed814790bbe1f10a5ff31ce6c21bc78f0da4a1e8268d6c80dbd", size = 260508, upload-time = "2025-12-28T15:41:51.035Z" }, + { url = "https://files.pythonhosted.org/packages/ce/7d/f0f59b3404caf662e7b5346247883887687c074ce67ba453ea08c612b1d5/coverage-7.13.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:d2287ac9360dec3837bfdad969963a5d073a09a85d898bd86bea82aa8876ef3c", size = 263357, upload-time = "2025-12-28T15:41:52.631Z" }, + { url = "https://files.pythonhosted.org/packages/1a/b1/29896492b0b1a047604d35d6fa804f12818fa30cdad660763a5f3159e158/coverage-7.13.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:0d2c11f3ea4db66b5cbded23b20185c35066892c67d80ec4be4bab257b9ad1e0", size = 260978, upload-time = "2025-12-28T15:41:54.589Z" }, + { url = "https://files.pythonhosted.org/packages/48/f2/971de1238a62e6f0a4128d37adadc8bb882ee96afbe03ff1570291754629/coverage-7.13.1-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:3fc6a169517ca0d7ca6846c3c5392ef2b9e38896f61d615cb75b9e7134d4ee1e", size = 259877, upload-time = "2025-12-28T15:41:56.263Z" }, + { url = "https://files.pythonhosted.org/packages/6a/fc/0474efcbb590ff8628830e9aaec5f1831594874360e3251f1fdec31d07a3/coverage-7.13.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:d10a2ed46386e850bb3de503a54f9fe8192e5917fcbb143bfef653a9355e9a53", size = 262069, upload-time = "2025-12-28T15:41:58.093Z" }, + { url = "https://files.pythonhosted.org/packages/88/4f/3c159b7953db37a7b44c0eab8a95c37d1aa4257c47b4602c04022d5cb975/coverage-7.13.1-cp313-cp313t-win32.whl", hash = "sha256:75a6f4aa904301dab8022397a22c0039edc1f51e90b83dbd4464b8a38dc87842", size = 222184, upload-time = "2025-12-28T15:41:59.763Z" }, + { url = "https://files.pythonhosted.org/packages/58/a5/6b57d28f81417f9335774f20679d9d13b9a8fb90cd6160957aa3b54a2379/coverage-7.13.1-cp313-cp313t-win_amd64.whl", hash = "sha256:309ef5706e95e62578cda256b97f5e097916a2c26247c287bbe74794e7150df2", size = 223250, upload-time = "2025-12-28T15:42:01.52Z" }, + { url = "https://files.pythonhosted.org/packages/81/7c/160796f3b035acfbb58be80e02e484548595aa67e16a6345e7910ace0a38/coverage-7.13.1-cp313-cp313t-win_arm64.whl", hash = "sha256:92f980729e79b5d16d221038dbf2e8f9a9136afa072f9d5d6ed4cb984b126a09", size = 221521, upload-time = "2025-12-28T15:42:03.275Z" }, + { url = "https://files.pythonhosted.org/packages/aa/8e/ba0e597560c6563fc0adb902fda6526df5d4aa73bb10adf0574d03bd2206/coverage-7.13.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:97ab3647280d458a1f9adb85244e81587505a43c0c7cff851f5116cd2814b894", size = 218996, upload-time = "2025-12-28T15:42:04.978Z" }, + { url = "https://files.pythonhosted.org/packages/6b/8e/764c6e116f4221dc7aa26c4061181ff92edb9c799adae6433d18eeba7a14/coverage-7.13.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:8f572d989142e0908e6acf57ad1b9b86989ff057c006d13b76c146ec6a20216a", size = 219326, upload-time = "2025-12-28T15:42:06.691Z" }, + { url = "https://files.pythonhosted.org/packages/4f/a6/6130dc6d8da28cdcbb0f2bf8865aeca9b157622f7c0031e48c6cf9a0e591/coverage-7.13.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:d72140ccf8a147e94274024ff6fd8fb7811354cf7ef88b1f0a988ebaa5bc774f", size = 250374, upload-time = "2025-12-28T15:42:08.786Z" }, + { url = "https://files.pythonhosted.org/packages/82/2b/783ded568f7cd6b677762f780ad338bf4b4750205860c17c25f7c708995e/coverage-7.13.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:d3c9f051b028810f5a87c88e5d6e9af3c0ff32ef62763bf15d29f740453ca909", size = 252882, upload-time = "2025-12-28T15:42:10.515Z" }, + { url = "https://files.pythonhosted.org/packages/cd/b2/9808766d082e6a4d59eb0cc881a57fc1600eb2c5882813eefff8254f71b5/coverage-7.13.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f398ba4df52d30b1763f62eed9de5620dcde96e6f491f4c62686736b155aa6e4", size = 254218, upload-time = "2025-12-28T15:42:12.208Z" }, + { url = "https://files.pythonhosted.org/packages/44/ea/52a985bb447c871cb4d2e376e401116520991b597c85afdde1ea9ef54f2c/coverage-7.13.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:132718176cc723026d201e347f800cd1a9e4b62ccd3f82476950834dad501c75", size = 250391, upload-time = "2025-12-28T15:42:14.21Z" }, + { url = "https://files.pythonhosted.org/packages/7f/1d/125b36cc12310718873cfc8209ecfbc1008f14f4f5fa0662aa608e579353/coverage-7.13.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:9e549d642426e3579b3f4b92d0431543b012dcb6e825c91619d4e93b7363c3f9", size = 252239, upload-time = "2025-12-28T15:42:16.292Z" }, + { url = "https://files.pythonhosted.org/packages/6a/16/10c1c164950cade470107f9f14bbac8485f8fb8515f515fca53d337e4a7f/coverage-7.13.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:90480b2134999301eea795b3a9dbf606c6fbab1b489150c501da84a959442465", size = 250196, upload-time = "2025-12-28T15:42:18.54Z" }, + { url = "https://files.pythonhosted.org/packages/2a/c6/cd860fac08780c6fd659732f6ced1b40b79c35977c1356344e44d72ba6c4/coverage-7.13.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:e825dbb7f84dfa24663dd75835e7257f8882629fc11f03ecf77d84a75134b864", size = 250008, upload-time = "2025-12-28T15:42:20.365Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3a/a8c58d3d38f82a5711e1e0a67268362af48e1a03df27c03072ac30feefcf/coverage-7.13.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:623dcc6d7a7ba450bbdbeedbaa0c42b329bdae16491af2282f12a7e809be7eb9", size = 251671, upload-time = "2025-12-28T15:42:22.114Z" }, + { url = "https://files.pythonhosted.org/packages/f0/bc/fd4c1da651d037a1e3d53e8cb3f8182f4b53271ffa9a95a2e211bacc0349/coverage-7.13.1-cp314-cp314-win32.whl", hash = "sha256:6e73ebb44dca5f708dc871fe0b90cf4cff1a13f9956f747cc87b535a840386f5", size = 221777, upload-time = "2025-12-28T15:42:23.919Z" }, + { url = "https://files.pythonhosted.org/packages/4b/50/71acabdc8948464c17e90b5ffd92358579bd0910732c2a1c9537d7536aa6/coverage-7.13.1-cp314-cp314-win_amd64.whl", hash = "sha256:be753b225d159feb397bd0bf91ae86f689bad0da09d3b301478cd39b878ab31a", size = 222592, upload-time = "2025-12-28T15:42:25.619Z" }, + { url = "https://files.pythonhosted.org/packages/f7/c8/a6fb943081bb0cc926499c7907731a6dc9efc2cbdc76d738c0ab752f1a32/coverage-7.13.1-cp314-cp314-win_arm64.whl", hash = "sha256:228b90f613b25ba0019361e4ab81520b343b622fc657daf7e501c4ed6a2366c0", size = 221169, upload-time = "2025-12-28T15:42:27.629Z" }, + { url = "https://files.pythonhosted.org/packages/16/61/d5b7a0a0e0e40d62e59bc8c7aa1afbd86280d82728ba97f0673b746b78e2/coverage-7.13.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:60cfb538fe9ef86e5b2ab0ca8fc8d62524777f6c611dcaf76dc16fbe9b8e698a", size = 219730, upload-time = "2025-12-28T15:42:29.306Z" }, + { url = "https://files.pythonhosted.org/packages/a3/2c/8881326445fd071bb49514d1ce97d18a46a980712b51fee84f9ab42845b4/coverage-7.13.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:57dfc8048c72ba48a8c45e188d811e5efd7e49b387effc8fb17e97936dde5bf6", size = 220001, upload-time = "2025-12-28T15:42:31.319Z" }, + { url = "https://files.pythonhosted.org/packages/b5/d7/50de63af51dfa3a7f91cc37ad8fcc1e244b734232fbc8b9ab0f3c834a5cd/coverage-7.13.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3f2f725aa3e909b3c5fdb8192490bdd8e1495e85906af74fe6e34a2a77ba0673", size = 261370, upload-time = "2025-12-28T15:42:32.992Z" }, + { url = "https://files.pythonhosted.org/packages/e1/2c/d31722f0ec918fd7453b2758312729f645978d212b410cd0f7c2aed88a94/coverage-7.13.1-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9ee68b21909686eeb21dfcba2c3b81fee70dcf38b140dcd5aa70680995fa3aa5", size = 263485, upload-time = "2025-12-28T15:42:34.759Z" }, + { url = "https://files.pythonhosted.org/packages/fa/7a/2c114fa5c5fc08ba0777e4aec4c97e0b4a1afcb69c75f1f54cff78b073ab/coverage-7.13.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:724b1b270cb13ea2e6503476e34541a0b1f62280bc997eab443f87790202033d", size = 265890, upload-time = "2025-12-28T15:42:36.517Z" }, + { url = "https://files.pythonhosted.org/packages/65/d9/f0794aa1c74ceabc780fe17f6c338456bbc4e96bd950f2e969f48ac6fb20/coverage-7.13.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:916abf1ac5cf7eb16bc540a5bf75c71c43a676f5c52fcb9fe75a2bd75fb944e8", size = 260445, upload-time = "2025-12-28T15:42:38.646Z" }, + { url = "https://files.pythonhosted.org/packages/49/23/184b22a00d9bb97488863ced9454068c79e413cb23f472da6cbddc6cfc52/coverage-7.13.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:776483fd35b58d8afe3acbd9988d5de592ab6da2d2a865edfdbc9fdb43e7c486", size = 263357, upload-time = "2025-12-28T15:42:40.788Z" }, + { url = "https://files.pythonhosted.org/packages/7d/bd/58af54c0c9199ea4190284f389005779d7daf7bf3ce40dcd2d2b2f96da69/coverage-7.13.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:b6f3b96617e9852703f5b633ea01315ca45c77e879584f283c44127f0f1ec564", size = 260959, upload-time = "2025-12-28T15:42:42.808Z" }, + { url = "https://files.pythonhosted.org/packages/4b/2a/6839294e8f78a4891bf1df79d69c536880ba2f970d0ff09e7513d6e352e9/coverage-7.13.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:bd63e7b74661fed317212fab774e2a648bc4bb09b35f25474f8e3325d2945cd7", size = 259792, upload-time = "2025-12-28T15:42:44.818Z" }, + { url = "https://files.pythonhosted.org/packages/ba/c3/528674d4623283310ad676c5af7414b9850ab6d55c2300e8aa4b945ec554/coverage-7.13.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:933082f161bbb3e9f90d00990dc956120f608cdbcaeea15c4d897f56ef4fe416", size = 262123, upload-time = "2025-12-28T15:42:47.108Z" }, + { url = "https://files.pythonhosted.org/packages/06/c5/8c0515692fb4c73ac379d8dc09b18eaf0214ecb76ea6e62467ba7a1556ff/coverage-7.13.1-cp314-cp314t-win32.whl", hash = "sha256:18be793c4c87de2965e1c0f060f03d9e5aff66cfeae8e1dbe6e5b88056ec153f", size = 222562, upload-time = "2025-12-28T15:42:49.144Z" }, + { url = "https://files.pythonhosted.org/packages/05/0e/c0a0c4678cb30dac735811db529b321d7e1c9120b79bd728d4f4d6b010e9/coverage-7.13.1-cp314-cp314t-win_amd64.whl", hash = "sha256:0e42e0ec0cd3e0d851cb3c91f770c9301f48647cb2877cb78f74bdaa07639a79", size = 223670, upload-time = "2025-12-28T15:42:51.218Z" }, + { url = "https://files.pythonhosted.org/packages/f5/5f/b177aa0011f354abf03a8f30a85032686d290fdeed4222b27d36b4372a50/coverage-7.13.1-cp314-cp314t-win_arm64.whl", hash = "sha256:eaecf47ef10c72ece9a2a92118257da87e460e113b83cc0d2905cbbe931792b4", size = 221707, upload-time = "2025-12-28T15:42:53.034Z" }, + { url = "https://files.pythonhosted.org/packages/cc/48/d9f421cb8da5afaa1a64570d9989e00fb7955e6acddc5a12979f7666ef60/coverage-7.13.1-py3-none-any.whl", hash = "sha256:2016745cb3ba554469d02819d78958b571792bb68e31302610e898f80dd3a573", size = 210722, upload-time = "2025-12-28T15:42:54.901Z" }, +] + +[package.optional-dependencies] +toml = [ + { name = "tomli", marker = "python_full_version <= '3.11'" }, +] + +[[package]] +name = "cryptography" +version = "46.0.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9f/33/c00162f49c0e2fe8064a62cb92b93e50c74a72bc370ab92f86112b33ff62/cryptography-46.0.3.tar.gz", hash = "sha256:a8b17438104fed022ce745b362294d9ce35b4c2e45c1d958ad4a4b019285f4a1", size = 749258, upload-time = "2025-10-15T23:18:31.74Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1d/42/9c391dd801d6cf0d561b5890549d4b27bafcc53b39c31a817e69d87c625b/cryptography-46.0.3-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:109d4ddfadf17e8e7779c39f9b18111a09efb969a301a31e987416a0191ed93a", size = 7225004, upload-time = "2025-10-15T23:16:52.239Z" }, + { url = "https://files.pythonhosted.org/packages/1c/67/38769ca6b65f07461eb200e85fc1639b438bdc667be02cf7f2cd6a64601c/cryptography-46.0.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:09859af8466b69bc3c27bdf4f5d84a665e0f7ab5088412e9e2ec49758eca5cbc", size = 4296667, upload-time = "2025-10-15T23:16:54.369Z" }, + { url = "https://files.pythonhosted.org/packages/5c/49/498c86566a1d80e978b42f0d702795f69887005548c041636df6ae1ca64c/cryptography-46.0.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:01ca9ff2885f3acc98c29f1860552e37f6d7c7d013d7334ff2a9de43a449315d", size = 4450807, upload-time = "2025-10-15T23:16:56.414Z" }, + { url = "https://files.pythonhosted.org/packages/4b/0a/863a3604112174c8624a2ac3c038662d9e59970c7f926acdcfaed8d61142/cryptography-46.0.3-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:6eae65d4c3d33da080cff9c4ab1f711b15c1d9760809dad6ea763f3812d254cb", size = 4299615, upload-time = "2025-10-15T23:16:58.442Z" }, + { url = "https://files.pythonhosted.org/packages/64/02/b73a533f6b64a69f3cd3872acb6ebc12aef924d8d103133bb3ea750dc703/cryptography-46.0.3-cp311-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e5bf0ed4490068a2e72ac03d786693adeb909981cc596425d09032d372bcc849", size = 4016800, upload-time = "2025-10-15T23:17:00.378Z" }, + { url = "https://files.pythonhosted.org/packages/25/d5/16e41afbfa450cde85a3b7ec599bebefaef16b5c6ba4ec49a3532336ed72/cryptography-46.0.3-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:5ecfccd2329e37e9b7112a888e76d9feca2347f12f37918facbb893d7bb88ee8", size = 4984707, upload-time = "2025-10-15T23:17:01.98Z" }, + { url = "https://files.pythonhosted.org/packages/c9/56/e7e69b427c3878352c2fb9b450bd0e19ed552753491d39d7d0a2f5226d41/cryptography-46.0.3-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:a2c0cd47381a3229c403062f764160d57d4d175e022c1df84e168c6251a22eec", size = 4482541, upload-time = "2025-10-15T23:17:04.078Z" }, + { url = "https://files.pythonhosted.org/packages/78/f6/50736d40d97e8483172f1bb6e698895b92a223dba513b0ca6f06b2365339/cryptography-46.0.3-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:549e234ff32571b1f4076ac269fcce7a808d3bf98b76c8dd560e42dbc66d7d91", size = 4299464, upload-time = "2025-10-15T23:17:05.483Z" }, + { url = "https://files.pythonhosted.org/packages/00/de/d8e26b1a855f19d9994a19c702fa2e93b0456beccbcfe437eda00e0701f2/cryptography-46.0.3-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:c0a7bb1a68a5d3471880e264621346c48665b3bf1c3759d682fc0864c540bd9e", size = 4950838, upload-time = "2025-10-15T23:17:07.425Z" }, + { url = "https://files.pythonhosted.org/packages/8f/29/798fc4ec461a1c9e9f735f2fc58741b0daae30688f41b2497dcbc9ed1355/cryptography-46.0.3-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:10b01676fc208c3e6feeb25a8b83d81767e8059e1fe86e1dc62d10a3018fa926", size = 4481596, upload-time = "2025-10-15T23:17:09.343Z" }, + { url = "https://files.pythonhosted.org/packages/15/8d/03cd48b20a573adfff7652b76271078e3045b9f49387920e7f1f631d125e/cryptography-46.0.3-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:0abf1ffd6e57c67e92af68330d05760b7b7efb243aab8377e583284dbab72c71", size = 4426782, upload-time = "2025-10-15T23:17:11.22Z" }, + { url = "https://files.pythonhosted.org/packages/fa/b1/ebacbfe53317d55cf33165bda24c86523497a6881f339f9aae5c2e13e57b/cryptography-46.0.3-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a04bee9ab6a4da801eb9b51f1b708a1b5b5c9eb48c03f74198464c66f0d344ac", size = 4698381, upload-time = "2025-10-15T23:17:12.829Z" }, + { url = "https://files.pythonhosted.org/packages/96/92/8a6a9525893325fc057a01f654d7efc2c64b9de90413adcf605a85744ff4/cryptography-46.0.3-cp311-abi3-win32.whl", hash = "sha256:f260d0d41e9b4da1ed1e0f1ce571f97fe370b152ab18778e9e8f67d6af432018", size = 3055988, upload-time = "2025-10-15T23:17:14.65Z" }, + { url = "https://files.pythonhosted.org/packages/7e/bf/80fbf45253ea585a1e492a6a17efcb93467701fa79e71550a430c5e60df0/cryptography-46.0.3-cp311-abi3-win_amd64.whl", hash = "sha256:a9a3008438615669153eb86b26b61e09993921ebdd75385ddd748702c5adfddb", size = 3514451, upload-time = "2025-10-15T23:17:16.142Z" }, + { url = "https://files.pythonhosted.org/packages/2e/af/9b302da4c87b0beb9db4e756386a7c6c5b8003cd0e742277888d352ae91d/cryptography-46.0.3-cp311-abi3-win_arm64.whl", hash = "sha256:5d7f93296ee28f68447397bf5198428c9aeeab45705a55d53a6343455dcb2c3c", size = 2928007, upload-time = "2025-10-15T23:17:18.04Z" }, + { url = "https://files.pythonhosted.org/packages/f5/e2/a510aa736755bffa9d2f75029c229111a1d02f8ecd5de03078f4c18d91a3/cryptography-46.0.3-cp314-cp314t-macosx_10_9_universal2.whl", hash = "sha256:00a5e7e87938e5ff9ff5447ab086a5706a957137e6e433841e9d24f38a065217", size = 7158012, upload-time = "2025-10-15T23:17:19.982Z" }, + { url = "https://files.pythonhosted.org/packages/73/dc/9aa866fbdbb95b02e7f9d086f1fccfeebf8953509b87e3f28fff927ff8a0/cryptography-46.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c8daeb2d2174beb4575b77482320303f3d39b8e81153da4f0fb08eb5fe86a6c5", size = 4288728, upload-time = "2025-10-15T23:17:21.527Z" }, + { url = "https://files.pythonhosted.org/packages/c5/fd/bc1daf8230eaa075184cbbf5f8cd00ba9db4fd32d63fb83da4671b72ed8a/cryptography-46.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:39b6755623145ad5eff1dab323f4eae2a32a77a7abef2c5089a04a3d04366715", size = 4435078, upload-time = "2025-10-15T23:17:23.042Z" }, + { url = "https://files.pythonhosted.org/packages/82/98/d3bd5407ce4c60017f8ff9e63ffee4200ab3e23fe05b765cab805a7db008/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:db391fa7c66df6762ee3f00c95a89e6d428f4d60e7abc8328f4fe155b5ac6e54", size = 4293460, upload-time = "2025-10-15T23:17:24.885Z" }, + { url = "https://files.pythonhosted.org/packages/26/e9/e23e7900983c2b8af7a08098db406cf989d7f09caea7897e347598d4cd5b/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:78a97cf6a8839a48c49271cdcbd5cf37ca2c1d6b7fdd86cc864f302b5e9bf459", size = 3995237, upload-time = "2025-10-15T23:17:26.449Z" }, + { url = "https://files.pythonhosted.org/packages/91/15/af68c509d4a138cfe299d0d7ddb14afba15233223ebd933b4bbdbc7155d3/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:dfb781ff7eaa91a6f7fd41776ec37c5853c795d3b358d4896fdbb5df168af422", size = 4967344, upload-time = "2025-10-15T23:17:28.06Z" }, + { url = "https://files.pythonhosted.org/packages/ca/e3/8643d077c53868b681af077edf6b3cb58288b5423610f21c62aadcbe99f4/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:6f61efb26e76c45c4a227835ddeae96d83624fb0d29eb5df5b96e14ed1a0afb7", size = 4466564, upload-time = "2025-10-15T23:17:29.665Z" }, + { url = "https://files.pythonhosted.org/packages/0e/43/c1e8726fa59c236ff477ff2b5dc071e54b21e5a1e51aa2cee1676f1c986f/cryptography-46.0.3-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:23b1a8f26e43f47ceb6d6a43115f33a5a37d57df4ea0ca295b780ae8546e8044", size = 4292415, upload-time = "2025-10-15T23:17:31.686Z" }, + { url = "https://files.pythonhosted.org/packages/42/f9/2f8fefdb1aee8a8e3256a0568cffc4e6d517b256a2fe97a029b3f1b9fe7e/cryptography-46.0.3-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:b419ae593c86b87014b9be7396b385491ad7f320bde96826d0dd174459e54665", size = 4931457, upload-time = "2025-10-15T23:17:33.478Z" }, + { url = "https://files.pythonhosted.org/packages/79/30/9b54127a9a778ccd6d27c3da7563e9f2d341826075ceab89ae3b41bf5be2/cryptography-46.0.3-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:50fc3343ac490c6b08c0cf0d704e881d0d660be923fd3076db3e932007e726e3", size = 4466074, upload-time = "2025-10-15T23:17:35.158Z" }, + { url = "https://files.pythonhosted.org/packages/ac/68/b4f4a10928e26c941b1b6a179143af9f4d27d88fe84a6a3c53592d2e76bf/cryptography-46.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:22d7e97932f511d6b0b04f2bfd818d73dcd5928db509460aaf48384778eb6d20", size = 4420569, upload-time = "2025-10-15T23:17:37.188Z" }, + { url = "https://files.pythonhosted.org/packages/a3/49/3746dab4c0d1979888f125226357d3262a6dd40e114ac29e3d2abdf1ec55/cryptography-46.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:d55f3dffadd674514ad19451161118fd010988540cee43d8bc20675e775925de", size = 4681941, upload-time = "2025-10-15T23:17:39.236Z" }, + { url = "https://files.pythonhosted.org/packages/fd/30/27654c1dbaf7e4a3531fa1fc77986d04aefa4d6d78259a62c9dc13d7ad36/cryptography-46.0.3-cp314-cp314t-win32.whl", hash = "sha256:8a6e050cb6164d3f830453754094c086ff2d0b2f3a897a1d9820f6139a1f0914", size = 3022339, upload-time = "2025-10-15T23:17:40.888Z" }, + { url = "https://files.pythonhosted.org/packages/f6/30/640f34ccd4d2a1bc88367b54b926b781b5a018d65f404d409aba76a84b1c/cryptography-46.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:760f83faa07f8b64e9c33fc963d790a2edb24efb479e3520c14a45741cd9b2db", size = 3494315, upload-time = "2025-10-15T23:17:42.769Z" }, + { url = "https://files.pythonhosted.org/packages/ba/8b/88cc7e3bd0a8e7b861f26981f7b820e1f46aa9d26cc482d0feba0ecb4919/cryptography-46.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:516ea134e703e9fe26bcd1277a4b59ad30586ea90c365a87781d7887a646fe21", size = 2919331, upload-time = "2025-10-15T23:17:44.468Z" }, + { url = "https://files.pythonhosted.org/packages/fd/23/45fe7f376a7df8daf6da3556603b36f53475a99ce4faacb6ba2cf3d82021/cryptography-46.0.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:cb3d760a6117f621261d662bccc8ef5bc32ca673e037c83fbe565324f5c46936", size = 7218248, upload-time = "2025-10-15T23:17:46.294Z" }, + { url = "https://files.pythonhosted.org/packages/27/32/b68d27471372737054cbd34c84981f9edbc24fe67ca225d389799614e27f/cryptography-46.0.3-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4b7387121ac7d15e550f5cb4a43aef2559ed759c35df7336c402bb8275ac9683", size = 4294089, upload-time = "2025-10-15T23:17:48.269Z" }, + { url = "https://files.pythonhosted.org/packages/26/42/fa8389d4478368743e24e61eea78846a0006caffaf72ea24a15159215a14/cryptography-46.0.3-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:15ab9b093e8f09daab0f2159bb7e47532596075139dd74365da52ecc9cb46c5d", size = 4440029, upload-time = "2025-10-15T23:17:49.837Z" }, + { url = "https://files.pythonhosted.org/packages/5f/eb/f483db0ec5ac040824f269e93dd2bd8a21ecd1027e77ad7bdf6914f2fd80/cryptography-46.0.3-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:46acf53b40ea38f9c6c229599a4a13f0d46a6c3fa9ef19fc1a124d62e338dfa0", size = 4297222, upload-time = "2025-10-15T23:17:51.357Z" }, + { url = "https://files.pythonhosted.org/packages/fd/cf/da9502c4e1912cb1da3807ea3618a6829bee8207456fbbeebc361ec38ba3/cryptography-46.0.3-cp38-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:10ca84c4668d066a9878890047f03546f3ae0a6b8b39b697457b7757aaf18dbc", size = 4012280, upload-time = "2025-10-15T23:17:52.964Z" }, + { url = "https://files.pythonhosted.org/packages/6b/8f/9adb86b93330e0df8b3dcf03eae67c33ba89958fc2e03862ef1ac2b42465/cryptography-46.0.3-cp38-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:36e627112085bb3b81b19fed209c05ce2a52ee8b15d161b7c643a7d5a88491f3", size = 4978958, upload-time = "2025-10-15T23:17:54.965Z" }, + { url = "https://files.pythonhosted.org/packages/d1/a0/5fa77988289c34bdb9f913f5606ecc9ada1adb5ae870bd0d1054a7021cc4/cryptography-46.0.3-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:1000713389b75c449a6e979ffc7dcc8ac90b437048766cef052d4d30b8220971", size = 4473714, upload-time = "2025-10-15T23:17:56.754Z" }, + { url = "https://files.pythonhosted.org/packages/14/e5/fc82d72a58d41c393697aa18c9abe5ae1214ff6f2a5c18ac470f92777895/cryptography-46.0.3-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:b02cf04496f6576afffef5ddd04a0cb7d49cf6be16a9059d793a30b035f6b6ac", size = 4296970, upload-time = "2025-10-15T23:17:58.588Z" }, + { url = "https://files.pythonhosted.org/packages/78/06/5663ed35438d0b09056973994f1aec467492b33bd31da36e468b01ec1097/cryptography-46.0.3-cp38-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:71e842ec9bc7abf543b47cf86b9a743baa95f4677d22baa4c7d5c69e49e9bc04", size = 4940236, upload-time = "2025-10-15T23:18:00.897Z" }, + { url = "https://files.pythonhosted.org/packages/fc/59/873633f3f2dcd8a053b8dd1d38f783043b5fce589c0f6988bf55ef57e43e/cryptography-46.0.3-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:402b58fc32614f00980b66d6e56a5b4118e6cb362ae8f3fda141ba4689bd4506", size = 4472642, upload-time = "2025-10-15T23:18:02.749Z" }, + { url = "https://files.pythonhosted.org/packages/3d/39/8e71f3930e40f6877737d6f69248cf74d4e34b886a3967d32f919cc50d3b/cryptography-46.0.3-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ef639cb3372f69ec44915fafcd6698b6cc78fbe0c2ea41be867f6ed612811963", size = 4423126, upload-time = "2025-10-15T23:18:04.85Z" }, + { url = "https://files.pythonhosted.org/packages/cd/c7/f65027c2810e14c3e7268353b1681932b87e5a48e65505d8cc17c99e36ae/cryptography-46.0.3-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:3b51b8ca4f1c6453d8829e1eb7299499ca7f313900dd4d89a24b8b87c0a780d4", size = 4686573, upload-time = "2025-10-15T23:18:06.908Z" }, + { url = "https://files.pythonhosted.org/packages/0a/6e/1c8331ddf91ca4730ab3086a0f1be19c65510a33b5a441cb334e7a2d2560/cryptography-46.0.3-cp38-abi3-win32.whl", hash = "sha256:6276eb85ef938dc035d59b87c8a7dc559a232f954962520137529d77b18ff1df", size = 3036695, upload-time = "2025-10-15T23:18:08.672Z" }, + { url = "https://files.pythonhosted.org/packages/90/45/b0d691df20633eff80955a0fc7695ff9051ffce8b69741444bd9ed7bd0db/cryptography-46.0.3-cp38-abi3-win_amd64.whl", hash = "sha256:416260257577718c05135c55958b674000baef9a1c7d9e8f306ec60d71db850f", size = 3501720, upload-time = "2025-10-15T23:18:10.632Z" }, + { url = "https://files.pythonhosted.org/packages/e8/cb/2da4cc83f5edb9c3257d09e1e7ab7b23f049c7962cae8d842bbef0a9cec9/cryptography-46.0.3-cp38-abi3-win_arm64.whl", hash = "sha256:d89c3468de4cdc4f08a57e214384d0471911a3830fcdaf7a8cc587e42a866372", size = 2918740, upload-time = "2025-10-15T23:18:12.277Z" }, + { url = "https://files.pythonhosted.org/packages/d9/cd/1a8633802d766a0fa46f382a77e096d7e209e0817892929655fe0586ae32/cryptography-46.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a23582810fedb8c0bc47524558fb6c56aac3fc252cb306072fd2815da2a47c32", size = 3689163, upload-time = "2025-10-15T23:18:13.821Z" }, + { url = "https://files.pythonhosted.org/packages/4c/59/6b26512964ace6480c3e54681a9859c974172fb141c38df11eadd8416947/cryptography-46.0.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e7aec276d68421f9574040c26e2a7c3771060bc0cff408bae1dcb19d3ab1e63c", size = 3429474, upload-time = "2025-10-15T23:18:15.477Z" }, + { url = "https://files.pythonhosted.org/packages/06/8a/e60e46adab4362a682cf142c7dcb5bf79b782ab2199b0dcb81f55970807f/cryptography-46.0.3-pp311-pypy311_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7ce938a99998ed3c8aa7e7272dca1a610401ede816d36d0693907d863b10d9ea", size = 3698132, upload-time = "2025-10-15T23:18:17.056Z" }, + { url = "https://files.pythonhosted.org/packages/da/38/f59940ec4ee91e93d3311f7532671a5cef5570eb04a144bf203b58552d11/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:191bb60a7be5e6f54e30ba16fdfae78ad3a342a0599eb4193ba88e3f3d6e185b", size = 4243992, upload-time = "2025-10-15T23:18:18.695Z" }, + { url = "https://files.pythonhosted.org/packages/b0/0c/35b3d92ddebfdfda76bb485738306545817253d0a3ded0bfe80ef8e67aa5/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c70cc23f12726be8f8bc72e41d5065d77e4515efae3690326764ea1b07845cfb", size = 4409944, upload-time = "2025-10-15T23:18:20.597Z" }, + { url = "https://files.pythonhosted.org/packages/99/55/181022996c4063fc0e7666a47049a1ca705abb9c8a13830f074edb347495/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:9394673a9f4de09e28b5356e7fff97d778f8abad85c9d5ac4a4b7e25a0de7717", size = 4242957, upload-time = "2025-10-15T23:18:22.18Z" }, + { url = "https://files.pythonhosted.org/packages/ba/af/72cd6ef29f9c5f731251acadaeb821559fe25f10852f44a63374c9ca08c1/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:94cd0549accc38d1494e1f8de71eca837d0509d0d44bf11d158524b0e12cebf9", size = 4409447, upload-time = "2025-10-15T23:18:24.209Z" }, + { url = "https://files.pythonhosted.org/packages/0d/c3/e90f4a4feae6410f914f8ebac129b9ae7a8c92eb60a638012dde42030a9d/cryptography-46.0.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:6b5063083824e5509fdba180721d55909ffacccc8adbec85268b48439423d78c", size = 3438528, upload-time = "2025-10-15T23:18:26.227Z" }, +] + +[[package]] +name = "distlib" +version = "0.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz", hash = "sha256:feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d", size = 614605, upload-time = "2025-07-17T16:52:00.465Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/33/6b/e0547afaf41bf2c42e52430072fa5658766e3d65bd4b03a563d1b6336f57/distlib-0.4.0-py2.py3-none-any.whl", hash = "sha256:9659f7d87e46584a30b5780e43ac7a2143098441670ff0a49d5f9034c54a6c16", size = 469047, upload-time = "2025-07-17T16:51:58.613Z" }, +] + +[[package]] +name = "dnspython" +version = "2.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz", hash = "sha256:181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f", size = 368251, upload-time = "2025-09-07T18:58:00.022Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ba/5a/18ad964b0086c6e62e2e7500f7edc89e3faa45033c71c1893d34eed2b2de/dnspython-2.8.0-py3-none-any.whl", hash = "sha256:01d9bbc4a2d76bf0db7c1f729812ded6d912bd318d3b1cf81d30c0f845dbf3af", size = 331094, upload-time = "2025-09-07T18:57:58.071Z" }, +] + +[[package]] +name = "docutils" +version = "0.21.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f", size = 2204444, upload-time = "2024-04-23T18:57:18.24Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8f/d7/9322c609343d929e75e7e5e6255e614fcc67572cfd083959cdef3b7aad79/docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2", size = 587408, upload-time = "2024-04-23T18:57:14.835Z" }, +] + +[[package]] +name = "exceptiongroup" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions", marker = "python_full_version < '3.12'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" }, +] + +[[package]] +name = "filelock" +version = "3.20.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a7/23/ce7a1126827cedeb958fc043d61745754464eb56c5937c35bbf2b8e26f34/filelock-3.20.1.tar.gz", hash = "sha256:b8360948b351b80f420878d8516519a2204b07aefcdcfd24912a5d33127f188c", size = 19476, upload-time = "2025-12-15T23:54:28.027Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e3/7f/a1a97644e39e7316d850784c642093c99df1290a460df4ede27659056834/filelock-3.20.1-py3-none-any.whl", hash = "sha256:15d9e9a67306188a44baa72f569d2bfd803076269365fdea0934385da4dc361a", size = 16666, upload-time = "2025-12-15T23:54:26.874Z" }, +] + +[[package]] +name = "frozenlist" +version = "1.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz", hash = "sha256:3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad", size = 45875, upload-time = "2025-10-06T05:38:17.865Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/83/4a/557715d5047da48d54e659203b9335be7bfaafda2c3f627b7c47e0b3aaf3/frozenlist-1.8.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b37f6d31b3dcea7deb5e9696e529a6aa4a898adc33db82da12e4c60a7c4d2011", size = 86230, upload-time = "2025-10-06T05:35:23.699Z" }, + { url = "https://files.pythonhosted.org/packages/a2/fb/c85f9fed3ea8fe8740e5b46a59cc141c23b842eca617da8876cfce5f760e/frozenlist-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef2b7b394f208233e471abc541cc6991f907ffd47dc72584acee3147899d6565", size = 49621, upload-time = "2025-10-06T05:35:25.341Z" }, + { url = "https://files.pythonhosted.org/packages/63/70/26ca3f06aace16f2352796b08704338d74b6d1a24ca38f2771afbb7ed915/frozenlist-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a88f062f072d1589b7b46e951698950e7da00442fc1cacbe17e19e025dc327ad", size = 49889, upload-time = "2025-10-06T05:35:26.797Z" }, + { url = "https://files.pythonhosted.org/packages/5d/ed/c7895fd2fde7f3ee70d248175f9b6cdf792fb741ab92dc59cd9ef3bd241b/frozenlist-1.8.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f57fb59d9f385710aa7060e89410aeb5058b99e62f4d16b08b91986b9a2140c2", size = 219464, upload-time = "2025-10-06T05:35:28.254Z" }, + { url = "https://files.pythonhosted.org/packages/6b/83/4d587dccbfca74cb8b810472392ad62bfa100bf8108c7223eb4c4fa2f7b3/frozenlist-1.8.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:799345ab092bee59f01a915620b5d014698547afd011e691a208637312db9186", size = 221649, upload-time = "2025-10-06T05:35:29.454Z" }, + { url = "https://files.pythonhosted.org/packages/6a/c6/fd3b9cd046ec5fff9dab66831083bc2077006a874a2d3d9247dea93ddf7e/frozenlist-1.8.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c23c3ff005322a6e16f71bf8692fcf4d5a304aaafe1e262c98c6d4adc7be863e", size = 219188, upload-time = "2025-10-06T05:35:30.951Z" }, + { url = "https://files.pythonhosted.org/packages/ce/80/6693f55eb2e085fc8afb28cf611448fb5b90e98e068fa1d1b8d8e66e5c7d/frozenlist-1.8.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8a76ea0f0b9dfa06f254ee06053d93a600865b3274358ca48a352ce4f0798450", size = 231748, upload-time = "2025-10-06T05:35:32.101Z" }, + { url = "https://files.pythonhosted.org/packages/97/d6/e9459f7c5183854abd989ba384fe0cc1a0fb795a83c033f0571ec5933ca4/frozenlist-1.8.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c7366fe1418a6133d5aa824ee53d406550110984de7637d65a178010f759c6ef", size = 236351, upload-time = "2025-10-06T05:35:33.834Z" }, + { url = "https://files.pythonhosted.org/packages/97/92/24e97474b65c0262e9ecd076e826bfd1d3074adcc165a256e42e7b8a7249/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13d23a45c4cebade99340c4165bd90eeb4a56c6d8a9d8aa49568cac19a6d0dc4", size = 218767, upload-time = "2025-10-06T05:35:35.205Z" }, + { url = "https://files.pythonhosted.org/packages/ee/bf/dc394a097508f15abff383c5108cb8ad880d1f64a725ed3b90d5c2fbf0bb/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:e4a3408834f65da56c83528fb52ce7911484f0d1eaf7b761fc66001db1646eff", size = 235887, upload-time = "2025-10-06T05:35:36.354Z" }, + { url = "https://files.pythonhosted.org/packages/40/90/25b201b9c015dbc999a5baf475a257010471a1fa8c200c843fd4abbee725/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:42145cd2748ca39f32801dad54aeea10039da6f86e303659db90db1c4b614c8c", size = 228785, upload-time = "2025-10-06T05:35:37.949Z" }, + { url = "https://files.pythonhosted.org/packages/84/f4/b5bc148df03082f05d2dd30c089e269acdbe251ac9a9cf4e727b2dbb8a3d/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e2de870d16a7a53901e41b64ffdf26f2fbb8917b3e6ebf398098d72c5b20bd7f", size = 230312, upload-time = "2025-10-06T05:35:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/db/4b/87e95b5d15097c302430e647136b7d7ab2398a702390cf4c8601975709e7/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:20e63c9493d33ee48536600d1a5c95eefc870cd71e7ab037763d1fbb89cc51e7", size = 217650, upload-time = "2025-10-06T05:35:40.377Z" }, + { url = "https://files.pythonhosted.org/packages/e5/70/78a0315d1fea97120591a83e0acd644da638c872f142fd72a6cebee825f3/frozenlist-1.8.0-cp310-cp310-win32.whl", hash = "sha256:adbeebaebae3526afc3c96fad434367cafbfd1b25d72369a9e5858453b1bb71a", size = 39659, upload-time = "2025-10-06T05:35:41.863Z" }, + { url = "https://files.pythonhosted.org/packages/66/aa/3f04523fb189a00e147e60c5b2205126118f216b0aa908035c45336e27e4/frozenlist-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:667c3777ca571e5dbeb76f331562ff98b957431df140b54c85fd4d52eea8d8f6", size = 43837, upload-time = "2025-10-06T05:35:43.205Z" }, + { url = "https://files.pythonhosted.org/packages/39/75/1135feecdd7c336938bd55b4dc3b0dfc46d85b9be12ef2628574b28de776/frozenlist-1.8.0-cp310-cp310-win_arm64.whl", hash = "sha256:80f85f0a7cc86e7a54c46d99c9e1318ff01f4687c172ede30fd52d19d1da1c8e", size = 39989, upload-time = "2025-10-06T05:35:44.596Z" }, + { url = "https://files.pythonhosted.org/packages/bc/03/077f869d540370db12165c0aa51640a873fb661d8b315d1d4d67b284d7ac/frozenlist-1.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:09474e9831bc2b2199fad6da3c14c7b0fbdd377cce9d3d77131be28906cb7d84", size = 86912, upload-time = "2025-10-06T05:35:45.98Z" }, + { url = "https://files.pythonhosted.org/packages/df/b5/7610b6bd13e4ae77b96ba85abea1c8cb249683217ef09ac9e0ae93f25a91/frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:17c883ab0ab67200b5f964d2b9ed6b00971917d5d8a92df149dc2c9779208ee9", size = 50046, upload-time = "2025-10-06T05:35:47.009Z" }, + { url = "https://files.pythonhosted.org/packages/6e/ef/0e8f1fe32f8a53dd26bdd1f9347efe0778b0fddf62789ea683f4cc7d787d/frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa47e444b8ba08fffd1c18e8cdb9a75db1b6a27f17507522834ad13ed5922b93", size = 50119, upload-time = "2025-10-06T05:35:48.38Z" }, + { url = "https://files.pythonhosted.org/packages/11/b1/71a477adc7c36e5fb628245dfbdea2166feae310757dea848d02bd0689fd/frozenlist-1.8.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2552f44204b744fba866e573be4c1f9048d6a324dfe14475103fd51613eb1d1f", size = 231067, upload-time = "2025-10-06T05:35:49.97Z" }, + { url = "https://files.pythonhosted.org/packages/45/7e/afe40eca3a2dc19b9904c0f5d7edfe82b5304cb831391edec0ac04af94c2/frozenlist-1.8.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:957e7c38f250991e48a9a73e6423db1bb9dd14e722a10f6b8bb8e16a0f55f695", size = 233160, upload-time = "2025-10-06T05:35:51.729Z" }, + { url = "https://files.pythonhosted.org/packages/a6/aa/7416eac95603ce428679d273255ffc7c998d4132cfae200103f164b108aa/frozenlist-1.8.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8585e3bb2cdea02fc88ffa245069c36555557ad3609e83be0ec71f54fd4abb52", size = 228544, upload-time = "2025-10-06T05:35:53.246Z" }, + { url = "https://files.pythonhosted.org/packages/8b/3d/2a2d1f683d55ac7e3875e4263d28410063e738384d3adc294f5ff3d7105e/frozenlist-1.8.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:edee74874ce20a373d62dc28b0b18b93f645633c2943fd90ee9d898550770581", size = 243797, upload-time = "2025-10-06T05:35:54.497Z" }, + { url = "https://files.pythonhosted.org/packages/78/1e/2d5565b589e580c296d3bb54da08d206e797d941a83a6fdea42af23be79c/frozenlist-1.8.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c9a63152fe95756b85f31186bddf42e4c02c6321207fd6601a1c89ebac4fe567", size = 247923, upload-time = "2025-10-06T05:35:55.861Z" }, + { url = "https://files.pythonhosted.org/packages/aa/c3/65872fcf1d326a7f101ad4d86285c403c87be7d832b7470b77f6d2ed5ddc/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b6db2185db9be0a04fecf2f241c70b63b1a242e2805be291855078f2b404dd6b", size = 230886, upload-time = "2025-10-06T05:35:57.399Z" }, + { url = "https://files.pythonhosted.org/packages/a0/76/ac9ced601d62f6956f03cc794f9e04c81719509f85255abf96e2510f4265/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f4be2e3d8bc8aabd566f8d5b8ba7ecc09249d74ba3c9ed52e54dc23a293f0b92", size = 245731, upload-time = "2025-10-06T05:35:58.563Z" }, + { url = "https://files.pythonhosted.org/packages/b9/49/ecccb5f2598daf0b4a1415497eba4c33c1e8ce07495eb07d2860c731b8d5/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c8d1634419f39ea6f5c427ea2f90ca85126b54b50837f31497f3bf38266e853d", size = 241544, upload-time = "2025-10-06T05:35:59.719Z" }, + { url = "https://files.pythonhosted.org/packages/53/4b/ddf24113323c0bbcc54cb38c8b8916f1da7165e07b8e24a717b4a12cbf10/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1a7fa382a4a223773ed64242dbe1c9c326ec09457e6b8428efb4118c685c3dfd", size = 241806, upload-time = "2025-10-06T05:36:00.959Z" }, + { url = "https://files.pythonhosted.org/packages/a7/fb/9b9a084d73c67175484ba2789a59f8eebebd0827d186a8102005ce41e1ba/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:11847b53d722050808926e785df837353bd4d75f1d494377e59b23594d834967", size = 229382, upload-time = "2025-10-06T05:36:02.22Z" }, + { url = "https://files.pythonhosted.org/packages/95/a3/c8fb25aac55bf5e12dae5c5aa6a98f85d436c1dc658f21c3ac73f9fa95e5/frozenlist-1.8.0-cp311-cp311-win32.whl", hash = "sha256:27c6e8077956cf73eadd514be8fb04d77fc946a7fe9f7fe167648b0b9085cc25", size = 39647, upload-time = "2025-10-06T05:36:03.409Z" }, + { url = "https://files.pythonhosted.org/packages/0a/f5/603d0d6a02cfd4c8f2a095a54672b3cf967ad688a60fb9faf04fc4887f65/frozenlist-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:ac913f8403b36a2c8610bbfd25b8013488533e71e62b4b4adce9c86c8cea905b", size = 44064, upload-time = "2025-10-06T05:36:04.368Z" }, + { url = "https://files.pythonhosted.org/packages/5d/16/c2c9ab44e181f043a86f9a8f84d5124b62dbcb3a02c0977ec72b9ac1d3e0/frozenlist-1.8.0-cp311-cp311-win_arm64.whl", hash = "sha256:d4d3214a0f8394edfa3e303136d0575eece0745ff2b47bd2cb2e66dd92d4351a", size = 39937, upload-time = "2025-10-06T05:36:05.669Z" }, + { url = "https://files.pythonhosted.org/packages/69/29/948b9aa87e75820a38650af445d2ef2b6b8a6fab1a23b6bb9e4ef0be2d59/frozenlist-1.8.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:78f7b9e5d6f2fdb88cdde9440dc147259b62b9d3b019924def9f6478be254ac1", size = 87782, upload-time = "2025-10-06T05:36:06.649Z" }, + { url = "https://files.pythonhosted.org/packages/64/80/4f6e318ee2a7c0750ed724fa33a4bdf1eacdc5a39a7a24e818a773cd91af/frozenlist-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:229bf37d2e4acdaf808fd3f06e854a4a7a3661e871b10dc1f8f1896a3b05f18b", size = 50594, upload-time = "2025-10-06T05:36:07.69Z" }, + { url = "https://files.pythonhosted.org/packages/2b/94/5c8a2b50a496b11dd519f4a24cb5496cf125681dd99e94c604ccdea9419a/frozenlist-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f833670942247a14eafbb675458b4e61c82e002a148f49e68257b79296e865c4", size = 50448, upload-time = "2025-10-06T05:36:08.78Z" }, + { url = "https://files.pythonhosted.org/packages/6a/bd/d91c5e39f490a49df14320f4e8c80161cfcce09f1e2cde1edd16a551abb3/frozenlist-1.8.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:494a5952b1c597ba44e0e78113a7266e656b9794eec897b19ead706bd7074383", size = 242411, upload-time = "2025-10-06T05:36:09.801Z" }, + { url = "https://files.pythonhosted.org/packages/8f/83/f61505a05109ef3293dfb1ff594d13d64a2324ac3482be2cedc2be818256/frozenlist-1.8.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96f423a119f4777a4a056b66ce11527366a8bb92f54e541ade21f2374433f6d4", size = 243014, upload-time = "2025-10-06T05:36:11.394Z" }, + { url = "https://files.pythonhosted.org/packages/d8/cb/cb6c7b0f7d4023ddda30cf56b8b17494eb3a79e3fda666bf735f63118b35/frozenlist-1.8.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3462dd9475af2025c31cc61be6652dfa25cbfb56cbbf52f4ccfe029f38decaf8", size = 234909, upload-time = "2025-10-06T05:36:12.598Z" }, + { url = "https://files.pythonhosted.org/packages/31/c5/cd7a1f3b8b34af009fb17d4123c5a778b44ae2804e3ad6b86204255f9ec5/frozenlist-1.8.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4c800524c9cd9bac5166cd6f55285957fcfc907db323e193f2afcd4d9abd69b", size = 250049, upload-time = "2025-10-06T05:36:14.065Z" }, + { url = "https://files.pythonhosted.org/packages/c0/01/2f95d3b416c584a1e7f0e1d6d31998c4a795f7544069ee2e0962a4b60740/frozenlist-1.8.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d6a5df73acd3399d893dafc71663ad22534b5aa4f94e8a2fabfe856c3c1b6a52", size = 256485, upload-time = "2025-10-06T05:36:15.39Z" }, + { url = "https://files.pythonhosted.org/packages/ce/03/024bf7720b3abaebcff6d0793d73c154237b85bdf67b7ed55e5e9596dc9a/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:405e8fe955c2280ce66428b3ca55e12b3c4e9c336fb2103a4937e891c69a4a29", size = 237619, upload-time = "2025-10-06T05:36:16.558Z" }, + { url = "https://files.pythonhosted.org/packages/69/fa/f8abdfe7d76b731f5d8bd217827cf6764d4f1d9763407e42717b4bed50a0/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:908bd3f6439f2fef9e85031b59fd4f1297af54415fb60e4254a95f75b3cab3f3", size = 250320, upload-time = "2025-10-06T05:36:17.821Z" }, + { url = "https://files.pythonhosted.org/packages/f5/3c/b051329f718b463b22613e269ad72138cc256c540f78a6de89452803a47d/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:294e487f9ec720bd8ffcebc99d575f7eff3568a08a253d1ee1a0378754b74143", size = 246820, upload-time = "2025-10-06T05:36:19.046Z" }, + { url = "https://files.pythonhosted.org/packages/0f/ae/58282e8f98e444b3f4dd42448ff36fa38bef29e40d40f330b22e7108f565/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:74c51543498289c0c43656701be6b077f4b265868fa7f8a8859c197006efb608", size = 250518, upload-time = "2025-10-06T05:36:20.763Z" }, + { url = "https://files.pythonhosted.org/packages/8f/96/007e5944694d66123183845a106547a15944fbbb7154788cbf7272789536/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:776f352e8329135506a1d6bf16ac3f87bc25b28e765949282dcc627af36123aa", size = 239096, upload-time = "2025-10-06T05:36:22.129Z" }, + { url = "https://files.pythonhosted.org/packages/66/bb/852b9d6db2fa40be96f29c0d1205c306288f0684df8fd26ca1951d461a56/frozenlist-1.8.0-cp312-cp312-win32.whl", hash = "sha256:433403ae80709741ce34038da08511d4a77062aa924baf411ef73d1146e74faf", size = 39985, upload-time = "2025-10-06T05:36:23.661Z" }, + { url = "https://files.pythonhosted.org/packages/b8/af/38e51a553dd66eb064cdf193841f16f077585d4d28394c2fa6235cb41765/frozenlist-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:34187385b08f866104f0c0617404c8eb08165ab1272e884abc89c112e9c00746", size = 44591, upload-time = "2025-10-06T05:36:24.958Z" }, + { url = "https://files.pythonhosted.org/packages/a7/06/1dc65480ab147339fecc70797e9c2f69d9cea9cf38934ce08df070fdb9cb/frozenlist-1.8.0-cp312-cp312-win_arm64.whl", hash = "sha256:fe3c58d2f5db5fbd18c2987cba06d51b0529f52bc3a6cdc33d3f4eab725104bd", size = 40102, upload-time = "2025-10-06T05:36:26.333Z" }, + { url = "https://files.pythonhosted.org/packages/2d/40/0832c31a37d60f60ed79e9dfb5a92e1e2af4f40a16a29abcc7992af9edff/frozenlist-1.8.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8d92f1a84bb12d9e56f818b3a746f3efba93c1b63c8387a73dde655e1e42282a", size = 85717, upload-time = "2025-10-06T05:36:27.341Z" }, + { url = "https://files.pythonhosted.org/packages/30/ba/b0b3de23f40bc55a7057bd38434e25c34fa48e17f20ee273bbde5e0650f3/frozenlist-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:96153e77a591c8adc2ee805756c61f59fef4cf4073a9275ee86fe8cba41241f7", size = 49651, upload-time = "2025-10-06T05:36:28.855Z" }, + { url = "https://files.pythonhosted.org/packages/0c/ab/6e5080ee374f875296c4243c381bbdef97a9ac39c6e3ce1d5f7d42cb78d6/frozenlist-1.8.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f21f00a91358803399890ab167098c131ec2ddd5f8f5fd5fe9c9f2c6fcd91e40", size = 49417, upload-time = "2025-10-06T05:36:29.877Z" }, + { url = "https://files.pythonhosted.org/packages/d5/4e/e4691508f9477ce67da2015d8c00acd751e6287739123113a9fca6f1604e/frozenlist-1.8.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fb30f9626572a76dfe4293c7194a09fb1fe93ba94c7d4f720dfae3b646b45027", size = 234391, upload-time = "2025-10-06T05:36:31.301Z" }, + { url = "https://files.pythonhosted.org/packages/40/76/c202df58e3acdf12969a7895fd6f3bc016c642e6726aa63bd3025e0fc71c/frozenlist-1.8.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaa352d7047a31d87dafcacbabe89df0aa506abb5b1b85a2fb91bc3faa02d822", size = 233048, upload-time = "2025-10-06T05:36:32.531Z" }, + { url = "https://files.pythonhosted.org/packages/f9/c0/8746afb90f17b73ca5979c7a3958116e105ff796e718575175319b5bb4ce/frozenlist-1.8.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:03ae967b4e297f58f8c774c7eabcce57fe3c2434817d4385c50661845a058121", size = 226549, upload-time = "2025-10-06T05:36:33.706Z" }, + { url = "https://files.pythonhosted.org/packages/7e/eb/4c7eefc718ff72f9b6c4893291abaae5fbc0c82226a32dcd8ef4f7a5dbef/frozenlist-1.8.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f6292f1de555ffcc675941d65fffffb0a5bcd992905015f85d0592201793e0e5", size = 239833, upload-time = "2025-10-06T05:36:34.947Z" }, + { url = "https://files.pythonhosted.org/packages/c2/4e/e5c02187cf704224f8b21bee886f3d713ca379535f16893233b9d672ea71/frozenlist-1.8.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29548f9b5b5e3460ce7378144c3010363d8035cea44bc0bf02d57f5a685e084e", size = 245363, upload-time = "2025-10-06T05:36:36.534Z" }, + { url = "https://files.pythonhosted.org/packages/1f/96/cb85ec608464472e82ad37a17f844889c36100eed57bea094518bf270692/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ec3cc8c5d4084591b4237c0a272cc4f50a5b03396a47d9caaf76f5d7b38a4f11", size = 229314, upload-time = "2025-10-06T05:36:38.582Z" }, + { url = "https://files.pythonhosted.org/packages/5d/6f/4ae69c550e4cee66b57887daeebe006fe985917c01d0fff9caab9883f6d0/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:517279f58009d0b1f2e7c1b130b377a349405da3f7621ed6bfae50b10adf20c1", size = 243365, upload-time = "2025-10-06T05:36:40.152Z" }, + { url = "https://files.pythonhosted.org/packages/7a/58/afd56de246cf11780a40a2c28dc7cbabbf06337cc8ddb1c780a2d97e88d8/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:db1e72ede2d0d7ccb213f218df6a078a9c09a7de257c2fe8fcef16d5925230b1", size = 237763, upload-time = "2025-10-06T05:36:41.355Z" }, + { url = "https://files.pythonhosted.org/packages/cb/36/cdfaf6ed42e2644740d4a10452d8e97fa1c062e2a8006e4b09f1b5fd7d63/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b4dec9482a65c54a5044486847b8a66bf10c9cb4926d42927ec4e8fd5db7fed8", size = 240110, upload-time = "2025-10-06T05:36:42.716Z" }, + { url = "https://files.pythonhosted.org/packages/03/a8/9ea226fbefad669f11b52e864c55f0bd57d3c8d7eb07e9f2e9a0b39502e1/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:21900c48ae04d13d416f0e1e0c4d81f7931f73a9dfa0b7a8746fb2fe7dd970ed", size = 233717, upload-time = "2025-10-06T05:36:44.251Z" }, + { url = "https://files.pythonhosted.org/packages/1e/0b/1b5531611e83ba7d13ccc9988967ea1b51186af64c42b7a7af465dcc9568/frozenlist-1.8.0-cp313-cp313-win32.whl", hash = "sha256:8b7b94a067d1c504ee0b16def57ad5738701e4ba10cec90529f13fa03c833496", size = 39628, upload-time = "2025-10-06T05:36:45.423Z" }, + { url = "https://files.pythonhosted.org/packages/d8/cf/174c91dbc9cc49bc7b7aab74d8b734e974d1faa8f191c74af9b7e80848e6/frozenlist-1.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:878be833caa6a3821caf85eb39c5ba92d28e85df26d57afb06b35b2efd937231", size = 43882, upload-time = "2025-10-06T05:36:46.796Z" }, + { url = "https://files.pythonhosted.org/packages/c1/17/502cd212cbfa96eb1388614fe39a3fc9ab87dbbe042b66f97acb57474834/frozenlist-1.8.0-cp313-cp313-win_arm64.whl", hash = "sha256:44389d135b3ff43ba8cc89ff7f51f5a0bb6b63d829c8300f79a2fe4fe61bcc62", size = 39676, upload-time = "2025-10-06T05:36:47.8Z" }, + { url = "https://files.pythonhosted.org/packages/d2/5c/3bbfaa920dfab09e76946a5d2833a7cbdf7b9b4a91c714666ac4855b88b4/frozenlist-1.8.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:e25ac20a2ef37e91c1b39938b591457666a0fa835c7783c3a8f33ea42870db94", size = 89235, upload-time = "2025-10-06T05:36:48.78Z" }, + { url = "https://files.pythonhosted.org/packages/d2/d6/f03961ef72166cec1687e84e8925838442b615bd0b8854b54923ce5b7b8a/frozenlist-1.8.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07cdca25a91a4386d2e76ad992916a85038a9b97561bf7a3fd12d5d9ce31870c", size = 50742, upload-time = "2025-10-06T05:36:49.837Z" }, + { url = "https://files.pythonhosted.org/packages/1e/bb/a6d12b7ba4c3337667d0e421f7181c82dda448ce4e7ad7ecd249a16fa806/frozenlist-1.8.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4e0c11f2cc6717e0a741f84a527c52616140741cd812a50422f83dc31749fb52", size = 51725, upload-time = "2025-10-06T05:36:50.851Z" }, + { url = "https://files.pythonhosted.org/packages/bc/71/d1fed0ffe2c2ccd70b43714c6cab0f4188f09f8a67a7914a6b46ee30f274/frozenlist-1.8.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b3210649ee28062ea6099cfda39e147fa1bc039583c8ee4481cb7811e2448c51", size = 284533, upload-time = "2025-10-06T05:36:51.898Z" }, + { url = "https://files.pythonhosted.org/packages/c9/1f/fb1685a7b009d89f9bf78a42d94461bc06581f6e718c39344754a5d9bada/frozenlist-1.8.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:581ef5194c48035a7de2aefc72ac6539823bb71508189e5de01d60c9dcd5fa65", size = 292506, upload-time = "2025-10-06T05:36:53.101Z" }, + { url = "https://files.pythonhosted.org/packages/e6/3b/b991fe1612703f7e0d05c0cf734c1b77aaf7c7d321df4572e8d36e7048c8/frozenlist-1.8.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3ef2d026f16a2b1866e1d86fc4e1291e1ed8a387b2c333809419a2f8b3a77b82", size = 274161, upload-time = "2025-10-06T05:36:54.309Z" }, + { url = "https://files.pythonhosted.org/packages/ca/ec/c5c618767bcdf66e88945ec0157d7f6c4a1322f1473392319b7a2501ded7/frozenlist-1.8.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5500ef82073f599ac84d888e3a8c1f77ac831183244bfd7f11eaa0289fb30714", size = 294676, upload-time = "2025-10-06T05:36:55.566Z" }, + { url = "https://files.pythonhosted.org/packages/7c/ce/3934758637d8f8a88d11f0585d6495ef54b2044ed6ec84492a91fa3b27aa/frozenlist-1.8.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:50066c3997d0091c411a66e710f4e11752251e6d2d73d70d8d5d4c76442a199d", size = 300638, upload-time = "2025-10-06T05:36:56.758Z" }, + { url = "https://files.pythonhosted.org/packages/fc/4f/a7e4d0d467298f42de4b41cbc7ddaf19d3cfeabaf9ff97c20c6c7ee409f9/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:5c1c8e78426e59b3f8005e9b19f6ff46e5845895adbde20ece9218319eca6506", size = 283067, upload-time = "2025-10-06T05:36:57.965Z" }, + { url = "https://files.pythonhosted.org/packages/dc/48/c7b163063d55a83772b268e6d1affb960771b0e203b632cfe09522d67ea5/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:eefdba20de0d938cec6a89bd4d70f346a03108a19b9df4248d3cf0d88f1b0f51", size = 292101, upload-time = "2025-10-06T05:36:59.237Z" }, + { url = "https://files.pythonhosted.org/packages/9f/d0/2366d3c4ecdc2fd391e0afa6e11500bfba0ea772764d631bbf82f0136c9d/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:cf253e0e1c3ceb4aaff6df637ce033ff6535fb8c70a764a8f46aafd3d6ab798e", size = 289901, upload-time = "2025-10-06T05:37:00.811Z" }, + { url = "https://files.pythonhosted.org/packages/b8/94/daff920e82c1b70e3618a2ac39fbc01ae3e2ff6124e80739ce5d71c9b920/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:032efa2674356903cd0261c4317a561a6850f3ac864a63fc1583147fb05a79b0", size = 289395, upload-time = "2025-10-06T05:37:02.115Z" }, + { url = "https://files.pythonhosted.org/packages/e3/20/bba307ab4235a09fdcd3cc5508dbabd17c4634a1af4b96e0f69bfe551ebd/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6da155091429aeba16851ecb10a9104a108bcd32f6c1642867eadaee401c1c41", size = 283659, upload-time = "2025-10-06T05:37:03.711Z" }, + { url = "https://files.pythonhosted.org/packages/fd/00/04ca1c3a7a124b6de4f8a9a17cc2fcad138b4608e7a3fc5877804b8715d7/frozenlist-1.8.0-cp313-cp313t-win32.whl", hash = "sha256:0f96534f8bfebc1a394209427d0f8a63d343c9779cda6fc25e8e121b5fd8555b", size = 43492, upload-time = "2025-10-06T05:37:04.915Z" }, + { url = "https://files.pythonhosted.org/packages/59/5e/c69f733a86a94ab10f68e496dc6b7e8bc078ebb415281d5698313e3af3a1/frozenlist-1.8.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5d63a068f978fc69421fb0e6eb91a9603187527c86b7cd3f534a5b77a592b888", size = 48034, upload-time = "2025-10-06T05:37:06.343Z" }, + { url = "https://files.pythonhosted.org/packages/16/6c/be9d79775d8abe79b05fa6d23da99ad6e7763a1d080fbae7290b286093fd/frozenlist-1.8.0-cp313-cp313t-win_arm64.whl", hash = "sha256:bf0a7e10b077bf5fb9380ad3ae8ce20ef919a6ad93b4552896419ac7e1d8e042", size = 41749, upload-time = "2025-10-06T05:37:07.431Z" }, + { url = "https://files.pythonhosted.org/packages/f1/c8/85da824b7e7b9b6e7f7705b2ecaf9591ba6f79c1177f324c2735e41d36a2/frozenlist-1.8.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cee686f1f4cadeb2136007ddedd0aaf928ab95216e7691c63e50a8ec066336d0", size = 86127, upload-time = "2025-10-06T05:37:08.438Z" }, + { url = "https://files.pythonhosted.org/packages/8e/e8/a1185e236ec66c20afd72399522f142c3724c785789255202d27ae992818/frozenlist-1.8.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:119fb2a1bd47307e899c2fac7f28e85b9a543864df47aa7ec9d3c1b4545f096f", size = 49698, upload-time = "2025-10-06T05:37:09.48Z" }, + { url = "https://files.pythonhosted.org/packages/a1/93/72b1736d68f03fda5fdf0f2180fb6caaae3894f1b854d006ac61ecc727ee/frozenlist-1.8.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4970ece02dbc8c3a92fcc5228e36a3e933a01a999f7094ff7c23fbd2beeaa67c", size = 49749, upload-time = "2025-10-06T05:37:10.569Z" }, + { url = "https://files.pythonhosted.org/packages/a7/b2/fabede9fafd976b991e9f1b9c8c873ed86f202889b864756f240ce6dd855/frozenlist-1.8.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:cba69cb73723c3f329622e34bdbf5ce1f80c21c290ff04256cff1cd3c2036ed2", size = 231298, upload-time = "2025-10-06T05:37:11.993Z" }, + { url = "https://files.pythonhosted.org/packages/3a/3b/d9b1e0b0eed36e70477ffb8360c49c85c8ca8ef9700a4e6711f39a6e8b45/frozenlist-1.8.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:778a11b15673f6f1df23d9586f83c4846c471a8af693a22e066508b77d201ec8", size = 232015, upload-time = "2025-10-06T05:37:13.194Z" }, + { url = "https://files.pythonhosted.org/packages/dc/94/be719d2766c1138148564a3960fc2c06eb688da592bdc25adcf856101be7/frozenlist-1.8.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0325024fe97f94c41c08872db482cf8ac4800d80e79222c6b0b7b162d5b13686", size = 225038, upload-time = "2025-10-06T05:37:14.577Z" }, + { url = "https://files.pythonhosted.org/packages/e4/09/6712b6c5465f083f52f50cf74167b92d4ea2f50e46a9eea0523d658454ae/frozenlist-1.8.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:97260ff46b207a82a7567b581ab4190bd4dfa09f4db8a8b49d1a958f6aa4940e", size = 240130, upload-time = "2025-10-06T05:37:15.781Z" }, + { url = "https://files.pythonhosted.org/packages/f8/d4/cd065cdcf21550b54f3ce6a22e143ac9e4836ca42a0de1022da8498eac89/frozenlist-1.8.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:54b2077180eb7f83dd52c40b2750d0a9f175e06a42e3213ce047219de902717a", size = 242845, upload-time = "2025-10-06T05:37:17.037Z" }, + { url = "https://files.pythonhosted.org/packages/62/c3/f57a5c8c70cd1ead3d5d5f776f89d33110b1addae0ab010ad774d9a44fb9/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2f05983daecab868a31e1da44462873306d3cbfd76d1f0b5b69c473d21dbb128", size = 229131, upload-time = "2025-10-06T05:37:18.221Z" }, + { url = "https://files.pythonhosted.org/packages/6c/52/232476fe9cb64f0742f3fde2b7d26c1dac18b6d62071c74d4ded55e0ef94/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:33f48f51a446114bc5d251fb2954ab0164d5be02ad3382abcbfe07e2531d650f", size = 240542, upload-time = "2025-10-06T05:37:19.771Z" }, + { url = "https://files.pythonhosted.org/packages/5f/85/07bf3f5d0fb5414aee5f47d33c6f5c77bfe49aac680bfece33d4fdf6a246/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:154e55ec0655291b5dd1b8731c637ecdb50975a2ae70c606d100750a540082f7", size = 237308, upload-time = "2025-10-06T05:37:20.969Z" }, + { url = "https://files.pythonhosted.org/packages/11/99/ae3a33d5befd41ac0ca2cc7fd3aa707c9c324de2e89db0e0f45db9a64c26/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:4314debad13beb564b708b4a496020e5306c7333fa9a3ab90374169a20ffab30", size = 238210, upload-time = "2025-10-06T05:37:22.252Z" }, + { url = "https://files.pythonhosted.org/packages/b2/60/b1d2da22f4970e7a155f0adde9b1435712ece01b3cd45ba63702aea33938/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:073f8bf8becba60aa931eb3bc420b217bb7d5b8f4750e6f8b3be7f3da85d38b7", size = 231972, upload-time = "2025-10-06T05:37:23.5Z" }, + { url = "https://files.pythonhosted.org/packages/3f/ab/945b2f32de889993b9c9133216c068b7fcf257d8595a0ac420ac8677cab0/frozenlist-1.8.0-cp314-cp314-win32.whl", hash = "sha256:bac9c42ba2ac65ddc115d930c78d24ab8d4f465fd3fc473cdedfccadb9429806", size = 40536, upload-time = "2025-10-06T05:37:25.581Z" }, + { url = "https://files.pythonhosted.org/packages/59/ad/9caa9b9c836d9ad6f067157a531ac48b7d36499f5036d4141ce78c230b1b/frozenlist-1.8.0-cp314-cp314-win_amd64.whl", hash = "sha256:3e0761f4d1a44f1d1a47996511752cf3dcec5bbdd9cc2b4fe595caf97754b7a0", size = 44330, upload-time = "2025-10-06T05:37:26.928Z" }, + { url = "https://files.pythonhosted.org/packages/82/13/e6950121764f2676f43534c555249f57030150260aee9dcf7d64efda11dd/frozenlist-1.8.0-cp314-cp314-win_arm64.whl", hash = "sha256:d1eaff1d00c7751b7c6662e9c5ba6eb2c17a2306ba5e2a37f24ddf3cc953402b", size = 40627, upload-time = "2025-10-06T05:37:28.075Z" }, + { url = "https://files.pythonhosted.org/packages/c0/c7/43200656ecc4e02d3f8bc248df68256cd9572b3f0017f0a0c4e93440ae23/frozenlist-1.8.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:d3bb933317c52d7ea5004a1c442eef86f426886fba134ef8cf4226ea6ee1821d", size = 89238, upload-time = "2025-10-06T05:37:29.373Z" }, + { url = "https://files.pythonhosted.org/packages/d1/29/55c5f0689b9c0fb765055629f472c0de484dcaf0acee2f7707266ae3583c/frozenlist-1.8.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:8009897cdef112072f93a0efdce29cd819e717fd2f649ee3016efd3cd885a7ed", size = 50738, upload-time = "2025-10-06T05:37:30.792Z" }, + { url = "https://files.pythonhosted.org/packages/ba/7d/b7282a445956506fa11da8c2db7d276adcbf2b17d8bb8407a47685263f90/frozenlist-1.8.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2c5dcbbc55383e5883246d11fd179782a9d07a986c40f49abe89ddf865913930", size = 51739, upload-time = "2025-10-06T05:37:32.127Z" }, + { url = "https://files.pythonhosted.org/packages/62/1c/3d8622e60d0b767a5510d1d3cf21065b9db874696a51ea6d7a43180a259c/frozenlist-1.8.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:39ecbc32f1390387d2aa4f5a995e465e9e2f79ba3adcac92d68e3e0afae6657c", size = 284186, upload-time = "2025-10-06T05:37:33.21Z" }, + { url = "https://files.pythonhosted.org/packages/2d/14/aa36d5f85a89679a85a1d44cd7a6657e0b1c75f61e7cad987b203d2daca8/frozenlist-1.8.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92db2bf818d5cc8d9c1f1fc56b897662e24ea5adb36ad1f1d82875bd64e03c24", size = 292196, upload-time = "2025-10-06T05:37:36.107Z" }, + { url = "https://files.pythonhosted.org/packages/05/23/6bde59eb55abd407d34f77d39a5126fb7b4f109a3f611d3929f14b700c66/frozenlist-1.8.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2dc43a022e555de94c3b68a4ef0b11c4f747d12c024a520c7101709a2144fb37", size = 273830, upload-time = "2025-10-06T05:37:37.663Z" }, + { url = "https://files.pythonhosted.org/packages/d2/3f/22cff331bfad7a8afa616289000ba793347fcd7bc275f3b28ecea2a27909/frozenlist-1.8.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cb89a7f2de3602cfed448095bab3f178399646ab7c61454315089787df07733a", size = 294289, upload-time = "2025-10-06T05:37:39.261Z" }, + { url = "https://files.pythonhosted.org/packages/a4/89/5b057c799de4838b6c69aa82b79705f2027615e01be996d2486a69ca99c4/frozenlist-1.8.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:33139dc858c580ea50e7e60a1b0ea003efa1fd42e6ec7fdbad78fff65fad2fd2", size = 300318, upload-time = "2025-10-06T05:37:43.213Z" }, + { url = "https://files.pythonhosted.org/packages/30/de/2c22ab3eb2a8af6d69dc799e48455813bab3690c760de58e1bf43b36da3e/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:168c0969a329b416119507ba30b9ea13688fafffac1b7822802537569a1cb0ef", size = 282814, upload-time = "2025-10-06T05:37:45.337Z" }, + { url = "https://files.pythonhosted.org/packages/59/f7/970141a6a8dbd7f556d94977858cfb36fa9b66e0892c6dd780d2219d8cd8/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:28bd570e8e189d7f7b001966435f9dac6718324b5be2990ac496cf1ea9ddb7fe", size = 291762, upload-time = "2025-10-06T05:37:46.657Z" }, + { url = "https://files.pythonhosted.org/packages/c1/15/ca1adae83a719f82df9116d66f5bb28bb95557b3951903d39135620ef157/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b2a095d45c5d46e5e79ba1e5b9cb787f541a8dee0433836cea4b96a2c439dcd8", size = 289470, upload-time = "2025-10-06T05:37:47.946Z" }, + { url = "https://files.pythonhosted.org/packages/ac/83/dca6dc53bf657d371fbc88ddeb21b79891e747189c5de990b9dfff2ccba1/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:eab8145831a0d56ec9c4139b6c3e594c7a83c2c8be25d5bcf2d86136a532287a", size = 289042, upload-time = "2025-10-06T05:37:49.499Z" }, + { url = "https://files.pythonhosted.org/packages/96/52/abddd34ca99be142f354398700536c5bd315880ed0a213812bc491cff5e4/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:974b28cf63cc99dfb2188d8d222bc6843656188164848c4f679e63dae4b0708e", size = 283148, upload-time = "2025-10-06T05:37:50.745Z" }, + { url = "https://files.pythonhosted.org/packages/af/d3/76bd4ed4317e7119c2b7f57c3f6934aba26d277acc6309f873341640e21f/frozenlist-1.8.0-cp314-cp314t-win32.whl", hash = "sha256:342c97bf697ac5480c0a7ec73cd700ecfa5a8a40ac923bd035484616efecc2df", size = 44676, upload-time = "2025-10-06T05:37:52.222Z" }, + { url = "https://files.pythonhosted.org/packages/89/76/c615883b7b521ead2944bb3480398cbb07e12b7b4e4d073d3752eb721558/frozenlist-1.8.0-cp314-cp314t-win_amd64.whl", hash = "sha256:06be8f67f39c8b1dc671f5d83aaefd3358ae5cdcf8314552c57e7ed3e6475bdd", size = 49451, upload-time = "2025-10-06T05:37:53.425Z" }, + { url = "https://files.pythonhosted.org/packages/e0/a3/5982da14e113d07b325230f95060e2169f5311b1017ea8af2a29b374c289/frozenlist-1.8.0-cp314-cp314t-win_arm64.whl", hash = "sha256:102e6314ca4da683dca92e3b1355490fed5f313b768500084fbe6371fddfdb79", size = 42507, upload-time = "2025-10-06T05:37:54.513Z" }, + { url = "https://files.pythonhosted.org/packages/9a/9a/e35b4a917281c0b8419d4207f4334c8e8c5dbf4f3f5f9ada73958d937dcc/frozenlist-1.8.0-py3-none-any.whl", hash = "sha256:0c18a16eab41e82c295618a77502e17b195883241c563b00f0aa5106fc4eaa0d", size = 13409, upload-time = "2025-10-06T05:38:16.721Z" }, +] + +[[package]] +name = "furo" +version = "2024.8.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "beautifulsoup4" }, + { name = "pygments" }, + { name = "sphinx" }, + { name = "sphinx-basic-ng" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a0/e2/d351d69a9a9e4badb4a5be062c2d0e87bd9e6c23b5e57337fef14bef34c8/furo-2024.8.6.tar.gz", hash = "sha256:b63e4cee8abfc3136d3bc03a3d45a76a850bada4d6374d24c1716b0e01394a01", size = 1661506, upload-time = "2024-08-06T08:07:57.567Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/48/e791a7ed487dbb9729ef32bb5d1af16693d8925f4366befef54119b2e576/furo-2024.8.6-py3-none-any.whl", hash = "sha256:6cd97c58b47813d3619e63e9081169880fbe331f0ca883c871ff1f3f11814f5c", size = 341333, upload-time = "2024-08-06T08:07:54.44Z" }, +] + +[[package]] +name = "h11" +version = "0.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, +] + +[[package]] +name = "hiredis" +version = "3.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/65/82/d2817ce0653628e0a0cb128533f6af0dd6318a49f3f3a6a7bd1f2f2154af/hiredis-3.3.0.tar.gz", hash = "sha256:105596aad9249634361815c574351f1bd50455dc23b537c2940066c4a9dea685", size = 89048, upload-time = "2025-10-14T16:33:34.263Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9f/44/20a95f4d5f9c0ffe4e5c095cd467545d4dc929840ab27f48c093dc364293/hiredis-3.3.0-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:9937d9b69321b393fbace69f55423480f098120bc55a3316e1ca3508c4dbbd6f", size = 81824, upload-time = "2025-10-14T16:31:46.655Z" }, + { url = "https://files.pythonhosted.org/packages/2a/d9/acfcbcc648fa42a37ed90286f5f71dc4fd012a4347d008b0c67a6ed79492/hiredis-3.3.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:50351b77f89ba6a22aff430b993653847f36b71d444509036baa0f2d79d1ebf4", size = 46047, upload-time = "2025-10-14T16:31:48.207Z" }, + { url = "https://files.pythonhosted.org/packages/ab/ad/fde44d70f6a5eed57dfebc6953a61cc69e6e331a673839f3fb7e186db606/hiredis-3.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1d00bce25c813eec45a2f524249f58daf51d38c9d3347f6f643ae53826fc735a", size = 41818, upload-time = "2025-10-14T16:31:49.242Z" }, + { url = "https://files.pythonhosted.org/packages/8e/99/175ef7110ada8ec6c247377f9b697d6c6237692313963fd666336e75f7bd/hiredis-3.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ef840d9f142556ed384180ed8cdf14ff875fcae55c980cbe5cec7adca2ef4d8", size = 167063, upload-time = "2025-10-14T16:31:50.032Z" }, + { url = "https://files.pythonhosted.org/packages/7f/0d/766366e1b9fe84cde707728ec847fc78ff9fdee05c4a186203e4da270ffe/hiredis-3.3.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:88bc79d7e9b94d17ed1bd8b7f2815ed0eada376ed5f48751044e5e4d179aa2f2", size = 178930, upload-time = "2025-10-14T16:31:50.871Z" }, + { url = "https://files.pythonhosted.org/packages/5f/ae/b0e532fef2eea0d16aeada2af5e40aa42ba6838748ef5f5b55f2fb2982e7/hiredis-3.3.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7165c7363e59b258e1875c51f35c0b2b9901e6c691037b487d8a0ace2c137ed2", size = 176735, upload-time = "2025-10-14T16:31:51.994Z" }, + { url = "https://files.pythonhosted.org/packages/4f/03/772b7b0f2464fb16fecb849127f34bace2983bb490eb59e89468b245033b/hiredis-3.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8c3be446f0c38fbe6863a7cf4522c9a463df6e64bee87c4402e9f6d7d2e7f869", size = 168800, upload-time = "2025-10-14T16:31:53.204Z" }, + { url = "https://files.pythonhosted.org/packages/fe/e5/d14302ac17684fe742613d44c9d39ddeb21e5239e0f74a34f60effd7bf8e/hiredis-3.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:96f9a27643279853b91a1fb94a88b559e55fdecec86f1fcd5f2561492be52e47", size = 163475, upload-time = "2025-10-14T16:31:54.33Z" }, + { url = "https://files.pythonhosted.org/packages/a6/cf/eaf1030e3afd55729f2764cde0d9dca8395a37680af13acc1f917e40b4a2/hiredis-3.3.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:0a5eebb170de1b415c78ae5ca3aee17cff8b885df93c2055d54320e789d838f4", size = 174188, upload-time = "2025-10-14T16:31:55.519Z" }, + { url = "https://files.pythonhosted.org/packages/92/94/6b000f417f6893525f76809ab27b09cc378ca5878a18b5e27bd09541f16a/hiredis-3.3.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:200678547ac3966bac3e38df188211fdc13d5f21509c23267e7def411710e112", size = 167143, upload-time = "2025-10-14T16:31:56.444Z" }, + { url = "https://files.pythonhosted.org/packages/6e/b2/cc593707b4f0e0f15fcf389d6a0d50898404453f442095e73e4e15164de1/hiredis-3.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:dd9d78c5363a858f9dc5e698e5e1e402b83c00226cba294f977a92c53092b549", size = 164898, upload-time = "2025-10-14T16:31:57.332Z" }, + { url = "https://files.pythonhosted.org/packages/5f/6c/521367e6fc8f428f14145bfb9936419253e3c844b3eeec4dd6f9920f6297/hiredis-3.3.0-cp310-cp310-win32.whl", hash = "sha256:a0d31ff178b913137a7a08c7377e93805914755a15c3585e203d0d74496456c0", size = 20394, upload-time = "2025-10-14T16:31:58.847Z" }, + { url = "https://files.pythonhosted.org/packages/ef/77/ecb24bcd1daa094030914bcf0a65d6ccc40b6c7b647939cd9e441d5d4686/hiredis-3.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:7b41833c8f0d4c7fbfaa867c8ed9a4e4aaa71d7c54e4806ed62da2d5cd27b40d", size = 22330, upload-time = "2025-10-14T16:31:59.57Z" }, + { url = "https://files.pythonhosted.org/packages/34/0c/be3b1093f93a7c823ca16fbfbb83d3a1de671bbd2add8da1fe2bcfccb2b8/hiredis-3.3.0-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:63ee6c1ae6a2462a2439eb93c38ab0315cd5f4b6d769c6a34903058ba538b5d6", size = 81813, upload-time = "2025-10-14T16:32:00.576Z" }, + { url = "https://files.pythonhosted.org/packages/95/2b/ed722d392ac59a7eee548d752506ef32c06ffdd0bce9cf91125a74b8edf9/hiredis-3.3.0-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:31eda3526e2065268a8f97fbe3d0e9a64ad26f1d89309e953c80885c511ea2ae", size = 46049, upload-time = "2025-10-14T16:32:01.319Z" }, + { url = "https://files.pythonhosted.org/packages/e5/61/8ace8027d5b3f6b28e1dc55f4a504be038ba8aa8bf71882b703e8f874c91/hiredis-3.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a26bae1b61b7bcafe3d0d0c7d012fb66ab3c95f2121dbea336df67e344e39089", size = 41814, upload-time = "2025-10-14T16:32:02.076Z" }, + { url = "https://files.pythonhosted.org/packages/23/0e/380ade1ffb21034976663a5128f0383533f35caccdba13ff0537dd5ace79/hiredis-3.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b9546079f7fd5c50fbff9c791710049b32eebe7f9b94debec1e8b9f4c048cba2", size = 167572, upload-time = "2025-10-14T16:32:03.125Z" }, + { url = "https://files.pythonhosted.org/packages/ca/60/b4a8d2177575b896730f73e6890644591aa56790a75c2b6d6f2302a1dae6/hiredis-3.3.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ae327fc13b1157b694d53f92d50920c0051e30b0c245f980a7036e299d039ab4", size = 179373, upload-time = "2025-10-14T16:32:04.04Z" }, + { url = "https://files.pythonhosted.org/packages/31/53/a473a18d27cfe8afda7772ff9adfba1718fd31d5e9c224589dc17774fa0b/hiredis-3.3.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4016e50a8be5740a59c5af5252e5ad16c395021a999ad24c6604f0d9faf4d346", size = 177504, upload-time = "2025-10-14T16:32:04.934Z" }, + { url = "https://files.pythonhosted.org/packages/7e/0f/f6ee4c26b149063dbf5b1b6894b4a7a1f00a50e3d0cfd30a22d4c3479db3/hiredis-3.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c17b473f273465a3d2168a57a5b43846165105ac217d5652a005e14068589ddc", size = 169449, upload-time = "2025-10-14T16:32:05.808Z" }, + { url = "https://files.pythonhosted.org/packages/64/38/e3e113172289e1261ccd43e387a577dd268b0b9270721b5678735803416c/hiredis-3.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9ecd9b09b11bd0b8af87d29c3f5da628d2bdc2a6c23d2dd264d2da082bd4bf32", size = 164010, upload-time = "2025-10-14T16:32:06.695Z" }, + { url = "https://files.pythonhosted.org/packages/8d/9a/ccf4999365691ea73d0dd2ee95ee6ef23ebc9a835a7417f81765bc49eade/hiredis-3.3.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:00fb04eac208cd575d14f246e74a468561081ce235937ab17d77cde73aefc66c", size = 174623, upload-time = "2025-10-14T16:32:07.627Z" }, + { url = "https://files.pythonhosted.org/packages/ed/c7/ee55fa2ade078b7c4f17e8ddc9bc28881d0b71b794ebf9db4cfe4c8f0623/hiredis-3.3.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:60814a7d0b718adf3bfe2c32c6878b0e00d6ae290ad8e47f60d7bba3941234a6", size = 167650, upload-time = "2025-10-14T16:32:08.615Z" }, + { url = "https://files.pythonhosted.org/packages/bf/06/f6cd90275dcb0ba03f69767805151eb60b602bc25830648bd607660e1f97/hiredis-3.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:fcbd1a15e935aa323b5b2534b38419511b7909b4b8ee548e42b59090a1b37bb1", size = 165452, upload-time = "2025-10-14T16:32:09.561Z" }, + { url = "https://files.pythonhosted.org/packages/c3/10/895177164a6c4409a07717b5ae058d84a908e1ab629f0401110b02aaadda/hiredis-3.3.0-cp311-cp311-win32.whl", hash = "sha256:73679607c5a19f4bcfc9cf6eb54480bcd26617b68708ac8b1079da9721be5449", size = 20394, upload-time = "2025-10-14T16:32:10.469Z" }, + { url = "https://files.pythonhosted.org/packages/3c/c7/1e8416ae4d4134cb62092c61cabd76b3d720507ee08edd19836cdeea4c7a/hiredis-3.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:30a4df3d48f32538de50648d44146231dde5ad7f84f8f08818820f426840ae97", size = 22336, upload-time = "2025-10-14T16:32:11.221Z" }, + { url = "https://files.pythonhosted.org/packages/48/1c/ed28ae5d704f5c7e85b946fa327f30d269e6272c847fef7e91ba5fc86193/hiredis-3.3.0-cp312-cp312-macosx_10_15_universal2.whl", hash = "sha256:5b8e1d6a2277ec5b82af5dce11534d3ed5dffeb131fd9b210bc1940643b39b5f", size = 82026, upload-time = "2025-10-14T16:32:12.004Z" }, + { url = "https://files.pythonhosted.org/packages/f4/9b/79f30c5c40e248291023b7412bfdef4ad9a8a92d9e9285d65d600817dac7/hiredis-3.3.0-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:c4981de4d335f996822419e8a8b3b87367fcef67dc5fb74d3bff4df9f6f17783", size = 46217, upload-time = "2025-10-14T16:32:13.133Z" }, + { url = "https://files.pythonhosted.org/packages/e7/c3/02b9ed430ad9087aadd8afcdf616717452d16271b701fa47edfe257b681e/hiredis-3.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1706480a683e328ae9ba5d704629dee2298e75016aa0207e7067b9c40cecc271", size = 41858, upload-time = "2025-10-14T16:32:13.98Z" }, + { url = "https://files.pythonhosted.org/packages/f1/98/b2a42878b82130a535c7aa20bc937ba2d07d72e9af3ad1ad93e837c419b5/hiredis-3.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0a95cef9989736ac313639f8f545b76b60b797e44e65834aabbb54e4fad8d6c8", size = 170195, upload-time = "2025-10-14T16:32:14.728Z" }, + { url = "https://files.pythonhosted.org/packages/66/1d/9dcde7a75115d3601b016113d9b90300726fa8e48aacdd11bf01a453c145/hiredis-3.3.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ca2802934557ccc28a954414c245ba7ad904718e9712cb67c05152cf6b9dd0a3", size = 181808, upload-time = "2025-10-14T16:32:15.622Z" }, + { url = "https://files.pythonhosted.org/packages/56/a1/60f6bda9b20b4e73c85f7f5f046bc2c154a5194fc94eb6861e1fd97ced52/hiredis-3.3.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fe730716775f61e76d75810a38ee4c349d3af3896450f1525f5a4034cf8f2ed7", size = 180578, upload-time = "2025-10-14T16:32:16.514Z" }, + { url = "https://files.pythonhosted.org/packages/d9/01/859d21de65085f323a701824e23ea3330a0ac05f8e184544d7aa5c26128d/hiredis-3.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:749faa69b1ce1f741f5eaf743435ac261a9262e2d2d66089192477e7708a9abc", size = 172508, upload-time = "2025-10-14T16:32:17.411Z" }, + { url = "https://files.pythonhosted.org/packages/99/a8/28fd526e554c80853d0fbf57ef2a3235f00e4ed34ce0e622e05d27d0f788/hiredis-3.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:95c9427f2ac3f1dd016a3da4e1161fa9d82f221346c8f3fdd6f3f77d4e28946c", size = 166341, upload-time = "2025-10-14T16:32:18.561Z" }, + { url = "https://files.pythonhosted.org/packages/f2/91/ded746b7d2914f557fbbf77be55e90d21f34ba758ae10db6591927c642c8/hiredis-3.3.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c863ee44fe7bff25e41f3a5105c936a63938b76299b802d758f40994ab340071", size = 176765, upload-time = "2025-10-14T16:32:19.491Z" }, + { url = "https://files.pythonhosted.org/packages/d6/4c/04aa46ff386532cb5f08ee495c2bf07303e93c0acf2fa13850e031347372/hiredis-3.3.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:2213c7eb8ad5267434891f3241c7776e3bafd92b5933fc57d53d4456247dc542", size = 170312, upload-time = "2025-10-14T16:32:20.404Z" }, + { url = "https://files.pythonhosted.org/packages/90/6e/67f9d481c63f542a9cf4c9f0ea4e5717db0312fb6f37fb1f78f3a66de93c/hiredis-3.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a172bae3e2837d74530cd60b06b141005075db1b814d966755977c69bd882ce8", size = 167965, upload-time = "2025-10-14T16:32:21.259Z" }, + { url = "https://files.pythonhosted.org/packages/7a/df/dde65144d59c3c0d85e43255798f1fa0c48d413e668cfd92b3d9f87924ef/hiredis-3.3.0-cp312-cp312-win32.whl", hash = "sha256:cb91363b9fd6d41c80df9795e12fffbaf5c399819e6ae8120f414dedce6de068", size = 20533, upload-time = "2025-10-14T16:32:22.192Z" }, + { url = "https://files.pythonhosted.org/packages/f5/a9/55a4ac9c16fdf32e92e9e22c49f61affe5135e177ca19b014484e28950f7/hiredis-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:04ec150e95eea3de9ff8bac754978aa17b8bf30a86d4ab2689862020945396b0", size = 22379, upload-time = "2025-10-14T16:32:22.916Z" }, + { url = "https://files.pythonhosted.org/packages/6d/39/2b789ebadd1548ccb04a2c18fbc123746ad1a7e248b7f3f3cac618ca10a6/hiredis-3.3.0-cp313-cp313-macosx_10_15_universal2.whl", hash = "sha256:b7048b4ec0d5dddc8ddd03da603de0c4b43ef2540bf6e4c54f47d23e3480a4fa", size = 82035, upload-time = "2025-10-14T16:32:23.715Z" }, + { url = "https://files.pythonhosted.org/packages/85/74/4066d9c1093be744158ede277f2a0a4e4cd0fefeaa525c79e2876e9e5c72/hiredis-3.3.0-cp313-cp313-macosx_10_15_x86_64.whl", hash = "sha256:e5f86ce5a779319c15567b79e0be806e8e92c18bb2ea9153e136312fafa4b7d6", size = 46219, upload-time = "2025-10-14T16:32:24.554Z" }, + { url = "https://files.pythonhosted.org/packages/fa/3f/f9e0f6d632f399d95b3635703e1558ffaa2de3aea4cfcbc2d7832606ba43/hiredis-3.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:fbdb97a942e66016fff034df48a7a184e2b7dc69f14c4acd20772e156f20d04b", size = 41860, upload-time = "2025-10-14T16:32:25.356Z" }, + { url = "https://files.pythonhosted.org/packages/4a/c5/b7dde5ec390dabd1cabe7b364a509c66d4e26de783b0b64cf1618f7149fc/hiredis-3.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b0fb4bea72fe45ff13e93ddd1352b43ff0749f9866263b5cca759a4c960c776f", size = 170094, upload-time = "2025-10-14T16:32:26.148Z" }, + { url = "https://files.pythonhosted.org/packages/3e/d6/7f05c08ee74d41613be466935688068e07f7b6c55266784b5ace7b35b766/hiredis-3.3.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:85b9baf98050e8f43c2826ab46aaf775090d608217baf7af7882596aef74e7f9", size = 181746, upload-time = "2025-10-14T16:32:27.844Z" }, + { url = "https://files.pythonhosted.org/packages/0e/d2/aaf9f8edab06fbf5b766e0cae3996324297c0516a91eb2ca3bd1959a0308/hiredis-3.3.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:69079fb0f0ebb61ba63340b9c4bce9388ad016092ca157e5772eb2818209d930", size = 180465, upload-time = "2025-10-14T16:32:29.185Z" }, + { url = "https://files.pythonhosted.org/packages/8d/1e/93ded8b9b484519b211fc71746a231af98c98928e3ebebb9086ed20bb1ad/hiredis-3.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c17f77b79031ea4b0967d30255d2ae6e7df0603ee2426ad3274067f406938236", size = 172419, upload-time = "2025-10-14T16:32:30.059Z" }, + { url = "https://files.pythonhosted.org/packages/68/13/02880458e02bbfcedcaabb8f7510f9dda1c89d7c1921b1bb28c22bb38cbf/hiredis-3.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:45d14f745fc177bc05fc24bdf20e2b515e9a068d3d4cce90a0fb78d04c9c9d9a", size = 166400, upload-time = "2025-10-14T16:32:31.173Z" }, + { url = "https://files.pythonhosted.org/packages/11/60/896e03267670570f19f61dc65a2137fcb2b06e83ab0911d58eeec9f3cb88/hiredis-3.3.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:ba063fdf1eff6377a0c409609cbe890389aefddfec109c2d20fcc19cfdafe9da", size = 176845, upload-time = "2025-10-14T16:32:32.12Z" }, + { url = "https://files.pythonhosted.org/packages/f1/90/a1d4bd0cdcf251fda72ac0bd932f547b48ad3420f89bb2ef91bf6a494534/hiredis-3.3.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:1799cc66353ad066bfdd410135c951959da9f16bcb757c845aab2f21fc4ef099", size = 170365, upload-time = "2025-10-14T16:32:33.035Z" }, + { url = "https://files.pythonhosted.org/packages/f1/9a/7c98f7bb76bdb4a6a6003cf8209721f083e65d2eed2b514f4a5514bda665/hiredis-3.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2cbf71a121996ffac82436b6153290815b746afb010cac19b3290a1644381b07", size = 168022, upload-time = "2025-10-14T16:32:34.81Z" }, + { url = "https://files.pythonhosted.org/packages/0d/ca/672ee658ffe9525558615d955b554ecd36aa185acd4431ccc9701c655c9b/hiredis-3.3.0-cp313-cp313-win32.whl", hash = "sha256:a7cbbc6026bf03659f0b25e94bbf6e64f6c8c22f7b4bc52fe569d041de274194", size = 20533, upload-time = "2025-10-14T16:32:35.7Z" }, + { url = "https://files.pythonhosted.org/packages/20/93/511fd94f6a7b6d72a4cf9c2b159bf3d780585a9a1dca52715dd463825299/hiredis-3.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:a8def89dd19d4e2e4482b7412d453dec4a5898954d9a210d7d05f60576cedef6", size = 22387, upload-time = "2025-10-14T16:32:36.441Z" }, + { url = "https://files.pythonhosted.org/packages/aa/b3/b948ee76a6b2bc7e45249861646f91f29704f743b52565cf64cee9c4658b/hiredis-3.3.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:c135bda87211f7af9e2fd4e046ab433c576cd17b69e639a0f5bb2eed5e0e71a9", size = 82105, upload-time = "2025-10-14T16:32:37.204Z" }, + { url = "https://files.pythonhosted.org/packages/a2/9b/4210f4ebfb3ab4ada964b8de08190f54cbac147198fb463cd3c111cc13e0/hiredis-3.3.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:2f855c678230aed6fc29b962ce1cc67e5858a785ef3a3fd6b15dece0487a2e60", size = 46237, upload-time = "2025-10-14T16:32:38.07Z" }, + { url = "https://files.pythonhosted.org/packages/b3/7a/e38bfd7d04c05036b4ccc6f42b86b1032185cf6ae426e112a97551fece14/hiredis-3.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4059c78a930cbb33c391452ccce75b137d6f89e2eebf6273d75dafc5c2143c03", size = 41894, upload-time = "2025-10-14T16:32:38.929Z" }, + { url = "https://files.pythonhosted.org/packages/28/d3/eae43d9609c5d9a6effef0586ee47e13a0d84b44264b688d97a75cd17ee5/hiredis-3.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:334a3f1d14c253bb092e187736c3384203bd486b244e726319bbb3f7dffa4a20", size = 170486, upload-time = "2025-10-14T16:32:40.147Z" }, + { url = "https://files.pythonhosted.org/packages/c3/fd/34d664554880b27741ab2916d66207357563b1639e2648685f4c84cfb755/hiredis-3.3.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd137b147235447b3d067ec952c5b9b95ca54b71837e1b38dbb2ec03b89f24fc", size = 182031, upload-time = "2025-10-14T16:32:41.06Z" }, + { url = "https://files.pythonhosted.org/packages/08/a3/0c69fdde3f4155b9f7acc64ccffde46f312781469260061b3bbaa487fd34/hiredis-3.3.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8f88f4f2aceb73329ece86a1cb0794fdbc8e6d614cb5ca2d1023c9b7eb432db8", size = 180542, upload-time = "2025-10-14T16:32:42.993Z" }, + { url = "https://files.pythonhosted.org/packages/68/7a/ad5da4d7bc241e57c5b0c4fe95aa75d1f2116e6e6c51577394d773216e01/hiredis-3.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:550f4d1538822fc75ebf8cf63adc396b23d4958bdbbad424521f2c0e3dfcb169", size = 172353, upload-time = "2025-10-14T16:32:43.965Z" }, + { url = "https://files.pythonhosted.org/packages/4b/dc/c46eace64eb047a5b31acd5e4b0dc6d2f0390a4a3f6d507442d9efa570ad/hiredis-3.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:54b14211fbd5930fc696f6fcd1f1f364c660970d61af065a80e48a1fa5464dd6", size = 166435, upload-time = "2025-10-14T16:32:44.97Z" }, + { url = "https://files.pythonhosted.org/packages/4a/ac/ad13a714e27883a2e4113c980c94caf46b801b810de5622c40f8d3e8335f/hiredis-3.3.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:c9e96f63dbc489fc86f69951e9f83dadb9582271f64f6822c47dcffa6fac7e4a", size = 177218, upload-time = "2025-10-14T16:32:45.936Z" }, + { url = "https://files.pythonhosted.org/packages/c2/38/268fabd85b225271fe1ba82cb4a484fcc1bf922493ff2c74b400f1a6f339/hiredis-3.3.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:106e99885d46684d62ab3ec1d6b01573cc0e0083ac295b11aaa56870b536c7ec", size = 170477, upload-time = "2025-10-14T16:32:46.898Z" }, + { url = "https://files.pythonhosted.org/packages/20/6b/02bb8af810ea04247334ab7148acff7a61c08a8832830c6703f464be83a9/hiredis-3.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:087e2ef3206361281b1a658b5b4263572b6ba99465253e827796964208680459", size = 167915, upload-time = "2025-10-14T16:32:47.847Z" }, + { url = "https://files.pythonhosted.org/packages/83/94/901fa817e667b2e69957626395e6dee416e31609dca738f28e6b545ca6c2/hiredis-3.3.0-cp314-cp314-win32.whl", hash = "sha256:80638ebeab1cefda9420e9fedc7920e1ec7b4f0513a6b23d58c9d13c882f8065", size = 21165, upload-time = "2025-10-14T16:32:50.753Z" }, + { url = "https://files.pythonhosted.org/packages/b1/7e/4881b9c1d0b4cdaba11bd10e600e97863f977ea9d67c5988f7ec8cd363e5/hiredis-3.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:a68aaf9ba024f4e28cf23df9196ff4e897bd7085872f3a30644dca07fa787816", size = 22996, upload-time = "2025-10-14T16:32:51.543Z" }, + { url = "https://files.pythonhosted.org/packages/a7/b6/d7e6c17da032665a954a89c1e6ee3bd12cb51cd78c37527842b03519981d/hiredis-3.3.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:f7f80442a32ce51ee5d89aeb5a84ee56189a0e0e875f1a57bbf8d462555ae48f", size = 83034, upload-time = "2025-10-14T16:32:52.395Z" }, + { url = "https://files.pythonhosted.org/packages/27/6c/6751b698060cdd1b2d8427702cff367c9ed7a1705bcf3792eb5b896f149b/hiredis-3.3.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:a1a67530da714954ed50579f4fe1ab0ddbac9c43643b1721c2cb226a50dde263", size = 46701, upload-time = "2025-10-14T16:32:53.572Z" }, + { url = "https://files.pythonhosted.org/packages/ce/8e/20a5cf2c83c7a7e08c76b9abab113f99f71cd57468a9c7909737ce6e9bf8/hiredis-3.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:616868352e47ab355559adca30f4f3859f9db895b4e7bc71e2323409a2add751", size = 42381, upload-time = "2025-10-14T16:32:54.762Z" }, + { url = "https://files.pythonhosted.org/packages/be/0a/547c29c06e8c9c337d0df3eec39da0cf1aad701daf8a9658dd37f25aca66/hiredis-3.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e799b79f3150083e9702fc37e6243c0bd47a443d6eae3f3077b0b3f510d6a145", size = 180313, upload-time = "2025-10-14T16:32:55.644Z" }, + { url = "https://files.pythonhosted.org/packages/89/8a/488de5469e3d0921a1c425045bf00e983d48b2111a90e47cf5769eaa536c/hiredis-3.3.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9ef1dfb0d2c92c3701655e2927e6bbe10c499aba632c7ea57b6392516df3864b", size = 190488, upload-time = "2025-10-14T16:32:56.649Z" }, + { url = "https://files.pythonhosted.org/packages/b5/59/8493edc3eb9ae0dbea2b2230c2041a52bc03e390b02ffa3ac0bca2af9aea/hiredis-3.3.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c290da6bc2a57e854c7da9956cd65013483ede935677e84560da3b848f253596", size = 189210, upload-time = "2025-10-14T16:32:57.759Z" }, + { url = "https://files.pythonhosted.org/packages/f0/de/8c9a653922057b32fb1e2546ecd43ef44c9aa1a7cf460c87cae507eb2bc7/hiredis-3.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fd8c438d9e1728f0085bf9b3c9484d19ec31f41002311464e75b69550c32ffa8", size = 180972, upload-time = "2025-10-14T16:32:58.737Z" }, + { url = "https://files.pythonhosted.org/packages/e4/a3/51e6e6afaef2990986d685ca6e254ffbd191f1635a59b2d06c9e5d10c8a2/hiredis-3.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:1bbc6b8a88bbe331e3ebf6685452cebca6dfe6d38a6d4efc5651d7e363ba28bd", size = 175315, upload-time = "2025-10-14T16:32:59.774Z" }, + { url = "https://files.pythonhosted.org/packages/96/54/e436312feb97601f70f8b39263b8da5ac4a5d18305ebdfb08ad7621f6119/hiredis-3.3.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:55d8c18fe9a05496c5c04e6eccc695169d89bf358dff964bcad95696958ec05f", size = 185653, upload-time = "2025-10-14T16:33:00.749Z" }, + { url = "https://files.pythonhosted.org/packages/ed/a3/88e66030d066337c6c0f883a912c6d4b2d6d7173490fbbc113a6cbe414ff/hiredis-3.3.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:4ddc79afa76b805d364e202a754666cb3c4d9c85153cbfed522871ff55827838", size = 179032, upload-time = "2025-10-14T16:33:01.711Z" }, + { url = "https://files.pythonhosted.org/packages/bc/1f/fb7375467e9adaa371cd617c2984fefe44bdce73add4c70b8dd8cab1b33a/hiredis-3.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8e8a4b8540581dcd1b2b25827a54cfd538e0afeaa1a0e3ca87ad7126965981cc", size = 176127, upload-time = "2025-10-14T16:33:02.793Z" }, + { url = "https://files.pythonhosted.org/packages/66/14/0dc2b99209c400f3b8f24067273e9c3cb383d894e155830879108fb19e98/hiredis-3.3.0-cp314-cp314t-win32.whl", hash = "sha256:298593bb08487753b3afe6dc38bac2532e9bac8dcee8d992ef9977d539cc6776", size = 22024, upload-time = "2025-10-14T16:33:03.812Z" }, + { url = "https://files.pythonhosted.org/packages/b2/2f/8a0befeed8bbe142d5a6cf3b51e8cbe019c32a64a596b0ebcbc007a8f8f1/hiredis-3.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:b442b6ab038a6f3b5109874d2514c4edf389d8d8b553f10f12654548808683bc", size = 23808, upload-time = "2025-10-14T16:33:04.965Z" }, +] + +[[package]] +name = "identify" +version = "2.6.15" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ff/e7/685de97986c916a6d93b3876139e00eef26ad5bbbd61925d670ae8013449/identify-2.6.15.tar.gz", hash = "sha256:e4f4864b96c6557ef2a1e1c951771838f4edc9df3a72ec7118b338801b11c7bf", size = 99311, upload-time = "2025-10-02T17:43:40.631Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0f/1c/e5fd8f973d4f375adb21565739498e2e9a1e54c858a97b9a8ccfdc81da9b/identify-2.6.15-py2.py3-none-any.whl", hash = "sha256:1181ef7608e00704db228516541eb83a88a9f94433a8c80bb9b5bd54b1d81757", size = 99183, upload-time = "2025-10-02T17:43:39.137Z" }, +] + +[[package]] +name = "idna" +version = "3.11" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902", size = 194582, upload-time = "2025-10-12T14:55:20.501Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" }, +] + +[[package]] +name = "imagesize" +version = "1.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a7/84/62473fb57d61e31fef6e36d64a179c8781605429fd927b5dd608c997be31/imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a", size = 1280026, upload-time = "2022-07-01T12:21:05.687Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ff/62/85c4c919272577931d407be5ba5d71c20f0b616d31a0befe0ae45bb79abd/imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b", size = 8769, upload-time = "2022-07-01T12:21:02.467Z" }, +] + +[[package]] +name = "iniconfig" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + +[[package]] +name = "magic-filter" +version = "1.0.12" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e6/08/da7c2cc7398cc0376e8da599d6330a437c01d3eace2f2365f300e0f3f758/magic_filter-1.0.12.tar.gz", hash = "sha256:4751d0b579a5045d1dc250625c4c508c18c3def5ea6afaf3957cb4530d03f7f9", size = 11071, upload-time = "2023-10-01T12:33:19.006Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cc/75/f620449f0056eff0ec7c1b1e088f71068eb4e47a46eb54f6c065c6ad7675/magic_filter-1.0.12-py3-none-any.whl", hash = "sha256:e5929e544f310c2b1f154318db8c5cdf544dd658efa998172acd2e4ba0f6c6a6", size = 11335, upload-time = "2023-10-01T12:33:17.711Z" }, +] + +[[package]] +name = "markdown" +version = "3.10" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/ab/7dd27d9d863b3376fcf23a5a13cb5d024aed1db46f963f1b5735ae43b3be/markdown-3.10.tar.gz", hash = "sha256:37062d4f2aa4b2b6b32aefb80faa300f82cc790cb949a35b8caede34f2b68c0e", size = 364931, upload-time = "2025-11-03T19:51:15.007Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/70/81/54e3ce63502cd085a0c556652a4e1b919c45a446bd1e5300e10c44c8c521/markdown-3.10-py3-none-any.whl", hash = "sha256:b5b99d6951e2e4948d939255596523444c0e677c669700b1d17aa4a8a464cb7c", size = 107678, upload-time = "2025-11-03T19:51:13.887Z" }, +] + +[[package]] +name = "markdown-include" +version = "0.8.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ad/d8/66bf162fe6c1adb619f94a6da599323eecacf15b6d57469d0fd0421c10df/markdown-include-0.8.1.tar.gz", hash = "sha256:1d0623e0fc2757c38d35df53752768356162284259d259c486b4ab6285cdbbe3", size = 21873, upload-time = "2023-02-07T09:47:26.608Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d7/e2/c4d20b21a05fe0fee571649cebc05f7f72e80b1a743f932e7326125e6c9e/markdown_include-0.8.1-py3-none-any.whl", hash = "sha256:32f0635b9cfef46997b307e2430022852529f7a5b87c0075c504283e7cc7db53", size = 18837, upload-time = "2023-02-07T09:47:25.03Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e8/4b/3541d44f3937ba468b75da9eebcae497dcf67adb65caa16760b0a6807ebb/markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559", size = 11631, upload-time = "2025-09-27T18:36:05.558Z" }, + { url = "https://files.pythonhosted.org/packages/98/1b/fbd8eed11021cabd9226c37342fa6ca4e8a98d8188a8d9b66740494960e4/markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419", size = 12057, upload-time = "2025-09-27T18:36:07.165Z" }, + { url = "https://files.pythonhosted.org/packages/40/01/e560d658dc0bb8ab762670ece35281dec7b6c1b33f5fbc09ebb57a185519/markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695", size = 22050, upload-time = "2025-09-27T18:36:08.005Z" }, + { url = "https://files.pythonhosted.org/packages/af/cd/ce6e848bbf2c32314c9b237839119c5a564a59725b53157c856e90937b7a/markupsafe-3.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591", size = 20681, upload-time = "2025-09-27T18:36:08.881Z" }, + { url = "https://files.pythonhosted.org/packages/c9/2a/b5c12c809f1c3045c4d580b035a743d12fcde53cf685dbc44660826308da/markupsafe-3.0.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c", size = 20705, upload-time = "2025-09-27T18:36:10.131Z" }, + { url = "https://files.pythonhosted.org/packages/cf/e3/9427a68c82728d0a88c50f890d0fc072a1484de2f3ac1ad0bfc1a7214fd5/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f", size = 21524, upload-time = "2025-09-27T18:36:11.324Z" }, + { url = "https://files.pythonhosted.org/packages/bc/36/23578f29e9e582a4d0278e009b38081dbe363c5e7165113fad546918a232/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6", size = 20282, upload-time = "2025-09-27T18:36:12.573Z" }, + { url = "https://files.pythonhosted.org/packages/56/21/dca11354e756ebd03e036bd8ad58d6d7168c80ce1fe5e75218e4945cbab7/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1", size = 20745, upload-time = "2025-09-27T18:36:13.504Z" }, + { url = "https://files.pythonhosted.org/packages/87/99/faba9369a7ad6e4d10b6a5fbf71fa2a188fe4a593b15f0963b73859a1bbd/markupsafe-3.0.3-cp310-cp310-win32.whl", hash = "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa", size = 14571, upload-time = "2025-09-27T18:36:14.779Z" }, + { url = "https://files.pythonhosted.org/packages/d6/25/55dc3ab959917602c96985cb1253efaa4ff42f71194bddeb61eb7278b8be/markupsafe-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8", size = 15056, upload-time = "2025-09-27T18:36:16.125Z" }, + { url = "https://files.pythonhosted.org/packages/d0/9e/0a02226640c255d1da0b8d12e24ac2aa6734da68bff14c05dd53b94a0fc3/markupsafe-3.0.3-cp310-cp310-win_arm64.whl", hash = "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1", size = 13932, upload-time = "2025-09-27T18:36:17.311Z" }, + { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" }, + { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" }, + { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" }, + { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" }, + { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" }, + { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" }, + { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" }, + { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" }, + { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" }, + { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" }, + { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" }, + { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" }, + { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" }, + { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" }, + { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" }, + { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" }, + { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" }, + { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" }, + { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" }, + { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" }, + { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" }, + { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" }, + { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" }, + { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" }, + { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" }, + { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" }, + { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" }, + { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" }, + { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" }, + { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" }, + { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" }, + { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" }, + { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" }, + { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" }, + { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" }, + { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" }, + { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" }, + { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" }, + { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" }, + { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" }, + { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" }, + { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" }, + { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" }, + { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" }, + { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" }, + { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" }, + { url = "https://files.pythonhosted.org/packages/41/3c/a36c2450754618e62008bf7435ccb0f88053e07592e6028a34776213d877/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", size = 23005, upload-time = "2025-09-27T18:37:10.58Z" }, + { url = "https://files.pythonhosted.org/packages/bc/20/b7fdf89a8456b099837cd1dc21974632a02a999ec9bf7ca3e490aacd98e7/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", size = 22048, upload-time = "2025-09-27T18:37:11.547Z" }, + { url = "https://files.pythonhosted.org/packages/9a/a7/591f592afdc734f47db08a75793a55d7fbcc6902a723ae4cfbab61010cc5/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", size = 23821, upload-time = "2025-09-27T18:37:12.48Z" }, + { url = "https://files.pythonhosted.org/packages/7d/33/45b24e4f44195b26521bc6f1a82197118f74df348556594bd2262bda1038/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", size = 21606, upload-time = "2025-09-27T18:37:13.485Z" }, + { url = "https://files.pythonhosted.org/packages/ff/0e/53dfaca23a69fbfbbf17a4b64072090e70717344c52eaaaa9c5ddff1e5f0/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", size = 23043, upload-time = "2025-09-27T18:37:14.408Z" }, + { url = "https://files.pythonhosted.org/packages/46/11/f333a06fc16236d5238bfe74daccbca41459dcd8d1fa952e8fbd5dccfb70/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", size = 14747, upload-time = "2025-09-27T18:37:15.36Z" }, + { url = "https://files.pythonhosted.org/packages/28/52/182836104b33b444e400b14f797212f720cbc9ed6ba34c800639d154e821/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", size = 15341, upload-time = "2025-09-27T18:37:16.496Z" }, + { url = "https://files.pythonhosted.org/packages/6f/18/acf23e91bd94fd7b3031558b1f013adfa21a8e407a3fdb32745538730382/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", size = 14073, upload-time = "2025-09-27T18:37:17.476Z" }, + { url = "https://files.pythonhosted.org/packages/3c/f0/57689aa4076e1b43b15fdfa646b04653969d50cf30c32a102762be2485da/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", size = 11661, upload-time = "2025-09-27T18:37:18.453Z" }, + { url = "https://files.pythonhosted.org/packages/89/c3/2e67a7ca217c6912985ec766c6393b636fb0c2344443ff9d91404dc4c79f/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", size = 12069, upload-time = "2025-09-27T18:37:19.332Z" }, + { url = "https://files.pythonhosted.org/packages/f0/00/be561dce4e6ca66b15276e184ce4b8aec61fe83662cce2f7d72bd3249d28/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", size = 25670, upload-time = "2025-09-27T18:37:20.245Z" }, + { url = "https://files.pythonhosted.org/packages/50/09/c419f6f5a92e5fadde27efd190eca90f05e1261b10dbd8cbcb39cd8ea1dc/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50", size = 23598, upload-time = "2025-09-27T18:37:21.177Z" }, + { url = "https://files.pythonhosted.org/packages/22/44/a0681611106e0b2921b3033fc19bc53323e0b50bc70cffdd19f7d679bb66/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", size = 23261, upload-time = "2025-09-27T18:37:22.167Z" }, + { url = "https://files.pythonhosted.org/packages/5f/57/1b0b3f100259dc9fffe780cfb60d4be71375510e435efec3d116b6436d43/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", size = 24835, upload-time = "2025-09-27T18:37:23.296Z" }, + { url = "https://files.pythonhosted.org/packages/26/6a/4bf6d0c97c4920f1597cc14dd720705eca0bf7c787aebc6bb4d1bead5388/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", size = 22733, upload-time = "2025-09-27T18:37:24.237Z" }, + { url = "https://files.pythonhosted.org/packages/14/c7/ca723101509b518797fedc2fdf79ba57f886b4aca8a7d31857ba3ee8281f/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", size = 23672, upload-time = "2025-09-27T18:37:25.271Z" }, + { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" }, + { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" }, + { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" }, +] + +[[package]] +name = "motor" +version = "3.7.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pymongo" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/93/ae/96b88362d6a84cb372f7977750ac2a8aed7b2053eed260615df08d5c84f4/motor-3.7.1.tar.gz", hash = "sha256:27b4d46625c87928f331a6ca9d7c51c2f518ba0e270939d395bc1ddc89d64526", size = 280997, upload-time = "2025-05-14T18:56:33.653Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/01/9a/35e053d4f442addf751ed20e0e922476508ee580786546d699b0567c4c67/motor-3.7.1-py3-none-any.whl", hash = "sha256:8a63b9049e38eeeb56b4fdd57c3312a6d1f25d01db717fe7d82222393c410298", size = 74996, upload-time = "2025-05-14T18:56:31.665Z" }, +] + +[[package]] +name = "motor-types" +version = "1.0.0b4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pymongo" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bf/3a/1c8e980100bce164546761d4e1cb21856ca4986f51db7d815ca0bc401df1/motor_types-1.0.0b4.tar.gz", hash = "sha256:ece2ec5283dfef1a4d3d693db15a010b6c56fea0d46697184e36880935a9f940", size = 11859, upload-time = "2023-12-22T08:36:41.364Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a8/68/25bd2b82f5ecb7aac1be927ad1be529604b9731ed52bcf9535945f6c7329/motor_types-1.0.0b4-py3-none-any.whl", hash = "sha256:6dc37c87a78acdbd658abbc4426ba3d239c4a26485a12325c65439cb7a2e27bf", size = 14339, upload-time = "2023-12-22T08:36:39.068Z" }, +] + +[[package]] +name = "multidict" +version = "6.7.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz", hash = "sha256:c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5", size = 101834, upload-time = "2025-10-06T14:52:30.657Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/63/7bdd4adc330abcca54c85728db2327130e49e52e8c3ce685cec44e0f2e9f/multidict-6.7.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9f474ad5acda359c8758c8accc22032c6abe6dc87a8be2440d097785e27a9349", size = 77153, upload-time = "2025-10-06T14:48:26.409Z" }, + { url = "https://files.pythonhosted.org/packages/3f/bb/b6c35ff175ed1a3142222b78455ee31be71a8396ed3ab5280fbe3ebe4e85/multidict-6.7.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4b7a9db5a870f780220e931d0002bbfd88fb53aceb6293251e2c839415c1b20e", size = 44993, upload-time = "2025-10-06T14:48:28.4Z" }, + { url = "https://files.pythonhosted.org/packages/e0/1f/064c77877c5fa6df6d346e68075c0f6998547afe952d6471b4c5f6a7345d/multidict-6.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:03ca744319864e92721195fa28c7a3b2bc7b686246b35e4078c1e4d0eb5466d3", size = 44607, upload-time = "2025-10-06T14:48:29.581Z" }, + { url = "https://files.pythonhosted.org/packages/04/7a/bf6aa92065dd47f287690000b3d7d332edfccb2277634cadf6a810463c6a/multidict-6.7.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f0e77e3c0008bc9316e662624535b88d360c3a5d3f81e15cf12c139a75250046", size = 241847, upload-time = "2025-10-06T14:48:32.107Z" }, + { url = "https://files.pythonhosted.org/packages/94/39/297a8de920f76eda343e4ce05f3b489f0ab3f9504f2576dfb37b7c08ca08/multidict-6.7.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:08325c9e5367aa379a3496aa9a022fe8837ff22e00b94db256d3a1378c76ab32", size = 242616, upload-time = "2025-10-06T14:48:34.054Z" }, + { url = "https://files.pythonhosted.org/packages/39/3a/d0eee2898cfd9d654aea6cb8c4addc2f9756e9a7e09391cfe55541f917f7/multidict-6.7.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e2862408c99f84aa571ab462d25236ef9cb12a602ea959ba9c9009a54902fc73", size = 222333, upload-time = "2025-10-06T14:48:35.9Z" }, + { url = "https://files.pythonhosted.org/packages/05/48/3b328851193c7a4240815b71eea165b49248867bbb6153a0aee227a0bb47/multidict-6.7.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4d72a9a2d885f5c208b0cb91ff2ed43636bb7e345ec839ff64708e04f69a13cc", size = 253239, upload-time = "2025-10-06T14:48:37.302Z" }, + { url = "https://files.pythonhosted.org/packages/b1/ca/0706a98c8d126a89245413225ca4a3fefc8435014de309cf8b30acb68841/multidict-6.7.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:478cc36476687bac1514d651cbbaa94b86b0732fb6855c60c673794c7dd2da62", size = 251618, upload-time = "2025-10-06T14:48:38.963Z" }, + { url = "https://files.pythonhosted.org/packages/5e/4f/9c7992f245554d8b173f6f0a048ad24b3e645d883f096857ec2c0822b8bd/multidict-6.7.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6843b28b0364dc605f21481c90fadb5f60d9123b442eb8a726bb74feef588a84", size = 241655, upload-time = "2025-10-06T14:48:40.312Z" }, + { url = "https://files.pythonhosted.org/packages/31/79/26a85991ae67efd1c0b1fc2e0c275b8a6aceeb155a68861f63f87a798f16/multidict-6.7.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:23bfeee5316266e5ee2d625df2d2c602b829435fc3a235c2ba2131495706e4a0", size = 239245, upload-time = "2025-10-06T14:48:41.848Z" }, + { url = "https://files.pythonhosted.org/packages/14/1e/75fa96394478930b79d0302eaf9a6c69f34005a1a5251ac8b9c336486ec9/multidict-6.7.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:680878b9f3d45c31e1f730eef731f9b0bc1da456155688c6745ee84eb818e90e", size = 233523, upload-time = "2025-10-06T14:48:43.749Z" }, + { url = "https://files.pythonhosted.org/packages/b2/5e/085544cb9f9c4ad2b5d97467c15f856df8d9bac410cffd5c43991a5d878b/multidict-6.7.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:eb866162ef2f45063acc7a53a88ef6fe8bf121d45c30ea3c9cd87ce7e191a8d4", size = 243129, upload-time = "2025-10-06T14:48:45.225Z" }, + { url = "https://files.pythonhosted.org/packages/b9/c3/e9d9e2f20c9474e7a8fcef28f863c5cbd29bb5adce6b70cebe8bdad0039d/multidict-6.7.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:df0e3bf7993bdbeca5ac25aa859cf40d39019e015c9c91809ba7093967f7a648", size = 248999, upload-time = "2025-10-06T14:48:46.703Z" }, + { url = "https://files.pythonhosted.org/packages/b5/3f/df171b6efa3239ae33b97b887e42671cd1d94d460614bfb2c30ffdab3b95/multidict-6.7.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:661709cdcd919a2ece2234f9bae7174e5220c80b034585d7d8a755632d3e2111", size = 243711, upload-time = "2025-10-06T14:48:48.146Z" }, + { url = "https://files.pythonhosted.org/packages/3c/2f/9b5564888c4e14b9af64c54acf149263721a283aaf4aa0ae89b091d5d8c1/multidict-6.7.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:096f52730c3fb8ed419db2d44391932b63891b2c5ed14850a7e215c0ba9ade36", size = 237504, upload-time = "2025-10-06T14:48:49.447Z" }, + { url = "https://files.pythonhosted.org/packages/6c/3a/0bd6ca0f7d96d790542d591c8c3354c1e1b6bfd2024d4d92dc3d87485ec7/multidict-6.7.0-cp310-cp310-win32.whl", hash = "sha256:afa8a2978ec65d2336305550535c9c4ff50ee527914328c8677b3973ade52b85", size = 41422, upload-time = "2025-10-06T14:48:50.789Z" }, + { url = "https://files.pythonhosted.org/packages/00/35/f6a637ea2c75f0d3b7c7d41b1189189acff0d9deeb8b8f35536bb30f5e33/multidict-6.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:b15b3afff74f707b9275d5ba6a91ae8f6429c3ffb29bbfd216b0b375a56f13d7", size = 46050, upload-time = "2025-10-06T14:48:51.938Z" }, + { url = "https://files.pythonhosted.org/packages/e7/b8/f7bf8329b39893d02d9d95cf610c75885d12fc0f402b1c894e1c8e01c916/multidict-6.7.0-cp310-cp310-win_arm64.whl", hash = "sha256:4b73189894398d59131a66ff157837b1fafea9974be486d036bb3d32331fdbf0", size = 43153, upload-time = "2025-10-06T14:48:53.146Z" }, + { url = "https://files.pythonhosted.org/packages/34/9e/5c727587644d67b2ed479041e4b1c58e30afc011e3d45d25bbe35781217c/multidict-6.7.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4d409aa42a94c0b3fa617708ef5276dfe81012ba6753a0370fcc9d0195d0a1fc", size = 76604, upload-time = "2025-10-06T14:48:54.277Z" }, + { url = "https://files.pythonhosted.org/packages/17/e4/67b5c27bd17c085a5ea8f1ec05b8a3e5cba0ca734bfcad5560fb129e70ca/multidict-6.7.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:14c9e076eede3b54c636f8ce1c9c252b5f057c62131211f0ceeec273810c9721", size = 44715, upload-time = "2025-10-06T14:48:55.445Z" }, + { url = "https://files.pythonhosted.org/packages/4d/e1/866a5d77be6ea435711bef2a4291eed11032679b6b28b56b4776ab06ba3e/multidict-6.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4c09703000a9d0fa3c3404b27041e574cc7f4df4c6563873246d0e11812a94b6", size = 44332, upload-time = "2025-10-06T14:48:56.706Z" }, + { url = "https://files.pythonhosted.org/packages/31/61/0c2d50241ada71ff61a79518db85ada85fdabfcf395d5968dae1cbda04e5/multidict-6.7.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a265acbb7bb33a3a2d626afbe756371dce0279e7b17f4f4eda406459c2b5ff1c", size = 245212, upload-time = "2025-10-06T14:48:58.042Z" }, + { url = "https://files.pythonhosted.org/packages/ac/e0/919666a4e4b57fff1b57f279be1c9316e6cdc5de8a8b525d76f6598fefc7/multidict-6.7.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:51cb455de290ae462593e5b1cb1118c5c22ea7f0d3620d9940bf695cea5a4bd7", size = 246671, upload-time = "2025-10-06T14:49:00.004Z" }, + { url = "https://files.pythonhosted.org/packages/a1/cc/d027d9c5a520f3321b65adea289b965e7bcbd2c34402663f482648c716ce/multidict-6.7.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:db99677b4457c7a5c5a949353e125ba72d62b35f74e26da141530fbb012218a7", size = 225491, upload-time = "2025-10-06T14:49:01.393Z" }, + { url = "https://files.pythonhosted.org/packages/75/c4/bbd633980ce6155a28ff04e6a6492dd3335858394d7bb752d8b108708558/multidict-6.7.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f470f68adc395e0183b92a2f4689264d1ea4b40504a24d9882c27375e6662bb9", size = 257322, upload-time = "2025-10-06T14:49:02.745Z" }, + { url = "https://files.pythonhosted.org/packages/4c/6d/d622322d344f1f053eae47e033b0b3f965af01212de21b10bcf91be991fb/multidict-6.7.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0db4956f82723cc1c270de9c6e799b4c341d327762ec78ef82bb962f79cc07d8", size = 254694, upload-time = "2025-10-06T14:49:04.15Z" }, + { url = "https://files.pythonhosted.org/packages/a8/9f/78f8761c2705d4c6d7516faed63c0ebdac569f6db1bef95e0d5218fdc146/multidict-6.7.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3e56d780c238f9e1ae66a22d2adf8d16f485381878250db8d496623cd38b22bd", size = 246715, upload-time = "2025-10-06T14:49:05.967Z" }, + { url = "https://files.pythonhosted.org/packages/78/59/950818e04f91b9c2b95aab3d923d9eabd01689d0dcd889563988e9ea0fd8/multidict-6.7.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9d14baca2ee12c1a64740d4531356ba50b82543017f3ad6de0deb943c5979abb", size = 243189, upload-time = "2025-10-06T14:49:07.37Z" }, + { url = "https://files.pythonhosted.org/packages/7a/3d/77c79e1934cad2ee74991840f8a0110966d9599b3af95964c0cd79bb905b/multidict-6.7.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:295a92a76188917c7f99cda95858c822f9e4aae5824246bba9b6b44004ddd0a6", size = 237845, upload-time = "2025-10-06T14:49:08.759Z" }, + { url = "https://files.pythonhosted.org/packages/63/1b/834ce32a0a97a3b70f86437f685f880136677ac00d8bce0027e9fd9c2db7/multidict-6.7.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:39f1719f57adbb767ef592a50ae5ebb794220d1188f9ca93de471336401c34d2", size = 246374, upload-time = "2025-10-06T14:49:10.574Z" }, + { url = "https://files.pythonhosted.org/packages/23/ef/43d1c3ba205b5dec93dc97f3fba179dfa47910fc73aaaea4f7ceb41cec2a/multidict-6.7.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:0a13fb8e748dfc94749f622de065dd5c1def7e0d2216dba72b1d8069a389c6ff", size = 253345, upload-time = "2025-10-06T14:49:12.331Z" }, + { url = "https://files.pythonhosted.org/packages/6b/03/eaf95bcc2d19ead522001f6a650ef32811aa9e3624ff0ad37c445c7a588c/multidict-6.7.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e3aa16de190d29a0ea1b48253c57d99a68492c8dd8948638073ab9e74dc9410b", size = 246940, upload-time = "2025-10-06T14:49:13.821Z" }, + { url = "https://files.pythonhosted.org/packages/e8/df/ec8a5fd66ea6cd6f525b1fcbb23511b033c3e9bc42b81384834ffa484a62/multidict-6.7.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a048ce45dcdaaf1defb76b2e684f997fb5abf74437b6cb7b22ddad934a964e34", size = 242229, upload-time = "2025-10-06T14:49:15.603Z" }, + { url = "https://files.pythonhosted.org/packages/8a/a2/59b405d59fd39ec86d1142630e9049243015a5f5291ba49cadf3c090c541/multidict-6.7.0-cp311-cp311-win32.whl", hash = "sha256:a90af66facec4cebe4181b9e62a68be65e45ac9b52b67de9eec118701856e7ff", size = 41308, upload-time = "2025-10-06T14:49:16.871Z" }, + { url = "https://files.pythonhosted.org/packages/32/0f/13228f26f8b882c34da36efa776c3b7348455ec383bab4a66390e42963ae/multidict-6.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:95b5ffa4349df2887518bb839409bcf22caa72d82beec453216802f475b23c81", size = 46037, upload-time = "2025-10-06T14:49:18.457Z" }, + { url = "https://files.pythonhosted.org/packages/84/1f/68588e31b000535a3207fd3c909ebeec4fb36b52c442107499c18a896a2a/multidict-6.7.0-cp311-cp311-win_arm64.whl", hash = "sha256:329aa225b085b6f004a4955271a7ba9f1087e39dcb7e65f6284a988264a63912", size = 43023, upload-time = "2025-10-06T14:49:19.648Z" }, + { url = "https://files.pythonhosted.org/packages/c2/9e/9f61ac18d9c8b475889f32ccfa91c9f59363480613fc807b6e3023d6f60b/multidict-6.7.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:8a3862568a36d26e650a19bb5cbbba14b71789032aebc0423f8cc5f150730184", size = 76877, upload-time = "2025-10-06T14:49:20.884Z" }, + { url = "https://files.pythonhosted.org/packages/38/6f/614f09a04e6184f8824268fce4bc925e9849edfa654ddd59f0b64508c595/multidict-6.7.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:960c60b5849b9b4f9dcc9bea6e3626143c252c74113df2c1540aebce70209b45", size = 45467, upload-time = "2025-10-06T14:49:22.054Z" }, + { url = "https://files.pythonhosted.org/packages/b3/93/c4f67a436dd026f2e780c433277fff72be79152894d9fc36f44569cab1a6/multidict-6.7.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2049be98fb57a31b4ccf870bf377af2504d4ae35646a19037ec271e4c07998aa", size = 43834, upload-time = "2025-10-06T14:49:23.566Z" }, + { url = "https://files.pythonhosted.org/packages/7f/f5/013798161ca665e4a422afbc5e2d9e4070142a9ff8905e482139cd09e4d0/multidict-6.7.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:0934f3843a1860dd465d38895c17fce1f1cb37295149ab05cd1b9a03afacb2a7", size = 250545, upload-time = "2025-10-06T14:49:24.882Z" }, + { url = "https://files.pythonhosted.org/packages/71/2f/91dbac13e0ba94669ea5119ba267c9a832f0cb65419aca75549fcf09a3dc/multidict-6.7.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b3e34f3a1b8131ba06f1a73adab24f30934d148afcd5f5de9a73565a4404384e", size = 258305, upload-time = "2025-10-06T14:49:26.778Z" }, + { url = "https://files.pythonhosted.org/packages/ef/b0/754038b26f6e04488b48ac621f779c341338d78503fb45403755af2df477/multidict-6.7.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:efbb54e98446892590dc2458c19c10344ee9a883a79b5cec4bc34d6656e8d546", size = 242363, upload-time = "2025-10-06T14:49:28.562Z" }, + { url = "https://files.pythonhosted.org/packages/87/15/9da40b9336a7c9fa606c4cf2ed80a649dffeb42b905d4f63a1d7eb17d746/multidict-6.7.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a35c5fc61d4f51eb045061e7967cfe3123d622cd500e8868e7c0c592a09fedc4", size = 268375, upload-time = "2025-10-06T14:49:29.96Z" }, + { url = "https://files.pythonhosted.org/packages/82/72/c53fcade0cc94dfaad583105fd92b3a783af2091eddcb41a6d5a52474000/multidict-6.7.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29fe6740ebccba4175af1b9b87bf553e9c15cd5868ee967e010efcf94e4fd0f1", size = 269346, upload-time = "2025-10-06T14:49:31.404Z" }, + { url = "https://files.pythonhosted.org/packages/0d/e2/9baffdae21a76f77ef8447f1a05a96ec4bc0a24dae08767abc0a2fe680b8/multidict-6.7.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:123e2a72e20537add2f33a79e605f6191fba2afda4cbb876e35c1a7074298a7d", size = 256107, upload-time = "2025-10-06T14:49:32.974Z" }, + { url = "https://files.pythonhosted.org/packages/3c/06/3f06f611087dc60d65ef775f1fb5aca7c6d61c6db4990e7cda0cef9b1651/multidict-6.7.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b284e319754366c1aee2267a2036248b24eeb17ecd5dc16022095e747f2f4304", size = 253592, upload-time = "2025-10-06T14:49:34.52Z" }, + { url = "https://files.pythonhosted.org/packages/20/24/54e804ec7945b6023b340c412ce9c3f81e91b3bf5fa5ce65558740141bee/multidict-6.7.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:803d685de7be4303b5a657b76e2f6d1240e7e0a8aa2968ad5811fa2285553a12", size = 251024, upload-time = "2025-10-06T14:49:35.956Z" }, + { url = "https://files.pythonhosted.org/packages/14/48/011cba467ea0b17ceb938315d219391d3e421dfd35928e5dbdc3f4ae76ef/multidict-6.7.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c04a328260dfd5db8c39538f999f02779012268f54614902d0afc775d44e0a62", size = 251484, upload-time = "2025-10-06T14:49:37.631Z" }, + { url = "https://files.pythonhosted.org/packages/0d/2f/919258b43bb35b99fa127435cfb2d91798eb3a943396631ef43e3720dcf4/multidict-6.7.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8a19cdb57cd3df4cd865849d93ee14920fb97224300c88501f16ecfa2604b4e0", size = 263579, upload-time = "2025-10-06T14:49:39.502Z" }, + { url = "https://files.pythonhosted.org/packages/31/22/a0e884d86b5242b5a74cf08e876bdf299e413016b66e55511f7a804a366e/multidict-6.7.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9b2fd74c52accced7e75de26023b7dccee62511a600e62311b918ec5c168fc2a", size = 259654, upload-time = "2025-10-06T14:49:41.32Z" }, + { url = "https://files.pythonhosted.org/packages/b2/e5/17e10e1b5c5f5a40f2fcbb45953c9b215f8a4098003915e46a93f5fcaa8f/multidict-6.7.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3e8bfdd0e487acf992407a140d2589fe598238eaeffa3da8448d63a63cd363f8", size = 251511, upload-time = "2025-10-06T14:49:46.021Z" }, + { url = "https://files.pythonhosted.org/packages/e3/9a/201bb1e17e7af53139597069c375e7b0dcbd47594604f65c2d5359508566/multidict-6.7.0-cp312-cp312-win32.whl", hash = "sha256:dd32a49400a2c3d52088e120ee00c1e3576cbff7e10b98467962c74fdb762ed4", size = 41895, upload-time = "2025-10-06T14:49:48.718Z" }, + { url = "https://files.pythonhosted.org/packages/46/e2/348cd32faad84eaf1d20cce80e2bb0ef8d312c55bca1f7fa9865e7770aaf/multidict-6.7.0-cp312-cp312-win_amd64.whl", hash = "sha256:92abb658ef2d7ef22ac9f8bb88e8b6c3e571671534e029359b6d9e845923eb1b", size = 46073, upload-time = "2025-10-06T14:49:50.28Z" }, + { url = "https://files.pythonhosted.org/packages/25/ec/aad2613c1910dce907480e0c3aa306905830f25df2e54ccc9dea450cb5aa/multidict-6.7.0-cp312-cp312-win_arm64.whl", hash = "sha256:490dab541a6a642ce1a9d61a4781656b346a55c13038f0b1244653828e3a83ec", size = 43226, upload-time = "2025-10-06T14:49:52.304Z" }, + { url = "https://files.pythonhosted.org/packages/d2/86/33272a544eeb36d66e4d9a920602d1a2f57d4ebea4ef3cdfe5a912574c95/multidict-6.7.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:bee7c0588aa0076ce77c0ea5d19a68d76ad81fcd9fe8501003b9a24f9d4000f6", size = 76135, upload-time = "2025-10-06T14:49:54.26Z" }, + { url = "https://files.pythonhosted.org/packages/91/1c/eb97db117a1ebe46d457a3d235a7b9d2e6dcab174f42d1b67663dd9e5371/multidict-6.7.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7ef6b61cad77091056ce0e7ce69814ef72afacb150b7ac6a3e9470def2198159", size = 45117, upload-time = "2025-10-06T14:49:55.82Z" }, + { url = "https://files.pythonhosted.org/packages/f1/d8/6c3442322e41fb1dd4de8bd67bfd11cd72352ac131f6368315617de752f1/multidict-6.7.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9c0359b1ec12b1d6849c59f9d319610b7f20ef990a6d454ab151aa0e3b9f78ca", size = 43472, upload-time = "2025-10-06T14:49:57.048Z" }, + { url = "https://files.pythonhosted.org/packages/75/3f/e2639e80325af0b6c6febdf8e57cc07043ff15f57fa1ef808f4ccb5ac4cd/multidict-6.7.0-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cd240939f71c64bd658f186330603aac1a9a81bf6273f523fca63673cb7378a8", size = 249342, upload-time = "2025-10-06T14:49:58.368Z" }, + { url = "https://files.pythonhosted.org/packages/5d/cc/84e0585f805cbeaa9cbdaa95f9a3d6aed745b9d25700623ac89a6ecff400/multidict-6.7.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a60a4d75718a5efa473ebd5ab685786ba0c67b8381f781d1be14da49f1a2dc60", size = 257082, upload-time = "2025-10-06T14:49:59.89Z" }, + { url = "https://files.pythonhosted.org/packages/b0/9c/ac851c107c92289acbbf5cfb485694084690c1b17e555f44952c26ddc5bd/multidict-6.7.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:53a42d364f323275126aff81fb67c5ca1b7a04fda0546245730a55c8c5f24bc4", size = 240704, upload-time = "2025-10-06T14:50:01.485Z" }, + { url = "https://files.pythonhosted.org/packages/50/cc/5f93e99427248c09da95b62d64b25748a5f5c98c7c2ab09825a1d6af0e15/multidict-6.7.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3b29b980d0ddbecb736735ee5bef69bb2ddca56eff603c86f3f29a1128299b4f", size = 266355, upload-time = "2025-10-06T14:50:02.955Z" }, + { url = "https://files.pythonhosted.org/packages/ec/0c/2ec1d883ceb79c6f7f6d7ad90c919c898f5d1c6ea96d322751420211e072/multidict-6.7.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f8a93b1c0ed2d04b97a5e9336fd2d33371b9a6e29ab7dd6503d63407c20ffbaf", size = 267259, upload-time = "2025-10-06T14:50:04.446Z" }, + { url = "https://files.pythonhosted.org/packages/c6/2d/f0b184fa88d6630aa267680bdb8623fb69cb0d024b8c6f0d23f9a0f406d3/multidict-6.7.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9ff96e8815eecacc6645da76c413eb3b3d34cfca256c70b16b286a687d013c32", size = 254903, upload-time = "2025-10-06T14:50:05.98Z" }, + { url = "https://files.pythonhosted.org/packages/06/c9/11ea263ad0df7dfabcad404feb3c0dd40b131bc7f232d5537f2fb1356951/multidict-6.7.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7516c579652f6a6be0e266aec0acd0db80829ca305c3d771ed898538804c2036", size = 252365, upload-time = "2025-10-06T14:50:07.511Z" }, + { url = "https://files.pythonhosted.org/packages/41/88/d714b86ee2c17d6e09850c70c9d310abac3d808ab49dfa16b43aba9d53fd/multidict-6.7.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:040f393368e63fb0f3330e70c26bfd336656bed925e5cbe17c9da839a6ab13ec", size = 250062, upload-time = "2025-10-06T14:50:09.074Z" }, + { url = "https://files.pythonhosted.org/packages/15/fe/ad407bb9e818c2b31383f6131ca19ea7e35ce93cf1310fce69f12e89de75/multidict-6.7.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b3bc26a951007b1057a1c543af845f1c7e3e71cc240ed1ace7bf4484aa99196e", size = 249683, upload-time = "2025-10-06T14:50:10.714Z" }, + { url = "https://files.pythonhosted.org/packages/8c/a4/a89abdb0229e533fb925e7c6e5c40201c2873efebc9abaf14046a4536ee6/multidict-6.7.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:7b022717c748dd1992a83e219587aabe45980d88969f01b316e78683e6285f64", size = 261254, upload-time = "2025-10-06T14:50:12.28Z" }, + { url = "https://files.pythonhosted.org/packages/8d/aa/0e2b27bd88b40a4fb8dc53dd74eecac70edaa4c1dd0707eb2164da3675b3/multidict-6.7.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:9600082733859f00d79dee64effc7aef1beb26adb297416a4ad2116fd61374bd", size = 257967, upload-time = "2025-10-06T14:50:14.16Z" }, + { url = "https://files.pythonhosted.org/packages/d0/8e/0c67b7120d5d5f6d874ed85a085f9dc770a7f9d8813e80f44a9fec820bb7/multidict-6.7.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:94218fcec4d72bc61df51c198d098ce2b378e0ccbac41ddbed5ef44092913288", size = 250085, upload-time = "2025-10-06T14:50:15.639Z" }, + { url = "https://files.pythonhosted.org/packages/ba/55/b73e1d624ea4b8fd4dd07a3bb70f6e4c7c6c5d9d640a41c6ffe5cdbd2a55/multidict-6.7.0-cp313-cp313-win32.whl", hash = "sha256:a37bd74c3fa9d00be2d7b8eca074dc56bd8077ddd2917a839bd989612671ed17", size = 41713, upload-time = "2025-10-06T14:50:17.066Z" }, + { url = "https://files.pythonhosted.org/packages/32/31/75c59e7d3b4205075b4c183fa4ca398a2daf2303ddf616b04ae6ef55cffe/multidict-6.7.0-cp313-cp313-win_amd64.whl", hash = "sha256:30d193c6cc6d559db42b6bcec8a5d395d34d60c9877a0b71ecd7c204fcf15390", size = 45915, upload-time = "2025-10-06T14:50:18.264Z" }, + { url = "https://files.pythonhosted.org/packages/31/2a/8987831e811f1184c22bc2e45844934385363ee61c0a2dcfa8f71b87e608/multidict-6.7.0-cp313-cp313-win_arm64.whl", hash = "sha256:ea3334cabe4d41b7ccd01e4d349828678794edbc2d3ae97fc162a3312095092e", size = 43077, upload-time = "2025-10-06T14:50:19.853Z" }, + { url = "https://files.pythonhosted.org/packages/e8/68/7b3a5170a382a340147337b300b9eb25a9ddb573bcdfff19c0fa3f31ffba/multidict-6.7.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:ad9ce259f50abd98a1ca0aa6e490b58c316a0fce0617f609723e40804add2c00", size = 83114, upload-time = "2025-10-06T14:50:21.223Z" }, + { url = "https://files.pythonhosted.org/packages/55/5c/3fa2d07c84df4e302060f555bbf539310980362236ad49f50eeb0a1c1eb9/multidict-6.7.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07f5594ac6d084cbb5de2df218d78baf55ef150b91f0ff8a21cc7a2e3a5a58eb", size = 48442, upload-time = "2025-10-06T14:50:22.871Z" }, + { url = "https://files.pythonhosted.org/packages/fc/56/67212d33239797f9bd91962bb899d72bb0f4c35a8652dcdb8ed049bef878/multidict-6.7.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0591b48acf279821a579282444814a2d8d0af624ae0bc600aa4d1b920b6e924b", size = 46885, upload-time = "2025-10-06T14:50:24.258Z" }, + { url = "https://files.pythonhosted.org/packages/46/d1/908f896224290350721597a61a69cd19b89ad8ee0ae1f38b3f5cd12ea2ac/multidict-6.7.0-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:749a72584761531d2b9467cfbdfd29487ee21124c304c4b6cb760d8777b27f9c", size = 242588, upload-time = "2025-10-06T14:50:25.716Z" }, + { url = "https://files.pythonhosted.org/packages/ab/67/8604288bbd68680eee0ab568fdcb56171d8b23a01bcd5cb0c8fedf6e5d99/multidict-6.7.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b4c3d199f953acd5b446bf7c0de1fe25d94e09e79086f8dc2f48a11a129cdf1", size = 249966, upload-time = "2025-10-06T14:50:28.192Z" }, + { url = "https://files.pythonhosted.org/packages/20/33/9228d76339f1ba51e3efef7da3ebd91964d3006217aae13211653193c3ff/multidict-6.7.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9fb0211dfc3b51efea2f349ec92c114d7754dd62c01f81c3e32b765b70c45c9b", size = 228618, upload-time = "2025-10-06T14:50:29.82Z" }, + { url = "https://files.pythonhosted.org/packages/f8/2d/25d9b566d10cab1c42b3b9e5b11ef79c9111eaf4463b8c257a3bd89e0ead/multidict-6.7.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a027ec240fe73a8d6281872690b988eed307cd7d91b23998ff35ff577ca688b5", size = 257539, upload-time = "2025-10-06T14:50:31.731Z" }, + { url = "https://files.pythonhosted.org/packages/b6/b1/8d1a965e6637fc33de3c0d8f414485c2b7e4af00f42cab3d84e7b955c222/multidict-6.7.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1d964afecdf3a8288789df2f5751dc0a8261138c3768d9af117ed384e538fad", size = 256345, upload-time = "2025-10-06T14:50:33.26Z" }, + { url = "https://files.pythonhosted.org/packages/ba/0c/06b5a8adbdeedada6f4fb8d8f193d44a347223b11939b42953eeb6530b6b/multidict-6.7.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:caf53b15b1b7df9fbd0709aa01409000a2b4dd03a5f6f5cc548183c7c8f8b63c", size = 247934, upload-time = "2025-10-06T14:50:34.808Z" }, + { url = "https://files.pythonhosted.org/packages/8f/31/b2491b5fe167ca044c6eb4b8f2c9f3b8a00b24c432c365358eadac5d7625/multidict-6.7.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:654030da3197d927f05a536a66186070e98765aa5142794c9904555d3a9d8fb5", size = 245243, upload-time = "2025-10-06T14:50:36.436Z" }, + { url = "https://files.pythonhosted.org/packages/61/1a/982913957cb90406c8c94f53001abd9eafc271cb3e70ff6371590bec478e/multidict-6.7.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:2090d3718829d1e484706a2f525e50c892237b2bf9b17a79b059cb98cddc2f10", size = 235878, upload-time = "2025-10-06T14:50:37.953Z" }, + { url = "https://files.pythonhosted.org/packages/be/c0/21435d804c1a1cf7a2608593f4d19bca5bcbd7a81a70b253fdd1c12af9c0/multidict-6.7.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:2d2cfeec3f6f45651b3d408c4acec0ebf3daa9bc8a112a084206f5db5d05b754", size = 243452, upload-time = "2025-10-06T14:50:39.574Z" }, + { url = "https://files.pythonhosted.org/packages/54/0a/4349d540d4a883863191be6eb9a928846d4ec0ea007d3dcd36323bb058ac/multidict-6.7.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:4ef089f985b8c194d341eb2c24ae6e7408c9a0e2e5658699c92f497437d88c3c", size = 252312, upload-time = "2025-10-06T14:50:41.612Z" }, + { url = "https://files.pythonhosted.org/packages/26/64/d5416038dbda1488daf16b676e4dbfd9674dde10a0cc8f4fc2b502d8125d/multidict-6.7.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e93a0617cd16998784bf4414c7e40f17a35d2350e5c6f0bd900d3a8e02bd3762", size = 246935, upload-time = "2025-10-06T14:50:43.972Z" }, + { url = "https://files.pythonhosted.org/packages/9f/8c/8290c50d14e49f35e0bd4abc25e1bc7711149ca9588ab7d04f886cdf03d9/multidict-6.7.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:f0feece2ef8ebc42ed9e2e8c78fc4aa3cf455733b507c09ef7406364c94376c6", size = 243385, upload-time = "2025-10-06T14:50:45.648Z" }, + { url = "https://files.pythonhosted.org/packages/ef/a0/f83ae75e42d694b3fbad3e047670e511c138be747bc713cf1b10d5096416/multidict-6.7.0-cp313-cp313t-win32.whl", hash = "sha256:19a1d55338ec1be74ef62440ca9e04a2f001a04d0cc49a4983dc320ff0f3212d", size = 47777, upload-time = "2025-10-06T14:50:47.154Z" }, + { url = "https://files.pythonhosted.org/packages/dc/80/9b174a92814a3830b7357307a792300f42c9e94664b01dee8e457551fa66/multidict-6.7.0-cp313-cp313t-win_amd64.whl", hash = "sha256:3da4fb467498df97e986af166b12d01f05d2e04f978a9c1c680ea1988e0bc4b6", size = 53104, upload-time = "2025-10-06T14:50:48.851Z" }, + { url = "https://files.pythonhosted.org/packages/cc/28/04baeaf0428d95bb7a7bea0e691ba2f31394338ba424fb0679a9ed0f4c09/multidict-6.7.0-cp313-cp313t-win_arm64.whl", hash = "sha256:b4121773c49a0776461f4a904cdf6264c88e42218aaa8407e803ca8025872792", size = 45503, upload-time = "2025-10-06T14:50:50.16Z" }, + { url = "https://files.pythonhosted.org/packages/e2/b1/3da6934455dd4b261d4c72f897e3a5728eba81db59959f3a639245891baa/multidict-6.7.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3bab1e4aff7adaa34410f93b1f8e57c4b36b9af0426a76003f441ee1d3c7e842", size = 75128, upload-time = "2025-10-06T14:50:51.92Z" }, + { url = "https://files.pythonhosted.org/packages/14/2c/f069cab5b51d175a1a2cb4ccdf7a2c2dabd58aa5bd933fa036a8d15e2404/multidict-6.7.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:b8512bac933afc3e45fb2b18da8e59b78d4f408399a960339598374d4ae3b56b", size = 44410, upload-time = "2025-10-06T14:50:53.275Z" }, + { url = "https://files.pythonhosted.org/packages/42/e2/64bb41266427af6642b6b128e8774ed84c11b80a90702c13ac0a86bb10cc/multidict-6.7.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:79dcf9e477bc65414ebfea98ffd013cb39552b5ecd62908752e0e413d6d06e38", size = 43205, upload-time = "2025-10-06T14:50:54.911Z" }, + { url = "https://files.pythonhosted.org/packages/02/68/6b086fef8a3f1a8541b9236c594f0c9245617c29841f2e0395d979485cde/multidict-6.7.0-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:31bae522710064b5cbeddaf2e9f32b1abab70ac6ac91d42572502299e9953128", size = 245084, upload-time = "2025-10-06T14:50:56.369Z" }, + { url = "https://files.pythonhosted.org/packages/15/ee/f524093232007cd7a75c1d132df70f235cfd590a7c9eaccd7ff422ef4ae8/multidict-6.7.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a0df7ff02397bb63e2fd22af2c87dfa39e8c7f12947bc524dbdc528282c7e34", size = 252667, upload-time = "2025-10-06T14:50:57.991Z" }, + { url = "https://files.pythonhosted.org/packages/02/a5/eeb3f43ab45878f1895118c3ef157a480db58ede3f248e29b5354139c2c9/multidict-6.7.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7a0222514e8e4c514660e182d5156a415c13ef0aabbd71682fc714e327b95e99", size = 233590, upload-time = "2025-10-06T14:50:59.589Z" }, + { url = "https://files.pythonhosted.org/packages/6a/1e/76d02f8270b97269d7e3dbd45644b1785bda457b474315f8cf999525a193/multidict-6.7.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2397ab4daaf2698eb51a76721e98db21ce4f52339e535725de03ea962b5a3202", size = 264112, upload-time = "2025-10-06T14:51:01.183Z" }, + { url = "https://files.pythonhosted.org/packages/76/0b/c28a70ecb58963847c2a8efe334904cd254812b10e535aefb3bcce513918/multidict-6.7.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8891681594162635948a636c9fe0ff21746aeb3dd5463f6e25d9bea3a8a39ca1", size = 261194, upload-time = "2025-10-06T14:51:02.794Z" }, + { url = "https://files.pythonhosted.org/packages/b4/63/2ab26e4209773223159b83aa32721b4021ffb08102f8ac7d689c943fded1/multidict-6.7.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18706cc31dbf402a7945916dd5cddf160251b6dab8a2c5f3d6d5a55949f676b3", size = 248510, upload-time = "2025-10-06T14:51:04.724Z" }, + { url = "https://files.pythonhosted.org/packages/93/cd/06c1fa8282af1d1c46fd55c10a7930af652afdce43999501d4d68664170c/multidict-6.7.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f844a1bbf1d207dd311a56f383f7eda2d0e134921d45751842d8235e7778965d", size = 248395, upload-time = "2025-10-06T14:51:06.306Z" }, + { url = "https://files.pythonhosted.org/packages/99/ac/82cb419dd6b04ccf9e7e61befc00c77614fc8134362488b553402ecd55ce/multidict-6.7.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:d4393e3581e84e5645506923816b9cc81f5609a778c7e7534054091acc64d1c6", size = 239520, upload-time = "2025-10-06T14:51:08.091Z" }, + { url = "https://files.pythonhosted.org/packages/fa/f3/a0f9bf09493421bd8716a362e0cd1d244f5a6550f5beffdd6b47e885b331/multidict-6.7.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:fbd18dc82d7bf274b37aa48d664534330af744e03bccf696d6f4c6042e7d19e7", size = 245479, upload-time = "2025-10-06T14:51:10.365Z" }, + { url = "https://files.pythonhosted.org/packages/8d/01/476d38fc73a212843f43c852b0eee266b6971f0e28329c2184a8df90c376/multidict-6.7.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:b6234e14f9314731ec45c42fc4554b88133ad53a09092cc48a88e771c125dadb", size = 258903, upload-time = "2025-10-06T14:51:12.466Z" }, + { url = "https://files.pythonhosted.org/packages/49/6d/23faeb0868adba613b817d0e69c5f15531b24d462af8012c4f6de4fa8dc3/multidict-6.7.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:08d4379f9744d8f78d98c8673c06e202ffa88296f009c71bbafe8a6bf847d01f", size = 252333, upload-time = "2025-10-06T14:51:14.48Z" }, + { url = "https://files.pythonhosted.org/packages/1e/cc/48d02ac22b30fa247f7dad82866e4b1015431092f4ba6ebc7e77596e0b18/multidict-6.7.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9fe04da3f79387f450fd0061d4dd2e45a72749d31bf634aecc9e27f24fdc4b3f", size = 243411, upload-time = "2025-10-06T14:51:16.072Z" }, + { url = "https://files.pythonhosted.org/packages/4a/03/29a8bf5a18abf1fe34535c88adbdfa88c9fb869b5a3b120692c64abe8284/multidict-6.7.0-cp314-cp314-win32.whl", hash = "sha256:fbafe31d191dfa7c4c51f7a6149c9fb7e914dcf9ffead27dcfd9f1ae382b3885", size = 40940, upload-time = "2025-10-06T14:51:17.544Z" }, + { url = "https://files.pythonhosted.org/packages/82/16/7ed27b680791b939de138f906d5cf2b4657b0d45ca6f5dd6236fdddafb1a/multidict-6.7.0-cp314-cp314-win_amd64.whl", hash = "sha256:2f67396ec0310764b9222a1728ced1ab638f61aadc6226f17a71dd9324f9a99c", size = 45087, upload-time = "2025-10-06T14:51:18.875Z" }, + { url = "https://files.pythonhosted.org/packages/cd/3c/e3e62eb35a1950292fe39315d3c89941e30a9d07d5d2df42965ab041da43/multidict-6.7.0-cp314-cp314-win_arm64.whl", hash = "sha256:ba672b26069957ee369cfa7fc180dde1fc6f176eaf1e6beaf61fbebbd3d9c000", size = 42368, upload-time = "2025-10-06T14:51:20.225Z" }, + { url = "https://files.pythonhosted.org/packages/8b/40/cd499bd0dbc5f1136726db3153042a735fffd0d77268e2ee20d5f33c010f/multidict-6.7.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:c1dcc7524066fa918c6a27d61444d4ee7900ec635779058571f70d042d86ed63", size = 82326, upload-time = "2025-10-06T14:51:21.588Z" }, + { url = "https://files.pythonhosted.org/packages/13/8a/18e031eca251c8df76daf0288e6790561806e439f5ce99a170b4af30676b/multidict-6.7.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:27e0b36c2d388dc7b6ced3406671b401e84ad7eb0656b8f3a2f46ed0ce483718", size = 48065, upload-time = "2025-10-06T14:51:22.93Z" }, + { url = "https://files.pythonhosted.org/packages/40/71/5e6701277470a87d234e433fb0a3a7deaf3bcd92566e421e7ae9776319de/multidict-6.7.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2a7baa46a22e77f0988e3b23d4ede5513ebec1929e34ee9495be535662c0dfe2", size = 46475, upload-time = "2025-10-06T14:51:24.352Z" }, + { url = "https://files.pythonhosted.org/packages/fe/6a/bab00cbab6d9cfb57afe1663318f72ec28289ea03fd4e8236bb78429893a/multidict-6.7.0-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7bf77f54997a9166a2f5675d1201520586439424c2511723a7312bdb4bcc034e", size = 239324, upload-time = "2025-10-06T14:51:25.822Z" }, + { url = "https://files.pythonhosted.org/packages/2a/5f/8de95f629fc22a7769ade8b41028e3e5a822c1f8904f618d175945a81ad3/multidict-6.7.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e011555abada53f1578d63389610ac8a5400fc70ce71156b0aa30d326f1a5064", size = 246877, upload-time = "2025-10-06T14:51:27.604Z" }, + { url = "https://files.pythonhosted.org/packages/23/b4/38881a960458f25b89e9f4a4fdcb02ac101cfa710190db6e5528841e67de/multidict-6.7.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:28b37063541b897fd6a318007373930a75ca6d6ac7c940dbe14731ffdd8d498e", size = 225824, upload-time = "2025-10-06T14:51:29.664Z" }, + { url = "https://files.pythonhosted.org/packages/1e/39/6566210c83f8a261575f18e7144736059f0c460b362e96e9cf797a24b8e7/multidict-6.7.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:05047ada7a2fde2631a0ed706f1fd68b169a681dfe5e4cf0f8e4cb6618bbc2cd", size = 253558, upload-time = "2025-10-06T14:51:31.684Z" }, + { url = "https://files.pythonhosted.org/packages/00/a3/67f18315100f64c269f46e6c0319fa87ba68f0f64f2b8e7fd7c72b913a0b/multidict-6.7.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:716133f7d1d946a4e1b91b1756b23c088881e70ff180c24e864c26192ad7534a", size = 252339, upload-time = "2025-10-06T14:51:33.699Z" }, + { url = "https://files.pythonhosted.org/packages/c8/2a/1cb77266afee2458d82f50da41beba02159b1d6b1f7973afc9a1cad1499b/multidict-6.7.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d1bed1b467ef657f2a0ae62844a607909ef1c6889562de5e1d505f74457d0b96", size = 244895, upload-time = "2025-10-06T14:51:36.189Z" }, + { url = "https://files.pythonhosted.org/packages/dd/72/09fa7dd487f119b2eb9524946ddd36e2067c08510576d43ff68469563b3b/multidict-6.7.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ca43bdfa5d37bd6aee89d85e1d0831fb86e25541be7e9d376ead1b28974f8e5e", size = 241862, upload-time = "2025-10-06T14:51:41.291Z" }, + { url = "https://files.pythonhosted.org/packages/65/92/bc1f8bd0853d8669300f732c801974dfc3702c3eeadae2f60cef54dc69d7/multidict-6.7.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:44b546bd3eb645fd26fb949e43c02a25a2e632e2ca21a35e2e132c8105dc8599", size = 232376, upload-time = "2025-10-06T14:51:43.55Z" }, + { url = "https://files.pythonhosted.org/packages/09/86/ac39399e5cb9d0c2ac8ef6e10a768e4d3bc933ac808d49c41f9dc23337eb/multidict-6.7.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:a6ef16328011d3f468e7ebc326f24c1445f001ca1dec335b2f8e66bed3006394", size = 240272, upload-time = "2025-10-06T14:51:45.265Z" }, + { url = "https://files.pythonhosted.org/packages/3d/b6/fed5ac6b8563ec72df6cb1ea8dac6d17f0a4a1f65045f66b6d3bf1497c02/multidict-6.7.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:5aa873cbc8e593d361ae65c68f85faadd755c3295ea2c12040ee146802f23b38", size = 248774, upload-time = "2025-10-06T14:51:46.836Z" }, + { url = "https://files.pythonhosted.org/packages/6b/8d/b954d8c0dc132b68f760aefd45870978deec6818897389dace00fcde32ff/multidict-6.7.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:3d7b6ccce016e29df4b7ca819659f516f0bc7a4b3efa3bb2012ba06431b044f9", size = 242731, upload-time = "2025-10-06T14:51:48.541Z" }, + { url = "https://files.pythonhosted.org/packages/16/9d/a2dac7009125d3540c2f54e194829ea18ac53716c61b655d8ed300120b0f/multidict-6.7.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:171b73bd4ee683d307599b66793ac80981b06f069b62eea1c9e29c9241aa66b0", size = 240193, upload-time = "2025-10-06T14:51:50.355Z" }, + { url = "https://files.pythonhosted.org/packages/39/ca/c05f144128ea232ae2178b008d5011d4e2cea86e4ee8c85c2631b1b94802/multidict-6.7.0-cp314-cp314t-win32.whl", hash = "sha256:b2d7f80c4e1fd010b07cb26820aae86b7e73b681ee4889684fb8d2d4537aab13", size = 48023, upload-time = "2025-10-06T14:51:51.883Z" }, + { url = "https://files.pythonhosted.org/packages/ba/8f/0a60e501584145588be1af5cc829265701ba3c35a64aec8e07cbb71d39bb/multidict-6.7.0-cp314-cp314t-win_amd64.whl", hash = "sha256:09929cab6fcb68122776d575e03c6cc64ee0b8fca48d17e135474b042ce515cd", size = 53507, upload-time = "2025-10-06T14:51:53.672Z" }, + { url = "https://files.pythonhosted.org/packages/7f/ae/3148b988a9c6239903e786eac19c889fab607c31d6efa7fb2147e5680f23/multidict-6.7.0-cp314-cp314t-win_arm64.whl", hash = "sha256:cc41db090ed742f32bd2d2c721861725e6109681eddf835d0a82bd3a5c382827", size = 44804, upload-time = "2025-10-06T14:51:55.415Z" }, + { url = "https://files.pythonhosted.org/packages/b7/da/7d22601b625e241d4f23ef1ebff8acfc60da633c9e7e7922e24d10f592b3/multidict-6.7.0-py3-none-any.whl", hash = "sha256:394fc5c42a333c9ffc3e421a4c85e08580d990e08b99f6bf35b4132114c5dcb3", size = 12317, upload-time = "2025-10-06T14:52:29.272Z" }, +] + +[[package]] +name = "mypy" +version = "1.10.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mypy-extensions" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c7/b9/81e4c6dbb1ec1e72503de3ff2c5fe4b7f224e04613b670f8b9004cd8a4dd/mypy-1.10.1.tar.gz", hash = "sha256:1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0", size = 3022304, upload-time = "2024-06-25T00:12:23.941Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/56/24/8a179de3ed98e1882f640d431db25a17fc5813258fded79674e475501f87/mypy-1.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e36f229acfe250dc660790840916eb49726c928e8ce10fbdf90715090fe4ae02", size = 10817694, upload-time = "2024-06-25T00:12:05.229Z" }, + { url = "https://files.pythonhosted.org/packages/f3/80/1675d07cfb4cc12bedcb5bb426f256d8c8da3668cbf300121e39333f0c96/mypy-1.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:51a46974340baaa4145363b9e051812a2446cf583dfaeba124af966fa44593f7", size = 9975362, upload-time = "2024-06-25T00:11:18.586Z" }, + { url = "https://files.pythonhosted.org/packages/d5/a0/684ebd636f258bdd263b12be46dd4e1ed33ac73a76d590b209c026e3c65f/mypy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:901c89c2d67bba57aaaca91ccdb659aa3a312de67f23b9dfb059727cce2e2e0a", size = 12728032, upload-time = "2024-06-25T00:11:15.438Z" }, + { url = "https://files.pythonhosted.org/packages/f3/c8/1f881f08e93ea8165113ab0fad490262b0466d0c2616c13c1bb85741ff87/mypy-1.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0cd62192a4a32b77ceb31272d9e74d23cd88c8060c34d1d3622db3267679a5d9", size = 12797751, upload-time = "2024-06-25T00:11:32.698Z" }, + { url = "https://files.pythonhosted.org/packages/4a/d3/46c81d90576e2e766144c0e436fa397a7387092fe29c6ef964f91d92778d/mypy-1.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:a2cbc68cb9e943ac0814c13e2452d2046c2f2b23ff0278e26599224cf164e78d", size = 9398835, upload-time = "2024-06-25T00:11:28.844Z" }, + { url = "https://files.pythonhosted.org/packages/38/cf/0645128c6edf70eb9b9687ad42fcb61ea344a7927ed2b78ce2275282fe87/mypy-1.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd6f629b67bb43dc0d9211ee98b96d8dabc97b1ad38b9b25f5e4c4d7569a0c6a", size = 10740526, upload-time = "2024-06-25T00:10:58.841Z" }, + { url = "https://files.pythonhosted.org/packages/19/c9/10842953066265e6063c41a85bbee3b877501947c970ea84a1db5f11d32e/mypy-1.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a1bbb3a6f5ff319d2b9d40b4080d46cd639abe3516d5a62c070cf0114a457d84", size = 9898375, upload-time = "2024-06-25T00:11:54.767Z" }, + { url = "https://files.pythonhosted.org/packages/e4/9e/551e897f67c5d67aa1976bc3b4951f297d1daf07250c421bb045b2613350/mypy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8edd4e9bbbc9d7b79502eb9592cab808585516ae1bcc1446eb9122656c6066f", size = 12602338, upload-time = "2024-06-25T00:10:55.898Z" }, + { url = "https://files.pythonhosted.org/packages/2b/a4/55e3635253e5fa7051674dd5a67582f08b0ba8823e1fdbf7241ed5b32d4e/mypy-1.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6166a88b15f1759f94a46fa474c7b1b05d134b1b61fca627dd7335454cc9aa6b", size = 12680741, upload-time = "2024-06-25T00:11:39.882Z" }, + { url = "https://files.pythonhosted.org/packages/7a/cc/aa881ad051f99915887db0b5de8facc0e224295be22f92178c8f77fd8359/mypy-1.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bb9cd11c01c8606a9d0b83ffa91d0b236a0e91bc4126d9ba9ce62906ada868e", size = 9393661, upload-time = "2024-06-25T00:11:11.966Z" }, + { url = "https://files.pythonhosted.org/packages/5d/86/3c3bdaccc3cbd1372acb15667a2c2cb773523a710a22e2748cbda9a7c1e2/mypy-1.10.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d8681909f7b44d0b7b86e653ca152d6dff0eb5eb41694e163c6092124f8246d7", size = 10864022, upload-time = "2024-06-25T00:11:01.838Z" }, + { url = "https://files.pythonhosted.org/packages/ec/05/7c87b26b6a769b70f6c0b8a6daef01fc6f3ae566df89a2fa9d04f690b0d3/mypy-1.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:378c03f53f10bbdd55ca94e46ec3ba255279706a6aacaecac52ad248f98205d3", size = 9857795, upload-time = "2024-06-25T00:12:17.799Z" }, + { url = "https://files.pythonhosted.org/packages/ff/b5/cbccba4dca9703c4c467171e7f61ea6a1a75eae991208aa5bc7d49807f91/mypy-1.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bacf8f3a3d7d849f40ca6caea5c055122efe70e81480c8328ad29c55c69e93e", size = 12647633, upload-time = "2024-06-25T00:10:42.207Z" }, + { url = "https://files.pythonhosted.org/packages/02/3c/1f5e57c8cfab4299f7189821ae8bb4896e8e623a04d293fd32e32eb0e617/mypy-1.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:701b5f71413f1e9855566a34d6e9d12624e9e0a8818a5704d74d6b0402e66c04", size = 12730251, upload-time = "2024-06-25T00:12:14.738Z" }, + { url = "https://files.pythonhosted.org/packages/f9/20/d33608e8dc3bc0f5966fc1f6c2d16671f0725dcca279beec47c3e19afd9d/mypy-1.10.1-cp312-cp312-win_amd64.whl", hash = "sha256:3c4c2992f6ea46ff7fce0072642cfb62af7a2484efe69017ed8b095f7b39ef31", size = 9491734, upload-time = "2024-06-25T00:11:05.118Z" }, + { url = "https://files.pythonhosted.org/packages/2b/ee/d53a3d4792a09b6cd757978951d6dcf8b10825a8b8522b68e9b5eb53b9a1/mypy-1.10.1-py3-none-any.whl", hash = "sha256:71d8ac0b906354ebda8ef1673e5fde785936ac1f29ff6987c7483cfbd5a4235a", size = 2580108, upload-time = "2024-06-25T00:12:08.18Z" }, +] + +[[package]] +name = "mypy-extensions" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, +] + +[[package]] +name = "nodeenv" +version = "1.10.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/24/bf/d1bda4f6168e0b2e9e5958945e01910052158313224ada5ce1fb2e1113b8/nodeenv-1.10.0.tar.gz", hash = "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb", size = 55611, upload-time = "2025-12-20T14:08:54.006Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/b2/d0896bdcdc8d28a7fc5717c305f1a861c26e18c05047949fb371034d98bd/nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827", size = 23438, upload-time = "2025-12-20T14:08:52.782Z" }, +] + +[[package]] +name = "packaging" +version = "25.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" }, +] + +[[package]] +name = "platformdirs" +version = "4.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cf/86/0248f086a84f01b37aaec0fa567b397df1a119f73c16f6c7a9aac73ea309/platformdirs-4.5.1.tar.gz", hash = "sha256:61d5cdcc6065745cdd94f0f878977f8de9437be93de97c1c12f853c9c0cdcbda", size = 21715, upload-time = "2025-12-05T13:52:58.638Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/28/3bfe2fa5a7b9c46fe7e13c97bda14c895fb10fa2ebf1d0abb90e0cea7ee1/platformdirs-4.5.1-py3-none-any.whl", hash = "sha256:d03afa3963c806a9bed9d5125c8f4cb2fdaf74a55ab60e5d59b3fde758104d31", size = 18731, upload-time = "2025-12-05T13:52:56.823Z" }, +] + +[[package]] +name = "pluggy" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, +] + +[[package]] +name = "pre-commit" +version = "4.5.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cfgv" }, + { name = "identify" }, + { name = "nodeenv" }, + { name = "pyyaml" }, + { name = "virtualenv" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/40/f1/6d86a29246dfd2e9b6237f0b5823717f60cad94d47ddc26afa916d21f525/pre_commit-4.5.1.tar.gz", hash = "sha256:eb545fcff725875197837263e977ea257a402056661f09dae08e4b149b030a61", size = 198232, upload-time = "2025-12-16T21:14:33.552Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5d/19/fd3ef348460c80af7bb4669ea7926651d1f95c23ff2df18b9d24bab4f3fa/pre_commit-4.5.1-py2.py3-none-any.whl", hash = "sha256:3b3afd891e97337708c1674210f8eba659b52a38ea5f822ff142d10786221f77", size = 226437, upload-time = "2025-12-16T21:14:32.409Z" }, +] + +[[package]] +name = "propcache" +version = "0.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz", hash = "sha256:f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d", size = 46442, upload-time = "2025-10-08T19:49:02.291Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/0e/934b541323035566a9af292dba85a195f7b78179114f2c6ebb24551118a9/propcache-0.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c2d1fa3201efaf55d730400d945b5b3ab6e672e100ba0f9a409d950ab25d7db", size = 79534, upload-time = "2025-10-08T19:46:02.083Z" }, + { url = "https://files.pythonhosted.org/packages/a1/6b/db0d03d96726d995dc7171286c6ba9d8d14251f37433890f88368951a44e/propcache-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1eb2994229cc8ce7fe9b3db88f5465f5fd8651672840b2e426b88cdb1a30aac8", size = 45526, upload-time = "2025-10-08T19:46:03.884Z" }, + { url = "https://files.pythonhosted.org/packages/e4/c3/82728404aea669e1600f304f2609cde9e665c18df5a11cdd57ed73c1dceb/propcache-0.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:66c1f011f45a3b33d7bcb22daed4b29c0c9e2224758b6be00686731e1b46f925", size = 47263, upload-time = "2025-10-08T19:46:05.405Z" }, + { url = "https://files.pythonhosted.org/packages/df/1b/39313ddad2bf9187a1432654c38249bab4562ef535ef07f5eb6eb04d0b1b/propcache-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9a52009f2adffe195d0b605c25ec929d26b36ef986ba85244891dee3b294df21", size = 201012, upload-time = "2025-10-08T19:46:07.165Z" }, + { url = "https://files.pythonhosted.org/packages/5b/01/f1d0b57d136f294a142acf97f4ed58c8e5b974c21e543000968357115011/propcache-0.4.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5d4e2366a9c7b837555cf02fb9be2e3167d333aff716332ef1b7c3a142ec40c5", size = 209491, upload-time = "2025-10-08T19:46:08.909Z" }, + { url = "https://files.pythonhosted.org/packages/a1/c8/038d909c61c5bb039070b3fb02ad5cccdb1dde0d714792e251cdb17c9c05/propcache-0.4.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9d2b6caef873b4f09e26ea7e33d65f42b944837563a47a94719cc3544319a0db", size = 215319, upload-time = "2025-10-08T19:46:10.7Z" }, + { url = "https://files.pythonhosted.org/packages/08/57/8c87e93142b2c1fa2408e45695205a7ba05fb5db458c0bf5c06ba0e09ea6/propcache-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b16ec437a8c8a965ecf95739448dd938b5c7f56e67ea009f4300d8df05f32b7", size = 196856, upload-time = "2025-10-08T19:46:12.003Z" }, + { url = "https://files.pythonhosted.org/packages/42/df/5615fec76aa561987a534759b3686008a288e73107faa49a8ae5795a9f7a/propcache-0.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:296f4c8ed03ca7476813fe666c9ea97869a8d7aec972618671b33a38a5182ef4", size = 193241, upload-time = "2025-10-08T19:46:13.495Z" }, + { url = "https://files.pythonhosted.org/packages/d5/21/62949eb3a7a54afe8327011c90aca7e03547787a88fb8bd9726806482fea/propcache-0.4.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:1f0978529a418ebd1f49dad413a2b68af33f85d5c5ca5c6ca2a3bed375a7ac60", size = 190552, upload-time = "2025-10-08T19:46:14.938Z" }, + { url = "https://files.pythonhosted.org/packages/30/ee/ab4d727dd70806e5b4de96a798ae7ac6e4d42516f030ee60522474b6b332/propcache-0.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fd138803047fb4c062b1c1dd95462f5209456bfab55c734458f15d11da288f8f", size = 200113, upload-time = "2025-10-08T19:46:16.695Z" }, + { url = "https://files.pythonhosted.org/packages/8a/0b/38b46208e6711b016aa8966a3ac793eee0d05c7159d8342aa27fc0bc365e/propcache-0.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8c9b3cbe4584636d72ff556d9036e0c9317fa27b3ac1f0f558e7e84d1c9c5900", size = 200778, upload-time = "2025-10-08T19:46:18.023Z" }, + { url = "https://files.pythonhosted.org/packages/cf/81/5abec54355ed344476bee711e9f04815d4b00a311ab0535599204eecc257/propcache-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f93243fdc5657247533273ac4f86ae106cc6445a0efacb9a1bfe982fcfefd90c", size = 193047, upload-time = "2025-10-08T19:46:19.449Z" }, + { url = "https://files.pythonhosted.org/packages/ec/b6/1f237c04e32063cb034acd5f6ef34ef3a394f75502e72703545631ab1ef6/propcache-0.4.1-cp310-cp310-win32.whl", hash = "sha256:a0ee98db9c5f80785b266eb805016e36058ac72c51a064040f2bc43b61101cdb", size = 38093, upload-time = "2025-10-08T19:46:20.643Z" }, + { url = "https://files.pythonhosted.org/packages/a6/67/354aac4e0603a15f76439caf0427781bcd6797f370377f75a642133bc954/propcache-0.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:1cdb7988c4e5ac7f6d175a28a9aa0c94cb6f2ebe52756a3c0cda98d2809a9e37", size = 41638, upload-time = "2025-10-08T19:46:21.935Z" }, + { url = "https://files.pythonhosted.org/packages/e0/e1/74e55b9fd1a4c209ff1a9a824bf6c8b3d1fc5a1ac3eabe23462637466785/propcache-0.4.1-cp310-cp310-win_arm64.whl", hash = "sha256:d82ad62b19645419fe79dd63b3f9253e15b30e955c0170e5cebc350c1844e581", size = 38229, upload-time = "2025-10-08T19:46:23.368Z" }, + { url = "https://files.pythonhosted.org/packages/8c/d4/4e2c9aaf7ac2242b9358f98dccd8f90f2605402f5afeff6c578682c2c491/propcache-0.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:60a8fda9644b7dfd5dece8c61d8a85e271cb958075bfc4e01083c148b61a7caf", size = 80208, upload-time = "2025-10-08T19:46:24.597Z" }, + { url = "https://files.pythonhosted.org/packages/c2/21/d7b68e911f9c8e18e4ae43bdbc1e1e9bbd971f8866eb81608947b6f585ff/propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c30b53e7e6bda1d547cabb47c825f3843a0a1a42b0496087bb58d8fedf9f41b5", size = 45777, upload-time = "2025-10-08T19:46:25.733Z" }, + { url = "https://files.pythonhosted.org/packages/d3/1d/11605e99ac8ea9435651ee71ab4cb4bf03f0949586246476a25aadfec54a/propcache-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6918ecbd897443087a3b7cd978d56546a812517dcaaca51b49526720571fa93e", size = 47647, upload-time = "2025-10-08T19:46:27.304Z" }, + { url = "https://files.pythonhosted.org/packages/58/1a/3c62c127a8466c9c843bccb503d40a273e5cc69838805f322e2826509e0d/propcache-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3d902a36df4e5989763425a8ab9e98cd8ad5c52c823b34ee7ef307fd50582566", size = 214929, upload-time = "2025-10-08T19:46:28.62Z" }, + { url = "https://files.pythonhosted.org/packages/56/b9/8fa98f850960b367c4b8fe0592e7fc341daa7a9462e925228f10a60cf74f/propcache-0.4.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a9695397f85973bb40427dedddf70d8dc4a44b22f1650dd4af9eedf443d45165", size = 221778, upload-time = "2025-10-08T19:46:30.358Z" }, + { url = "https://files.pythonhosted.org/packages/46/a6/0ab4f660eb59649d14b3d3d65c439421cf2f87fe5dd68591cbe3c1e78a89/propcache-0.4.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2bb07ffd7eaad486576430c89f9b215f9e4be68c4866a96e97db9e97fead85dc", size = 228144, upload-time = "2025-10-08T19:46:32.607Z" }, + { url = "https://files.pythonhosted.org/packages/52/6a/57f43e054fb3d3a56ac9fc532bc684fc6169a26c75c353e65425b3e56eef/propcache-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fd6f30fdcf9ae2a70abd34da54f18da086160e4d7d9251f81f3da0ff84fc5a48", size = 210030, upload-time = "2025-10-08T19:46:33.969Z" }, + { url = "https://files.pythonhosted.org/packages/40/e2/27e6feebb5f6b8408fa29f5efbb765cd54c153ac77314d27e457a3e993b7/propcache-0.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:fc38cba02d1acba4e2869eef1a57a43dfbd3d49a59bf90dda7444ec2be6a5570", size = 208252, upload-time = "2025-10-08T19:46:35.309Z" }, + { url = "https://files.pythonhosted.org/packages/9e/f8/91c27b22ccda1dbc7967f921c42825564fa5336a01ecd72eb78a9f4f53c2/propcache-0.4.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:67fad6162281e80e882fb3ec355398cf72864a54069d060321f6cd0ade95fe85", size = 202064, upload-time = "2025-10-08T19:46:36.993Z" }, + { url = "https://files.pythonhosted.org/packages/f2/26/7f00bd6bd1adba5aafe5f4a66390f243acab58eab24ff1a08bebb2ef9d40/propcache-0.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f10207adf04d08bec185bae14d9606a1444715bc99180f9331c9c02093e1959e", size = 212429, upload-time = "2025-10-08T19:46:38.398Z" }, + { url = "https://files.pythonhosted.org/packages/84/89/fd108ba7815c1117ddca79c228f3f8a15fc82a73bca8b142eb5de13b2785/propcache-0.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e9b0d8d0845bbc4cfcdcbcdbf5086886bc8157aa963c31c777ceff7846c77757", size = 216727, upload-time = "2025-10-08T19:46:39.732Z" }, + { url = "https://files.pythonhosted.org/packages/79/37/3ec3f7e3173e73f1d600495d8b545b53802cbf35506e5732dd8578db3724/propcache-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:981333cb2f4c1896a12f4ab92a9cc8f09ea664e9b7dbdc4eff74627af3a11c0f", size = 205097, upload-time = "2025-10-08T19:46:41.025Z" }, + { url = "https://files.pythonhosted.org/packages/61/b0/b2631c19793f869d35f47d5a3a56fb19e9160d3c119f15ac7344fc3ccae7/propcache-0.4.1-cp311-cp311-win32.whl", hash = "sha256:f1d2f90aeec838a52f1c1a32fe9a619fefd5e411721a9117fbf82aea638fe8a1", size = 38084, upload-time = "2025-10-08T19:46:42.693Z" }, + { url = "https://files.pythonhosted.org/packages/f4/78/6cce448e2098e9f3bfc91bb877f06aa24b6ccace872e39c53b2f707c4648/propcache-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:364426a62660f3f699949ac8c621aad6977be7126c5807ce48c0aeb8e7333ea6", size = 41637, upload-time = "2025-10-08T19:46:43.778Z" }, + { url = "https://files.pythonhosted.org/packages/9c/e9/754f180cccd7f51a39913782c74717c581b9cc8177ad0e949f4d51812383/propcache-0.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:e53f3a38d3510c11953f3e6a33f205c6d1b001129f972805ca9b42fc308bc239", size = 38064, upload-time = "2025-10-08T19:46:44.872Z" }, + { url = "https://files.pythonhosted.org/packages/a2/0f/f17b1b2b221d5ca28b4b876e8bb046ac40466513960646bda8e1853cdfa2/propcache-0.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e153e9cd40cc8945138822807139367f256f89c6810c2634a4f6902b52d3b4e2", size = 80061, upload-time = "2025-10-08T19:46:46.075Z" }, + { url = "https://files.pythonhosted.org/packages/76/47/8ccf75935f51448ba9a16a71b783eb7ef6b9ee60f5d14c7f8a8a79fbeed7/propcache-0.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cd547953428f7abb73c5ad82cbb32109566204260d98e41e5dfdc682eb7f8403", size = 46037, upload-time = "2025-10-08T19:46:47.23Z" }, + { url = "https://files.pythonhosted.org/packages/0a/b6/5c9a0e42df4d00bfb4a3cbbe5cf9f54260300c88a0e9af1f47ca5ce17ac0/propcache-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f048da1b4f243fc44f205dfd320933a951b8d89e0afd4c7cacc762a8b9165207", size = 47324, upload-time = "2025-10-08T19:46:48.384Z" }, + { url = "https://files.pythonhosted.org/packages/9e/d3/6c7ee328b39a81ee877c962469f1e795f9db87f925251efeb0545e0020d0/propcache-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ec17c65562a827bba85e3872ead335f95405ea1674860d96483a02f5c698fa72", size = 225505, upload-time = "2025-10-08T19:46:50.055Z" }, + { url = "https://files.pythonhosted.org/packages/01/5d/1c53f4563490b1d06a684742cc6076ef944bc6457df6051b7d1a877c057b/propcache-0.4.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:405aac25c6394ef275dee4c709be43745d36674b223ba4eb7144bf4d691b7367", size = 230242, upload-time = "2025-10-08T19:46:51.815Z" }, + { url = "https://files.pythonhosted.org/packages/20/e1/ce4620633b0e2422207c3cb774a0ee61cac13abc6217763a7b9e2e3f4a12/propcache-0.4.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0013cb6f8dde4b2a2f66903b8ba740bdfe378c943c4377a200551ceb27f379e4", size = 238474, upload-time = "2025-10-08T19:46:53.208Z" }, + { url = "https://files.pythonhosted.org/packages/46/4b/3aae6835b8e5f44ea6a68348ad90f78134047b503765087be2f9912140ea/propcache-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:15932ab57837c3368b024473a525e25d316d8353016e7cc0e5ba9eb343fbb1cf", size = 221575, upload-time = "2025-10-08T19:46:54.511Z" }, + { url = "https://files.pythonhosted.org/packages/6e/a5/8a5e8678bcc9d3a1a15b9a29165640d64762d424a16af543f00629c87338/propcache-0.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:031dce78b9dc099f4c29785d9cf5577a3faf9ebf74ecbd3c856a7b92768c3df3", size = 216736, upload-time = "2025-10-08T19:46:56.212Z" }, + { url = "https://files.pythonhosted.org/packages/f1/63/b7b215eddeac83ca1c6b934f89d09a625aa9ee4ba158338854c87210cc36/propcache-0.4.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ab08df6c9a035bee56e31af99be621526bd237bea9f32def431c656b29e41778", size = 213019, upload-time = "2025-10-08T19:46:57.595Z" }, + { url = "https://files.pythonhosted.org/packages/57/74/f580099a58c8af587cac7ba19ee7cb418506342fbbe2d4a4401661cca886/propcache-0.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4d7af63f9f93fe593afbf104c21b3b15868efb2c21d07d8732c0c4287e66b6a6", size = 220376, upload-time = "2025-10-08T19:46:59.067Z" }, + { url = "https://files.pythonhosted.org/packages/c4/ee/542f1313aff7eaf19c2bb758c5d0560d2683dac001a1c96d0774af799843/propcache-0.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:cfc27c945f422e8b5071b6e93169679e4eb5bf73bbcbf1ba3ae3a83d2f78ebd9", size = 226988, upload-time = "2025-10-08T19:47:00.544Z" }, + { url = "https://files.pythonhosted.org/packages/8f/18/9c6b015dd9c6930f6ce2229e1f02fb35298b847f2087ea2b436a5bfa7287/propcache-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:35c3277624a080cc6ec6f847cbbbb5b49affa3598c4535a0a4682a697aaa5c75", size = 215615, upload-time = "2025-10-08T19:47:01.968Z" }, + { url = "https://files.pythonhosted.org/packages/80/9e/e7b85720b98c45a45e1fca6a177024934dc9bc5f4d5dd04207f216fc33ed/propcache-0.4.1-cp312-cp312-win32.whl", hash = "sha256:671538c2262dadb5ba6395e26c1731e1d52534bfe9ae56d0b5573ce539266aa8", size = 38066, upload-time = "2025-10-08T19:47:03.503Z" }, + { url = "https://files.pythonhosted.org/packages/54/09/d19cff2a5aaac632ec8fc03737b223597b1e347416934c1b3a7df079784c/propcache-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:cb2d222e72399fcf5890d1d5cc1060857b9b236adff2792ff48ca2dfd46c81db", size = 41655, upload-time = "2025-10-08T19:47:04.973Z" }, + { url = "https://files.pythonhosted.org/packages/68/ab/6b5c191bb5de08036a8c697b265d4ca76148efb10fa162f14af14fb5f076/propcache-0.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:204483131fb222bdaaeeea9f9e6c6ed0cac32731f75dfc1d4a567fc1926477c1", size = 37789, upload-time = "2025-10-08T19:47:06.077Z" }, + { url = "https://files.pythonhosted.org/packages/bf/df/6d9c1b6ac12b003837dde8a10231a7344512186e87b36e855bef32241942/propcache-0.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:43eedf29202c08550aac1d14e0ee619b0430aaef78f85864c1a892294fbc28cf", size = 77750, upload-time = "2025-10-08T19:47:07.648Z" }, + { url = "https://files.pythonhosted.org/packages/8b/e8/677a0025e8a2acf07d3418a2e7ba529c9c33caf09d3c1f25513023c1db56/propcache-0.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d62cdfcfd89ccb8de04e0eda998535c406bf5e060ffd56be6c586cbcc05b3311", size = 44780, upload-time = "2025-10-08T19:47:08.851Z" }, + { url = "https://files.pythonhosted.org/packages/89/a4/92380f7ca60f99ebae761936bc48a72a639e8a47b29050615eef757cb2a7/propcache-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cae65ad55793da34db5f54e4029b89d3b9b9490d8abe1b4c7ab5d4b8ec7ebf74", size = 46308, upload-time = "2025-10-08T19:47:09.982Z" }, + { url = "https://files.pythonhosted.org/packages/2d/48/c5ac64dee5262044348d1d78a5f85dd1a57464a60d30daee946699963eb3/propcache-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:333ddb9031d2704a301ee3e506dc46b1fe5f294ec198ed6435ad5b6a085facfe", size = 208182, upload-time = "2025-10-08T19:47:11.319Z" }, + { url = "https://files.pythonhosted.org/packages/c6/0c/cd762dd011a9287389a6a3eb43aa30207bde253610cca06824aeabfe9653/propcache-0.4.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd0858c20f078a32cf55f7e81473d96dcf3b93fd2ccdb3d40fdf54b8573df3af", size = 211215, upload-time = "2025-10-08T19:47:13.146Z" }, + { url = "https://files.pythonhosted.org/packages/30/3e/49861e90233ba36890ae0ca4c660e95df565b2cd15d4a68556ab5865974e/propcache-0.4.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:678ae89ebc632c5c204c794f8dab2837c5f159aeb59e6ed0539500400577298c", size = 218112, upload-time = "2025-10-08T19:47:14.913Z" }, + { url = "https://files.pythonhosted.org/packages/f1/8b/544bc867e24e1bd48f3118cecd3b05c694e160a168478fa28770f22fd094/propcache-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d472aeb4fbf9865e0c6d622d7f4d54a4e101a89715d8904282bb5f9a2f476c3f", size = 204442, upload-time = "2025-10-08T19:47:16.277Z" }, + { url = "https://files.pythonhosted.org/packages/50/a6/4282772fd016a76d3e5c0df58380a5ea64900afd836cec2c2f662d1b9bb3/propcache-0.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4d3df5fa7e36b3225954fba85589da77a0fe6a53e3976de39caf04a0db4c36f1", size = 199398, upload-time = "2025-10-08T19:47:17.962Z" }, + { url = "https://files.pythonhosted.org/packages/3e/ec/d8a7cd406ee1ddb705db2139f8a10a8a427100347bd698e7014351c7af09/propcache-0.4.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:ee17f18d2498f2673e432faaa71698032b0127ebf23ae5974eeaf806c279df24", size = 196920, upload-time = "2025-10-08T19:47:19.355Z" }, + { url = "https://files.pythonhosted.org/packages/f6/6c/f38ab64af3764f431e359f8baf9e0a21013e24329e8b85d2da32e8ed07ca/propcache-0.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:580e97762b950f993ae618e167e7be9256b8353c2dcd8b99ec100eb50f5286aa", size = 203748, upload-time = "2025-10-08T19:47:21.338Z" }, + { url = "https://files.pythonhosted.org/packages/d6/e3/fa846bd70f6534d647886621388f0a265254d30e3ce47e5c8e6e27dbf153/propcache-0.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:501d20b891688eb8e7aa903021f0b72d5a55db40ffaab27edefd1027caaafa61", size = 205877, upload-time = "2025-10-08T19:47:23.059Z" }, + { url = "https://files.pythonhosted.org/packages/e2/39/8163fc6f3133fea7b5f2827e8eba2029a0277ab2c5beee6c1db7b10fc23d/propcache-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a0bd56e5b100aef69bd8562b74b46254e7c8812918d3baa700c8a8009b0af66", size = 199437, upload-time = "2025-10-08T19:47:24.445Z" }, + { url = "https://files.pythonhosted.org/packages/93/89/caa9089970ca49c7c01662bd0eeedfe85494e863e8043565aeb6472ce8fe/propcache-0.4.1-cp313-cp313-win32.whl", hash = "sha256:bcc9aaa5d80322bc2fb24bb7accb4a30f81e90ab8d6ba187aec0744bc302ad81", size = 37586, upload-time = "2025-10-08T19:47:25.736Z" }, + { url = "https://files.pythonhosted.org/packages/f5/ab/f76ec3c3627c883215b5c8080debb4394ef5a7a29be811f786415fc1e6fd/propcache-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:381914df18634f5494334d201e98245c0596067504b9372d8cf93f4bb23e025e", size = 40790, upload-time = "2025-10-08T19:47:26.847Z" }, + { url = "https://files.pythonhosted.org/packages/59/1b/e71ae98235f8e2ba5004d8cb19765a74877abf189bc53fc0c80d799e56c3/propcache-0.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:8873eb4460fd55333ea49b7d189749ecf6e55bf85080f11b1c4530ed3034cba1", size = 37158, upload-time = "2025-10-08T19:47:27.961Z" }, + { url = "https://files.pythonhosted.org/packages/83/ce/a31bbdfc24ee0dcbba458c8175ed26089cf109a55bbe7b7640ed2470cfe9/propcache-0.4.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:92d1935ee1f8d7442da9c0c4fa7ac20d07e94064184811b685f5c4fada64553b", size = 81451, upload-time = "2025-10-08T19:47:29.445Z" }, + { url = "https://files.pythonhosted.org/packages/25/9c/442a45a470a68456e710d96cacd3573ef26a1d0a60067e6a7d5e655621ed/propcache-0.4.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:473c61b39e1460d386479b9b2f337da492042447c9b685f28be4f74d3529e566", size = 46374, upload-time = "2025-10-08T19:47:30.579Z" }, + { url = "https://files.pythonhosted.org/packages/f4/bf/b1d5e21dbc3b2e889ea4327044fb16312a736d97640fb8b6aa3f9c7b3b65/propcache-0.4.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:c0ef0aaafc66fbd87842a3fe3902fd889825646bc21149eafe47be6072725835", size = 48396, upload-time = "2025-10-08T19:47:31.79Z" }, + { url = "https://files.pythonhosted.org/packages/f4/04/5b4c54a103d480e978d3c8a76073502b18db0c4bc17ab91b3cb5092ad949/propcache-0.4.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95393b4d66bfae908c3ca8d169d5f79cd65636ae15b5e7a4f6e67af675adb0e", size = 275950, upload-time = "2025-10-08T19:47:33.481Z" }, + { url = "https://files.pythonhosted.org/packages/b4/c1/86f846827fb969c4b78b0af79bba1d1ea2156492e1b83dea8b8a6ae27395/propcache-0.4.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c07fda85708bc48578467e85099645167a955ba093be0a2dcba962195676e859", size = 273856, upload-time = "2025-10-08T19:47:34.906Z" }, + { url = "https://files.pythonhosted.org/packages/36/1d/fc272a63c8d3bbad6878c336c7a7dea15e8f2d23a544bda43205dfa83ada/propcache-0.4.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:af223b406d6d000830c6f65f1e6431783fc3f713ba3e6cc8c024d5ee96170a4b", size = 280420, upload-time = "2025-10-08T19:47:36.338Z" }, + { url = "https://files.pythonhosted.org/packages/07/0c/01f2219d39f7e53d52e5173bcb09c976609ba30209912a0680adfb8c593a/propcache-0.4.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a78372c932c90ee474559c5ddfffd718238e8673c340dc21fe45c5b8b54559a0", size = 263254, upload-time = "2025-10-08T19:47:37.692Z" }, + { url = "https://files.pythonhosted.org/packages/2d/18/cd28081658ce597898f0c4d174d4d0f3c5b6d4dc27ffafeef835c95eb359/propcache-0.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:564d9f0d4d9509e1a870c920a89b2fec951b44bf5ba7d537a9e7c1ccec2c18af", size = 261205, upload-time = "2025-10-08T19:47:39.659Z" }, + { url = "https://files.pythonhosted.org/packages/7a/71/1f9e22eb8b8316701c2a19fa1f388c8a3185082607da8e406a803c9b954e/propcache-0.4.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:17612831fda0138059cc5546f4d12a2aacfb9e47068c06af35c400ba58ba7393", size = 247873, upload-time = "2025-10-08T19:47:41.084Z" }, + { url = "https://files.pythonhosted.org/packages/4a/65/3d4b61f36af2b4eddba9def857959f1016a51066b4f1ce348e0cf7881f58/propcache-0.4.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:41a89040cb10bd345b3c1a873b2bf36413d48da1def52f268a055f7398514874", size = 262739, upload-time = "2025-10-08T19:47:42.51Z" }, + { url = "https://files.pythonhosted.org/packages/2a/42/26746ab087faa77c1c68079b228810436ccd9a5ce9ac85e2b7307195fd06/propcache-0.4.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e35b88984e7fa64aacecea39236cee32dd9bd8c55f57ba8a75cf2399553f9bd7", size = 263514, upload-time = "2025-10-08T19:47:43.927Z" }, + { url = "https://files.pythonhosted.org/packages/94/13/630690fe201f5502d2403dd3cfd451ed8858fe3c738ee88d095ad2ff407b/propcache-0.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f8b465489f927b0df505cbe26ffbeed4d6d8a2bbc61ce90eb074ff129ef0ab1", size = 257781, upload-time = "2025-10-08T19:47:45.448Z" }, + { url = "https://files.pythonhosted.org/packages/92/f7/1d4ec5841505f423469efbfc381d64b7b467438cd5a4bbcbb063f3b73d27/propcache-0.4.1-cp313-cp313t-win32.whl", hash = "sha256:2ad890caa1d928c7c2965b48f3a3815c853180831d0e5503d35cf00c472f4717", size = 41396, upload-time = "2025-10-08T19:47:47.202Z" }, + { url = "https://files.pythonhosted.org/packages/48/f0/615c30622316496d2cbbc29f5985f7777d3ada70f23370608c1d3e081c1f/propcache-0.4.1-cp313-cp313t-win_amd64.whl", hash = "sha256:f7ee0e597f495cf415bcbd3da3caa3bd7e816b74d0d52b8145954c5e6fd3ff37", size = 44897, upload-time = "2025-10-08T19:47:48.336Z" }, + { url = "https://files.pythonhosted.org/packages/fd/ca/6002e46eccbe0e33dcd4069ef32f7f1c9e243736e07adca37ae8c4830ec3/propcache-0.4.1-cp313-cp313t-win_arm64.whl", hash = "sha256:929d7cbe1f01bb7baffb33dc14eb5691c95831450a26354cd210a8155170c93a", size = 39789, upload-time = "2025-10-08T19:47:49.876Z" }, + { url = "https://files.pythonhosted.org/packages/8e/5c/bca52d654a896f831b8256683457ceddd490ec18d9ec50e97dfd8fc726a8/propcache-0.4.1-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3f7124c9d820ba5548d431afb4632301acf965db49e666aa21c305cbe8c6de12", size = 78152, upload-time = "2025-10-08T19:47:51.051Z" }, + { url = "https://files.pythonhosted.org/packages/65/9b/03b04e7d82a5f54fb16113d839f5ea1ede58a61e90edf515f6577c66fa8f/propcache-0.4.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:c0d4b719b7da33599dfe3b22d3db1ef789210a0597bc650b7cee9c77c2be8c5c", size = 44869, upload-time = "2025-10-08T19:47:52.594Z" }, + { url = "https://files.pythonhosted.org/packages/b2/fa/89a8ef0468d5833a23fff277b143d0573897cf75bd56670a6d28126c7d68/propcache-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9f302f4783709a78240ebc311b793f123328716a60911d667e0c036bc5dcbded", size = 46596, upload-time = "2025-10-08T19:47:54.073Z" }, + { url = "https://files.pythonhosted.org/packages/86/bd/47816020d337f4a746edc42fe8d53669965138f39ee117414c7d7a340cfe/propcache-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c80ee5802e3fb9ea37938e7eecc307fb984837091d5fd262bb37238b1ae97641", size = 206981, upload-time = "2025-10-08T19:47:55.715Z" }, + { url = "https://files.pythonhosted.org/packages/df/f6/c5fa1357cc9748510ee55f37173eb31bfde6d94e98ccd9e6f033f2fc06e1/propcache-0.4.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ed5a841e8bb29a55fb8159ed526b26adc5bdd7e8bd7bf793ce647cb08656cdf4", size = 211490, upload-time = "2025-10-08T19:47:57.499Z" }, + { url = "https://files.pythonhosted.org/packages/80/1e/e5889652a7c4a3846683401a48f0f2e5083ce0ec1a8a5221d8058fbd1adf/propcache-0.4.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:55c72fd6ea2da4c318e74ffdf93c4fe4e926051133657459131a95c846d16d44", size = 215371, upload-time = "2025-10-08T19:47:59.317Z" }, + { url = "https://files.pythonhosted.org/packages/b2/f2/889ad4b2408f72fe1a4f6a19491177b30ea7bf1a0fd5f17050ca08cfc882/propcache-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8326e144341460402713f91df60ade3c999d601e7eb5ff8f6f7862d54de0610d", size = 201424, upload-time = "2025-10-08T19:48:00.67Z" }, + { url = "https://files.pythonhosted.org/packages/27/73/033d63069b57b0812c8bd19f311faebeceb6ba31b8f32b73432d12a0b826/propcache-0.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:060b16ae65bc098da7f6d25bf359f1f31f688384858204fe5d652979e0015e5b", size = 197566, upload-time = "2025-10-08T19:48:02.604Z" }, + { url = "https://files.pythonhosted.org/packages/dc/89/ce24f3dc182630b4e07aa6d15f0ff4b14ed4b9955fae95a0b54c58d66c05/propcache-0.4.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:89eb3fa9524f7bec9de6e83cf3faed9d79bffa560672c118a96a171a6f55831e", size = 193130, upload-time = "2025-10-08T19:48:04.499Z" }, + { url = "https://files.pythonhosted.org/packages/a9/24/ef0d5fd1a811fb5c609278d0209c9f10c35f20581fcc16f818da959fc5b4/propcache-0.4.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:dee69d7015dc235f526fe80a9c90d65eb0039103fe565776250881731f06349f", size = 202625, upload-time = "2025-10-08T19:48:06.213Z" }, + { url = "https://files.pythonhosted.org/packages/f5/02/98ec20ff5546f68d673df2f7a69e8c0d076b5abd05ca882dc7ee3a83653d/propcache-0.4.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5558992a00dfd54ccbc64a32726a3357ec93825a418a401f5cc67df0ac5d9e49", size = 204209, upload-time = "2025-10-08T19:48:08.432Z" }, + { url = "https://files.pythonhosted.org/packages/a0/87/492694f76759b15f0467a2a93ab68d32859672b646aa8a04ce4864e7932d/propcache-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c9b822a577f560fbd9554812526831712c1436d2c046cedee4c3796d3543b144", size = 197797, upload-time = "2025-10-08T19:48:09.968Z" }, + { url = "https://files.pythonhosted.org/packages/ee/36/66367de3575db1d2d3f3d177432bd14ee577a39d3f5d1b3d5df8afe3b6e2/propcache-0.4.1-cp314-cp314-win32.whl", hash = "sha256:ab4c29b49d560fe48b696cdcb127dd36e0bc2472548f3bf56cc5cb3da2b2984f", size = 38140, upload-time = "2025-10-08T19:48:11.232Z" }, + { url = "https://files.pythonhosted.org/packages/0c/2a/a758b47de253636e1b8aef181c0b4f4f204bf0dd964914fb2af90a95b49b/propcache-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:5a103c3eb905fcea0ab98be99c3a9a5ab2de60228aa5aceedc614c0281cf6153", size = 41257, upload-time = "2025-10-08T19:48:12.707Z" }, + { url = "https://files.pythonhosted.org/packages/34/5e/63bd5896c3fec12edcbd6f12508d4890d23c265df28c74b175e1ef9f4f3b/propcache-0.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:74c1fb26515153e482e00177a1ad654721bf9207da8a494a0c05e797ad27b992", size = 38097, upload-time = "2025-10-08T19:48:13.923Z" }, + { url = "https://files.pythonhosted.org/packages/99/85/9ff785d787ccf9bbb3f3106f79884a130951436f58392000231b4c737c80/propcache-0.4.1-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:824e908bce90fb2743bd6b59db36eb4f45cd350a39637c9f73b1c1ea66f5b75f", size = 81455, upload-time = "2025-10-08T19:48:15.16Z" }, + { url = "https://files.pythonhosted.org/packages/90/85/2431c10c8e7ddb1445c1f7c4b54d886e8ad20e3c6307e7218f05922cad67/propcache-0.4.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:c2b5e7db5328427c57c8e8831abda175421b709672f6cfc3d630c3b7e2146393", size = 46372, upload-time = "2025-10-08T19:48:16.424Z" }, + { url = "https://files.pythonhosted.org/packages/01/20/b0972d902472da9bcb683fa595099911f4d2e86e5683bcc45de60dd05dc3/propcache-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:6f6ff873ed40292cd4969ef5310179afd5db59fdf055897e282485043fc80ad0", size = 48411, upload-time = "2025-10-08T19:48:17.577Z" }, + { url = "https://files.pythonhosted.org/packages/e2/e3/7dc89f4f21e8f99bad3d5ddb3a3389afcf9da4ac69e3deb2dcdc96e74169/propcache-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:49a2dc67c154db2c1463013594c458881a069fcf98940e61a0569016a583020a", size = 275712, upload-time = "2025-10-08T19:48:18.901Z" }, + { url = "https://files.pythonhosted.org/packages/20/67/89800c8352489b21a8047c773067644e3897f02ecbbd610f4d46b7f08612/propcache-0.4.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:005f08e6a0529984491e37d8dbc3dd86f84bd78a8ceb5fa9a021f4c48d4984be", size = 273557, upload-time = "2025-10-08T19:48:20.762Z" }, + { url = "https://files.pythonhosted.org/packages/e2/a1/b52b055c766a54ce6d9c16d9aca0cad8059acd9637cdf8aa0222f4a026ef/propcache-0.4.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5c3310452e0d31390da9035c348633b43d7e7feb2e37be252be6da45abd1abcc", size = 280015, upload-time = "2025-10-08T19:48:22.592Z" }, + { url = "https://files.pythonhosted.org/packages/48/c8/33cee30bd890672c63743049f3c9e4be087e6780906bfc3ec58528be59c1/propcache-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c3c70630930447f9ef1caac7728c8ad1c56bc5015338b20fed0d08ea2480b3a", size = 262880, upload-time = "2025-10-08T19:48:23.947Z" }, + { url = "https://files.pythonhosted.org/packages/0c/b1/8f08a143b204b418285c88b83d00edbd61afbc2c6415ffafc8905da7038b/propcache-0.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8e57061305815dfc910a3634dcf584f08168a8836e6999983569f51a8544cd89", size = 260938, upload-time = "2025-10-08T19:48:25.656Z" }, + { url = "https://files.pythonhosted.org/packages/cf/12/96e4664c82ca2f31e1c8dff86afb867348979eb78d3cb8546a680287a1e9/propcache-0.4.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:521a463429ef54143092c11a77e04056dd00636f72e8c45b70aaa3140d639726", size = 247641, upload-time = "2025-10-08T19:48:27.207Z" }, + { url = "https://files.pythonhosted.org/packages/18/ed/e7a9cfca28133386ba52278136d42209d3125db08d0a6395f0cba0c0285c/propcache-0.4.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:120c964da3fdc75e3731aa392527136d4ad35868cc556fd09bb6d09172d9a367", size = 262510, upload-time = "2025-10-08T19:48:28.65Z" }, + { url = "https://files.pythonhosted.org/packages/f5/76/16d8bf65e8845dd62b4e2b57444ab81f07f40caa5652b8969b87ddcf2ef6/propcache-0.4.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:d8f353eb14ee3441ee844ade4277d560cdd68288838673273b978e3d6d2c8f36", size = 263161, upload-time = "2025-10-08T19:48:30.133Z" }, + { url = "https://files.pythonhosted.org/packages/e7/70/c99e9edb5d91d5ad8a49fa3c1e8285ba64f1476782fed10ab251ff413ba1/propcache-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ab2943be7c652f09638800905ee1bab2c544e537edb57d527997a24c13dc1455", size = 257393, upload-time = "2025-10-08T19:48:31.567Z" }, + { url = "https://files.pythonhosted.org/packages/08/02/87b25304249a35c0915d236575bc3574a323f60b47939a2262b77632a3ee/propcache-0.4.1-cp314-cp314t-win32.whl", hash = "sha256:05674a162469f31358c30bcaa8883cb7829fa3110bf9c0991fe27d7896c42d85", size = 42546, upload-time = "2025-10-08T19:48:32.872Z" }, + { url = "https://files.pythonhosted.org/packages/cb/ef/3c6ecf8b317aa982f309835e8f96987466123c6e596646d4e6a1dfcd080f/propcache-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:990f6b3e2a27d683cb7602ed6c86f15ee6b43b1194736f9baaeb93d0016633b1", size = 46259, upload-time = "2025-10-08T19:48:34.226Z" }, + { url = "https://files.pythonhosted.org/packages/c4/2d/346e946d4951f37eca1e4f55be0f0174c52cd70720f84029b02f296f4a38/propcache-0.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ecef2343af4cc68e05131e45024ba34f6095821988a9d0a02aa7c73fcc448aa9", size = 40428, upload-time = "2025-10-08T19:48:35.441Z" }, + { url = "https://files.pythonhosted.org/packages/5b/5a/bc7b4a4ef808fa59a816c17b20c4bef6884daebbdf627ff2a161da67da19/propcache-0.4.1-py3-none-any.whl", hash = "sha256:af2a6052aeb6cf17d3e46ee169099044fd8224cbaf75c76a2ef596e8163e2237", size = 13305, upload-time = "2025-10-08T19:49:00.792Z" }, +] + +[[package]] +name = "pycares" +version = "4.11.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8d/ad/9d1e96486d2eb5a2672c4d9a2dd372d015b8d7a332c6ac2722c4c8e6bbbf/pycares-4.11.0.tar.gz", hash = "sha256:c863d9003ca0ce7df26429007859afd2a621d3276ed9fef154a9123db9252557", size = 654473, upload-time = "2025-09-09T15:18:21.849Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3b/6c/54ea6c4dbfa7a225124672c7892ef005f4836238c7342af341eeedeb316b/pycares-4.11.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:87dab618fe116f1936f8461df5970fcf0befeba7531a36b0a86321332ff9c20b", size = 145874, upload-time = "2025-09-09T15:16:13.136Z" }, + { url = "https://files.pythonhosted.org/packages/be/b2/7fd2d2e9bb58a0ab2813ae4fb83679bc00855f4763c12dd40da88801a137/pycares-4.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3db6b6439e378115572fa317053f3ee6eecb39097baafe9292320ff1a9df73e3", size = 141821, upload-time = "2025-09-09T15:16:14.994Z" }, + { url = "https://files.pythonhosted.org/packages/00/88/ec6e72982d9c51867e35570d970ee83c223d9b5df0128c9f995bf3270e2a/pycares-4.11.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:742fbaa44b418237dbd6bf8cdab205c98b3edb334436a972ad341b0ea296fb47", size = 642642, upload-time = "2025-09-09T15:16:16.64Z" }, + { url = "https://files.pythonhosted.org/packages/a1/b3/cb38188b232f6e41f14d9c157fe4f92a45b8cd3e0d117d70df281dcf4d5a/pycares-4.11.0-cp310-cp310-manylinux_2_28_ppc64le.whl", hash = "sha256:d2a3526dbf6cb01b355e8867079c9356a8df48706b4b099ac0bf59d4656e610d", size = 690268, upload-time = "2025-09-09T15:16:17.864Z" }, + { url = "https://files.pythonhosted.org/packages/3b/18/b7f967d745f401f7d1b0f964a9102b3dfd1a86b4ac385d41a2032ab23015/pycares-4.11.0-cp310-cp310-manylinux_2_28_s390x.whl", hash = "sha256:3d5300a598ad48bbf169fba1f2b2e4cf7ab229e7c1a48d8c1166f9ccf1755cb3", size = 682138, upload-time = "2025-09-09T15:16:19.474Z" }, + { url = "https://files.pythonhosted.org/packages/27/30/291338fa5e745dba3cee06969343ae55334fa1692afce3851901f2025712/pycares-4.11.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:066f3caa07c85e1a094aebd9e7a7bb3f3b2d97cff2276665693dd5c0cc81cf84", size = 643965, upload-time = "2025-09-09T15:16:20.789Z" }, + { url = "https://files.pythonhosted.org/packages/e3/c0/de6d9bb2fb917f669c2834d7e00ae593c1b8d84c850cb4a6fa5096ea0612/pycares-4.11.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:dcd4a7761fdfb5aaac88adad0a734dd065c038f5982a8c4b0dd28efa0bd9cc7c", size = 627041, upload-time = "2025-09-09T15:16:22.42Z" }, + { url = "https://files.pythonhosted.org/packages/cd/f1/c7c0f9d23621bb192c29481e10d4f76b7d1194943bc220ae9584d14d9f49/pycares-4.11.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:83a7401d7520fa14b00d85d68bcca47a0676c69996e8515d53733972286f9739", size = 673289, upload-time = "2025-09-09T15:16:24.017Z" }, + { url = "https://files.pythonhosted.org/packages/33/51/902a965d771ccb899fd7ed8ae4bde5cd4ba2cac8e4a7e41ee131837416f0/pycares-4.11.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:66c310773abe42479302abf064832f4a37c8d7f788f4d5ee0d43cbad35cf5ff4", size = 656639, upload-time = "2025-09-09T15:16:25.64Z" }, + { url = "https://files.pythonhosted.org/packages/97/1d/3d961dacbf7b132fbbfa76fdbb19e5b9a109b3b53761d87c09dde9f9a832/pycares-4.11.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:95bc81f83fadb67f7f87914f216a0e141555ee17fd7f56e25aa0cc165e99e53b", size = 631945, upload-time = "2025-09-09T15:16:26.877Z" }, + { url = "https://files.pythonhosted.org/packages/10/9c/4a048c9ecd030cacf2565db4b46624bd2b21582888a840d37594fa3446f6/pycares-4.11.0-cp310-cp310-win32.whl", hash = "sha256:1dbbf0cfb39be63598b4cdc2522960627bf2f523e49c4349fb64b0499902ec7c", size = 118831, upload-time = "2025-09-09T15:16:27.94Z" }, + { url = "https://files.pythonhosted.org/packages/10/ce/b5f541f01162775d043d985a87750383111081a4478fd5e29fdfc42e6585/pycares-4.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:dde02314eefb85dce3cfdd747e8b44c69a94d442c0d7221b7de151ee4c93f0f5", size = 144579, upload-time = "2025-09-09T15:16:28.969Z" }, + { url = "https://files.pythonhosted.org/packages/d3/64/698fdab3e176cae8f755b6bf071b0a3fd0fb257c8f01c14183f86ca78a54/pycares-4.11.0-cp310-cp310-win_arm64.whl", hash = "sha256:9518514e3e85646bac798d94d34bf5b8741ee0cb580512e8450ce884f526b7cf", size = 115686, upload-time = "2025-09-09T15:16:30.032Z" }, + { url = "https://files.pythonhosted.org/packages/5f/0f/2e68eb38244b5bbd68cd8d21e82d5f937353b563fd2f1aae28987e38a93d/pycares-4.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c2971af3a4094280f7c24293ff4d361689c175c1ebcbea6b3c1560eaff7cb240", size = 145863, upload-time = "2025-09-09T15:16:31.253Z" }, + { url = "https://files.pythonhosted.org/packages/a2/3c/3c0ddeed957667438dd6151e9c41f21b54b49a3c16159807ca5d52eff621/pycares-4.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5d69e2034160e1219665decb8140e439afc7a7afcfd4adff08eb0f6142405c3e", size = 141825, upload-time = "2025-09-09T15:16:32.408Z" }, + { url = "https://files.pythonhosted.org/packages/6c/72/f285b4944e69f611d1f4fadae63675edfb4380a980e6b6e99acca9d7e731/pycares-4.11.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:3bd81ad69f607803f531ff5cfa1262391fa06e78488c13495cee0f70d02e0287", size = 642673, upload-time = "2025-09-09T15:16:33.664Z" }, + { url = "https://files.pythonhosted.org/packages/c5/44/61550e684035e71c894752e074b3722e5f1d40739840ca8b0b295209def7/pycares-4.11.0-cp311-cp311-manylinux_2_28_ppc64le.whl", hash = "sha256:0aed0974eab3131d832e7e84a73ddb0dddbc57393cd8c0788d68a759a78c4a7b", size = 690263, upload-time = "2025-09-09T15:16:34.819Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e6/e5e5e96821bb98106222fb8f617ba3e0c8828e75e74c67685f0044c77907/pycares-4.11.0-cp311-cp311-manylinux_2_28_s390x.whl", hash = "sha256:30d197180af626bb56f17e1fa54640838d7d12ed0f74665a3014f7155435b199", size = 682092, upload-time = "2025-09-09T15:16:36.119Z" }, + { url = "https://files.pythonhosted.org/packages/51/37/3c065239229e5ca57f2f46bac2cedaf32b26a22dae5d728751e8623efb4d/pycares-4.11.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:cb711a66246561f1cae51244deef700eef75481a70d99611fd3c8ab5bd69ab49", size = 643995, upload-time = "2025-09-09T15:16:40.623Z" }, + { url = "https://files.pythonhosted.org/packages/f9/0e/a3a24b205a725e51eebf3d766e512ccca07462da60211a238d906535105c/pycares-4.11.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7aba9a312a620052133437f2363aae90ae4695ee61cb2ee07cbb9951d4c69ddd", size = 627004, upload-time = "2025-09-09T15:16:44.199Z" }, + { url = "https://files.pythonhosted.org/packages/61/08/d9d2d4b15fcb6bd703306fa5ad426df22d5c7076e689b62bfbcb884b8a87/pycares-4.11.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c2af7a9d3afb63da31df1456d38b91555a6c147710a116d5cc70ab1e9f457a4f", size = 673235, upload-time = "2025-09-09T15:16:45.449Z" }, + { url = "https://files.pythonhosted.org/packages/1c/51/bc12de8ab3b36c0352a2b157d556dbdae942652d88f6db83034fa3b5cdaf/pycares-4.11.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:d5fe089be67bc5927f0c0bd60c082c79f22cf299635ee3ddd370ae2a6e8b4ae0", size = 656624, upload-time = "2025-09-09T15:16:46.905Z" }, + { url = "https://files.pythonhosted.org/packages/b5/ab/dd42b95634edcb26bdf0abde579f78d5ede3377fb46e3947ec223b2fbba5/pycares-4.11.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:35ff1ec260372c97ed688efd5b3c6e5481f2274dea08f6c4ea864c195a9673c6", size = 631904, upload-time = "2025-09-09T15:16:48.587Z" }, + { url = "https://files.pythonhosted.org/packages/59/59/f87c36aba61cc1a94c739a83cd55fdb73075739929e0a5a7bcc2ce880aa3/pycares-4.11.0-cp311-cp311-win32.whl", hash = "sha256:ff3d25883b7865ea34c00084dd22a7be7c58fd3131db6b25c35eafae84398f9d", size = 118829, upload-time = "2025-09-09T15:16:49.77Z" }, + { url = "https://files.pythonhosted.org/packages/70/b1/d7ce974454eafc6c81f87ae512f3dc2917c6e57af60c57aaef34b3729ce3/pycares-4.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:f4695153333607e63068580f2979b377b641a03bc36e02813659ffbea2b76fe2", size = 144578, upload-time = "2025-09-09T15:16:50.702Z" }, + { url = "https://files.pythonhosted.org/packages/7a/3b/f783b8fed44eb5c8a32a675613e5ac566dba149e58e3ab3097b9bfeb209e/pycares-4.11.0-cp311-cp311-win_arm64.whl", hash = "sha256:dc54a21586c096df73f06f9bdf594e8d86d7be84e5d4266358ce81c04c3cc88c", size = 115683, upload-time = "2025-09-09T15:16:52.102Z" }, + { url = "https://files.pythonhosted.org/packages/e2/4e/4821b66feefaaa8ec03494c1a11614c430983572e54ff062b4589441e199/pycares-4.11.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b93d624560ba52287873bacff70b42c99943821ecbc810b959b0953560f53c36", size = 145906, upload-time = "2025-09-09T15:16:53.204Z" }, + { url = "https://files.pythonhosted.org/packages/e8/81/93a505dcbb7533254b0ce1da519591dcda889d6a66dcdfa5737e3280e18a/pycares-4.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:775d99966e28c8abd9910ddef2de0f1e173afc5a11cea9f184613c747373ab80", size = 141972, upload-time = "2025-09-09T15:16:54.43Z" }, + { url = "https://files.pythonhosted.org/packages/7d/d6/76994c8b21316e48ea6c3ce3298574c28f90c9c41428a3349a57104621c9/pycares-4.11.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:84fde689557361764f052850a2d68916050adbfd9321f6105aca1d8f1a9bd49b", size = 637832, upload-time = "2025-09-09T15:16:55.523Z" }, + { url = "https://files.pythonhosted.org/packages/bb/a4/5ca7e316d0edb714d78974cb34f4883f63fe9f580644c2db99fb62b05f56/pycares-4.11.0-cp312-cp312-manylinux_2_28_ppc64le.whl", hash = "sha256:30ceed06f3bf5eff865a34d21562c25a7f3dad0ed336b9dd415330e03a6c50c4", size = 687751, upload-time = "2025-09-09T15:16:57.55Z" }, + { url = "https://files.pythonhosted.org/packages/cb/8d/c5c578fdd335d7b1dcaea88fae3497390095b5b05a1ba34a29f62d037abb/pycares-4.11.0-cp312-cp312-manylinux_2_28_s390x.whl", hash = "sha256:97d971b3a88a803bb95ff8a40ea4d68da59319eb8b59e924e318e2560af8c16d", size = 678362, upload-time = "2025-09-09T15:16:58.859Z" }, + { url = "https://files.pythonhosted.org/packages/b9/96/9be4d838a9348dd2e72a90c34d186b918b66d499af5be79afa18a6ba2808/pycares-4.11.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:2d5cac829da91ade70ce1af97dad448c6cd4778b48facbce1b015e16ced93642", size = 641069, upload-time = "2025-09-09T15:17:00.046Z" }, + { url = "https://files.pythonhosted.org/packages/39/d6/8ea9b5dcef6b566cde034aa2b68743f7b0a19fa0fba9ea01a4f98b8a57fb/pycares-4.11.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ee1ea367835eb441d246164c09d1f9703197af4425fc6865cefcde9e2ca81f85", size = 622357, upload-time = "2025-09-09T15:17:01.205Z" }, + { url = "https://files.pythonhosted.org/packages/07/f8/3401e89b5d2970e30e02f9beb29ad59e2a8f19ef2c68c978de2b764cacb0/pycares-4.11.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:3139ec1f4450a4b253386035c5ecd2722582ae3320a456df5021ffe3f174260a", size = 670290, upload-time = "2025-09-09T15:17:02.413Z" }, + { url = "https://files.pythonhosted.org/packages/a2/c4/ff6a166e1d1d1987339548a19d0b1d52ec3ead8b3a8a2247a0d96e56013c/pycares-4.11.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5d70324ca1d82c6c4b00aa678347f7560d1ef2ce1d181978903459a97751543a", size = 652958, upload-time = "2025-09-09T15:17:04.203Z" }, + { url = "https://files.pythonhosted.org/packages/b8/7c/fc084b395921c9b862d31a83f809fe649c24314b51b527ad0ab0df33edd4/pycares-4.11.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e2f8d9cfe0eb3a2997fde5df99b1aaea5a46dabfcfcac97b2d05f027c2cd5e28", size = 629239, upload-time = "2025-09-09T15:17:05.477Z" }, + { url = "https://files.pythonhosted.org/packages/b0/7f/2f26062bea95ab657f979217d50df563dc9fd9cc4c5dd21a6e7323e9efe7/pycares-4.11.0-cp312-cp312-win32.whl", hash = "sha256:1571a7055c03a95d5270c914034eac7f8bfa1b432fc1de53d871b821752191a4", size = 118918, upload-time = "2025-09-09T15:17:06.882Z" }, + { url = "https://files.pythonhosted.org/packages/a5/86/277473d20f3df4e00fa7e0ebb21955b2830b15247462aaf8f3fc8c4950be/pycares-4.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:7570e0b50db619b2ee370461c462617225dc3a3f63f975c6f117e2f0c94f82ca", size = 144560, upload-time = "2025-09-09T15:17:07.891Z" }, + { url = "https://files.pythonhosted.org/packages/f0/f9/d65ad17ec921d8b7eb42161dec2024ee2f5c9f1c44cabf0dd1b7f4fac6c5/pycares-4.11.0-cp312-cp312-win_arm64.whl", hash = "sha256:f199702740f3b766ed8c70efb885538be76cb48cd0cb596b948626f0b825e07a", size = 115695, upload-time = "2025-09-09T15:17:09.333Z" }, + { url = "https://files.pythonhosted.org/packages/dc/a9/62fea7ad72ac1fed2ac9dd8e9a7379b7eb0288bf2b3ea5731642c3a6f7de/pycares-4.11.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2c296ab94d1974f8d2f76c499755a9ce31ffd4986e8898ef19b90e32525f7d84", size = 145909, upload-time = "2025-09-09T15:17:10.491Z" }, + { url = "https://files.pythonhosted.org/packages/f4/ac/0317d6d0d3bd7599c53b8f1db09ad04260647d2f6842018e322584791fd5/pycares-4.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e0fcd3a8bac57a0987d9b09953ba0f8703eb9dca7c77f7051d8c2ed001185be8", size = 141974, upload-time = "2025-09-09T15:17:11.634Z" }, + { url = "https://files.pythonhosted.org/packages/63/11/731b565ae1e81c43dac247a248ee204628186f6df97c9927bd06c62237f8/pycares-4.11.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:bac55842047567ddae177fb8189b89a60633ac956d5d37260f7f71b517fd8b87", size = 637796, upload-time = "2025-09-09T15:17:12.815Z" }, + { url = "https://files.pythonhosted.org/packages/f5/30/a2631fe2ffaa85475cdbff7df1d9376bc0b2a6ae77ca55d53233c937a5da/pycares-4.11.0-cp313-cp313-manylinux_2_28_ppc64le.whl", hash = "sha256:4da2e805ed8c789b9444ef4053f6ef8040cd13b0c1ca6d3c4fe6f9369c458cb4", size = 687734, upload-time = "2025-09-09T15:17:14.015Z" }, + { url = "https://files.pythonhosted.org/packages/a9/b7/b3a5f99d4ab776662e71d5a56e8f6ea10741230ff988d1f502a8d429236b/pycares-4.11.0-cp313-cp313-manylinux_2_28_s390x.whl", hash = "sha256:ea785d1f232b42b325578f0c8a2fa348192e182cc84a1e862896076a4a2ba2a7", size = 678320, upload-time = "2025-09-09T15:17:15.442Z" }, + { url = "https://files.pythonhosted.org/packages/ea/77/a00d962b90432993afbf3bd05da8fe42117e0d9037cd7fd428dc41094d7b/pycares-4.11.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:aa160dc9e785212c49c12bb891e242c949758b99542946cc8e2098ef391f93b0", size = 641012, upload-time = "2025-09-09T15:17:16.728Z" }, + { url = "https://files.pythonhosted.org/packages/c6/fb/9266979ba59d37deee1fd74452b2ae32a7395acafe1bee510ac023c6c9a5/pycares-4.11.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7830709c23bbc43fbaefbb3dde57bdd295dc86732504b9d2e65044df8fd5e9fb", size = 622363, upload-time = "2025-09-09T15:17:17.835Z" }, + { url = "https://files.pythonhosted.org/packages/91/c2/16dbc3dc33781a3c79cbdd76dd1cda808d98ba078d9a63a725d6a1fad181/pycares-4.11.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3ef1ab7abbd238bb2dbbe871c3ea39f5a7fc63547c015820c1e24d0d494a1689", size = 670294, upload-time = "2025-09-09T15:17:19.214Z" }, + { url = "https://files.pythonhosted.org/packages/ff/75/f003905e55298a6dd5e0673a2dc11e31518a5141393b925dc05fcaba9fb4/pycares-4.11.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:a4060d8556c908660512d42df1f4a874e4e91b81f79e3a9090afedc7690ea5ba", size = 652973, upload-time = "2025-09-09T15:17:20.388Z" }, + { url = "https://files.pythonhosted.org/packages/55/2a/eafb235c371979e11f8998d686cbaa91df6a84a34ffe4d997dfe57c45445/pycares-4.11.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a98fac4a3d4f780817016b6f00a8a2c2f41df5d25dfa8e5b1aa0d783645a6566", size = 629235, upload-time = "2025-09-09T15:17:21.92Z" }, + { url = "https://files.pythonhosted.org/packages/05/99/60f19eb1c8eb898882dd8875ea51ad0aac3aff5780b27247969e637cc26a/pycares-4.11.0-cp313-cp313-win32.whl", hash = "sha256:faa8321bc2a366189dcf87b3823e030edf5ac97a6b9a7fc99f1926c4bf8ef28e", size = 118918, upload-time = "2025-09-09T15:17:23.327Z" }, + { url = "https://files.pythonhosted.org/packages/2a/14/bc89ad7225cba73068688397de09d7cad657d67b93641c14e5e18b88e685/pycares-4.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:6f74b1d944a50fa12c5006fd10b45e1a45da0c5d15570919ce48be88e428264c", size = 144556, upload-time = "2025-09-09T15:17:24.341Z" }, + { url = "https://files.pythonhosted.org/packages/af/88/4309576bd74b5e6fc1f39b9bc5e4b578df2cadb16bdc026ac0cc15663763/pycares-4.11.0-cp313-cp313-win_arm64.whl", hash = "sha256:4b6f7581793d8bb3014028b8397f6f80b99db8842da58f4409839c29b16397ad", size = 115692, upload-time = "2025-09-09T15:17:25.637Z" }, + { url = "https://files.pythonhosted.org/packages/2a/70/a723bc79bdcac60361b40184b649282ac0ab433b90e9cc0975370c2ff9c9/pycares-4.11.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:df0a17f4e677d57bca3624752bbb515316522ad1ce0de07ed9d920e6c4ee5d35", size = 145910, upload-time = "2025-09-09T15:17:26.774Z" }, + { url = "https://files.pythonhosted.org/packages/d5/4e/46311ef5a384b5f0bb206851135dde8f86b3def38fdbee9e3c03475d35ae/pycares-4.11.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:3b44e54cad31d3c3be5e8149ac36bc1c163ec86e0664293402f6f846fb22ad00", size = 142053, upload-time = "2025-09-09T15:17:27.956Z" }, + { url = "https://files.pythonhosted.org/packages/74/23/d236fc4f134d6311e4ad6445571e8285e84a3e155be36422ff20c0fbe471/pycares-4.11.0-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:80752133442dc7e6dd9410cec227c49f69283c038c316a8585cca05ec32c2766", size = 637878, upload-time = "2025-09-09T15:17:29.173Z" }, + { url = "https://files.pythonhosted.org/packages/f7/92/6edd41282b3f0e3d9defaba7b05c39730d51c37c165d9d3b319349c975aa/pycares-4.11.0-cp314-cp314-manylinux_2_28_ppc64le.whl", hash = "sha256:84b0b402dd333403fdce0e204aef1ef834d839c439c0c1aa143dc7d1237bb197", size = 687865, upload-time = "2025-09-09T15:17:30.549Z" }, + { url = "https://files.pythonhosted.org/packages/a7/a9/4d7cf4d72600fd47d9518f9ce99703a3e8711fb08d2ef63d198056cdc9a9/pycares-4.11.0-cp314-cp314-manylinux_2_28_s390x.whl", hash = "sha256:c0eec184df42fc82e43197e073f9cc8f93b25ad2f11f230c64c2dc1c80dbc078", size = 678396, upload-time = "2025-09-09T15:17:32.304Z" }, + { url = "https://files.pythonhosted.org/packages/0b/4b/e546eeb1d8ff6559e2e3bef31a6ea0c6e57ec826191941f83a3ce900ca89/pycares-4.11.0-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:ee751409322ff10709ee867d5aea1dc8431eec7f34835f0f67afd016178da134", size = 640786, upload-time = "2025-09-09T15:17:33.602Z" }, + { url = "https://files.pythonhosted.org/packages/0e/f5/b4572d9ee9c26de1f8d1dc80730df756276b9243a6794fa3101bbe56613d/pycares-4.11.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:1732db81e348bfce19c9bf9448ba660aea03042eeeea282824da1604a5bd4dcf", size = 621857, upload-time = "2025-09-09T15:17:34.74Z" }, + { url = "https://files.pythonhosted.org/packages/17/f2/639090376198bcaeff86562b25e1bce05a481cfb1e605f82ce62285230cd/pycares-4.11.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:702d21823996f139874aba5aa9bb786d69e93bde6e3915b99832eb4e335d31ae", size = 670130, upload-time = "2025-09-09T15:17:35.982Z" }, + { url = "https://files.pythonhosted.org/packages/3a/c4/cf40773cd9c36a12cebbe1e9b6fb120f9160dc9bfe0398d81a20b6c69972/pycares-4.11.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:218619b912cef7c64a339ab0e231daea10c994a05699740714dff8c428b9694a", size = 653133, upload-time = "2025-09-09T15:17:37.179Z" }, + { url = "https://files.pythonhosted.org/packages/32/6b/06054d977b0a9643821043b59f523f3db5e7684c4b1b4f5821994d5fa780/pycares-4.11.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:719f7ddff024fdacde97b926b4b26d0cc25901d5ef68bb994a581c420069936d", size = 629344, upload-time = "2025-09-09T15:17:38.308Z" }, + { url = "https://files.pythonhosted.org/packages/d6/6f/14bb0c2171a286d512e3f02d6168e608ffe5f6eceab78bf63e3073091ae3/pycares-4.11.0-cp314-cp314-win32.whl", hash = "sha256:d552fb2cb513ce910d1dc22dbba6420758a991a356f3cd1b7ec73a9e31f94d01", size = 121804, upload-time = "2025-09-09T15:17:39.388Z" }, + { url = "https://files.pythonhosted.org/packages/24/dc/6822f9ad6941027f70e1cf161d8631456531a87061588ed3b1dcad07d49d/pycares-4.11.0-cp314-cp314-win_amd64.whl", hash = "sha256:23d50a0842e8dbdddf870a7218a7ab5053b68892706b3a391ecb3d657424d266", size = 148005, upload-time = "2025-09-09T15:17:40.44Z" }, + { url = "https://files.pythonhosted.org/packages/ea/24/24ff3a80aa8471fbb62785c821a8e90f397ca842e0489f83ebf7ee274397/pycares-4.11.0-cp314-cp314-win_arm64.whl", hash = "sha256:836725754c32363d2c5d15b931b3ebd46b20185c02e850672cb6c5f0452c1e80", size = 119239, upload-time = "2025-09-09T15:17:42.094Z" }, + { url = "https://files.pythonhosted.org/packages/54/fe/2f3558d298ff8db31d5c83369001ab72af3b86a0374d9b0d40dc63314187/pycares-4.11.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:c9d839b5700542b27c1a0d359cbfad6496341e7c819c7fea63db9588857065ed", size = 146408, upload-time = "2025-09-09T15:17:43.74Z" }, + { url = "https://files.pythonhosted.org/packages/3c/c8/516901e46a1a73b3a75e87a35f3a3a4fe085f1214f37d954c9d7e782bd6d/pycares-4.11.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:31b85ad00422b38f426e5733a71dfb7ee7eb65a99ea328c508d4f552b1760dc8", size = 142371, upload-time = "2025-09-09T15:17:45.186Z" }, + { url = "https://files.pythonhosted.org/packages/ac/99/c3fba0aa575f331ebed91f87ba960ffbe0849211cdf103ab275bc0107ac6/pycares-4.11.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:cdac992206756b024b371760c55719eb5cd9d6b2cb25a8d5a04ae1b0ff426232", size = 647504, upload-time = "2025-09-09T15:17:46.503Z" }, + { url = "https://files.pythonhosted.org/packages/5c/e4/1cdc3ec9c92f8069ec18c58b016b2df7c44a088e2849f37ed457554961aa/pycares-4.11.0-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:ffb22cee640bc12ee0e654eba74ecfb59e2e0aebc5bccc3cc7ef92f487008af7", size = 697122, upload-time = "2025-09-09T15:17:47.772Z" }, + { url = "https://files.pythonhosted.org/packages/9c/d5/bd8f370b97bb73e5bdd55dc2a78e18d6f49181cf77e88af0599d16f5c073/pycares-4.11.0-cp314-cp314t-manylinux_2_28_s390x.whl", hash = "sha256:00538826d2eaf4a0e4becb0753b0ac8d652334603c445c9566c9eb273657eb4c", size = 687543, upload-time = "2025-09-09T15:17:49.183Z" }, + { url = "https://files.pythonhosted.org/packages/33/38/49b77b9cf5dffc0b1fdd86656975c3bc1a58b79bdc883a9ef749b17a013c/pycares-4.11.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:29daa36548c04cdcd1a78ae187a4b7b003f0b357a2f4f1f98f9863373eedc759", size = 649565, upload-time = "2025-09-09T15:17:51.03Z" }, + { url = "https://files.pythonhosted.org/packages/3c/23/f6d57bfb99d00a6a7363f95c8d3a930fe82a868d9de24c64c8048d66f16a/pycares-4.11.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:cf306f3951740d7bed36149a6d8d656a7d5432dd4bbc6af3bb6554361fc87401", size = 631242, upload-time = "2025-09-09T15:17:52.298Z" }, + { url = "https://files.pythonhosted.org/packages/33/a2/7b9121c71cfe06a8474e221593f83a78176fae3b79e5853d2dfd13ab01cc/pycares-4.11.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:386da2581db4ea2832629e275c061103b0be32f9391c5dfaea7f6040951950ad", size = 680304, upload-time = "2025-09-09T15:17:53.638Z" }, + { url = "https://files.pythonhosted.org/packages/5b/07/dfe76807f637d8b80e1a59dfc4a1bceabdd0205a45b2ebf78b415ae72af3/pycares-4.11.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:45d3254a694459fdb0640ef08724ca9d4b4f6ff6d7161c9b526d7d2e2111379e", size = 661039, upload-time = "2025-09-09T15:17:55.024Z" }, + { url = "https://files.pythonhosted.org/packages/b2/9b/55d50c5acd46cbe95d0da27740a83e721d89c0ce7e42bff9891a9f29a855/pycares-4.11.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:eddf5e520bb88b23b04ac1f28f5e9a7c77c718b8b4af3a4a7a2cc4a600f34502", size = 637560, upload-time = "2025-09-09T15:17:56.492Z" }, + { url = "https://files.pythonhosted.org/packages/1f/79/2b2e723d1b929dbe7f99e80a56abb29a4f86988c1f73195d960d706b1629/pycares-4.11.0-cp314-cp314t-win32.whl", hash = "sha256:8a75a406432ce39ce0ca41edff7486df6c970eb0fe5cfbe292f195a6b8654461", size = 122235, upload-time = "2025-09-09T15:17:57.576Z" }, + { url = "https://files.pythonhosted.org/packages/93/fe/bf3b3ed9345a38092e72cd9890a5df5c2349fc27846a714d823a41f0ee27/pycares-4.11.0-cp314-cp314t-win_amd64.whl", hash = "sha256:3784b80d797bcc2ff2bf3d4b27f46d8516fe1707ff3b82c2580dc977537387f9", size = 148575, upload-time = "2025-09-09T15:17:58.699Z" }, + { url = "https://files.pythonhosted.org/packages/ce/20/c0c5cfcf89725fe533b27bc5f714dc4efa8e782bf697c36f9ddf04ba975d/pycares-4.11.0-cp314-cp314t-win_arm64.whl", hash = "sha256:afc6503adf8b35c21183b9387be64ca6810644ef54c9ef6c99d1d5635c01601b", size = 119690, upload-time = "2025-09-09T15:17:59.809Z" }, +] + +[[package]] +name = "pycparser" +version = "2.23" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz", hash = "sha256:78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2", size = 173734, upload-time = "2025-09-09T13:23:47.91Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/e3/59cd50310fc9b59512193629e1984c1f95e5c8ae6e5d8c69532ccc65a7fe/pycparser-2.23-py3-none-any.whl", hash = "sha256:e5c6e8d3fbad53479cab09ac03729e0a9faf2bee3db8208a550daf5af81a5934", size = 118140, upload-time = "2025-09-09T13:23:46.651Z" }, +] + +[[package]] +name = "pycryptodomex" +version = "3.23.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c9/85/e24bf90972a30b0fcd16c73009add1d7d7cd9140c2498a68252028899e41/pycryptodomex-3.23.0.tar.gz", hash = "sha256:71909758f010c82bc99b0abf4ea12012c98962fbf0583c2164f8b84533c2e4da", size = 4922157, upload-time = "2025-05-17T17:23:41.434Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2e/00/10edb04777069a42490a38c137099d4b17ba6e36a4e6e28bdc7470e9e853/pycryptodomex-3.23.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:7b37e08e3871efe2187bc1fd9320cc81d87caf19816c648f24443483005ff886", size = 2498764, upload-time = "2025-05-17T17:22:21.453Z" }, + { url = "https://files.pythonhosted.org/packages/6b/3f/2872a9c2d3a27eac094f9ceaa5a8a483b774ae69018040ea3240d5b11154/pycryptodomex-3.23.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:91979028227543010d7b2ba2471cf1d1e398b3f183cb105ac584df0c36dac28d", size = 1643012, upload-time = "2025-05-17T17:22:23.702Z" }, + { url = "https://files.pythonhosted.org/packages/70/af/774c2e2b4f6570fbf6a4972161adbb183aeeaa1863bde31e8706f123bf92/pycryptodomex-3.23.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b8962204c47464d5c1c4038abeadd4514a133b28748bcd9fa5b6d62e3cec6fa", size = 2187643, upload-time = "2025-05-17T17:22:26.37Z" }, + { url = "https://files.pythonhosted.org/packages/de/a3/71065b24cb889d537954cedc3ae5466af00a2cabcff8e29b73be047e9a19/pycryptodomex-3.23.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a33986a0066860f7fcf7c7bd2bc804fa90e434183645595ae7b33d01f3c91ed8", size = 2273762, upload-time = "2025-05-17T17:22:28.313Z" }, + { url = "https://files.pythonhosted.org/packages/c9/0b/ff6f43b7fbef4d302c8b981fe58467b8871902cdc3eb28896b52421422cc/pycryptodomex-3.23.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7947ab8d589e3178da3d7cdeabe14f841b391e17046954f2fbcd941705762b5", size = 2313012, upload-time = "2025-05-17T17:22:30.57Z" }, + { url = "https://files.pythonhosted.org/packages/02/de/9d4772c0506ab6da10b41159493657105d3f8bb5c53615d19452afc6b315/pycryptodomex-3.23.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c25e30a20e1b426e1f0fa00131c516f16e474204eee1139d1603e132acffc314", size = 2186856, upload-time = "2025-05-17T17:22:32.819Z" }, + { url = "https://files.pythonhosted.org/packages/28/ad/8b30efcd6341707a234e5eba5493700a17852ca1ac7a75daa7945fcf6427/pycryptodomex-3.23.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:da4fa650cef02db88c2b98acc5434461e027dce0ae8c22dd5a69013eaf510006", size = 2347523, upload-time = "2025-05-17T17:22:35.386Z" }, + { url = "https://files.pythonhosted.org/packages/0f/02/16868e9f655b7670dbb0ac4f2844145cbc42251f916fc35c414ad2359849/pycryptodomex-3.23.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:58b851b9effd0d072d4ca2e4542bf2a4abcf13c82a29fd2c93ce27ee2a2e9462", size = 2272825, upload-time = "2025-05-17T17:22:37.632Z" }, + { url = "https://files.pythonhosted.org/packages/ca/18/4ca89ac737230b52ac8ffaca42f9c6f1fd07c81a6cd821e91af79db60632/pycryptodomex-3.23.0-cp313-cp313t-win32.whl", hash = "sha256:a9d446e844f08299236780f2efa9898c818fe7e02f17263866b8550c7d5fb328", size = 1772078, upload-time = "2025-05-17T17:22:40Z" }, + { url = "https://files.pythonhosted.org/packages/73/34/13e01c322db027682e00986873eca803f11c56ade9ba5bbf3225841ea2d4/pycryptodomex-3.23.0-cp313-cp313t-win_amd64.whl", hash = "sha256:bc65bdd9fc8de7a35a74cab1c898cab391a4add33a8fe740bda00f5976ca4708", size = 1803656, upload-time = "2025-05-17T17:22:42.139Z" }, + { url = "https://files.pythonhosted.org/packages/54/68/9504c8796b1805d58f4425002bcca20f12880e6fa4dc2fc9a668705c7a08/pycryptodomex-3.23.0-cp313-cp313t-win_arm64.whl", hash = "sha256:c885da45e70139464f082018ac527fdaad26f1657a99ee13eecdce0f0ca24ab4", size = 1707172, upload-time = "2025-05-17T17:22:44.704Z" }, + { url = "https://files.pythonhosted.org/packages/dd/9c/1a8f35daa39784ed8adf93a694e7e5dc15c23c741bbda06e1d45f8979e9e/pycryptodomex-3.23.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:06698f957fe1ab229a99ba2defeeae1c09af185baa909a31a5d1f9d42b1aaed6", size = 2499240, upload-time = "2025-05-17T17:22:46.953Z" }, + { url = "https://files.pythonhosted.org/packages/7a/62/f5221a191a97157d240cf6643747558759126c76ee92f29a3f4aee3197a5/pycryptodomex-3.23.0-cp37-abi3-macosx_10_9_x86_64.whl", hash = "sha256:b2c2537863eccef2d41061e82a881dcabb04944c5c06c5aa7110b577cc487545", size = 1644042, upload-time = "2025-05-17T17:22:49.098Z" }, + { url = "https://files.pythonhosted.org/packages/8c/fd/5a054543c8988d4ed7b612721d7e78a4b9bf36bc3c5ad45ef45c22d0060e/pycryptodomex-3.23.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:43c446e2ba8df8889e0e16f02211c25b4934898384c1ec1ec04d7889c0333587", size = 2186227, upload-time = "2025-05-17T17:22:51.139Z" }, + { url = "https://files.pythonhosted.org/packages/c8/a9/8862616a85cf450d2822dbd4fff1fcaba90877907a6ff5bc2672cafe42f8/pycryptodomex-3.23.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f489c4765093fb60e2edafdf223397bc716491b2b69fe74367b70d6999257a5c", size = 2272578, upload-time = "2025-05-17T17:22:53.676Z" }, + { url = "https://files.pythonhosted.org/packages/46/9f/bda9c49a7c1842820de674ab36c79f4fbeeee03f8ff0e4f3546c3889076b/pycryptodomex-3.23.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bdc69d0d3d989a1029df0eed67cc5e8e5d968f3724f4519bd03e0ec68df7543c", size = 2312166, upload-time = "2025-05-17T17:22:56.585Z" }, + { url = "https://files.pythonhosted.org/packages/03/cc/870b9bf8ca92866ca0186534801cf8d20554ad2a76ca959538041b7a7cf4/pycryptodomex-3.23.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6bbcb1dd0f646484939e142462d9e532482bc74475cecf9c4903d4e1cd21f003", size = 2185467, upload-time = "2025-05-17T17:22:59.237Z" }, + { url = "https://files.pythonhosted.org/packages/96/e3/ce9348236d8e669fea5dd82a90e86be48b9c341210f44e25443162aba187/pycryptodomex-3.23.0-cp37-abi3-musllinux_1_2_i686.whl", hash = "sha256:8a4fcd42ccb04c31268d1efeecfccfd1249612b4de6374205376b8f280321744", size = 2346104, upload-time = "2025-05-17T17:23:02.112Z" }, + { url = "https://files.pythonhosted.org/packages/a5/e9/e869bcee87beb89040263c416a8a50204f7f7a83ac11897646c9e71e0daf/pycryptodomex-3.23.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:55ccbe27f049743a4caf4f4221b166560d3438d0b1e5ab929e07ae1702a4d6fd", size = 2271038, upload-time = "2025-05-17T17:23:04.872Z" }, + { url = "https://files.pythonhosted.org/packages/8d/67/09ee8500dd22614af5fbaa51a4aee6e342b5fa8aecf0a6cb9cbf52fa6d45/pycryptodomex-3.23.0-cp37-abi3-win32.whl", hash = "sha256:189afbc87f0b9f158386bf051f720e20fa6145975f1e76369303d0f31d1a8d7c", size = 1771969, upload-time = "2025-05-17T17:23:07.115Z" }, + { url = "https://files.pythonhosted.org/packages/69/96/11f36f71a865dd6df03716d33bd07a67e9d20f6b8d39820470b766af323c/pycryptodomex-3.23.0-cp37-abi3-win_amd64.whl", hash = "sha256:52e5ca58c3a0b0bd5e100a9fbc8015059b05cffc6c66ce9d98b4b45e023443b9", size = 1803124, upload-time = "2025-05-17T17:23:09.267Z" }, + { url = "https://files.pythonhosted.org/packages/f9/93/45c1cdcbeb182ccd2e144c693eaa097763b08b38cded279f0053ed53c553/pycryptodomex-3.23.0-cp37-abi3-win_arm64.whl", hash = "sha256:02d87b80778c171445d67e23d1caef279bf4b25c3597050ccd2e13970b57fd51", size = 1707161, upload-time = "2025-05-17T17:23:11.414Z" }, + { url = "https://files.pythonhosted.org/packages/f3/b8/3e76d948c3c4ac71335bbe75dac53e154b40b0f8f1f022dfa295257a0c96/pycryptodomex-3.23.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ebfff755c360d674306e5891c564a274a47953562b42fb74a5c25b8fc1fb1cb5", size = 1627695, upload-time = "2025-05-17T17:23:17.38Z" }, + { url = "https://files.pythonhosted.org/packages/6a/cf/80f4297a4820dfdfd1c88cf6c4666a200f204b3488103d027b5edd9176ec/pycryptodomex-3.23.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eca54f4bb349d45afc17e3011ed4264ef1cc9e266699874cdd1349c504e64798", size = 1675772, upload-time = "2025-05-17T17:23:19.202Z" }, + { url = "https://files.pythonhosted.org/packages/d1/42/1e969ee0ad19fe3134b0e1b856c39bd0b70d47a4d0e81c2a8b05727394c9/pycryptodomex-3.23.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2596e643d4365e14d0879dc5aafe6355616c61c2176009270f3048f6d9a61f", size = 1668083, upload-time = "2025-05-17T17:23:21.867Z" }, + { url = "https://files.pythonhosted.org/packages/6e/c3/1de4f7631fea8a992a44ba632aa40e0008764c0fb9bf2854b0acf78c2cf2/pycryptodomex-3.23.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fdfac7cda115bca3a5abb2f9e43bc2fb66c2b65ab074913643803ca7083a79ea", size = 1706056, upload-time = "2025-05-17T17:23:24.031Z" }, + { url = "https://files.pythonhosted.org/packages/f2/5f/af7da8e6f1e42b52f44a24d08b8e4c726207434e2593732d39e7af5e7256/pycryptodomex-3.23.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:14c37aaece158d0ace436f76a7bb19093db3b4deade9797abfc39ec6cd6cc2fe", size = 1806478, upload-time = "2025-05-17T17:23:26.066Z" }, +] + +[[package]] +name = "pydantic" +version = "2.12.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "annotated-types" }, + { name = "pydantic-core" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/69/44/36f1a6e523abc58ae5f928898e4aca2e0ea509b5aa6f6f392a5d882be928/pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49", size = 821591, upload-time = "2025-11-26T15:11:46.471Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/87/b70ad306ebb6f9b585f114d0ac2137d792b48be34d732d60e597c2f8465a/pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d", size = 463580, upload-time = "2025-11-26T15:11:44.605Z" }, +] + +[[package]] +name = "pydantic-core" +version = "2.41.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952, upload-time = "2025-11-04T13:43:49.098Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c6/90/32c9941e728d564b411d574d8ee0cf09b12ec978cb22b294995bae5549a5/pydantic_core-2.41.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77b63866ca88d804225eaa4af3e664c5faf3568cea95360d21f4725ab6e07146", size = 2107298, upload-time = "2025-11-04T13:39:04.116Z" }, + { url = "https://files.pythonhosted.org/packages/fb/a8/61c96a77fe28993d9a6fb0f4127e05430a267b235a124545d79fea46dd65/pydantic_core-2.41.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dfa8a0c812ac681395907e71e1274819dec685fec28273a28905df579ef137e2", size = 1901475, upload-time = "2025-11-04T13:39:06.055Z" }, + { url = "https://files.pythonhosted.org/packages/5d/b6/338abf60225acc18cdc08b4faef592d0310923d19a87fba1faf05af5346e/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5921a4d3ca3aee735d9fd163808f5e8dd6c6972101e4adbda9a4667908849b97", size = 1918815, upload-time = "2025-11-04T13:39:10.41Z" }, + { url = "https://files.pythonhosted.org/packages/d1/1c/2ed0433e682983d8e8cba9c8d8ef274d4791ec6a6f24c58935b90e780e0a/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25c479382d26a2a41b7ebea1043564a937db462816ea07afa8a44c0866d52f9", size = 2065567, upload-time = "2025-11-04T13:39:12.244Z" }, + { url = "https://files.pythonhosted.org/packages/b3/24/cf84974ee7d6eae06b9e63289b7b8f6549d416b5c199ca2d7ce13bbcf619/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f547144f2966e1e16ae626d8ce72b4cfa0caedc7fa28052001c94fb2fcaa1c52", size = 2230442, upload-time = "2025-11-04T13:39:13.962Z" }, + { url = "https://files.pythonhosted.org/packages/fd/21/4e287865504b3edc0136c89c9c09431be326168b1eb7841911cbc877a995/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f52298fbd394f9ed112d56f3d11aabd0d5bd27beb3084cc3d8ad069483b8941", size = 2350956, upload-time = "2025-11-04T13:39:15.889Z" }, + { url = "https://files.pythonhosted.org/packages/a8/76/7727ef2ffa4b62fcab916686a68a0426b9b790139720e1934e8ba797e238/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:100baa204bb412b74fe285fb0f3a385256dad1d1879f0a5cb1499ed2e83d132a", size = 2068253, upload-time = "2025-11-04T13:39:17.403Z" }, + { url = "https://files.pythonhosted.org/packages/d5/8c/a4abfc79604bcb4c748e18975c44f94f756f08fb04218d5cb87eb0d3a63e/pydantic_core-2.41.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05a2c8852530ad2812cb7914dc61a1125dc4e06252ee98e5638a12da6cc6fb6c", size = 2177050, upload-time = "2025-11-04T13:39:19.351Z" }, + { url = "https://files.pythonhosted.org/packages/67/b1/de2e9a9a79b480f9cb0b6e8b6ba4c50b18d4e89852426364c66aa82bb7b3/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:29452c56df2ed968d18d7e21f4ab0ac55e71dc59524872f6fc57dcf4a3249ed2", size = 2147178, upload-time = "2025-11-04T13:39:21Z" }, + { url = "https://files.pythonhosted.org/packages/16/c1/dfb33f837a47b20417500efaa0378adc6635b3c79e8369ff7a03c494b4ac/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:d5160812ea7a8a2ffbe233d8da666880cad0cbaf5d4de74ae15c313213d62556", size = 2341833, upload-time = "2025-11-04T13:39:22.606Z" }, + { url = "https://files.pythonhosted.org/packages/47/36/00f398642a0f4b815a9a558c4f1dca1b4020a7d49562807d7bc9ff279a6c/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df3959765b553b9440adfd3c795617c352154e497a4eaf3752555cfb5da8fc49", size = 2321156, upload-time = "2025-11-04T13:39:25.843Z" }, + { url = "https://files.pythonhosted.org/packages/7e/70/cad3acd89fde2010807354d978725ae111ddf6d0ea46d1ea1775b5c1bd0c/pydantic_core-2.41.5-cp310-cp310-win32.whl", hash = "sha256:1f8d33a7f4d5a7889e60dc39856d76d09333d8a6ed0f5f1190635cbec70ec4ba", size = 1989378, upload-time = "2025-11-04T13:39:27.92Z" }, + { url = "https://files.pythonhosted.org/packages/76/92/d338652464c6c367e5608e4488201702cd1cbb0f33f7b6a85a60fe5f3720/pydantic_core-2.41.5-cp310-cp310-win_amd64.whl", hash = "sha256:62de39db01b8d593e45871af2af9e497295db8d73b085f6bfd0b18c83c70a8f9", size = 2013622, upload-time = "2025-11-04T13:39:29.848Z" }, + { url = "https://files.pythonhosted.org/packages/e8/72/74a989dd9f2084b3d9530b0915fdda64ac48831c30dbf7c72a41a5232db8/pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6", size = 2105873, upload-time = "2025-11-04T13:39:31.373Z" }, + { url = "https://files.pythonhosted.org/packages/12/44/37e403fd9455708b3b942949e1d7febc02167662bf1a7da5b78ee1ea2842/pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b", size = 1899826, upload-time = "2025-11-04T13:39:32.897Z" }, + { url = "https://files.pythonhosted.org/packages/33/7f/1d5cab3ccf44c1935a359d51a8a2a9e1a654b744b5e7f80d41b88d501eec/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a", size = 1917869, upload-time = "2025-11-04T13:39:34.469Z" }, + { url = "https://files.pythonhosted.org/packages/6e/6a/30d94a9674a7fe4f4744052ed6c5e083424510be1e93da5bc47569d11810/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8", size = 2063890, upload-time = "2025-11-04T13:39:36.053Z" }, + { url = "https://files.pythonhosted.org/packages/50/be/76e5d46203fcb2750e542f32e6c371ffa9b8ad17364cf94bb0818dbfb50c/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e", size = 2229740, upload-time = "2025-11-04T13:39:37.753Z" }, + { url = "https://files.pythonhosted.org/packages/d3/ee/fed784df0144793489f87db310a6bbf8118d7b630ed07aa180d6067e653a/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1", size = 2350021, upload-time = "2025-11-04T13:39:40.94Z" }, + { url = "https://files.pythonhosted.org/packages/c8/be/8fed28dd0a180dca19e72c233cbf58efa36df055e5b9d90d64fd1740b828/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b", size = 2066378, upload-time = "2025-11-04T13:39:42.523Z" }, + { url = "https://files.pythonhosted.org/packages/b0/3b/698cf8ae1d536a010e05121b4958b1257f0b5522085e335360e53a6b1c8b/pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b", size = 2175761, upload-time = "2025-11-04T13:39:44.553Z" }, + { url = "https://files.pythonhosted.org/packages/b8/ba/15d537423939553116dea94ce02f9c31be0fa9d0b806d427e0308ec17145/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284", size = 2146303, upload-time = "2025-11-04T13:39:46.238Z" }, + { url = "https://files.pythonhosted.org/packages/58/7f/0de669bf37d206723795f9c90c82966726a2ab06c336deba4735b55af431/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594", size = 2340355, upload-time = "2025-11-04T13:39:48.002Z" }, + { url = "https://files.pythonhosted.org/packages/e5/de/e7482c435b83d7e3c3ee5ee4451f6e8973cff0eb6007d2872ce6383f6398/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e", size = 2319875, upload-time = "2025-11-04T13:39:49.705Z" }, + { url = "https://files.pythonhosted.org/packages/fe/e6/8c9e81bb6dd7560e33b9053351c29f30c8194b72f2d6932888581f503482/pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b", size = 1987549, upload-time = "2025-11-04T13:39:51.842Z" }, + { url = "https://files.pythonhosted.org/packages/11/66/f14d1d978ea94d1bc21fc98fcf570f9542fe55bfcc40269d4e1a21c19bf7/pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe", size = 2011305, upload-time = "2025-11-04T13:39:53.485Z" }, + { url = "https://files.pythonhosted.org/packages/56/d8/0e271434e8efd03186c5386671328154ee349ff0354d83c74f5caaf096ed/pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f", size = 1972902, upload-time = "2025-11-04T13:39:56.488Z" }, + { url = "https://files.pythonhosted.org/packages/5f/5d/5f6c63eebb5afee93bcaae4ce9a898f3373ca23df3ccaef086d0233a35a7/pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7", size = 2110990, upload-time = "2025-11-04T13:39:58.079Z" }, + { url = "https://files.pythonhosted.org/packages/aa/32/9c2e8ccb57c01111e0fd091f236c7b371c1bccea0fa85247ac55b1e2b6b6/pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0", size = 1896003, upload-time = "2025-11-04T13:39:59.956Z" }, + { url = "https://files.pythonhosted.org/packages/68/b8/a01b53cb0e59139fbc9e4fda3e9724ede8de279097179be4ff31f1abb65a/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69", size = 1919200, upload-time = "2025-11-04T13:40:02.241Z" }, + { url = "https://files.pythonhosted.org/packages/38/de/8c36b5198a29bdaade07b5985e80a233a5ac27137846f3bc2d3b40a47360/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75", size = 2052578, upload-time = "2025-11-04T13:40:04.401Z" }, + { url = "https://files.pythonhosted.org/packages/00/b5/0e8e4b5b081eac6cb3dbb7e60a65907549a1ce035a724368c330112adfdd/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05", size = 2208504, upload-time = "2025-11-04T13:40:06.072Z" }, + { url = "https://files.pythonhosted.org/packages/77/56/87a61aad59c7c5b9dc8caad5a41a5545cba3810c3e828708b3d7404f6cef/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc", size = 2335816, upload-time = "2025-11-04T13:40:07.835Z" }, + { url = "https://files.pythonhosted.org/packages/0d/76/941cc9f73529988688a665a5c0ecff1112b3d95ab48f81db5f7606f522d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c", size = 2075366, upload-time = "2025-11-04T13:40:09.804Z" }, + { url = "https://files.pythonhosted.org/packages/d3/43/ebef01f69baa07a482844faaa0a591bad1ef129253ffd0cdaa9d8a7f72d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5", size = 2171698, upload-time = "2025-11-04T13:40:12.004Z" }, + { url = "https://files.pythonhosted.org/packages/b1/87/41f3202e4193e3bacfc2c065fab7706ebe81af46a83d3e27605029c1f5a6/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c", size = 2132603, upload-time = "2025-11-04T13:40:13.868Z" }, + { url = "https://files.pythonhosted.org/packages/49/7d/4c00df99cb12070b6bccdef4a195255e6020a550d572768d92cc54dba91a/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294", size = 2329591, upload-time = "2025-11-04T13:40:15.672Z" }, + { url = "https://files.pythonhosted.org/packages/cc/6a/ebf4b1d65d458f3cda6a7335d141305dfa19bdc61140a884d165a8a1bbc7/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1", size = 2319068, upload-time = "2025-11-04T13:40:17.532Z" }, + { url = "https://files.pythonhosted.org/packages/49/3b/774f2b5cd4192d5ab75870ce4381fd89cf218af999515baf07e7206753f0/pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d", size = 1985908, upload-time = "2025-11-04T13:40:19.309Z" }, + { url = "https://files.pythonhosted.org/packages/86/45/00173a033c801cacf67c190fef088789394feaf88a98a7035b0e40d53dc9/pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815", size = 2020145, upload-time = "2025-11-04T13:40:21.548Z" }, + { url = "https://files.pythonhosted.org/packages/f9/22/91fbc821fa6d261b376a3f73809f907cec5ca6025642c463d3488aad22fb/pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3", size = 1976179, upload-time = "2025-11-04T13:40:23.393Z" }, + { url = "https://files.pythonhosted.org/packages/87/06/8806241ff1f70d9939f9af039c6c35f2360cf16e93c2ca76f184e76b1564/pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9", size = 2120403, upload-time = "2025-11-04T13:40:25.248Z" }, + { url = "https://files.pythonhosted.org/packages/94/02/abfa0e0bda67faa65fef1c84971c7e45928e108fe24333c81f3bfe35d5f5/pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34", size = 1896206, upload-time = "2025-11-04T13:40:27.099Z" }, + { url = "https://files.pythonhosted.org/packages/15/df/a4c740c0943e93e6500f9eb23f4ca7ec9bf71b19e608ae5b579678c8d02f/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0", size = 1919307, upload-time = "2025-11-04T13:40:29.806Z" }, + { url = "https://files.pythonhosted.org/packages/9a/e3/6324802931ae1d123528988e0e86587c2072ac2e5394b4bc2bc34b61ff6e/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33", size = 2063258, upload-time = "2025-11-04T13:40:33.544Z" }, + { url = "https://files.pythonhosted.org/packages/c9/d4/2230d7151d4957dd79c3044ea26346c148c98fbf0ee6ebd41056f2d62ab5/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e", size = 2214917, upload-time = "2025-11-04T13:40:35.479Z" }, + { url = "https://files.pythonhosted.org/packages/e6/9f/eaac5df17a3672fef0081b6c1bb0b82b33ee89aa5cec0d7b05f52fd4a1fa/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2", size = 2332186, upload-time = "2025-11-04T13:40:37.436Z" }, + { url = "https://files.pythonhosted.org/packages/cf/4e/35a80cae583a37cf15604b44240e45c05e04e86f9cfd766623149297e971/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586", size = 2073164, upload-time = "2025-11-04T13:40:40.289Z" }, + { url = "https://files.pythonhosted.org/packages/bf/e3/f6e262673c6140dd3305d144d032f7bd5f7497d3871c1428521f19f9efa2/pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d", size = 2179146, upload-time = "2025-11-04T13:40:42.809Z" }, + { url = "https://files.pythonhosted.org/packages/75/c7/20bd7fc05f0c6ea2056a4565c6f36f8968c0924f19b7d97bbfea55780e73/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740", size = 2137788, upload-time = "2025-11-04T13:40:44.752Z" }, + { url = "https://files.pythonhosted.org/packages/3a/8d/34318ef985c45196e004bc46c6eab2eda437e744c124ef0dbe1ff2c9d06b/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e", size = 2340133, upload-time = "2025-11-04T13:40:46.66Z" }, + { url = "https://files.pythonhosted.org/packages/9c/59/013626bf8c78a5a5d9350d12e7697d3d4de951a75565496abd40ccd46bee/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858", size = 2324852, upload-time = "2025-11-04T13:40:48.575Z" }, + { url = "https://files.pythonhosted.org/packages/1a/d9/c248c103856f807ef70c18a4f986693a46a8ffe1602e5d361485da502d20/pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36", size = 1994679, upload-time = "2025-11-04T13:40:50.619Z" }, + { url = "https://files.pythonhosted.org/packages/9e/8b/341991b158ddab181cff136acd2552c9f35bd30380422a639c0671e99a91/pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11", size = 2019766, upload-time = "2025-11-04T13:40:52.631Z" }, + { url = "https://files.pythonhosted.org/packages/73/7d/f2f9db34af103bea3e09735bb40b021788a5e834c81eedb541991badf8f5/pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd", size = 1981005, upload-time = "2025-11-04T13:40:54.734Z" }, + { url = "https://files.pythonhosted.org/packages/ea/28/46b7c5c9635ae96ea0fbb779e271a38129df2550f763937659ee6c5dbc65/pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a", size = 2119622, upload-time = "2025-11-04T13:40:56.68Z" }, + { url = "https://files.pythonhosted.org/packages/74/1a/145646e5687e8d9a1e8d09acb278c8535ebe9e972e1f162ed338a622f193/pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14", size = 1891725, upload-time = "2025-11-04T13:40:58.807Z" }, + { url = "https://files.pythonhosted.org/packages/23/04/e89c29e267b8060b40dca97bfc64a19b2a3cf99018167ea1677d96368273/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1", size = 1915040, upload-time = "2025-11-04T13:41:00.853Z" }, + { url = "https://files.pythonhosted.org/packages/84/a3/15a82ac7bd97992a82257f777b3583d3e84bdb06ba6858f745daa2ec8a85/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66", size = 2063691, upload-time = "2025-11-04T13:41:03.504Z" }, + { url = "https://files.pythonhosted.org/packages/74/9b/0046701313c6ef08c0c1cf0e028c67c770a4e1275ca73131563c5f2a310a/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869", size = 2213897, upload-time = "2025-11-04T13:41:05.804Z" }, + { url = "https://files.pythonhosted.org/packages/8a/cd/6bac76ecd1b27e75a95ca3a9a559c643b3afcd2dd62086d4b7a32a18b169/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2", size = 2333302, upload-time = "2025-11-04T13:41:07.809Z" }, + { url = "https://files.pythonhosted.org/packages/4c/d2/ef2074dc020dd6e109611a8be4449b98cd25e1b9b8a303c2f0fca2f2bcf7/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375", size = 2064877, upload-time = "2025-11-04T13:41:09.827Z" }, + { url = "https://files.pythonhosted.org/packages/18/66/e9db17a9a763d72f03de903883c057b2592c09509ccfe468187f2a2eef29/pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553", size = 2180680, upload-time = "2025-11-04T13:41:12.379Z" }, + { url = "https://files.pythonhosted.org/packages/d3/9e/3ce66cebb929f3ced22be85d4c2399b8e85b622db77dad36b73c5387f8f8/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90", size = 2138960, upload-time = "2025-11-04T13:41:14.627Z" }, + { url = "https://files.pythonhosted.org/packages/a6/62/205a998f4327d2079326b01abee48e502ea739d174f0a89295c481a2272e/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07", size = 2339102, upload-time = "2025-11-04T13:41:16.868Z" }, + { url = "https://files.pythonhosted.org/packages/3c/0d/f05e79471e889d74d3d88f5bd20d0ed189ad94c2423d81ff8d0000aab4ff/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb", size = 2326039, upload-time = "2025-11-04T13:41:18.934Z" }, + { url = "https://files.pythonhosted.org/packages/ec/e1/e08a6208bb100da7e0c4b288eed624a703f4d129bde2da475721a80cab32/pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23", size = 1995126, upload-time = "2025-11-04T13:41:21.418Z" }, + { url = "https://files.pythonhosted.org/packages/48/5d/56ba7b24e9557f99c9237e29f5c09913c81eeb2f3217e40e922353668092/pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf", size = 2015489, upload-time = "2025-11-04T13:41:24.076Z" }, + { url = "https://files.pythonhosted.org/packages/4e/bb/f7a190991ec9e3e0ba22e4993d8755bbc4a32925c0b5b42775c03e8148f9/pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0", size = 1977288, upload-time = "2025-11-04T13:41:26.33Z" }, + { url = "https://files.pythonhosted.org/packages/92/ed/77542d0c51538e32e15afe7899d79efce4b81eee631d99850edc2f5e9349/pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a", size = 2120255, upload-time = "2025-11-04T13:41:28.569Z" }, + { url = "https://files.pythonhosted.org/packages/bb/3d/6913dde84d5be21e284439676168b28d8bbba5600d838b9dca99de0fad71/pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3", size = 1863760, upload-time = "2025-11-04T13:41:31.055Z" }, + { url = "https://files.pythonhosted.org/packages/5a/f0/e5e6b99d4191da102f2b0eb9687aaa7f5bea5d9964071a84effc3e40f997/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c", size = 1878092, upload-time = "2025-11-04T13:41:33.21Z" }, + { url = "https://files.pythonhosted.org/packages/71/48/36fb760642d568925953bcc8116455513d6e34c4beaa37544118c36aba6d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612", size = 2053385, upload-time = "2025-11-04T13:41:35.508Z" }, + { url = "https://files.pythonhosted.org/packages/20/25/92dc684dd8eb75a234bc1c764b4210cf2646479d54b47bf46061657292a8/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d", size = 2218832, upload-time = "2025-11-04T13:41:37.732Z" }, + { url = "https://files.pythonhosted.org/packages/e2/09/f53e0b05023d3e30357d82eb35835d0f6340ca344720a4599cd663dca599/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9", size = 2327585, upload-time = "2025-11-04T13:41:40Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4e/2ae1aa85d6af35a39b236b1b1641de73f5a6ac4d5a7509f77b814885760c/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660", size = 2041078, upload-time = "2025-11-04T13:41:42.323Z" }, + { url = "https://files.pythonhosted.org/packages/cd/13/2e215f17f0ef326fc72afe94776edb77525142c693767fc347ed6288728d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9", size = 2173914, upload-time = "2025-11-04T13:41:45.221Z" }, + { url = "https://files.pythonhosted.org/packages/02/7a/f999a6dcbcd0e5660bc348a3991c8915ce6599f4f2c6ac22f01d7a10816c/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3", size = 2129560, upload-time = "2025-11-04T13:41:47.474Z" }, + { url = "https://files.pythonhosted.org/packages/3a/b1/6c990ac65e3b4c079a4fb9f5b05f5b013afa0f4ed6780a3dd236d2cbdc64/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf", size = 2329244, upload-time = "2025-11-04T13:41:49.992Z" }, + { url = "https://files.pythonhosted.org/packages/d9/02/3c562f3a51afd4d88fff8dffb1771b30cfdfd79befd9883ee094f5b6c0d8/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470", size = 2331955, upload-time = "2025-11-04T13:41:54.079Z" }, + { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" }, + { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" }, + { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" }, + { url = "https://files.pythonhosted.org/packages/11/72/90fda5ee3b97e51c494938a4a44c3a35a9c96c19bba12372fb9c634d6f57/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034", size = 2115441, upload-time = "2025-11-04T13:42:39.557Z" }, + { url = "https://files.pythonhosted.org/packages/1f/53/8942f884fa33f50794f119012dc6a1a02ac43a56407adaac20463df8e98f/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c", size = 1930291, upload-time = "2025-11-04T13:42:42.169Z" }, + { url = "https://files.pythonhosted.org/packages/79/c8/ecb9ed9cd942bce09fc888ee960b52654fbdbede4ba6c2d6e0d3b1d8b49c/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2", size = 1948632, upload-time = "2025-11-04T13:42:44.564Z" }, + { url = "https://files.pythonhosted.org/packages/2e/1b/687711069de7efa6af934e74f601e2a4307365e8fdc404703afc453eab26/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad", size = 2138905, upload-time = "2025-11-04T13:42:47.156Z" }, + { url = "https://files.pythonhosted.org/packages/09/32/59b0c7e63e277fa7911c2fc70ccfb45ce4b98991e7ef37110663437005af/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd", size = 2110495, upload-time = "2025-11-04T13:42:49.689Z" }, + { url = "https://files.pythonhosted.org/packages/aa/81/05e400037eaf55ad400bcd318c05bb345b57e708887f07ddb2d20e3f0e98/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc", size = 1915388, upload-time = "2025-11-04T13:42:52.215Z" }, + { url = "https://files.pythonhosted.org/packages/6e/0d/e3549b2399f71d56476b77dbf3cf8937cec5cd70536bdc0e374a421d0599/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56", size = 1942879, upload-time = "2025-11-04T13:42:56.483Z" }, + { url = "https://files.pythonhosted.org/packages/f7/07/34573da085946b6a313d7c42f82f16e8920bfd730665de2d11c0c37a74b5/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b", size = 2139017, upload-time = "2025-11-04T13:42:59.471Z" }, + { url = "https://files.pythonhosted.org/packages/e6/b0/1a2aa41e3b5a4ba11420aba2d091b2d17959c8d1519ece3627c371951e73/pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b5819cd790dbf0c5eb9f82c73c16b39a65dd6dd4d1439dcdea7816ec9adddab8", size = 2103351, upload-time = "2025-11-04T13:43:02.058Z" }, + { url = "https://files.pythonhosted.org/packages/a4/ee/31b1f0020baaf6d091c87900ae05c6aeae101fa4e188e1613c80e4f1ea31/pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:5a4e67afbc95fa5c34cf27d9089bca7fcab4e51e57278d710320a70b956d1b9a", size = 1925363, upload-time = "2025-11-04T13:43:05.159Z" }, + { url = "https://files.pythonhosted.org/packages/e1/89/ab8e86208467e467a80deaca4e434adac37b10a9d134cd2f99b28a01e483/pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ece5c59f0ce7d001e017643d8d24da587ea1f74f6993467d85ae8a5ef9d4f42b", size = 2135615, upload-time = "2025-11-04T13:43:08.116Z" }, + { url = "https://files.pythonhosted.org/packages/99/0a/99a53d06dd0348b2008f2f30884b34719c323f16c3be4e6cc1203b74a91d/pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16f80f7abe3351f8ea6858914ddc8c77e02578544a0ebc15b4c2e1a0e813b0b2", size = 2175369, upload-time = "2025-11-04T13:43:12.49Z" }, + { url = "https://files.pythonhosted.org/packages/6d/94/30ca3b73c6d485b9bb0bc66e611cff4a7138ff9736b7e66bcf0852151636/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:33cb885e759a705b426baada1fe68cbb0a2e68e34c5d0d0289a364cf01709093", size = 2144218, upload-time = "2025-11-04T13:43:15.431Z" }, + { url = "https://files.pythonhosted.org/packages/87/57/31b4f8e12680b739a91f472b5671294236b82586889ef764b5fbc6669238/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:c8d8b4eb992936023be7dee581270af5c6e0697a8559895f527f5b7105ecd36a", size = 2329951, upload-time = "2025-11-04T13:43:18.062Z" }, + { url = "https://files.pythonhosted.org/packages/7d/73/3c2c8edef77b8f7310e6fb012dbc4b8551386ed575b9eb6fb2506e28a7eb/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:242a206cd0318f95cd21bdacff3fcc3aab23e79bba5cac3db5a841c9ef9c6963", size = 2318428, upload-time = "2025-11-04T13:43:20.679Z" }, + { url = "https://files.pythonhosted.org/packages/2f/02/8559b1f26ee0d502c74f9cca5c0d2fd97e967e083e006bbbb4e97f3a043a/pydantic_core-2.41.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d3a978c4f57a597908b7e697229d996d77a6d3c94901e9edee593adada95ce1a", size = 2147009, upload-time = "2025-11-04T13:43:23.286Z" }, + { url = "https://files.pythonhosted.org/packages/5f/9b/1b3f0e9f9305839d7e84912f9e8bfbd191ed1b1ef48083609f0dabde978c/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26", size = 2101980, upload-time = "2025-11-04T13:43:25.97Z" }, + { url = "https://files.pythonhosted.org/packages/a4/ed/d71fefcb4263df0da6a85b5d8a7508360f2f2e9b3bf5814be9c8bccdccc1/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808", size = 1923865, upload-time = "2025-11-04T13:43:28.763Z" }, + { url = "https://files.pythonhosted.org/packages/ce/3a/626b38db460d675f873e4444b4bb030453bbe7b4ba55df821d026a0493c4/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc", size = 2134256, upload-time = "2025-11-04T13:43:31.71Z" }, + { url = "https://files.pythonhosted.org/packages/83/d9/8412d7f06f616bbc053d30cb4e5f76786af3221462ad5eee1f202021eb4e/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1", size = 2174762, upload-time = "2025-11-04T13:43:34.744Z" }, + { url = "https://files.pythonhosted.org/packages/55/4c/162d906b8e3ba3a99354e20faa1b49a85206c47de97a639510a0e673f5da/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84", size = 2143141, upload-time = "2025-11-04T13:43:37.701Z" }, + { url = "https://files.pythonhosted.org/packages/1f/f2/f11dd73284122713f5f89fc940f370d035fa8e1e078d446b3313955157fe/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770", size = 2330317, upload-time = "2025-11-04T13:43:40.406Z" }, + { url = "https://files.pythonhosted.org/packages/88/9d/b06ca6acfe4abb296110fb1273a4d848a0bfb2ff65f3ee92127b3244e16b/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f", size = 2316992, upload-time = "2025-11-04T13:43:43.602Z" }, + { url = "https://files.pythonhosted.org/packages/36/c7/cfc8e811f061c841d7990b0201912c3556bfeb99cdcb7ed24adc8d6f8704/pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51", size = 2145302, upload-time = "2025-11-04T13:43:46.64Z" }, +] + +[[package]] +name = "pygments" +version = "2.18.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199", size = 4891905, upload-time = "2024-05-04T13:42:02.013Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f7/3f/01c8b82017c199075f8f788d0d906b9ffbbc5a47dc9918a945e13d5a2bda/pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a", size = 1205513, upload-time = "2024-05-04T13:41:57.345Z" }, +] + +[[package]] +name = "pymdown-extensions" +version = "10.20" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown" }, + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3e/35/e3814a5b7df295df69d035cfb8aab78b2967cdf11fcfae7faed726b66664/pymdown_extensions-10.20.tar.gz", hash = "sha256:5c73566ab0cf38c6ba084cb7c5ea64a119ae0500cce754ccb682761dfea13a52", size = 852774, upload-time = "2025-12-31T19:59:42.211Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ea/10/47caf89cbb52e5bb764696fd52a8c591a2f0e851a93270c05a17f36000b5/pymdown_extensions-10.20-py3-none-any.whl", hash = "sha256:ea9e62add865da80a271d00bfa1c0fa085b20d133fb3fc97afdc88e682f60b2f", size = 268733, upload-time = "2025-12-31T19:59:40.652Z" }, +] + +[[package]] +name = "pymongo" +version = "4.15.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "dnspython" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/24/a0/5c324fe6735b2bc189779ff46e981a59d495a74594f45542159125d77256/pymongo-4.15.5.tar.gz", hash = "sha256:3a8d6bf2610abe0c97c567cf98bf5bba3e90ccc93cc03c9dde75fa11e4267b42", size = 2471889, upload-time = "2025-12-02T18:44:30.992Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/33/e4/d80061be4e53125597dd2916171c87986043b190e50c1834fff455e71d42/pymongo-4.15.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a01a2054d50b50c121c720739a2216d855c48726b0002894de9b991cdd68a2a5", size = 811318, upload-time = "2025-12-02T18:42:12.09Z" }, + { url = "https://files.pythonhosted.org/packages/fb/b3/c499fe0814e4d3a84fa3ff5df5133bf847529d8b5a051e6108b5a25b75c7/pymongo-4.15.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5e57968139d81367117ed7b75d921445a575d4d7e61536f5e860475df92ac0a9", size = 811676, upload-time = "2025-12-02T18:42:14.396Z" }, + { url = "https://files.pythonhosted.org/packages/62/71/8e21a8a680546b3a90afbb878a16fe2a7cb0f7d9652aa675c172e57856a1/pymongo-4.15.5-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:266aa37e3673e5dcfdd359a81d27131fc133e49cf8e5d9f9f27a5845fac2cd1f", size = 1185485, upload-time = "2025-12-02T18:42:16.147Z" }, + { url = "https://files.pythonhosted.org/packages/03/56/bdc292a7b01aa2aba806883dbcacc3be837d65425453aa2bc27954ba5a55/pymongo-4.15.5-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2883da6bd0545cc2f12672f6a609b33d48e099a220872ca2bf9bf29fe96a32c3", size = 1203866, upload-time = "2025-12-02T18:42:18.018Z" }, + { url = "https://files.pythonhosted.org/packages/8b/e2/12bebc7e93a81c2f804ffcc94997f61f0e2cd2c11bf0f01da8e0e1425e5c/pymongo-4.15.5-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2fc32b354a608ec748d89bbe236b74b967890667eea1af54e92dfd8fbf26df52", size = 1242550, upload-time = "2025-12-02T18:42:19.898Z" }, + { url = "https://files.pythonhosted.org/packages/0d/ac/c48f6f59a660ec44052ee448dea1c71da85cfaa4a0c17c726d4ee2db7716/pymongo-4.15.5-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3c006cbaa4b40d296dd2bb8828976866c876ead4c39032b761dcf26f1ba56fde", size = 1232844, upload-time = "2025-12-02T18:42:21.709Z" }, + { url = "https://files.pythonhosted.org/packages/89/cc/6368befca7a2f3b51460755a373f78b72003aeee95e8e138cbd479c307f4/pymongo-4.15.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ce21e3dc5939b83d03f871090d83ac29fef055bd057f8d3074b6cad10f86b04c", size = 1200192, upload-time = "2025-12-02T18:42:23.605Z" }, + { url = "https://files.pythonhosted.org/packages/9d/97/bc810a017ebb20e6e301fa8c5b21c5e53691fdde2cfd39bd9c450e957b14/pymongo-4.15.5-cp310-cp310-win32.whl", hash = "sha256:1b545dcf66a9f06e9b501bfb0438e1eb9af67336e8a5cf36c4bc0a5d3fbe7a37", size = 798338, upload-time = "2025-12-02T18:42:25.438Z" }, + { url = "https://files.pythonhosted.org/packages/46/17/3be0b476a6bfb3a51bf1750323b5eddf883dddb6482ccb8dbcab2c6c48ad/pymongo-4.15.5-cp310-cp310-win_amd64.whl", hash = "sha256:1ecc544f515f828f05d3c56cd98063ba3ef8b75f534c63de43306d59f1e93fcd", size = 808153, upload-time = "2025-12-02T18:42:26.889Z" }, + { url = "https://files.pythonhosted.org/packages/bf/0a/39f9daf16d695abd58987bb5e2c164b5a64e42b8d53d3c43bc06e4aa7dfc/pymongo-4.15.5-cp310-cp310-win_arm64.whl", hash = "sha256:1151968ab90db146f0591b6c7db27ce4f73c7ffa0bbddc1d7fb7cb14c9f0b967", size = 800943, upload-time = "2025-12-02T18:42:28.668Z" }, + { url = "https://files.pythonhosted.org/packages/0c/ea/e43387c2ed78a60ad917c45f4d4de4f6992929d63fe15af4c2e624f093a9/pymongo-4.15.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:57157a4b936e28e2fbe7017b2f6a751da5e284675cab371f2c596d4e0e4f58f3", size = 865894, upload-time = "2025-12-02T18:42:30.496Z" }, + { url = "https://files.pythonhosted.org/packages/5e/8c/f2c9c55adb9709a4b2244d8d8d9ec05e4abb274e03fe8388b58a34ae08b0/pymongo-4.15.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e2a34a7391f4cc54fc584e49db6f7c3929221a9da08b3af2d2689884a5943843", size = 866235, upload-time = "2025-12-02T18:42:31.862Z" }, + { url = "https://files.pythonhosted.org/packages/5e/aa/bdf3553d7309b0ebc0c6edc23f43829b1758431f2f2f7385d2427b20563b/pymongo-4.15.5-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:be040c8cdaf9c2d5ae9ab60a67ecab453ec19d9ccd457a678053fdceab5ee4c8", size = 1429787, upload-time = "2025-12-02T18:42:33.829Z" }, + { url = "https://files.pythonhosted.org/packages/b3/55/80a8eefc88f578fde56489e5278ba5caa5ee9b6f285959ed2b98b44e2133/pymongo-4.15.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:defe93944526b1774265c16acf014689cb1b0b18eb84a7b370083b214f9e18cd", size = 1456747, upload-time = "2025-12-02T18:42:35.805Z" }, + { url = "https://files.pythonhosted.org/packages/1d/54/6a7ec290c7ab22aab117ab60e7375882ec5af7433eaf077f86e187a3a9e8/pymongo-4.15.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:816e66116f0ef868eff0463a8b28774af8b547466dbad30c8e82bf0325041848", size = 1514670, upload-time = "2025-12-02T18:42:37.737Z" }, + { url = "https://files.pythonhosted.org/packages/65/8a/5822aa20b274ee8a8821bf0284f131e7fc555b0758c3f2a82c51ae73a3c6/pymongo-4.15.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66c7b332532e0f021d784d04488dbf7ed39b7e7d6d5505e282ec8e9cf1025791", size = 1500711, upload-time = "2025-12-02T18:42:39.61Z" }, + { url = "https://files.pythonhosted.org/packages/32/ca/63984e32b4d745a25445c9da1159dfe4568a03375f32bb1a9e009dccb023/pymongo-4.15.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:acc46a9e47efad8c5229e644a3774169013a46ee28ac72d1fa4edd67c0b7ee9b", size = 1452021, upload-time = "2025-12-02T18:42:41.323Z" }, + { url = "https://files.pythonhosted.org/packages/f1/23/0d6988f3fdfcacae2ac8d7b76eb24f80ebee9eb607c53bcebfad75b7fd85/pymongo-4.15.5-cp311-cp311-win32.whl", hash = "sha256:b9836c28ba350d8182a51f32ef9bb29f0c40e82ba1dfb9e4371cd4d94338a55d", size = 844483, upload-time = "2025-12-02T18:42:42.814Z" }, + { url = "https://files.pythonhosted.org/packages/8e/04/dedff8a5a9539e5b6128d8d2458b9c0c83ebd38b43389620a0d97223f114/pymongo-4.15.5-cp311-cp311-win_amd64.whl", hash = "sha256:3a45876c5c2ab44e2a249fb542eba2a026f60d6ab04c7ef3924eae338d9de790", size = 859194, upload-time = "2025-12-02T18:42:45.025Z" }, + { url = "https://files.pythonhosted.org/packages/67/e5/fb6f49bceffe183e66831c2eebd2ea14bd65e2816aeaf8e2fc018fd8c344/pymongo-4.15.5-cp311-cp311-win_arm64.whl", hash = "sha256:e4a48fc5c712b3db85c9987cfa7fde0366b7930018de262919afd9e52cfbc375", size = 848377, upload-time = "2025-12-02T18:42:47.19Z" }, + { url = "https://files.pythonhosted.org/packages/3c/4e/8f9fcb2dc9eab1fb0ed02da31e7f4847831d9c0ef08854a296588b97e8ed/pymongo-4.15.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c33477af1a50d1b4d86555e098fc2cf5992d839ad538dea0c00a8682162b7a75", size = 920955, upload-time = "2025-12-02T18:42:48.812Z" }, + { url = "https://files.pythonhosted.org/packages/d2/b4/c0808bed1f82b3008909b9562615461e59c3b66f8977e502ea87c88b08a4/pymongo-4.15.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e6b30defa4a52d3698cd84d608963a8932f7e9b6ec5130087e7082552ac685e5", size = 920690, upload-time = "2025-12-02T18:42:50.832Z" }, + { url = "https://files.pythonhosted.org/packages/12/f3/feea83150c6a0cd3b44d5f705b1c74bff298a36f82d665f597bf89d42b3f/pymongo-4.15.5-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:45fec063f5672e6173bcb09b492431e3641cc74399c2b996fcb995881c2cac61", size = 1690351, upload-time = "2025-12-02T18:42:53.402Z" }, + { url = "https://files.pythonhosted.org/packages/d7/4e/15924d33d8d429e4c41666090017c6ac5e7ccc4ce5e435a2df09e45220a8/pymongo-4.15.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b8c6813110c0d9fde18674b7262f47a2270ae46c0ddd05711e6770caa3c9a3fb", size = 1726089, upload-time = "2025-12-02T18:42:56.187Z" }, + { url = "https://files.pythonhosted.org/packages/a5/49/650ff29dc5f9cf090dfbd6fb248c56d8a10d268b6f46b10fb02fbda3c762/pymongo-4.15.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e8ec48d1db9f44c737b13be4299a1782d5fde3e75423acbbbe927cb37ebbe87d", size = 1800637, upload-time = "2025-12-02T18:42:57.913Z" }, + { url = "https://files.pythonhosted.org/packages/7d/18/f34661ade670ee42331543f4aa229569ac7ef45907ecda41b777137b9f40/pymongo-4.15.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1f410694fdd76631ead7df6544cdeadaf2407179196c3642fced8e48bb21d0a6", size = 1785480, upload-time = "2025-12-02T18:43:00.626Z" }, + { url = "https://files.pythonhosted.org/packages/10/b6/378bb26937f6b366754484145826aca2d2361ac05b0bacd45a35876abcef/pymongo-4.15.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8c46765d6ac5727a899190aacdeec7a57f8c93346124ddd7e12633b573e2e65", size = 1718548, upload-time = "2025-12-02T18:43:02.32Z" }, + { url = "https://files.pythonhosted.org/packages/58/79/31b8afba36f794a049633e105e45c30afaa0e1c0bab48332d999e87d4860/pymongo-4.15.5-cp312-cp312-win32.whl", hash = "sha256:647118a58dca7d3547714fc0b383aebf81f5852f4173dfd77dd34e80eea9d29b", size = 891319, upload-time = "2025-12-02T18:43:04.699Z" }, + { url = "https://files.pythonhosted.org/packages/c8/31/a7e6d8c5657d922872ac75ab1c0a1335bfb533d2b4dad082d5d04089abbb/pymongo-4.15.5-cp312-cp312-win_amd64.whl", hash = "sha256:099d3e2dddfc75760c6a8fadfb99c1e88824a99c2c204a829601241dff9da049", size = 910919, upload-time = "2025-12-02T18:43:06.555Z" }, + { url = "https://files.pythonhosted.org/packages/1c/b4/286c12fa955ae0597cd4c763d87c986e7ade681d4b11a81766f62f079c79/pymongo-4.15.5-cp312-cp312-win_arm64.whl", hash = "sha256:649cb906882c4058f467f334fb277083998ba5672ffec6a95d6700db577fd31a", size = 896357, upload-time = "2025-12-02T18:43:08.801Z" }, + { url = "https://files.pythonhosted.org/packages/9b/92/e70db1a53bc0bb5defe755dee66b5dfbe5e514882183ffb696d6e1d38aa2/pymongo-4.15.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2b736226f9001bbbd02f822acb9b9b6d28319f362f057672dfae2851f7da6125", size = 975324, upload-time = "2025-12-02T18:43:11.074Z" }, + { url = "https://files.pythonhosted.org/packages/a4/90/dd78c059a031b942fa36d71796e94a0739ea9fb4251fcd971e9579192611/pymongo-4.15.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:60ea9f07fbbcc7c88f922082eb27436dce6756730fdef76a3a9b4c972d0a57a3", size = 975129, upload-time = "2025-12-02T18:43:13.345Z" }, + { url = "https://files.pythonhosted.org/packages/40/72/87cf1bb75ef296456912eb7c6d51ebe7a36dbbe9bee0b8a9cd02a62a8a6e/pymongo-4.15.5-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:20af63218ae42870eaee31fb8cc4ce9e3af7f04ea02fc98ad751fb7a9c8d7be3", size = 1950973, upload-time = "2025-12-02T18:43:15.225Z" }, + { url = "https://files.pythonhosted.org/packages/8c/68/dfa507c8e5cebee4e305825b436c34f5b9ba34488a224b7e112a03dbc01e/pymongo-4.15.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:20d9c11625392f1f8dec7688de5ce344e110ca695344efa313ae4839f13bd017", size = 1995259, upload-time = "2025-12-02T18:43:16.869Z" }, + { url = "https://files.pythonhosted.org/packages/85/9d/832578e5ed7f682a09441bbc0881ffd506b843396ef4b34ec53bd38b2fb2/pymongo-4.15.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1202b3e5357b161acb7b7cc98e730288a5c15544e5ef7254b33931cb9a27c36e", size = 2086591, upload-time = "2025-12-02T18:43:19.559Z" }, + { url = "https://files.pythonhosted.org/packages/0a/99/ca8342a0cefd2bb1392187ef8fe01432855e3b5cd1e640495246bcd65542/pymongo-4.15.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:63af710e9700dbf91abccf119c5f5533b9830286d29edb073803d3b252862c0d", size = 2070200, upload-time = "2025-12-02T18:43:21.214Z" }, + { url = "https://files.pythonhosted.org/packages/3f/7d/f4a9c1fceaaf71524ff9ff964cece0315dcc93df4999a49f064564875bff/pymongo-4.15.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f22eeb86861cf7b8ee6886361d52abb88e3cd96c6f6d102e45e2604fc6e9e316", size = 1985263, upload-time = "2025-12-02T18:43:23.415Z" }, + { url = "https://files.pythonhosted.org/packages/d8/15/f942535bcc6e22d3c26c7e730daf296ffe69d8ce474c430ea7e551f8cf33/pymongo-4.15.5-cp313-cp313-win32.whl", hash = "sha256:aad6efe82b085bf77cec2a047ded2c810e93eced3ccf1a8e3faec3317df3cd52", size = 938143, upload-time = "2025-12-02T18:43:26.081Z" }, + { url = "https://files.pythonhosted.org/packages/02/2a/c92a6927d676dd376d1ae05c680139c5cad068b22e5f0c8cb61014448894/pymongo-4.15.5-cp313-cp313-win_amd64.whl", hash = "sha256:ccc801f6d71ebee2ec2fb3acc64b218fa7cdb7f57933b2f8eee15396b662a0a0", size = 962603, upload-time = "2025-12-02T18:43:27.816Z" }, + { url = "https://files.pythonhosted.org/packages/3a/f0/cdf78e9ed9c26fb36b8d75561ebf3c7fe206ff1c3de2e1b609fccdf3a55b/pymongo-4.15.5-cp313-cp313-win_arm64.whl", hash = "sha256:f043abdf20845bf29a554e95e4fe18d7d7a463095d6a1547699a12f80da91e02", size = 944308, upload-time = "2025-12-02T18:43:29.371Z" }, + { url = "https://files.pythonhosted.org/packages/03/0c/49713e0f8f41110e8b2bcce7c88570b158cf43dd53a0d01d4e1c772c7ede/pymongo-4.15.5-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ba0e75a390334221744e2666fd2d4c82419b580c9bc8d6e0d2d61459d263f3af", size = 1029996, upload-time = "2025-12-02T18:43:31.58Z" }, + { url = "https://files.pythonhosted.org/packages/23/de/1df5d7b49647e9e4511054f750c1109cb8e160763b286b96879917170618/pymongo-4.15.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:853ec7da97642eabaf94d3de4453a86365729327d920af167bf14b2e87b24dce", size = 1029612, upload-time = "2025-12-02T18:43:33.69Z" }, + { url = "https://files.pythonhosted.org/packages/8b/19/3a051228e5beb0b421d725bb2ab5207a260c718d9b5be5b85cfe963733e3/pymongo-4.15.5-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7631304106487480ebbd8acbe44ff1e69d1fdc27e83d9753dc1fd227cea10761", size = 2211814, upload-time = "2025-12-02T18:43:35.769Z" }, + { url = "https://files.pythonhosted.org/packages/bf/b3/989531a056c4388ef18245d1a6d6b3ec5c538666b000764286119efbf194/pymongo-4.15.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:50505181365eba5d4d35c462870b3614c8eddd0b2407c89377c1a59380640dd9", size = 2264629, upload-time = "2025-12-02T18:43:37.479Z" }, + { url = "https://files.pythonhosted.org/packages/ea/5f/8b3339fec44d0ba6d9388a19340fb1534c85ab6aa9fd8fb9c1af146bb72a/pymongo-4.15.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3b75ec7006471299a571d6db1c5609ea4aa9c847a701e9b2953a8ede705d82db", size = 2371823, upload-time = "2025-12-02T18:43:39.866Z" }, + { url = "https://files.pythonhosted.org/packages/d4/7f/706bf45cf12990b6cb73e6290b048944a51592de7a597052a761eea90b8d/pymongo-4.15.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c3fc24cb1f4ec60ed83162d4bba0c26abc6c9ae78c928805583673f3b3ea6984", size = 2351860, upload-time = "2025-12-02T18:43:42.002Z" }, + { url = "https://files.pythonhosted.org/packages/f3/c5/fdcc81c20c67a61ba1073122c9ab42c937dd6f914004747e9ceefa4cead3/pymongo-4.15.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:21d17bb2934b0640863361c08dd06991f128a97f9bee19425a499227be9ae6b4", size = 2251349, upload-time = "2025-12-02T18:43:43.924Z" }, + { url = "https://files.pythonhosted.org/packages/0c/1c/e540ccac0685b234a23574dce3c8e077cd59bcb73ab19bcab1915894d3a6/pymongo-4.15.5-cp314-cp314-win32.whl", hash = "sha256:5a3974236cb842b4ef50a5a6bfad9c7d83a713af68ea3592ba240bbcb863305a", size = 992901, upload-time = "2025-12-02T18:43:45.732Z" }, + { url = "https://files.pythonhosted.org/packages/89/31/eb72c53bc897cb50b57000d71ce9bdcfc9c84ba4c7f6d55348df47b241d8/pymongo-4.15.5-cp314-cp314-win_amd64.whl", hash = "sha256:73fa8a7eee44fd95ba7d5cf537340ff3ff34efeb1f7d6790532d0a6ed4dee575", size = 1021205, upload-time = "2025-12-02T18:43:47.756Z" }, + { url = "https://files.pythonhosted.org/packages/ea/4a/74a7cc350d60953d27b5636906b43b232b501cee07f70f6513ac603097e8/pymongo-4.15.5-cp314-cp314-win_arm64.whl", hash = "sha256:d41288ca2a3eb9ac7c8cad4ea86ef8d63b69dc46c9b65c2bbd35331ec2a0fc57", size = 1000616, upload-time = "2025-12-02T18:43:49.677Z" }, + { url = "https://files.pythonhosted.org/packages/1a/22/1e557868b9b207d7dbf7706412251b28a82d4b958e007b6f2569d59ada3d/pymongo-4.15.5-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:552670f0c8bff103656d4e4b1f2c018f789c9de03f7615ed5e547d5b1b83cda0", size = 1086723, upload-time = "2025-12-02T18:43:51.432Z" }, + { url = "https://files.pythonhosted.org/packages/aa/9c/2e24c2da289e1d3b9bc4e0850136a364473bddfbe8b19b33d2bb5d30ee0d/pymongo-4.15.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:41891b45f6ff1e23cfd1b7fbe40286664ad4507e2d2aa61c6d8c40eb6e11dded", size = 1086653, upload-time = "2025-12-02T18:43:53.131Z" }, + { url = "https://files.pythonhosted.org/packages/c6/be/4c2460c9ec91a891c754b91914ce700cc46009dae40183a85e26793dfae9/pymongo-4.15.5-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:524a8a593ae2eb1ec6db761daf0c03f98824e9882ab7df3d458d0c76c7ade255", size = 2531627, upload-time = "2025-12-02T18:43:55.141Z" }, + { url = "https://files.pythonhosted.org/packages/a0/48/cea56d04eb6bbd8b8943ff73d7cf26b94f715fccb23cf7ef9a4f853725a0/pymongo-4.15.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e7ceb35c41b86711a1b284c604e2b944a2d46cb1b8dd3f8b430a9155491378f2", size = 2603767, upload-time = "2025-12-02T18:43:57.188Z" }, + { url = "https://files.pythonhosted.org/packages/d9/ff/6743e351f8e0d5c3f388deb15f0cdbb77d2439eb3fba7ebcdf7878719517/pymongo-4.15.5-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3be2336715924be3a861b5e40c634376fd6bfe6dd1892d391566aa5a88a31307", size = 2725216, upload-time = "2025-12-02T18:43:59.463Z" }, + { url = "https://files.pythonhosted.org/packages/d4/90/fa532b6320b3ba61872110ff6f674bd54b54a592c0c64719e4f46852d0b6/pymongo-4.15.5-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d65df9c015e33f74ea9d1abf474971abca21e347a660384f8227dbdab75a33ca", size = 2704804, upload-time = "2025-12-02T18:44:01.415Z" }, + { url = "https://files.pythonhosted.org/packages/e1/84/1905c269aced043973b9528d94678e62e2eba249e70490c3c32dc70e2501/pymongo-4.15.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:83c05bea05e151754357f8e6bbb80d5accead5110dc58f64e283173c71ec9de2", size = 2582274, upload-time = "2025-12-02T18:44:03.427Z" }, + { url = "https://files.pythonhosted.org/packages/7e/af/78c13179961e418396ec6ef53c0f1c855f1e9f1176d10909e8345d65366a/pymongo-4.15.5-cp314-cp314t-win32.whl", hash = "sha256:7c285614a3e8570b03174a25db642e449b0e7f77a6c9e487b73b05c9bf228ee6", size = 1044015, upload-time = "2025-12-02T18:44:05.318Z" }, + { url = "https://files.pythonhosted.org/packages/b0/d5/49012f03418dce976124da339f3a6afbe6959cb0468ca6302596fe272926/pymongo-4.15.5-cp314-cp314t-win_amd64.whl", hash = "sha256:aae7d96f7b2b1a2753349130797543e61e93ee2ace8faa7fbe0565e2eb5d815f", size = 1078481, upload-time = "2025-12-02T18:44:07.215Z" }, + { url = "https://files.pythonhosted.org/packages/5e/fc/f352a070d8ff6f388ce344c5ddb82348a38e0d1c99346fa6bfdef07134fe/pymongo-4.15.5-cp314-cp314t-win_arm64.whl", hash = "sha256:576a7d4b99465d38112c72f7f3d345f9d16aeeff0f923a3b298c13e15ab4f0ad", size = 1051166, upload-time = "2025-12-02T18:44:09.048Z" }, +] + +[[package]] +name = "pytest" +version = "9.0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/07/56/f013048ac4bc4c1d9be45afd4ab209ea62822fb1598f40687e6bf45dcea4/pytest-9.0.1.tar.gz", hash = "sha256:3e9c069ea73583e255c3b21cf46b8d3c56f6e3a1a8f6da94ccb0fcf57b9d73c8", size = 1564125, upload-time = "2025-11-12T13:05:09.333Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0b/8b/6300fb80f858cda1c51ffa17075df5d846757081d11ab4aa35cef9e6258b/pytest-9.0.1-py3-none-any.whl", hash = "sha256:67be0030d194df2dfa7b556f2e56fb3c3315bd5c8822c6951162b92b32ce7dad", size = 373668, upload-time = "2025-11-12T13:05:07.379Z" }, +] + +[[package]] +name = "pytest-aiohttp" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiohttp" }, + { name = "pytest" }, + { name = "pytest-asyncio" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/72/4b/d326890c153f2c4ce1bf45d07683c08c10a1766058a22934620bc6ac6592/pytest_aiohttp-1.1.0.tar.gz", hash = "sha256:147de8cb164f3fc9d7196967f109ab3c0b93ea3463ab50631e56438eab7b5adc", size = 12842, upload-time = "2025-01-23T12:44:04.465Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ba/0f/e6af71c02e0f1098eaf7d2dbf3ffdf0a69fc1e0ef174f96af05cef161f1b/pytest_aiohttp-1.1.0-py3-none-any.whl", hash = "sha256:f39a11693a0dce08dd6c542d241e199dd8047a6e6596b2bcfa60d373f143456d", size = 8932, upload-time = "2025-01-23T12:44:03.27Z" }, +] + +[[package]] +name = "pytest-asyncio" +version = "1.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "backports-asyncio-runner", marker = "python_full_version < '3.11'" }, + { name = "pytest" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/90/2c/8af215c0f776415f3590cac4f9086ccefd6fd463befeae41cd4d3f193e5a/pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5", size = 50087, upload-time = "2025-11-10T16:07:47.256Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e5/35/f8b19922b6a25bc0880171a2f1a003eaeb93657475193ab516fd87cac9da/pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5", size = 15075, upload-time = "2025-11-10T16:07:45.537Z" }, +] + +[[package]] +name = "pytest-cov" +version = "7.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "coverage", extra = ["toml"] }, + { name = "pluggy" }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5e/f7/c933acc76f5208b3b00089573cf6a2bc26dc80a8aece8f52bb7d6b1855ca/pytest_cov-7.0.0.tar.gz", hash = "sha256:33c97eda2e049a0c5298e91f519302a1334c26ac65c1a483d6206fd458361af1", size = 54328, upload-time = "2025-09-09T10:57:02.113Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ee/49/1377b49de7d0c1ce41292161ea0f721913fa8722c19fb9c1e3aa0367eecb/pytest_cov-7.0.0-py3-none-any.whl", hash = "sha256:3b8e9558b16cc1479da72058bdecf8073661c7f57f7d3c5f22a1c23507f2d861", size = 22424, upload-time = "2025-09-09T10:57:00.695Z" }, +] + +[[package]] +name = "pytest-html" +version = "4.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jinja2" }, + { name = "pytest" }, + { name = "pytest-metadata" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bb/ab/4862dcb5a8a514bd87747e06b8d55483c0c9e987e1b66972336946e49b49/pytest_html-4.1.1.tar.gz", hash = "sha256:70a01e8ae5800f4a074b56a4cb1025c8f4f9b038bba5fe31e3c98eb996686f07", size = 150773, upload-time = "2023-11-07T15:44:28.975Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c8/c7/c160021cbecd956cc1a6f79e5fe155f7868b2e5b848f1320dad0b3e3122f/pytest_html-4.1.1-py3-none-any.whl", hash = "sha256:c8152cea03bd4e9bee6d525573b67bbc6622967b72b9628dda0ea3e2a0b5dd71", size = 23491, upload-time = "2023-11-07T15:44:27.149Z" }, +] + +[[package]] +name = "pytest-metadata" +version = "3.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a6/85/8c969f8bec4e559f8f2b958a15229a35495f5b4ce499f6b865eac54b878d/pytest_metadata-3.1.1.tar.gz", hash = "sha256:d2a29b0355fbc03f168aa96d41ff88b1a3b44a3b02acbe491801c98a048017c8", size = 9952, upload-time = "2024-02-12T19:38:44.887Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3e/43/7e7b2ec865caa92f67b8f0e9231a798d102724ca4c0e1f414316be1c1ef2/pytest_metadata-3.1.1-py3-none-any.whl", hash = "sha256:c8e0844db684ee1c798cfa38908d20d67d0463ecb6137c72e91f418558dd5f4b", size = 11428, upload-time = "2024-02-12T19:38:42.531Z" }, +] + +[[package]] +name = "pytest-mock" +version = "3.15.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz", hash = "sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f", size = 34036, upload-time = "2025-09-16T16:37:27.081Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl", hash = "sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d", size = 10095, upload-time = "2025-09-16T16:37:25.734Z" }, +] + +[[package]] +name = "pytest-mypy" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "filelock" }, + { name = "mypy" }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b0/50/3ce149b469e27848c1dc354553b17774f9dde0140625f5a4130bd21e1052/pytest_mypy-1.0.1.tar.gz", hash = "sha256:3f5fcaff75c80dccc6b68cf5ecc28e1bbe71e95309469eb7a28bf408ce55c074", size = 15975, upload-time = "2025-04-02T19:31:16.151Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bf/93/25ed3c02e15c4ef1b04cbda7c708ffc5da755986aaacfb48db1f9e84a996/pytest_mypy-1.0.1-py3-none-any.whl", hash = "sha256:ad7133c9b92c802e032f2596590ebede7eea7c418e61d60d5cdd571b55c72056", size = 8701, upload-time = "2025-04-02T19:31:14.914Z" }, +] + +[[package]] +name = "python-socks" +version = "2.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6c/07/cfdd6a846ac859e513b4e68bb6c669a90a74d89d8d405516fba7fc9c6f0c/python_socks-2.8.0.tar.gz", hash = "sha256:340f82778b20a290bdd538ee47492978d603dff7826aaf2ce362d21ad9ee6f1b", size = 273130, upload-time = "2025-12-09T12:17:05.433Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/13/10/e2b575faa32d1d32e5e6041fc64794fa9f09526852a06b25353b66f52cae/python_socks-2.8.0-py3-none-any.whl", hash = "sha256:57c24b416569ccea493a101d38b0c82ed54be603aa50b6afbe64c46e4a4e4315", size = 55075, upload-time = "2025-12-09T12:17:03.269Z" }, +] + +[package.optional-dependencies] +asyncio = [ + { name = "async-timeout", marker = "python_full_version < '3.11'" }, +] + +[[package]] +name = "pytz" +version = "2025.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz", hash = "sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3", size = 320884, upload-time = "2025-03-25T02:25:00.538Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl", hash = "sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00", size = 509225, upload-time = "2025-03-25T02:24:58.468Z" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227, upload-time = "2025-09-25T21:31:46.04Z" }, + { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019, upload-time = "2025-09-25T21:31:47.706Z" }, + { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646, upload-time = "2025-09-25T21:31:49.21Z" }, + { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793, upload-time = "2025-09-25T21:31:50.735Z" }, + { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293, upload-time = "2025-09-25T21:31:51.828Z" }, + { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872, upload-time = "2025-09-25T21:31:53.282Z" }, + { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828, upload-time = "2025-09-25T21:31:54.807Z" }, + { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415, upload-time = "2025-09-25T21:31:55.885Z" }, + { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561, upload-time = "2025-09-25T21:31:57.406Z" }, + { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, + { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, + { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, + { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, + { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, + { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, + { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, + { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, + { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, + { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, + { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, + { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, + { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, + { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, + { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, + { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, + { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, + { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, + { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, + { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, + { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, + { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, + { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, + { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, + { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, + { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, +] + +[[package]] +name = "redis" +version = "7.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "async-timeout", marker = "python_full_version < '3.11.3'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/43/c8/983d5c6579a411d8a99bc5823cc5712768859b5ce2c8afe1a65b37832c81/redis-7.1.0.tar.gz", hash = "sha256:b1cc3cfa5a2cb9c2ab3ba700864fb0ad75617b41f01352ce5779dabf6d5f9c3c", size = 4796669, upload-time = "2025-11-19T15:54:39.961Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/89/f0/8956f8a86b20d7bb9d6ac0187cf4cd54d8065bc9a1a09eb8011d4d326596/redis-7.1.0-py3-none-any.whl", hash = "sha256:23c52b208f92b56103e17c5d06bdc1a6c2c0b3106583985a76a18f83b265de2b", size = 354159, upload-time = "2025-11-19T15:54:38.064Z" }, +] + +[package.optional-dependencies] +hiredis = [ + { name = "hiredis" }, +] + +[[package]] +name = "requests" +version = "2.32.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf", size = 134517, upload-time = "2025-08-18T20:46:02.573Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738, upload-time = "2025-08-18T20:46:00.542Z" }, +] + +[[package]] +name = "ruff" +version = "0.14.10" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/57/08/52232a877978dd8f9cf2aeddce3e611b40a63287dfca29b6b8da791f5e8d/ruff-0.14.10.tar.gz", hash = "sha256:9a2e830f075d1a42cd28420d7809ace390832a490ed0966fe373ba288e77aaf4", size = 5859763, upload-time = "2025-12-18T19:28:57.98Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/60/01/933704d69f3f05ee16ef11406b78881733c186fe14b6a46b05cfcaf6d3b2/ruff-0.14.10-py3-none-linux_armv6l.whl", hash = "sha256:7a3ce585f2ade3e1f29ec1b92df13e3da262178df8c8bdf876f48fa0e8316c49", size = 13527080, upload-time = "2025-12-18T19:29:25.642Z" }, + { url = "https://files.pythonhosted.org/packages/df/58/a0349197a7dfa603ffb7f5b0470391efa79ddc327c1e29c4851e85b09cc5/ruff-0.14.10-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:674f9be9372907f7257c51f1d4fc902cb7cf014b9980152b802794317941f08f", size = 13797320, upload-time = "2025-12-18T19:29:02.571Z" }, + { url = "https://files.pythonhosted.org/packages/7b/82/36be59f00a6082e38c23536df4e71cdbc6af8d7c707eade97fcad5c98235/ruff-0.14.10-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d85713d522348837ef9df8efca33ccb8bd6fcfc86a2cde3ccb4bc9d28a18003d", size = 12918434, upload-time = "2025-12-18T19:28:51.202Z" }, + { url = "https://files.pythonhosted.org/packages/a6/00/45c62a7f7e34da92a25804f813ebe05c88aa9e0c25e5cb5a7d23dd7450e3/ruff-0.14.10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6987ebe0501ae4f4308d7d24e2d0fe3d7a98430f5adfd0f1fead050a740a3a77", size = 13371961, upload-time = "2025-12-18T19:29:04.991Z" }, + { url = "https://files.pythonhosted.org/packages/40/31/a5906d60f0405f7e57045a70f2d57084a93ca7425f22e1d66904769d1628/ruff-0.14.10-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:16a01dfb7b9e4eee556fbfd5392806b1b8550c9b4a9f6acd3dbe6812b193c70a", size = 13275629, upload-time = "2025-12-18T19:29:21.381Z" }, + { url = "https://files.pythonhosted.org/packages/3e/60/61c0087df21894cf9d928dc04bcd4fb10e8b2e8dca7b1a276ba2155b2002/ruff-0.14.10-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7165d31a925b7a294465fa81be8c12a0e9b60fb02bf177e79067c867e71f8b1f", size = 14029234, upload-time = "2025-12-18T19:29:00.132Z" }, + { url = "https://files.pythonhosted.org/packages/44/84/77d911bee3b92348b6e5dab5a0c898d87084ea03ac5dc708f46d88407def/ruff-0.14.10-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c561695675b972effb0c0a45db233f2c816ff3da8dcfbe7dfc7eed625f218935", size = 15449890, upload-time = "2025-12-18T19:28:53.573Z" }, + { url = "https://files.pythonhosted.org/packages/e9/36/480206eaefa24a7ec321582dda580443a8f0671fdbf6b1c80e9c3e93a16a/ruff-0.14.10-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4bb98fcbbc61725968893682fd4df8966a34611239c9fd07a1f6a07e7103d08e", size = 15123172, upload-time = "2025-12-18T19:29:23.453Z" }, + { url = "https://files.pythonhosted.org/packages/5c/38/68e414156015ba80cef5473d57919d27dfb62ec804b96180bafdeaf0e090/ruff-0.14.10-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f24b47993a9d8cb858429e97bdf8544c78029f09b520af615c1d261bf827001d", size = 14460260, upload-time = "2025-12-18T19:29:27.808Z" }, + { url = "https://files.pythonhosted.org/packages/b3/19/9e050c0dca8aba824d67cc0db69fb459c28d8cd3f6855b1405b3f29cc91d/ruff-0.14.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:59aabd2e2c4fd614d2862e7939c34a532c04f1084476d6833dddef4afab87e9f", size = 14229978, upload-time = "2025-12-18T19:29:11.32Z" }, + { url = "https://files.pythonhosted.org/packages/51/eb/e8dd1dd6e05b9e695aa9dd420f4577debdd0f87a5ff2fedda33c09e9be8c/ruff-0.14.10-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:213db2b2e44be8625002dbea33bb9c60c66ea2c07c084a00d55732689d697a7f", size = 14338036, upload-time = "2025-12-18T19:29:09.184Z" }, + { url = "https://files.pythonhosted.org/packages/6a/12/f3e3a505db7c19303b70af370d137795fcfec136d670d5de5391e295c134/ruff-0.14.10-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b914c40ab64865a17a9a5b67911d14df72346a634527240039eb3bd650e5979d", size = 13264051, upload-time = "2025-12-18T19:29:13.431Z" }, + { url = "https://files.pythonhosted.org/packages/08/64/8c3a47eaccfef8ac20e0484e68e0772013eb85802f8a9f7603ca751eb166/ruff-0.14.10-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:1484983559f026788e3a5c07c81ef7d1e97c1c78ed03041a18f75df104c45405", size = 13283998, upload-time = "2025-12-18T19:29:06.994Z" }, + { url = "https://files.pythonhosted.org/packages/12/84/534a5506f4074e5cc0529e5cd96cfc01bb480e460c7edf5af70d2bcae55e/ruff-0.14.10-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c70427132db492d25f982fffc8d6c7535cc2fd2c83fc8888f05caaa248521e60", size = 13601891, upload-time = "2025-12-18T19:28:55.811Z" }, + { url = "https://files.pythonhosted.org/packages/0d/1e/14c916087d8598917dbad9b2921d340f7884824ad6e9c55de948a93b106d/ruff-0.14.10-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5bcf45b681e9f1ee6445d317ce1fa9d6cba9a6049542d1c3d5b5958986be8830", size = 14336660, upload-time = "2025-12-18T19:29:16.531Z" }, + { url = "https://files.pythonhosted.org/packages/f2/1c/d7b67ab43f30013b47c12b42d1acd354c195351a3f7a1d67f59e54227ede/ruff-0.14.10-py3-none-win32.whl", hash = "sha256:104c49fc7ab73f3f3a758039adea978869a918f31b73280db175b43a2d9b51d6", size = 13196187, upload-time = "2025-12-18T19:29:19.006Z" }, + { url = "https://files.pythonhosted.org/packages/fb/9c/896c862e13886fae2af961bef3e6312db9ebc6adc2b156fe95e615dee8c1/ruff-0.14.10-py3-none-win_amd64.whl", hash = "sha256:466297bd73638c6bdf06485683e812db1c00c7ac96d4ddd0294a338c62fdc154", size = 14661283, upload-time = "2025-12-18T19:29:30.16Z" }, + { url = "https://files.pythonhosted.org/packages/74/31/b0e29d572670dca3674eeee78e418f20bdf97fa8aa9ea71380885e175ca0/ruff-0.14.10-py3-none-win_arm64.whl", hash = "sha256:e51d046cf6dda98a4633b8a8a771451107413b0f07183b2bef03f075599e44e6", size = 13729839, upload-time = "2025-12-18T19:28:48.636Z" }, +] + +[[package]] +name = "setuptools" +version = "80.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz", hash = "sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c", size = 1319958, upload-time = "2025-05-27T00:56:51.443Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a3/dc/17031897dae0efacfea57dfd3a82fdd2a2aeb58e0ff71b77b87e44edc772/setuptools-80.9.0-py3-none-any.whl", hash = "sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922", size = 1201486, upload-time = "2025-05-27T00:56:49.664Z" }, +] + +[[package]] +name = "snowballstemmer" +version = "3.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/75/a7/9810d872919697c9d01295633f5d574fb416d47e535f258272ca1f01f447/snowballstemmer-3.0.1.tar.gz", hash = "sha256:6d5eeeec8e9f84d4d56b847692bacf79bc2c8e90c7f80ca4444ff8b6f2e52895", size = 105575, upload-time = "2025-05-09T16:34:51.843Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c8/78/3565d011c61f5a43488987ee32b6f3f656e7f107ac2782dd57bdd7d91d9a/snowballstemmer-3.0.1-py3-none-any.whl", hash = "sha256:6cd7b3897da8d6c9ffb968a6781fa6532dce9c3618a4b127d920dab764a19064", size = 103274, upload-time = "2025-05-09T16:34:50.371Z" }, +] + +[[package]] +name = "soupsieve" +version = "2.8.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/89/23/adf3796d740536d63a6fbda113d07e60c734b6ed5d3058d1e47fc0495e47/soupsieve-2.8.1.tar.gz", hash = "sha256:4cf733bc50fa805f5df4b8ef4740fc0e0fa6218cf3006269afd3f9d6d80fd350", size = 117856, upload-time = "2025-12-18T13:50:34.655Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/48/f3/b67d6ea49ca9154453b6d70b34ea22f3996b9fa55da105a79d8732227adc/soupsieve-2.8.1-py3-none-any.whl", hash = "sha256:a11fe2a6f3d76ab3cf2de04eb339c1be5b506a8a47f2ceb6d139803177f85434", size = 36710, upload-time = "2025-12-18T13:50:33.267Z" }, +] + +[[package]] +name = "sphinx" +version = "8.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "alabaster" }, + { name = "babel" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "docutils" }, + { name = "imagesize" }, + { name = "jinja2" }, + { name = "packaging" }, + { name = "pygments" }, + { name = "requests" }, + { name = "snowballstemmer" }, + { name = "sphinxcontrib-applehelp" }, + { name = "sphinxcontrib-devhelp" }, + { name = "sphinxcontrib-htmlhelp" }, + { name = "sphinxcontrib-jsmath" }, + { name = "sphinxcontrib-qthelp" }, + { name = "sphinxcontrib-serializinghtml" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/25/a7/3cc3d6dcad70aba2e32a3ae8de5a90026a0a2fdaaa0756925e3a120249b6/sphinx-8.0.2.tar.gz", hash = "sha256:0cce1ddcc4fd3532cf1dd283bc7d886758362c5c1de6598696579ce96d8ffa5b", size = 8189041, upload-time = "2024-07-30T01:39:14.711Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4d/61/2ad169c6ff1226b46e50da0e44671592dbc6d840a52034a0193a99b28579/sphinx-8.0.2-py3-none-any.whl", hash = "sha256:56173572ae6c1b9a38911786e206a110c9749116745873feae4f9ce88e59391d", size = 3498950, upload-time = "2024-07-30T01:39:11.116Z" }, +] + +[[package]] +name = "sphinx-autobuild" +version = "2024.9.19" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama" }, + { name = "sphinx" }, + { name = "starlette" }, + { name = "uvicorn" }, + { name = "watchfiles" }, + { name = "websockets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ad/5b/2adf7fb2451ba9a098c00d40fad0c6ca2cfa967ce0b6c6fa4c36cbc7c70c/sphinx_autobuild-2024.9.19.tar.gz", hash = "sha256:2dd4863d174e533c1cd075eb5dfc90ad9a21734af7efd25569bf228b405e08ef", size = 13712, upload-time = "2024-09-18T23:10:48.864Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6c/7f/fa4387bbe792bc4592f7e793bc56f7822746d5f26bef0cfc88a262884ec3/sphinx_autobuild-2024.9.19-py3-none-any.whl", hash = "sha256:57d974eebfc6461ff0fd136e78bf7a9c057d543d5166d318a45599898019b82c", size = 11519, upload-time = "2024-09-18T23:10:47.535Z" }, +] + +[[package]] +name = "sphinx-basic-ng" +version = "1.0.0b2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "sphinx" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/98/0b/a866924ded68efec7a1759587a4e478aec7559d8165fac8b2ad1c0e774d6/sphinx_basic_ng-1.0.0b2.tar.gz", hash = "sha256:9ec55a47c90c8c002b5960c57492ec3021f5193cb26cebc2dc4ea226848651c9", size = 20736, upload-time = "2023-07-08T18:40:54.166Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/dd/018ce05c532a22007ac58d4f45232514cd9d6dd0ee1dc374e309db830983/sphinx_basic_ng-1.0.0b2-py3-none-any.whl", hash = "sha256:eb09aedbabfb650607e9b4b68c9d240b90b1e1be221d6ad71d61c52e29f7932b", size = 22496, upload-time = "2023-07-08T18:40:52.659Z" }, +] + +[[package]] +name = "sphinx-copybutton" +version = "0.5.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "sphinx" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fc/2b/a964715e7f5295f77509e59309959f4125122d648f86b4fe7d70ca1d882c/sphinx-copybutton-0.5.2.tar.gz", hash = "sha256:4cf17c82fb9646d1bc9ca92ac280813a3b605d8c421225fd9913154103ee1fbd", size = 23039, upload-time = "2023-04-14T08:10:22.998Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/48/1ea60e74949eecb12cdd6ac43987f9fd331156388dcc2319b45e2ebb81bf/sphinx_copybutton-0.5.2-py3-none-any.whl", hash = "sha256:fb543fd386d917746c9a2c50360c7905b605726b9355cd26e9974857afeae06e", size = 13343, upload-time = "2023-04-14T08:10:20.844Z" }, +] + +[[package]] +name = "sphinx-intl" +version = "2.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "babel" }, + { name = "click" }, + { name = "setuptools" }, + { name = "sphinx" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b4/34/bc0d2332bccc23edffba4cc244a9dd84f86bd13a1fe1ce59cd027a58fdd9/sphinx_intl-2.2.0.tar.gz", hash = "sha256:66976a85d31624dfcb564059a6918f90b31669269bfe3f30b2d72e81f225ab20", size = 23652, upload-time = "2024-04-19T22:45:41.881Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/41/b6/766cf7220b257d005f513df0a5a3a031bb5d54ab9e2a29ebe43aa16f4d65/sphinx_intl-2.2.0-py3-none-any.whl", hash = "sha256:56ad5f360fae4aa1cb963448c802f141b55c87223bb32a7b29e936620bd1a381", size = 13557, upload-time = "2024-04-19T22:45:39.582Z" }, +] + +[[package]] +name = "sphinx-substitution-extensions" +version = "2024.8.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docutils" }, + { name = "sphinx" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/51/e5/28478a3cd206e850ac72eb764ef5acf7d2b0c658b78ae3faa206f6cfe9d7/sphinx_substitution_extensions-2024.8.6.tar.gz", hash = "sha256:0088b2f59967bb68dda3692e88daa12af78c6d3e6268375402b42f9d5fc9608b", size = 25526, upload-time = "2024-08-06T14:21:49.615Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5b/d0/e3246fee409dd2c836ea6073520ff12845c79e7927352d599f257a75d7c1/sphinx_substitution_extensions-2024.8.6-py2.py3-none-any.whl", hash = "sha256:bf459460008036e94ca4e488b3aa860d6ddfa4575b2a13a0551aca5df1ee04bf", size = 12931, upload-time = "2024-08-06T14:21:48.498Z" }, +] + +[[package]] +name = "sphinxcontrib-applehelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ba/6e/b837e84a1a704953c62ef8776d45c3e8d759876b4a84fe14eba2859106fe/sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1", size = 20053, upload-time = "2024-07-29T01:09:00.465Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5d/85/9ebeae2f76e9e77b952f4b274c27238156eae7979c5421fba91a28f4970d/sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5", size = 119300, upload-time = "2024-07-29T01:08:58.99Z" }, +] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/d2/5beee64d3e4e747f316bae86b55943f51e82bb86ecd325883ef65741e7da/sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad", size = 12967, upload-time = "2024-07-29T01:09:23.417Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/35/7a/987e583882f985fe4d7323774889ec58049171828b58c2217e7f79cdf44e/sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2", size = 82530, upload-time = "2024-07-29T01:09:21.945Z" }, +] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/93/983afd9aa001e5201eab16b5a444ed5b9b0a7a010541e0ddfbbfd0b2470c/sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9", size = 22617, upload-time = "2024-07-29T01:09:37.889Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0a/7b/18a8c0bcec9182c05a0b3ec2a776bba4ead82750a55ff798e8d406dae604/sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8", size = 98705, upload-time = "2024-07-29T01:09:36.407Z" }, +] + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8", size = 5787, upload-time = "2019-01-21T16:10:16.347Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071, upload-time = "2019-01-21T16:10:14.333Z" }, +] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/68/bc/9104308fc285eb3e0b31b67688235db556cd5b0ef31d96f30e45f2e51cae/sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab", size = 17165, upload-time = "2024-07-29T01:09:56.435Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/83/859ecdd180cacc13b1f7e857abf8582a64552ea7a061057a6c716e790fce/sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb", size = 88743, upload-time = "2024-07-29T01:09:54.885Z" }, +] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3b/44/6716b257b0aa6bfd51a1b31665d1c205fb12cb5ad56de752dfa15657de2f/sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d", size = 16080, upload-time = "2024-07-29T01:10:09.332Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072, upload-time = "2024-07-29T01:10:08.203Z" }, +] + +[[package]] +name = "sphinxcontrib-towncrier" +version = "0.4.0a0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "sphinx" }, + { name = "towncrier" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/59/16/9a4f64b0de8040ef1ac6efa37da0469e0c421c6f8116919de013271e9962/sphinxcontrib-towncrier-0.4.0a0.tar.gz", hash = "sha256:d9b1513fc07781432dd3a0b2ca797cfe0e99e9b5bc5e5c8bf112d5d142afb6dc", size = 49635, upload-time = "2023-11-09T04:02:20.777Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0b/48/e35ff6134f72f11e7c369c20ab6d26bbd5202f56bf2f2cd9c8da40228cd0/sphinxcontrib_towncrier-0.4.0a0-py3-none-any.whl", hash = "sha256:ec734e3d0920e2ce26e99681119f398a9e1fc0aa6c2d7ed1f052f1219dcd4653", size = 13405, upload-time = "2023-11-09T04:02:19.195Z" }, +] + +[[package]] +name = "starlette" +version = "0.50.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ba/b8/73a0e6a6e079a9d9cfa64113d771e421640b6f679a52eeb9b32f72d871a1/starlette-0.50.0.tar.gz", hash = "sha256:a2a17b22203254bcbc2e1f926d2d55f3f9497f769416b3190768befe598fa3ca", size = 2646985, upload-time = "2025-11-01T15:25:27.516Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d9/52/1064f510b141bd54025f9b55105e26d1fa970b9be67ad766380a3c9b74b0/starlette-0.50.0-py3-none-any.whl", hash = "sha256:9e5391843ec9b6e472eed1365a78c8098cfceb7a74bfd4d6b1c0c0095efb3bca", size = 74033, upload-time = "2025-11-01T15:25:25.461Z" }, +] + +[[package]] +name = "toml" +version = "0.10.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f", size = 22253, upload-time = "2020-11-01T01:40:22.204Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/44/6f/7120676b6d73228c96e17f1f794d8ab046fc910d781c8d151120c3f1569e/toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", size = 16588, upload-time = "2020-11-01T01:40:20.672Z" }, +] + +[[package]] +name = "tomli" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/52/ed/3f73f72945444548f33eba9a87fc7a6e969915e7b1acc8260b30e1f76a2f/tomli-2.3.0.tar.gz", hash = "sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549", size = 17392, upload-time = "2025-10-08T22:01:47.119Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/2e/299f62b401438d5fe1624119c723f5d877acc86a4c2492da405626665f12/tomli-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45", size = 153236, upload-time = "2025-10-08T22:01:00.137Z" }, + { url = "https://files.pythonhosted.org/packages/86/7f/d8fffe6a7aefdb61bced88fcb5e280cfd71e08939da5894161bd71bea022/tomli-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba", size = 148084, upload-time = "2025-10-08T22:01:01.63Z" }, + { url = "https://files.pythonhosted.org/packages/47/5c/24935fb6a2ee63e86d80e4d3b58b222dafaf438c416752c8b58537c8b89a/tomli-2.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf", size = 234832, upload-time = "2025-10-08T22:01:02.543Z" }, + { url = "https://files.pythonhosted.org/packages/89/da/75dfd804fc11e6612846758a23f13271b76d577e299592b4371a4ca4cd09/tomli-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441", size = 242052, upload-time = "2025-10-08T22:01:03.836Z" }, + { url = "https://files.pythonhosted.org/packages/70/8c/f48ac899f7b3ca7eb13af73bacbc93aec37f9c954df3c08ad96991c8c373/tomli-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845", size = 239555, upload-time = "2025-10-08T22:01:04.834Z" }, + { url = "https://files.pythonhosted.org/packages/ba/28/72f8afd73f1d0e7829bfc093f4cb98ce0a40ffc0cc997009ee1ed94ba705/tomli-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c", size = 245128, upload-time = "2025-10-08T22:01:05.84Z" }, + { url = "https://files.pythonhosted.org/packages/b6/eb/a7679c8ac85208706d27436e8d421dfa39d4c914dcf5fa8083a9305f58d9/tomli-2.3.0-cp311-cp311-win32.whl", hash = "sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456", size = 96445, upload-time = "2025-10-08T22:01:06.896Z" }, + { url = "https://files.pythonhosted.org/packages/0a/fe/3d3420c4cb1ad9cb462fb52967080575f15898da97e21cb6f1361d505383/tomli-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be", size = 107165, upload-time = "2025-10-08T22:01:08.107Z" }, + { url = "https://files.pythonhosted.org/packages/ff/b7/40f36368fcabc518bb11c8f06379a0fd631985046c038aca08c6d6a43c6e/tomli-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac", size = 154891, upload-time = "2025-10-08T22:01:09.082Z" }, + { url = "https://files.pythonhosted.org/packages/f9/3f/d9dd692199e3b3aab2e4e4dd948abd0f790d9ded8cd10cbaae276a898434/tomli-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22", size = 148796, upload-time = "2025-10-08T22:01:10.266Z" }, + { url = "https://files.pythonhosted.org/packages/60/83/59bff4996c2cf9f9387a0f5a3394629c7efa5ef16142076a23a90f1955fa/tomli-2.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f", size = 242121, upload-time = "2025-10-08T22:01:11.332Z" }, + { url = "https://files.pythonhosted.org/packages/45/e5/7c5119ff39de8693d6baab6c0b6dcb556d192c165596e9fc231ea1052041/tomli-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52", size = 250070, upload-time = "2025-10-08T22:01:12.498Z" }, + { url = "https://files.pythonhosted.org/packages/45/12/ad5126d3a278f27e6701abde51d342aa78d06e27ce2bb596a01f7709a5a2/tomli-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8", size = 245859, upload-time = "2025-10-08T22:01:13.551Z" }, + { url = "https://files.pythonhosted.org/packages/fb/a1/4d6865da6a71c603cfe6ad0e6556c73c76548557a8d658f9e3b142df245f/tomli-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6", size = 250296, upload-time = "2025-10-08T22:01:14.614Z" }, + { url = "https://files.pythonhosted.org/packages/a0/b7/a7a7042715d55c9ba6e8b196d65d2cb662578b4d8cd17d882d45322b0d78/tomli-2.3.0-cp312-cp312-win32.whl", hash = "sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876", size = 97124, upload-time = "2025-10-08T22:01:15.629Z" }, + { url = "https://files.pythonhosted.org/packages/06/1e/f22f100db15a68b520664eb3328fb0ae4e90530887928558112c8d1f4515/tomli-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878", size = 107698, upload-time = "2025-10-08T22:01:16.51Z" }, + { url = "https://files.pythonhosted.org/packages/89/48/06ee6eabe4fdd9ecd48bf488f4ac783844fd777f547b8d1b61c11939974e/tomli-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b", size = 154819, upload-time = "2025-10-08T22:01:17.964Z" }, + { url = "https://files.pythonhosted.org/packages/f1/01/88793757d54d8937015c75dcdfb673c65471945f6be98e6a0410fba167ed/tomli-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae", size = 148766, upload-time = "2025-10-08T22:01:18.959Z" }, + { url = "https://files.pythonhosted.org/packages/42/17/5e2c956f0144b812e7e107f94f1cc54af734eb17b5191c0bbfb72de5e93e/tomli-2.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b", size = 240771, upload-time = "2025-10-08T22:01:20.106Z" }, + { url = "https://files.pythonhosted.org/packages/d5/f4/0fbd014909748706c01d16824eadb0307115f9562a15cbb012cd9b3512c5/tomli-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf", size = 248586, upload-time = "2025-10-08T22:01:21.164Z" }, + { url = "https://files.pythonhosted.org/packages/30/77/fed85e114bde5e81ecf9bc5da0cc69f2914b38f4708c80ae67d0c10180c5/tomli-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f", size = 244792, upload-time = "2025-10-08T22:01:22.417Z" }, + { url = "https://files.pythonhosted.org/packages/55/92/afed3d497f7c186dc71e6ee6d4fcb0acfa5f7d0a1a2878f8beae379ae0cc/tomli-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05", size = 248909, upload-time = "2025-10-08T22:01:23.859Z" }, + { url = "https://files.pythonhosted.org/packages/f8/84/ef50c51b5a9472e7265ce1ffc7f24cd4023d289e109f669bdb1553f6a7c2/tomli-2.3.0-cp313-cp313-win32.whl", hash = "sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606", size = 96946, upload-time = "2025-10-08T22:01:24.893Z" }, + { url = "https://files.pythonhosted.org/packages/b2/b7/718cd1da0884f281f95ccfa3a6cc572d30053cba64603f79d431d3c9b61b/tomli-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999", size = 107705, upload-time = "2025-10-08T22:01:26.153Z" }, + { url = "https://files.pythonhosted.org/packages/19/94/aeafa14a52e16163008060506fcb6aa1949d13548d13752171a755c65611/tomli-2.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e", size = 154244, upload-time = "2025-10-08T22:01:27.06Z" }, + { url = "https://files.pythonhosted.org/packages/db/e4/1e58409aa78eefa47ccd19779fc6f36787edbe7d4cd330eeeedb33a4515b/tomli-2.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3", size = 148637, upload-time = "2025-10-08T22:01:28.059Z" }, + { url = "https://files.pythonhosted.org/packages/26/b6/d1eccb62f665e44359226811064596dd6a366ea1f985839c566cd61525ae/tomli-2.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc", size = 241925, upload-time = "2025-10-08T22:01:29.066Z" }, + { url = "https://files.pythonhosted.org/packages/70/91/7cdab9a03e6d3d2bb11beae108da5bdc1c34bdeb06e21163482544ddcc90/tomli-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0", size = 249045, upload-time = "2025-10-08T22:01:31.98Z" }, + { url = "https://files.pythonhosted.org/packages/15/1b/8c26874ed1f6e4f1fcfeb868db8a794cbe9f227299402db58cfcc858766c/tomli-2.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879", size = 245835, upload-time = "2025-10-08T22:01:32.989Z" }, + { url = "https://files.pythonhosted.org/packages/fd/42/8e3c6a9a4b1a1360c1a2a39f0b972cef2cc9ebd56025168c4137192a9321/tomli-2.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005", size = 253109, upload-time = "2025-10-08T22:01:34.052Z" }, + { url = "https://files.pythonhosted.org/packages/22/0c/b4da635000a71b5f80130937eeac12e686eefb376b8dee113b4a582bba42/tomli-2.3.0-cp314-cp314-win32.whl", hash = "sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463", size = 97930, upload-time = "2025-10-08T22:01:35.082Z" }, + { url = "https://files.pythonhosted.org/packages/b9/74/cb1abc870a418ae99cd5c9547d6bce30701a954e0e721821df483ef7223c/tomli-2.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8", size = 107964, upload-time = "2025-10-08T22:01:36.057Z" }, + { url = "https://files.pythonhosted.org/packages/54/78/5c46fff6432a712af9f792944f4fcd7067d8823157949f4e40c56b8b3c83/tomli-2.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77", size = 163065, upload-time = "2025-10-08T22:01:37.27Z" }, + { url = "https://files.pythonhosted.org/packages/39/67/f85d9bd23182f45eca8939cd2bc7050e1f90c41f4a2ecbbd5963a1d1c486/tomli-2.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf", size = 159088, upload-time = "2025-10-08T22:01:38.235Z" }, + { url = "https://files.pythonhosted.org/packages/26/5a/4b546a0405b9cc0659b399f12b6adb750757baf04250b148d3c5059fc4eb/tomli-2.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530", size = 268193, upload-time = "2025-10-08T22:01:39.712Z" }, + { url = "https://files.pythonhosted.org/packages/42/4f/2c12a72ae22cf7b59a7fe75b3465b7aba40ea9145d026ba41cb382075b0e/tomli-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b", size = 275488, upload-time = "2025-10-08T22:01:40.773Z" }, + { url = "https://files.pythonhosted.org/packages/92/04/a038d65dbe160c3aa5a624e93ad98111090f6804027d474ba9c37c8ae186/tomli-2.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67", size = 272669, upload-time = "2025-10-08T22:01:41.824Z" }, + { url = "https://files.pythonhosted.org/packages/be/2f/8b7c60a9d1612a7cbc39ffcca4f21a73bf368a80fc25bccf8253e2563267/tomli-2.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f", size = 279709, upload-time = "2025-10-08T22:01:43.177Z" }, + { url = "https://files.pythonhosted.org/packages/7e/46/cc36c679f09f27ded940281c38607716c86cf8ba4a518d524e349c8b4874/tomli-2.3.0-cp314-cp314t-win32.whl", hash = "sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0", size = 107563, upload-time = "2025-10-08T22:01:44.233Z" }, + { url = "https://files.pythonhosted.org/packages/84/ff/426ca8683cf7b753614480484f6437f568fd2fda2edbdf57a2d3d8b27a0b/tomli-2.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba", size = 119756, upload-time = "2025-10-08T22:01:45.234Z" }, + { url = "https://files.pythonhosted.org/packages/77/b8/0135fadc89e73be292b473cb820b4f5a08197779206b33191e801feeae40/tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b", size = 14408, upload-time = "2025-10-08T22:01:46.04Z" }, +] + +[[package]] +name = "towncrier" +version = "24.8.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "jinja2" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/69/d7/a5183f788cf4fabf03f7c767ae0b968249b0c737eb64b4d87a07ae01fea7/towncrier-24.8.0.tar.gz", hash = "sha256:013423ee7eed102b2f393c287d22d95f66f1a3ea10a4baa82d298001a7f18af3", size = 61635, upload-time = "2024-08-23T14:52:28.197Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/93/1b/2f7b88506e22d9798c139261af4946865c0787cfa345514ca3c70173a9cc/towncrier-24.8.0-py3-none-any.whl", hash = "sha256:9343209592b839209cdf28c339ba45792fbfe9775b5f9c177462fd693e127d8d", size = 56981, upload-time = "2024-08-23T14:52:26.659Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, +] + +[[package]] +name = "typing-inspection" +version = "0.4.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, +] + +[[package]] +name = "urllib3" +version = "2.6.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1e/24/a2a2ed9addd907787d7aa0355ba36a6cadf1768b934c652ea78acbd59dcd/urllib3-2.6.2.tar.gz", hash = "sha256:016f9c98bb7e98085cb2b4b17b87d2c702975664e4f060c6532e64d1c1a5e797", size = 432930, upload-time = "2025-12-11T15:56:40.252Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/b9/4095b668ea3678bf6a0af005527f39de12fb026516fb3df17495a733b7f8/urllib3-2.6.2-py3-none-any.whl", hash = "sha256:ec21cddfe7724fc7cb4ba4bea7aa8e2ef36f607a4bab81aa6ce42a13dc3f03dd", size = 131182, upload-time = "2025-12-11T15:56:38.584Z" }, +] + +[[package]] +name = "uvicorn" +version = "0.40.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "h11" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c3/d1/8f3c683c9561a4e6689dd3b1d345c815f10f86acd044ee1fb9a4dcd0b8c5/uvicorn-0.40.0.tar.gz", hash = "sha256:839676675e87e73694518b5574fd0f24c9d97b46bea16df7b8c05ea1a51071ea", size = 81761, upload-time = "2025-12-21T14:16:22.45Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3d/d8/2083a1daa7439a66f3a48589a57d576aa117726762618f6bb09fe3798796/uvicorn-0.40.0-py3-none-any.whl", hash = "sha256:c6c8f55bc8bf13eb6fa9ff87ad62308bbbc33d0b67f84293151efe87e0d5f2ee", size = 68502, upload-time = "2025-12-21T14:16:21.041Z" }, +] + +[[package]] +name = "uvloop" +version = "0.22.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/06/f0/18d39dbd1971d6d62c4629cc7fa67f74821b0dc1f5a77af43719de7936a7/uvloop-0.22.1.tar.gz", hash = "sha256:6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f", size = 2443250, upload-time = "2025-10-16T22:17:19.342Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/eb/14/ecceb239b65adaaf7fde510aa8bd534075695d1e5f8dadfa32b5723d9cfb/uvloop-0.22.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ef6f0d4cc8a9fa1f6a910230cd53545d9a14479311e87e3cb225495952eb672c", size = 1343335, upload-time = "2025-10-16T22:16:11.43Z" }, + { url = "https://files.pythonhosted.org/packages/ba/ae/6f6f9af7f590b319c94532b9567409ba11f4fa71af1148cab1bf48a07048/uvloop-0.22.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7cd375a12b71d33d46af85a3343b35d98e8116134ba404bd657b3b1d15988792", size = 742903, upload-time = "2025-10-16T22:16:12.979Z" }, + { url = "https://files.pythonhosted.org/packages/09/bd/3667151ad0702282a1f4d5d29288fce8a13c8b6858bf0978c219cd52b231/uvloop-0.22.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ac33ed96229b7790eb729702751c0e93ac5bc3bcf52ae9eccbff30da09194b86", size = 3648499, upload-time = "2025-10-16T22:16:14.451Z" }, + { url = "https://files.pythonhosted.org/packages/b3/f6/21657bb3beb5f8c57ce8be3b83f653dd7933c2fd00545ed1b092d464799a/uvloop-0.22.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:481c990a7abe2c6f4fc3d98781cc9426ebd7f03a9aaa7eb03d3bfc68ac2a46bd", size = 3700133, upload-time = "2025-10-16T22:16:16.272Z" }, + { url = "https://files.pythonhosted.org/packages/09/e0/604f61d004ded805f24974c87ddd8374ef675644f476f01f1df90e4cdf72/uvloop-0.22.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a592b043a47ad17911add5fbd087c76716d7c9ccc1d64ec9249ceafd735f03c2", size = 3512681, upload-time = "2025-10-16T22:16:18.07Z" }, + { url = "https://files.pythonhosted.org/packages/bb/ce/8491fd370b0230deb5eac69c7aae35b3be527e25a911c0acdffb922dc1cd/uvloop-0.22.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1489cf791aa7b6e8c8be1c5a080bae3a672791fcb4e9e12249b05862a2ca9cec", size = 3615261, upload-time = "2025-10-16T22:16:19.596Z" }, + { url = "https://files.pythonhosted.org/packages/c7/d5/69900f7883235562f1f50d8184bb7dd84a2fb61e9ec63f3782546fdbd057/uvloop-0.22.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c60ebcd36f7b240b30788554b6f0782454826a0ed765d8430652621b5de674b9", size = 1352420, upload-time = "2025-10-16T22:16:21.187Z" }, + { url = "https://files.pythonhosted.org/packages/a8/73/c4e271b3bce59724e291465cc936c37758886a4868787da0278b3b56b905/uvloop-0.22.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3b7f102bf3cb1995cfeaee9321105e8f5da76fdb104cdad8986f85461a1b7b77", size = 748677, upload-time = "2025-10-16T22:16:22.558Z" }, + { url = "https://files.pythonhosted.org/packages/86/94/9fb7fad2f824d25f8ecac0d70b94d0d48107ad5ece03769a9c543444f78a/uvloop-0.22.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:53c85520781d84a4b8b230e24a5af5b0778efdb39142b424990ff1ef7c48ba21", size = 3753819, upload-time = "2025-10-16T22:16:23.903Z" }, + { url = "https://files.pythonhosted.org/packages/74/4f/256aca690709e9b008b7108bc85fba619a2bc37c6d80743d18abad16ee09/uvloop-0.22.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:56a2d1fae65fd82197cb8c53c367310b3eabe1bbb9fb5a04d28e3e3520e4f702", size = 3804529, upload-time = "2025-10-16T22:16:25.246Z" }, + { url = "https://files.pythonhosted.org/packages/7f/74/03c05ae4737e871923d21a76fe28b6aad57f5c03b6e6bfcfa5ad616013e4/uvloop-0.22.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:40631b049d5972c6755b06d0bfe8233b1bd9a8a6392d9d1c45c10b6f9e9b2733", size = 3621267, upload-time = "2025-10-16T22:16:26.819Z" }, + { url = "https://files.pythonhosted.org/packages/75/be/f8e590fe61d18b4a92070905497aec4c0e64ae1761498cad09023f3f4b3e/uvloop-0.22.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:535cc37b3a04f6cd2c1ef65fa1d370c9a35b6695df735fcff5427323f2cd5473", size = 3723105, upload-time = "2025-10-16T22:16:28.252Z" }, + { url = "https://files.pythonhosted.org/packages/3d/ff/7f72e8170be527b4977b033239a83a68d5c881cc4775fca255c677f7ac5d/uvloop-0.22.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:fe94b4564e865d968414598eea1a6de60adba0c040ba4ed05ac1300de402cd42", size = 1359936, upload-time = "2025-10-16T22:16:29.436Z" }, + { url = "https://files.pythonhosted.org/packages/c3/c6/e5d433f88fd54d81ef4be58b2b7b0cea13c442454a1db703a1eea0db1a59/uvloop-0.22.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:51eb9bd88391483410daad430813d982010f9c9c89512321f5b60e2cddbdddd6", size = 752769, upload-time = "2025-10-16T22:16:30.493Z" }, + { url = "https://files.pythonhosted.org/packages/24/68/a6ac446820273e71aa762fa21cdcc09861edd3536ff47c5cd3b7afb10eeb/uvloop-0.22.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:700e674a166ca5778255e0e1dc4e9d79ab2acc57b9171b79e65feba7184b3370", size = 4317413, upload-time = "2025-10-16T22:16:31.644Z" }, + { url = "https://files.pythonhosted.org/packages/5f/6f/e62b4dfc7ad6518e7eff2516f680d02a0f6eb62c0c212e152ca708a0085e/uvloop-0.22.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7b5b1ac819a3f946d3b2ee07f09149578ae76066d70b44df3fa990add49a82e4", size = 4426307, upload-time = "2025-10-16T22:16:32.917Z" }, + { url = "https://files.pythonhosted.org/packages/90/60/97362554ac21e20e81bcef1150cb2a7e4ffdaf8ea1e5b2e8bf7a053caa18/uvloop-0.22.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e047cc068570bac9866237739607d1313b9253c3051ad84738cbb095be0537b2", size = 4131970, upload-time = "2025-10-16T22:16:34.015Z" }, + { url = "https://files.pythonhosted.org/packages/99/39/6b3f7d234ba3964c428a6e40006340f53ba37993f46ed6e111c6e9141d18/uvloop-0.22.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:512fec6815e2dd45161054592441ef76c830eddaad55c8aa30952e6fe1ed07c0", size = 4296343, upload-time = "2025-10-16T22:16:35.149Z" }, + { url = "https://files.pythonhosted.org/packages/89/8c/182a2a593195bfd39842ea68ebc084e20c850806117213f5a299dfc513d9/uvloop-0.22.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:561577354eb94200d75aca23fbde86ee11be36b00e52a4eaf8f50fb0c86b7705", size = 1358611, upload-time = "2025-10-16T22:16:36.833Z" }, + { url = "https://files.pythonhosted.org/packages/d2/14/e301ee96a6dc95224b6f1162cd3312f6d1217be3907b79173b06785f2fe7/uvloop-0.22.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1cdf5192ab3e674ca26da2eada35b288d2fa49fdd0f357a19f0e7c4e7d5077c8", size = 751811, upload-time = "2025-10-16T22:16:38.275Z" }, + { url = "https://files.pythonhosted.org/packages/b7/02/654426ce265ac19e2980bfd9ea6590ca96a56f10c76e63801a2df01c0486/uvloop-0.22.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6e2ea3d6190a2968f4a14a23019d3b16870dd2190cd69c8180f7c632d21de68d", size = 4288562, upload-time = "2025-10-16T22:16:39.375Z" }, + { url = "https://files.pythonhosted.org/packages/15/c0/0be24758891ef825f2065cd5db8741aaddabe3e248ee6acc5e8a80f04005/uvloop-0.22.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0530a5fbad9c9e4ee3f2b33b148c6a64d47bbad8000ea63704fa8260f4cf728e", size = 4366890, upload-time = "2025-10-16T22:16:40.547Z" }, + { url = "https://files.pythonhosted.org/packages/d2/53/8369e5219a5855869bcee5f4d317f6da0e2c669aecf0ef7d371e3d084449/uvloop-0.22.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bc5ef13bbc10b5335792360623cc378d52d7e62c2de64660616478c32cd0598e", size = 4119472, upload-time = "2025-10-16T22:16:41.694Z" }, + { url = "https://files.pythonhosted.org/packages/f8/ba/d69adbe699b768f6b29a5eec7b47dd610bd17a69de51b251126a801369ea/uvloop-0.22.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1f38ec5e3f18c8a10ded09742f7fb8de0108796eb673f30ce7762ce1b8550cad", size = 4239051, upload-time = "2025-10-16T22:16:43.224Z" }, + { url = "https://files.pythonhosted.org/packages/90/cd/b62bdeaa429758aee8de8b00ac0dd26593a9de93d302bff3d21439e9791d/uvloop-0.22.1-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3879b88423ec7e97cd4eba2a443aa26ed4e59b45e6b76aabf13fe2f27023a142", size = 1362067, upload-time = "2025-10-16T22:16:44.503Z" }, + { url = "https://files.pythonhosted.org/packages/0d/f8/a132124dfda0777e489ca86732e85e69afcd1ff7686647000050ba670689/uvloop-0.22.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:4baa86acedf1d62115c1dc6ad1e17134476688f08c6efd8a2ab076e815665c74", size = 752423, upload-time = "2025-10-16T22:16:45.968Z" }, + { url = "https://files.pythonhosted.org/packages/a3/94/94af78c156f88da4b3a733773ad5ba0b164393e357cc4bd0ab2e2677a7d6/uvloop-0.22.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:297c27d8003520596236bdb2335e6b3f649480bd09e00d1e3a99144b691d2a35", size = 4272437, upload-time = "2025-10-16T22:16:47.451Z" }, + { url = "https://files.pythonhosted.org/packages/b5/35/60249e9fd07b32c665192cec7af29e06c7cd96fa1d08b84f012a56a0b38e/uvloop-0.22.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c1955d5a1dd43198244d47664a5858082a3239766a839b2102a269aaff7a4e25", size = 4292101, upload-time = "2025-10-16T22:16:49.318Z" }, + { url = "https://files.pythonhosted.org/packages/02/62/67d382dfcb25d0a98ce73c11ed1a6fba5037a1a1d533dcbb7cab033a2636/uvloop-0.22.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b31dc2fccbd42adc73bc4e7cdbae4fc5086cf378979e53ca5d0301838c5682c6", size = 4114158, upload-time = "2025-10-16T22:16:50.517Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/f1171b4a882a5d13c8b7576f348acfe6074d72eaf52cccef752f748d4a9f/uvloop-0.22.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:93f617675b2d03af4e72a5333ef89450dfaa5321303ede6e67ba9c9d26878079", size = 4177360, upload-time = "2025-10-16T22:16:52.646Z" }, + { url = "https://files.pythonhosted.org/packages/79/7b/b01414f31546caf0919da80ad57cbfe24c56b151d12af68cee1b04922ca8/uvloop-0.22.1-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:37554f70528f60cad66945b885eb01f1bb514f132d92b6eeed1c90fd54ed6289", size = 1454790, upload-time = "2025-10-16T22:16:54.355Z" }, + { url = "https://files.pythonhosted.org/packages/d4/31/0bb232318dd838cad3fa8fb0c68c8b40e1145b32025581975e18b11fab40/uvloop-0.22.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:b76324e2dc033a0b2f435f33eb88ff9913c156ef78e153fb210e03c13da746b3", size = 796783, upload-time = "2025-10-16T22:16:55.906Z" }, + { url = "https://files.pythonhosted.org/packages/42/38/c9b09f3271a7a723a5de69f8e237ab8e7803183131bc57c890db0b6bb872/uvloop-0.22.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:badb4d8e58ee08dad957002027830d5c3b06aea446a6a3744483c2b3b745345c", size = 4647548, upload-time = "2025-10-16T22:16:57.008Z" }, + { url = "https://files.pythonhosted.org/packages/c1/37/945b4ca0ac27e3dc4952642d4c900edd030b3da6c9634875af6e13ae80e5/uvloop-0.22.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b91328c72635f6f9e0282e4a57da7470c7350ab1c9f48546c0f2866205349d21", size = 4467065, upload-time = "2025-10-16T22:16:58.206Z" }, + { url = "https://files.pythonhosted.org/packages/97/cc/48d232f33d60e2e2e0b42f4e73455b146b76ebe216487e862700457fbf3c/uvloop-0.22.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:daf620c2995d193449393d6c62131b3fbd40a63bf7b307a1527856ace637fe88", size = 4328384, upload-time = "2025-10-16T22:16:59.36Z" }, + { url = "https://files.pythonhosted.org/packages/e4/16/c1fd27e9549f3c4baf1dc9c20c456cd2f822dbf8de9f463824b0c0357e06/uvloop-0.22.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6cde23eeda1a25c75b2e07d39970f3374105d5eafbaab2a4482be82f272d5a5e", size = 4296730, upload-time = "2025-10-16T22:17:00.744Z" }, +] + +[[package]] +name = "virtualenv" +version = "20.35.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "distlib" }, + { name = "filelock" }, + { name = "platformdirs" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/20/28/e6f1a6f655d620846bd9df527390ecc26b3805a0c5989048c210e22c5ca9/virtualenv-20.35.4.tar.gz", hash = "sha256:643d3914d73d3eeb0c552cbb12d7e82adf0e504dbf86a3182f8771a153a1971c", size = 6028799, upload-time = "2025-10-29T06:57:40.511Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/0c/c05523fa3181fdf0c9c52a6ba91a23fbf3246cc095f26f6516f9c60e6771/virtualenv-20.35.4-py3-none-any.whl", hash = "sha256:c21c9cede36c9753eeade68ba7d523529f228a403463376cf821eaae2b650f1b", size = 6005095, upload-time = "2025-10-29T06:57:37.598Z" }, +] + +[[package]] +name = "watchfiles" +version = "0.20.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ef/48/02d2d2cbf54e134810b2cb40ac79fdb8ce08476184536a4764717a7bc9f4/watchfiles-0.20.0.tar.gz", hash = "sha256:728575b6b94c90dd531514677201e8851708e6e4b5fe7028ac506a200b622019", size = 37041, upload-time = "2023-08-24T12:49:17.616Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4d/db/899832e11fef2d468bf8b3c1c13289b1db4cb7c3410bb2a9612a52fc8b22/watchfiles-0.20.0-cp37-abi3-macosx_10_7_x86_64.whl", hash = "sha256:3796312bd3587e14926013612b23066912cf45a14af71cf2b20db1c12dadf4e9", size = 417357, upload-time = "2023-08-24T12:48:43.687Z" }, + { url = "https://files.pythonhosted.org/packages/9f/1a/85c914e4db62a3f8197daa98a271ea380a5d200a8d3058bd9f417752bc26/watchfiles-0.20.0-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:d0002d81c89a662b595645fb684a371b98ff90a9c7d8f8630c82f0fde8310458", size = 407258, upload-time = "2023-08-24T12:48:45.7Z" }, + { url = "https://files.pythonhosted.org/packages/25/ae/b7bddad421af5e33079a2ce639aa58837b715a2da98df16e25ecd310af52/watchfiles-0.20.0-cp37-abi3-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:570848706440373b4cd8017f3e850ae17f76dbdf1e9045fc79023b11e1afe490", size = 1331327, upload-time = "2023-08-24T12:48:47.005Z" }, + { url = "https://files.pythonhosted.org/packages/21/e5/b080cec4e841b1cf338ccbd958cf3232ad1691a590653b2d124b5c79cf6b/watchfiles-0.20.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9a0351d20d03c6f7ad6b2e8a226a5efafb924c7755ee1e34f04c77c3682417fa", size = 1301371, upload-time = "2023-08-24T12:48:48.338Z" }, + { url = "https://files.pythonhosted.org/packages/05/a0/2fb2c36730995a6b3f060187195dc08ad9ceee67426bdca8a4296024071c/watchfiles-0.20.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:007dcc4a401093010b389c044e81172c8a2520dba257c88f8828b3d460c6bb38", size = 1302438, upload-time = "2023-08-24T12:48:49.816Z" }, + { url = "https://files.pythonhosted.org/packages/13/ea/d11971958ae703cfe443b21f672169cb8bc12dbec5781b910633fa2186ec/watchfiles-0.20.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0d82dbc1832da83e441d112069833eedd4cf583d983fb8dd666fbefbea9d99c0", size = 1410655, upload-time = "2023-08-24T12:48:51.758Z" }, + { url = "https://files.pythonhosted.org/packages/6b/81/3f922f3ede53ca9c0b4095f63688ffeea19a49592d0ac62db1eb9632b1e3/watchfiles-0.20.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:99f4c65fd2fce61a571b2a6fcf747d6868db0bef8a934e8ca235cc8533944d95", size = 1494222, upload-time = "2023-08-24T12:48:54.331Z" }, + { url = "https://files.pythonhosted.org/packages/e1/46/c9d5ee4871b187d291d62e61c41f9a4d67d4866a89704b0ad16b6949e9bd/watchfiles-0.20.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5392dd327a05f538c56edb1c6ebba6af91afc81b40822452342f6da54907bbdf", size = 1294171, upload-time = "2023-08-24T12:48:56.288Z" }, + { url = "https://files.pythonhosted.org/packages/59/5e/6b64e3bf9fd4422250f3c716d992dd76dbe55e6fa1e7ebaf2bf88f389707/watchfiles-0.20.0-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:08dc702529bb06a2b23859110c214db245455532da5eaea602921687cfcd23db", size = 1462256, upload-time = "2023-08-24T12:48:57.638Z" }, + { url = "https://files.pythonhosted.org/packages/11/c0/75f5a71ac24118ab11bd898e0114cedc72b25924ff2d960d473bddb4ec6e/watchfiles-0.20.0-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:7d4e66a857621584869cfbad87039e65dadd7119f0d9bb9dbc957e089e32c164", size = 1461725, upload-time = "2023-08-24T12:48:59.713Z" }, + { url = "https://files.pythonhosted.org/packages/91/d4/0c0fdcc4293ad1b73db54896fa0de4b37439ae4f25971b5eb1708dd04f9a/watchfiles-0.20.0-cp37-abi3-win32.whl", hash = "sha256:a03d1e6feb7966b417f43c3e3783188167fd69c2063e86bad31e62c4ea794cc5", size = 268193, upload-time = "2023-08-24T12:49:01.101Z" }, + { url = "https://files.pythonhosted.org/packages/87/79/098b1b1fcb6de16149d23283a2ab5dadce6a06b864e7a182d231f57a1f9e/watchfiles-0.20.0-cp37-abi3-win_amd64.whl", hash = "sha256:eccc8942bcdc7d638a01435d915b913255bbd66f018f1af051cd8afddb339ea3", size = 276723, upload-time = "2023-08-24T12:49:02.351Z" }, + { url = "https://files.pythonhosted.org/packages/3f/82/45dddf4f5bf8b73ba27382cebb2bb3c0ee922c7ef77d936b86276aa39dca/watchfiles-0.20.0-cp37-abi3-win_arm64.whl", hash = "sha256:b17d4176c49d207865630da5b59a91779468dd3e08692fe943064da260de2c7c", size = 265344, upload-time = "2023-08-24T12:49:04.107Z" }, +] + +[[package]] +name = "websockets" +version = "15.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz", hash = "sha256:82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee", size = 177016, upload-time = "2025-03-05T20:03:41.606Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/da/6462a9f510c0c49837bbc9345aca92d767a56c1fb2939e1579df1e1cdcf7/websockets-15.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d63efaa0cd96cf0c5fe4d581521d9fa87744540d4bc999ae6e08595a1014b45b", size = 175423, upload-time = "2025-03-05T20:01:35.363Z" }, + { url = "https://files.pythonhosted.org/packages/1c/9f/9d11c1a4eb046a9e106483b9ff69bce7ac880443f00e5ce64261b47b07e7/websockets-15.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ac60e3b188ec7574cb761b08d50fcedf9d77f1530352db4eef1707fe9dee7205", size = 173080, upload-time = "2025-03-05T20:01:37.304Z" }, + { url = "https://files.pythonhosted.org/packages/d5/4f/b462242432d93ea45f297b6179c7333dd0402b855a912a04e7fc61c0d71f/websockets-15.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5756779642579d902eed757b21b0164cd6fe338506a8083eb58af5c372e39d9a", size = 173329, upload-time = "2025-03-05T20:01:39.668Z" }, + { url = "https://files.pythonhosted.org/packages/6e/0c/6afa1f4644d7ed50284ac59cc70ef8abd44ccf7d45850d989ea7310538d0/websockets-15.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fdfe3e2a29e4db3659dbd5bbf04560cea53dd9610273917799f1cde46aa725e", size = 182312, upload-time = "2025-03-05T20:01:41.815Z" }, + { url = "https://files.pythonhosted.org/packages/dd/d4/ffc8bd1350b229ca7a4db2a3e1c482cf87cea1baccd0ef3e72bc720caeec/websockets-15.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c2529b320eb9e35af0fa3016c187dffb84a3ecc572bcee7c3ce302bfeba52bf", size = 181319, upload-time = "2025-03-05T20:01:43.967Z" }, + { url = "https://files.pythonhosted.org/packages/97/3a/5323a6bb94917af13bbb34009fac01e55c51dfde354f63692bf2533ffbc2/websockets-15.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac1e5c9054fe23226fb11e05a6e630837f074174c4c2f0fe442996112a6de4fb", size = 181631, upload-time = "2025-03-05T20:01:46.104Z" }, + { url = "https://files.pythonhosted.org/packages/a6/cc/1aeb0f7cee59ef065724041bb7ed667b6ab1eeffe5141696cccec2687b66/websockets-15.0.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5df592cd503496351d6dc14f7cdad49f268d8e618f80dce0cd5a36b93c3fc08d", size = 182016, upload-time = "2025-03-05T20:01:47.603Z" }, + { url = "https://files.pythonhosted.org/packages/79/f9/c86f8f7af208e4161a7f7e02774e9d0a81c632ae76db2ff22549e1718a51/websockets-15.0.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a34631031a8f05657e8e90903e656959234f3a04552259458aac0b0f9ae6fd9", size = 181426, upload-time = "2025-03-05T20:01:48.949Z" }, + { url = "https://files.pythonhosted.org/packages/c7/b9/828b0bc6753db905b91df6ae477c0b14a141090df64fb17f8a9d7e3516cf/websockets-15.0.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3d00075aa65772e7ce9e990cab3ff1de702aa09be3940d1dc88d5abf1ab8a09c", size = 181360, upload-time = "2025-03-05T20:01:50.938Z" }, + { url = "https://files.pythonhosted.org/packages/89/fb/250f5533ec468ba6327055b7d98b9df056fb1ce623b8b6aaafb30b55d02e/websockets-15.0.1-cp310-cp310-win32.whl", hash = "sha256:1234d4ef35db82f5446dca8e35a7da7964d02c127b095e172e54397fb6a6c256", size = 176388, upload-time = "2025-03-05T20:01:52.213Z" }, + { url = "https://files.pythonhosted.org/packages/1c/46/aca7082012768bb98e5608f01658ff3ac8437e563eca41cf068bd5849a5e/websockets-15.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:39c1fec2c11dc8d89bba6b2bf1556af381611a173ac2b511cf7231622058af41", size = 176830, upload-time = "2025-03-05T20:01:53.922Z" }, + { url = "https://files.pythonhosted.org/packages/9f/32/18fcd5919c293a398db67443acd33fde142f283853076049824fc58e6f75/websockets-15.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:823c248b690b2fd9303ba00c4f66cd5e2d8c3ba4aa968b2779be9532a4dad431", size = 175423, upload-time = "2025-03-05T20:01:56.276Z" }, + { url = "https://files.pythonhosted.org/packages/76/70/ba1ad96b07869275ef42e2ce21f07a5b0148936688c2baf7e4a1f60d5058/websockets-15.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678999709e68425ae2593acf2e3ebcbcf2e69885a5ee78f9eb80e6e371f1bf57", size = 173082, upload-time = "2025-03-05T20:01:57.563Z" }, + { url = "https://files.pythonhosted.org/packages/86/f2/10b55821dd40eb696ce4704a87d57774696f9451108cff0d2824c97e0f97/websockets-15.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d50fd1ee42388dcfb2b3676132c78116490976f1300da28eb629272d5d93e905", size = 173330, upload-time = "2025-03-05T20:01:59.063Z" }, + { url = "https://files.pythonhosted.org/packages/a5/90/1c37ae8b8a113d3daf1065222b6af61cc44102da95388ac0018fcb7d93d9/websockets-15.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d99e5546bf73dbad5bf3547174cd6cb8ba7273062a23808ffea025ecb1cf8562", size = 182878, upload-time = "2025-03-05T20:02:00.305Z" }, + { url = "https://files.pythonhosted.org/packages/8e/8d/96e8e288b2a41dffafb78e8904ea7367ee4f891dafc2ab8d87e2124cb3d3/websockets-15.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66dd88c918e3287efc22409d426c8f729688d89a0c587c88971a0faa2c2f3792", size = 181883, upload-time = "2025-03-05T20:02:03.148Z" }, + { url = "https://files.pythonhosted.org/packages/93/1f/5d6dbf551766308f6f50f8baf8e9860be6182911e8106da7a7f73785f4c4/websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8dd8327c795b3e3f219760fa603dcae1dcc148172290a8ab15158cf85a953413", size = 182252, upload-time = "2025-03-05T20:02:05.29Z" }, + { url = "https://files.pythonhosted.org/packages/d4/78/2d4fed9123e6620cbf1706c0de8a1632e1a28e7774d94346d7de1bba2ca3/websockets-15.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8fdc51055e6ff4adeb88d58a11042ec9a5eae317a0a53d12c062c8a8865909e8", size = 182521, upload-time = "2025-03-05T20:02:07.458Z" }, + { url = "https://files.pythonhosted.org/packages/e7/3b/66d4c1b444dd1a9823c4a81f50231b921bab54eee2f69e70319b4e21f1ca/websockets-15.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:693f0192126df6c2327cce3baa7c06f2a117575e32ab2308f7f8216c29d9e2e3", size = 181958, upload-time = "2025-03-05T20:02:09.842Z" }, + { url = "https://files.pythonhosted.org/packages/08/ff/e9eed2ee5fed6f76fdd6032ca5cd38c57ca9661430bb3d5fb2872dc8703c/websockets-15.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54479983bd5fb469c38f2f5c7e3a24f9a4e70594cd68cd1fa6b9340dadaff7cf", size = 181918, upload-time = "2025-03-05T20:02:11.968Z" }, + { url = "https://files.pythonhosted.org/packages/d8/75/994634a49b7e12532be6a42103597b71098fd25900f7437d6055ed39930a/websockets-15.0.1-cp311-cp311-win32.whl", hash = "sha256:16b6c1b3e57799b9d38427dda63edcbe4926352c47cf88588c0be4ace18dac85", size = 176388, upload-time = "2025-03-05T20:02:13.32Z" }, + { url = "https://files.pythonhosted.org/packages/98/93/e36c73f78400a65f5e236cd376713c34182e6663f6889cd45a4a04d8f203/websockets-15.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:27ccee0071a0e75d22cb35849b1db43f2ecd3e161041ac1ee9d2352ddf72f065", size = 176828, upload-time = "2025-03-05T20:02:14.585Z" }, + { url = "https://files.pythonhosted.org/packages/51/6b/4545a0d843594f5d0771e86463606a3988b5a09ca5123136f8a76580dd63/websockets-15.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3e90baa811a5d73f3ca0bcbf32064d663ed81318ab225ee4f427ad4e26e5aff3", size = 175437, upload-time = "2025-03-05T20:02:16.706Z" }, + { url = "https://files.pythonhosted.org/packages/f4/71/809a0f5f6a06522af902e0f2ea2757f71ead94610010cf570ab5c98e99ed/websockets-15.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:592f1a9fe869c778694f0aa806ba0374e97648ab57936f092fd9d87f8bc03665", size = 173096, upload-time = "2025-03-05T20:02:18.832Z" }, + { url = "https://files.pythonhosted.org/packages/3d/69/1a681dd6f02180916f116894181eab8b2e25b31e484c5d0eae637ec01f7c/websockets-15.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0701bc3cfcb9164d04a14b149fd74be7347a530ad3bbf15ab2c678a2cd3dd9a2", size = 173332, upload-time = "2025-03-05T20:02:20.187Z" }, + { url = "https://files.pythonhosted.org/packages/a6/02/0073b3952f5bce97eafbb35757f8d0d54812b6174ed8dd952aa08429bcc3/websockets-15.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8b56bdcdb4505c8078cb6c7157d9811a85790f2f2b3632c7d1462ab5783d215", size = 183152, upload-time = "2025-03-05T20:02:22.286Z" }, + { url = "https://files.pythonhosted.org/packages/74/45/c205c8480eafd114b428284840da0b1be9ffd0e4f87338dc95dc6ff961a1/websockets-15.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0af68c55afbd5f07986df82831c7bff04846928ea8d1fd7f30052638788bc9b5", size = 182096, upload-time = "2025-03-05T20:02:24.368Z" }, + { url = "https://files.pythonhosted.org/packages/14/8f/aa61f528fba38578ec553c145857a181384c72b98156f858ca5c8e82d9d3/websockets-15.0.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64dee438fed052b52e4f98f76c5790513235efaa1ef7f3f2192c392cd7c91b65", size = 182523, upload-time = "2025-03-05T20:02:25.669Z" }, + { url = "https://files.pythonhosted.org/packages/ec/6d/0267396610add5bc0d0d3e77f546d4cd287200804fe02323797de77dbce9/websockets-15.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d5f6b181bb38171a8ad1d6aa58a67a6aa9d4b38d0f8c5f496b9e42561dfc62fe", size = 182790, upload-time = "2025-03-05T20:02:26.99Z" }, + { url = "https://files.pythonhosted.org/packages/02/05/c68c5adbf679cf610ae2f74a9b871ae84564462955d991178f95a1ddb7dd/websockets-15.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5d54b09eba2bada6011aea5375542a157637b91029687eb4fdb2dab11059c1b4", size = 182165, upload-time = "2025-03-05T20:02:30.291Z" }, + { url = "https://files.pythonhosted.org/packages/29/93/bb672df7b2f5faac89761cb5fa34f5cec45a4026c383a4b5761c6cea5c16/websockets-15.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be571a8b5afed347da347bfcf27ba12b069d9d7f42cb8c7028b5e98bbb12597", size = 182160, upload-time = "2025-03-05T20:02:31.634Z" }, + { url = "https://files.pythonhosted.org/packages/ff/83/de1f7709376dc3ca9b7eeb4b9a07b4526b14876b6d372a4dc62312bebee0/websockets-15.0.1-cp312-cp312-win32.whl", hash = "sha256:c338ffa0520bdb12fbc527265235639fb76e7bc7faafbb93f6ba80d9c06578a9", size = 176395, upload-time = "2025-03-05T20:02:33.017Z" }, + { url = "https://files.pythonhosted.org/packages/7d/71/abf2ebc3bbfa40f391ce1428c7168fb20582d0ff57019b69ea20fa698043/websockets-15.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcd5cf9e305d7b8338754470cf69cf81f420459dbae8a3b40cee57417f4614a7", size = 176841, upload-time = "2025-03-05T20:02:34.498Z" }, + { url = "https://files.pythonhosted.org/packages/cb/9f/51f0cf64471a9d2b4d0fc6c534f323b664e7095640c34562f5182e5a7195/websockets-15.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ee443ef070bb3b6ed74514f5efaa37a252af57c90eb33b956d35c8e9c10a1931", size = 175440, upload-time = "2025-03-05T20:02:36.695Z" }, + { url = "https://files.pythonhosted.org/packages/8a/05/aa116ec9943c718905997412c5989f7ed671bc0188ee2ba89520e8765d7b/websockets-15.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5a939de6b7b4e18ca683218320fc67ea886038265fd1ed30173f5ce3f8e85675", size = 173098, upload-time = "2025-03-05T20:02:37.985Z" }, + { url = "https://files.pythonhosted.org/packages/ff/0b/33cef55ff24f2d92924923c99926dcce78e7bd922d649467f0eda8368923/websockets-15.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:746ee8dba912cd6fc889a8147168991d50ed70447bf18bcda7039f7d2e3d9151", size = 173329, upload-time = "2025-03-05T20:02:39.298Z" }, + { url = "https://files.pythonhosted.org/packages/31/1d/063b25dcc01faa8fada1469bdf769de3768b7044eac9d41f734fd7b6ad6d/websockets-15.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:595b6c3969023ecf9041b2936ac3827e4623bfa3ccf007575f04c5a6aa318c22", size = 183111, upload-time = "2025-03-05T20:02:40.595Z" }, + { url = "https://files.pythonhosted.org/packages/93/53/9a87ee494a51bf63e4ec9241c1ccc4f7c2f45fff85d5bde2ff74fcb68b9e/websockets-15.0.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c714d2fc58b5ca3e285461a4cc0c9a66bd0e24c5da9911e30158286c9b5be7f", size = 182054, upload-time = "2025-03-05T20:02:41.926Z" }, + { url = "https://files.pythonhosted.org/packages/ff/b2/83a6ddf56cdcbad4e3d841fcc55d6ba7d19aeb89c50f24dd7e859ec0805f/websockets-15.0.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f3c1e2ab208db911594ae5b4f79addeb3501604a165019dd221c0bdcabe4db8", size = 182496, upload-time = "2025-03-05T20:02:43.304Z" }, + { url = "https://files.pythonhosted.org/packages/98/41/e7038944ed0abf34c45aa4635ba28136f06052e08fc2168520bb8b25149f/websockets-15.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:229cf1d3ca6c1804400b0a9790dc66528e08a6a1feec0d5040e8b9eb14422375", size = 182829, upload-time = "2025-03-05T20:02:48.812Z" }, + { url = "https://files.pythonhosted.org/packages/e0/17/de15b6158680c7623c6ef0db361da965ab25d813ae54fcfeae2e5b9ef910/websockets-15.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:756c56e867a90fb00177d530dca4b097dd753cde348448a1012ed6c5131f8b7d", size = 182217, upload-time = "2025-03-05T20:02:50.14Z" }, + { url = "https://files.pythonhosted.org/packages/33/2b/1f168cb6041853eef0362fb9554c3824367c5560cbdaad89ac40f8c2edfc/websockets-15.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:558d023b3df0bffe50a04e710bc87742de35060580a293c2a984299ed83bc4e4", size = 182195, upload-time = "2025-03-05T20:02:51.561Z" }, + { url = "https://files.pythonhosted.org/packages/86/eb/20b6cdf273913d0ad05a6a14aed4b9a85591c18a987a3d47f20fa13dcc47/websockets-15.0.1-cp313-cp313-win32.whl", hash = "sha256:ba9e56e8ceeeedb2e080147ba85ffcd5cd0711b89576b83784d8605a7df455fa", size = 176393, upload-time = "2025-03-05T20:02:53.814Z" }, + { url = "https://files.pythonhosted.org/packages/1b/6c/c65773d6cab416a64d191d6ee8a8b1c68a09970ea6909d16965d26bfed1e/websockets-15.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:e09473f095a819042ecb2ab9465aee615bd9c2028e4ef7d933600a8401c79561", size = 176837, upload-time = "2025-03-05T20:02:55.237Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/d40f779fa16f74d3468357197af8d6ad07e7c5a27ea1ca74ceb38986f77a/websockets-15.0.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0c9e74d766f2818bb95f84c25be4dea09841ac0f734d1966f415e4edfc4ef1c3", size = 173109, upload-time = "2025-03-05T20:03:17.769Z" }, + { url = "https://files.pythonhosted.org/packages/bc/cd/5b887b8585a593073fd92f7c23ecd3985cd2c3175025a91b0d69b0551372/websockets-15.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1009ee0c7739c08a0cd59de430d6de452a55e42d6b522de7aa15e6f67db0b8e1", size = 173343, upload-time = "2025-03-05T20:03:19.094Z" }, + { url = "https://files.pythonhosted.org/packages/fe/ae/d34f7556890341e900a95acf4886833646306269f899d58ad62f588bf410/websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76d1f20b1c7a2fa82367e04982e708723ba0e7b8d43aa643d3dcd404d74f1475", size = 174599, upload-time = "2025-03-05T20:03:21.1Z" }, + { url = "https://files.pythonhosted.org/packages/71/e6/5fd43993a87db364ec60fc1d608273a1a465c0caba69176dd160e197ce42/websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f29d80eb9a9263b8d109135351caf568cc3f80b9928bccde535c235de55c22d9", size = 174207, upload-time = "2025-03-05T20:03:23.221Z" }, + { url = "https://files.pythonhosted.org/packages/2b/fb/c492d6daa5ec067c2988ac80c61359ace5c4c674c532985ac5a123436cec/websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b359ed09954d7c18bbc1680f380c7301f92c60bf924171629c5db97febb12f04", size = 174155, upload-time = "2025-03-05T20:03:25.321Z" }, + { url = "https://files.pythonhosted.org/packages/68/a1/dcb68430b1d00b698ae7a7e0194433bce4f07ded185f0ee5fb21e2a2e91e/websockets-15.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:cad21560da69f4ce7658ca2cb83138fb4cf695a2ba3e475e0559e05991aa8122", size = 176884, upload-time = "2025-03-05T20:03:27.934Z" }, + { url = "https://files.pythonhosted.org/packages/fa/a8/5b41e0da817d64113292ab1f8247140aac61cbf6cfd085d6a0fa77f4984f/websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f", size = 169743, upload-time = "2025-03-05T20:03:39.41Z" }, +] + +[[package]] +name = "yarl" +version = "1.22.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "idna" }, + { name = "multidict" }, + { name = "propcache" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz", hash = "sha256:bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71", size = 187169, upload-time = "2025-10-06T14:12:55.963Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/43/a2204825342f37c337f5edb6637040fa14e365b2fcc2346960201d457579/yarl-1.22.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c7bd6683587567e5a49ee6e336e0612bec8329be1b7d4c8af5687dcdeb67ee1e", size = 140517, upload-time = "2025-10-06T14:08:42.494Z" }, + { url = "https://files.pythonhosted.org/packages/44/6f/674f3e6f02266428c56f704cd2501c22f78e8b2eeb23f153117cc86fb28a/yarl-1.22.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5cdac20da754f3a723cceea5b3448e1a2074866406adeb4ef35b469d089adb8f", size = 93495, upload-time = "2025-10-06T14:08:46.2Z" }, + { url = "https://files.pythonhosted.org/packages/b8/12/5b274d8a0f30c07b91b2f02cba69152600b47830fcfb465c108880fcee9c/yarl-1.22.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:07a524d84df0c10f41e3ee918846e1974aba4ec017f990dc735aad487a0bdfdf", size = 94400, upload-time = "2025-10-06T14:08:47.855Z" }, + { url = "https://files.pythonhosted.org/packages/e2/7f/df1b6949b1fa1aa9ff6de6e2631876ad4b73c4437822026e85d8acb56bb1/yarl-1.22.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e1b329cb8146d7b736677a2440e422eadd775d1806a81db2d4cded80a48efc1a", size = 347545, upload-time = "2025-10-06T14:08:49.683Z" }, + { url = "https://files.pythonhosted.org/packages/84/09/f92ed93bd6cd77872ab6c3462df45ca45cd058d8f1d0c9b4f54c1704429f/yarl-1.22.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:75976c6945d85dbb9ee6308cd7ff7b1fb9409380c82d6119bd778d8fcfe2931c", size = 319598, upload-time = "2025-10-06T14:08:51.215Z" }, + { url = "https://files.pythonhosted.org/packages/c3/97/ac3f3feae7d522cf7ccec3d340bb0b2b61c56cb9767923df62a135092c6b/yarl-1.22.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:80ddf7a5f8c86cb3eb4bc9028b07bbbf1f08a96c5c0bc1244be5e8fefcb94147", size = 363893, upload-time = "2025-10-06T14:08:53.144Z" }, + { url = "https://files.pythonhosted.org/packages/06/49/f3219097403b9c84a4d079b1d7bda62dd9b86d0d6e4428c02d46ab2c77fc/yarl-1.22.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d332fc2e3c94dad927f2112395772a4e4fedbcf8f80efc21ed7cdfae4d574fdb", size = 371240, upload-time = "2025-10-06T14:08:55.036Z" }, + { url = "https://files.pythonhosted.org/packages/35/9f/06b765d45c0e44e8ecf0fe15c9eacbbde342bb5b7561c46944f107bfb6c3/yarl-1.22.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0cf71bf877efeac18b38d3930594c0948c82b64547c1cf420ba48722fe5509f6", size = 346965, upload-time = "2025-10-06T14:08:56.722Z" }, + { url = "https://files.pythonhosted.org/packages/c5/69/599e7cea8d0fcb1694323b0db0dda317fa3162f7b90166faddecf532166f/yarl-1.22.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:663e1cadaddae26be034a6ab6072449a8426ddb03d500f43daf952b74553bba0", size = 342026, upload-time = "2025-10-06T14:08:58.563Z" }, + { url = "https://files.pythonhosted.org/packages/95/6f/9dfd12c8bc90fea9eab39832ee32ea48f8e53d1256252a77b710c065c89f/yarl-1.22.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:6dcbb0829c671f305be48a7227918cfcd11276c2d637a8033a99a02b67bf9eda", size = 335637, upload-time = "2025-10-06T14:09:00.506Z" }, + { url = "https://files.pythonhosted.org/packages/57/2e/34c5b4eb9b07e16e873db5b182c71e5f06f9b5af388cdaa97736d79dd9a6/yarl-1.22.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:f0d97c18dfd9a9af4490631905a3f131a8e4c9e80a39353919e2cfed8f00aedc", size = 359082, upload-time = "2025-10-06T14:09:01.936Z" }, + { url = "https://files.pythonhosted.org/packages/31/71/fa7e10fb772d273aa1f096ecb8ab8594117822f683bab7d2c5a89914c92a/yarl-1.22.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:437840083abe022c978470b942ff832c3940b2ad3734d424b7eaffcd07f76737", size = 357811, upload-time = "2025-10-06T14:09:03.445Z" }, + { url = "https://files.pythonhosted.org/packages/26/da/11374c04e8e1184a6a03cf9c8f5688d3e5cec83ed6f31ad3481b3207f709/yarl-1.22.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a899cbd98dce6f5d8de1aad31cb712ec0a530abc0a86bd6edaa47c1090138467", size = 351223, upload-time = "2025-10-06T14:09:05.401Z" }, + { url = "https://files.pythonhosted.org/packages/82/8f/e2d01f161b0c034a30410e375e191a5d27608c1f8693bab1a08b089ca096/yarl-1.22.0-cp310-cp310-win32.whl", hash = "sha256:595697f68bd1f0c1c159fcb97b661fc9c3f5db46498043555d04805430e79bea", size = 82118, upload-time = "2025-10-06T14:09:11.148Z" }, + { url = "https://files.pythonhosted.org/packages/62/46/94c76196642dbeae634c7a61ba3da88cd77bed875bf6e4a8bed037505aa6/yarl-1.22.0-cp310-cp310-win_amd64.whl", hash = "sha256:cb95a9b1adaa48e41815a55ae740cfda005758104049a640a398120bf02515ca", size = 86852, upload-time = "2025-10-06T14:09:12.958Z" }, + { url = "https://files.pythonhosted.org/packages/af/af/7df4f179d3b1a6dcb9a4bd2ffbc67642746fcafdb62580e66876ce83fff4/yarl-1.22.0-cp310-cp310-win_arm64.whl", hash = "sha256:b85b982afde6df99ecc996990d4ad7ccbdbb70e2a4ba4de0aecde5922ba98a0b", size = 82012, upload-time = "2025-10-06T14:09:14.664Z" }, + { url = "https://files.pythonhosted.org/packages/4d/27/5ab13fc84c76a0250afd3d26d5936349a35be56ce5785447d6c423b26d92/yarl-1.22.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ab72135b1f2db3fed3997d7e7dc1b80573c67138023852b6efb336a5eae6511", size = 141607, upload-time = "2025-10-06T14:09:16.298Z" }, + { url = "https://files.pythonhosted.org/packages/6a/a1/d065d51d02dc02ce81501d476b9ed2229d9a990818332242a882d5d60340/yarl-1.22.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:669930400e375570189492dc8d8341301578e8493aec04aebc20d4717f899dd6", size = 94027, upload-time = "2025-10-06T14:09:17.786Z" }, + { url = "https://files.pythonhosted.org/packages/c1/da/8da9f6a53f67b5106ffe902c6fa0164e10398d4e150d85838b82f424072a/yarl-1.22.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:792a2af6d58177ef7c19cbf0097aba92ca1b9cb3ffdd9c7470e156c8f9b5e028", size = 94963, upload-time = "2025-10-06T14:09:19.662Z" }, + { url = "https://files.pythonhosted.org/packages/68/fe/2c1f674960c376e29cb0bec1249b117d11738db92a6ccc4a530b972648db/yarl-1.22.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3ea66b1c11c9150f1372f69afb6b8116f2dd7286f38e14ea71a44eee9ec51b9d", size = 368406, upload-time = "2025-10-06T14:09:21.402Z" }, + { url = "https://files.pythonhosted.org/packages/95/26/812a540e1c3c6418fec60e9bbd38e871eaba9545e94fa5eff8f4a8e28e1e/yarl-1.22.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3e2daa88dc91870215961e96a039ec73e4937da13cf77ce17f9cad0c18df3503", size = 336581, upload-time = "2025-10-06T14:09:22.98Z" }, + { url = "https://files.pythonhosted.org/packages/0b/f5/5777b19e26fdf98563985e481f8be3d8a39f8734147a6ebf459d0dab5a6b/yarl-1.22.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ba440ae430c00eee41509353628600212112cd5018d5def7e9b05ea7ac34eb65", size = 388924, upload-time = "2025-10-06T14:09:24.655Z" }, + { url = "https://files.pythonhosted.org/packages/86/08/24bd2477bd59c0bbd994fe1d93b126e0472e4e3df5a96a277b0a55309e89/yarl-1.22.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e6438cc8f23a9c1478633d216b16104a586b9761db62bfacb6425bac0a36679e", size = 392890, upload-time = "2025-10-06T14:09:26.617Z" }, + { url = "https://files.pythonhosted.org/packages/46/00/71b90ed48e895667ecfb1eaab27c1523ee2fa217433ed77a73b13205ca4b/yarl-1.22.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c52a6e78aef5cf47a98ef8e934755abf53953379b7d53e68b15ff4420e6683d", size = 365819, upload-time = "2025-10-06T14:09:28.544Z" }, + { url = "https://files.pythonhosted.org/packages/30/2d/f715501cae832651d3282387c6a9236cd26bd00d0ff1e404b3dc52447884/yarl-1.22.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3b06bcadaac49c70f4c88af4ffcfbe3dc155aab3163e75777818092478bcbbe7", size = 363601, upload-time = "2025-10-06T14:09:30.568Z" }, + { url = "https://files.pythonhosted.org/packages/f8/f9/a678c992d78e394e7126ee0b0e4e71bd2775e4334d00a9278c06a6cce96a/yarl-1.22.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:6944b2dc72c4d7f7052683487e3677456050ff77fcf5e6204e98caf785ad1967", size = 358072, upload-time = "2025-10-06T14:09:32.528Z" }, + { url = "https://files.pythonhosted.org/packages/2c/d1/b49454411a60edb6fefdcad4f8e6dbba7d8019e3a508a1c5836cba6d0781/yarl-1.22.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:d5372ca1df0f91a86b047d1277c2aaf1edb32d78bbcefffc81b40ffd18f027ed", size = 385311, upload-time = "2025-10-06T14:09:34.634Z" }, + { url = "https://files.pythonhosted.org/packages/87/e5/40d7a94debb8448c7771a916d1861d6609dddf7958dc381117e7ba36d9e8/yarl-1.22.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:51af598701f5299012b8416486b40fceef8c26fc87dc6d7d1f6fc30609ea0aa6", size = 381094, upload-time = "2025-10-06T14:09:36.268Z" }, + { url = "https://files.pythonhosted.org/packages/35/d8/611cc282502381ad855448643e1ad0538957fc82ae83dfe7762c14069e14/yarl-1.22.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b266bd01fedeffeeac01a79ae181719ff848a5a13ce10075adbefc8f1daee70e", size = 370944, upload-time = "2025-10-06T14:09:37.872Z" }, + { url = "https://files.pythonhosted.org/packages/2d/df/fadd00fb1c90e1a5a8bd731fa3d3de2e165e5a3666a095b04e31b04d9cb6/yarl-1.22.0-cp311-cp311-win32.whl", hash = "sha256:a9b1ba5610a4e20f655258d5a1fdc7ebe3d837bb0e45b581398b99eb98b1f5ca", size = 81804, upload-time = "2025-10-06T14:09:39.359Z" }, + { url = "https://files.pythonhosted.org/packages/b5/f7/149bb6f45f267cb5c074ac40c01c6b3ea6d8a620d34b337f6321928a1b4d/yarl-1.22.0-cp311-cp311-win_amd64.whl", hash = "sha256:078278b9b0b11568937d9509b589ee83ef98ed6d561dfe2020e24a9fd08eaa2b", size = 86858, upload-time = "2025-10-06T14:09:41.068Z" }, + { url = "https://files.pythonhosted.org/packages/2b/13/88b78b93ad3f2f0b78e13bfaaa24d11cbc746e93fe76d8c06bf139615646/yarl-1.22.0-cp311-cp311-win_arm64.whl", hash = "sha256:b6a6f620cfe13ccec221fa312139135166e47ae169f8253f72a0abc0dae94376", size = 81637, upload-time = "2025-10-06T14:09:42.712Z" }, + { url = "https://files.pythonhosted.org/packages/75/ff/46736024fee3429b80a165a732e38e5d5a238721e634ab41b040d49f8738/yarl-1.22.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e340382d1afa5d32b892b3ff062436d592ec3d692aeea3bef3a5cfe11bbf8c6f", size = 142000, upload-time = "2025-10-06T14:09:44.631Z" }, + { url = "https://files.pythonhosted.org/packages/5a/9a/b312ed670df903145598914770eb12de1bac44599549b3360acc96878df8/yarl-1.22.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f1e09112a2c31ffe8d80be1b0988fa6a18c5d5cad92a9ffbb1c04c91bfe52ad2", size = 94338, upload-time = "2025-10-06T14:09:46.372Z" }, + { url = "https://files.pythonhosted.org/packages/ba/f5/0601483296f09c3c65e303d60c070a5c19fcdbc72daa061e96170785bc7d/yarl-1.22.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:939fe60db294c786f6b7c2d2e121576628468f65453d86b0fe36cb52f987bd74", size = 94909, upload-time = "2025-10-06T14:09:48.648Z" }, + { url = "https://files.pythonhosted.org/packages/60/41/9a1fe0b73dbcefce72e46cf149b0e0a67612d60bfc90fb59c2b2efdfbd86/yarl-1.22.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e1651bf8e0398574646744c1885a41198eba53dc8a9312b954073f845c90a8df", size = 372940, upload-time = "2025-10-06T14:09:50.089Z" }, + { url = "https://files.pythonhosted.org/packages/17/7a/795cb6dfee561961c30b800f0ed616b923a2ec6258b5def2a00bf8231334/yarl-1.22.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b8a0588521a26bf92a57a1705b77b8b59044cdceccac7151bd8d229e66b8dedb", size = 345825, upload-time = "2025-10-06T14:09:52.142Z" }, + { url = "https://files.pythonhosted.org/packages/d7/93/a58f4d596d2be2ae7bab1a5846c4d270b894958845753b2c606d666744d3/yarl-1.22.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:42188e6a615c1a75bcaa6e150c3fe8f3e8680471a6b10150c5f7e83f47cc34d2", size = 386705, upload-time = "2025-10-06T14:09:54.128Z" }, + { url = "https://files.pythonhosted.org/packages/61/92/682279d0e099d0e14d7fd2e176bd04f48de1484f56546a3e1313cd6c8e7c/yarl-1.22.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f6d2cb59377d99718913ad9a151030d6f83ef420a2b8f521d94609ecc106ee82", size = 396518, upload-time = "2025-10-06T14:09:55.762Z" }, + { url = "https://files.pythonhosted.org/packages/db/0f/0d52c98b8a885aeda831224b78f3be7ec2e1aa4a62091f9f9188c3c65b56/yarl-1.22.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50678a3b71c751d58d7908edc96d332af328839eea883bb554a43f539101277a", size = 377267, upload-time = "2025-10-06T14:09:57.958Z" }, + { url = "https://files.pythonhosted.org/packages/22/42/d2685e35908cbeaa6532c1fc73e89e7f2efb5d8a7df3959ea8e37177c5a3/yarl-1.22.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1e8fbaa7cec507aa24ea27a01456e8dd4b6fab829059b69844bd348f2d467124", size = 365797, upload-time = "2025-10-06T14:09:59.527Z" }, + { url = "https://files.pythonhosted.org/packages/a2/83/cf8c7bcc6355631762f7d8bdab920ad09b82efa6b722999dfb05afa6cfac/yarl-1.22.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:433885ab5431bc3d3d4f2f9bd15bfa1614c522b0f1405d62c4f926ccd69d04fa", size = 365535, upload-time = "2025-10-06T14:10:01.139Z" }, + { url = "https://files.pythonhosted.org/packages/25/e1/5302ff9b28f0c59cac913b91fe3f16c59a033887e57ce9ca5d41a3a94737/yarl-1.22.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:b790b39c7e9a4192dc2e201a282109ed2985a1ddbd5ac08dc56d0e121400a8f7", size = 382324, upload-time = "2025-10-06T14:10:02.756Z" }, + { url = "https://files.pythonhosted.org/packages/bf/cd/4617eb60f032f19ae3a688dc990d8f0d89ee0ea378b61cac81ede3e52fae/yarl-1.22.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:31f0b53913220599446872d757257be5898019c85e7971599065bc55065dc99d", size = 383803, upload-time = "2025-10-06T14:10:04.552Z" }, + { url = "https://files.pythonhosted.org/packages/59/65/afc6e62bb506a319ea67b694551dab4a7e6fb7bf604e9bd9f3e11d575fec/yarl-1.22.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a49370e8f711daec68d09b821a34e1167792ee2d24d405cbc2387be4f158b520", size = 374220, upload-time = "2025-10-06T14:10:06.489Z" }, + { url = "https://files.pythonhosted.org/packages/e7/3d/68bf18d50dc674b942daec86a9ba922d3113d8399b0e52b9897530442da2/yarl-1.22.0-cp312-cp312-win32.whl", hash = "sha256:70dfd4f241c04bd9239d53b17f11e6ab672b9f1420364af63e8531198e3f5fe8", size = 81589, upload-time = "2025-10-06T14:10:09.254Z" }, + { url = "https://files.pythonhosted.org/packages/c8/9a/6ad1a9b37c2f72874f93e691b2e7ecb6137fb2b899983125db4204e47575/yarl-1.22.0-cp312-cp312-win_amd64.whl", hash = "sha256:8884d8b332a5e9b88e23f60bb166890009429391864c685e17bd73a9eda9105c", size = 87213, upload-time = "2025-10-06T14:10:11.369Z" }, + { url = "https://files.pythonhosted.org/packages/44/c5/c21b562d1680a77634d748e30c653c3ca918beb35555cff24986fff54598/yarl-1.22.0-cp312-cp312-win_arm64.whl", hash = "sha256:ea70f61a47f3cc93bdf8b2f368ed359ef02a01ca6393916bc8ff877427181e74", size = 81330, upload-time = "2025-10-06T14:10:13.112Z" }, + { url = "https://files.pythonhosted.org/packages/ea/f3/d67de7260456ee105dc1d162d43a019ecad6b91e2f51809d6cddaa56690e/yarl-1.22.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8dee9c25c74997f6a750cd317b8ca63545169c098faee42c84aa5e506c819b53", size = 139980, upload-time = "2025-10-06T14:10:14.601Z" }, + { url = "https://files.pythonhosted.org/packages/01/88/04d98af0b47e0ef42597b9b28863b9060bb515524da0a65d5f4db160b2d5/yarl-1.22.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:01e73b85a5434f89fc4fe27dcda2aff08ddf35e4d47bbbea3bdcd25321af538a", size = 93424, upload-time = "2025-10-06T14:10:16.115Z" }, + { url = "https://files.pythonhosted.org/packages/18/91/3274b215fd8442a03975ce6bee5fe6aa57a8326b29b9d3d56234a1dca244/yarl-1.22.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:22965c2af250d20c873cdbee8ff958fb809940aeb2e74ba5f20aaf6b7ac8c70c", size = 93821, upload-time = "2025-10-06T14:10:17.993Z" }, + { url = "https://files.pythonhosted.org/packages/61/3a/caf4e25036db0f2da4ca22a353dfeb3c9d3c95d2761ebe9b14df8fc16eb0/yarl-1.22.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b4f15793aa49793ec8d1c708ab7f9eded1aa72edc5174cae703651555ed1b601", size = 373243, upload-time = "2025-10-06T14:10:19.44Z" }, + { url = "https://files.pythonhosted.org/packages/6e/9e/51a77ac7516e8e7803b06e01f74e78649c24ee1021eca3d6a739cb6ea49c/yarl-1.22.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e5542339dcf2747135c5c85f68680353d5cb9ffd741c0f2e8d832d054d41f35a", size = 342361, upload-time = "2025-10-06T14:10:21.124Z" }, + { url = "https://files.pythonhosted.org/packages/d4/f8/33b92454789dde8407f156c00303e9a891f1f51a0330b0fad7c909f87692/yarl-1.22.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5c401e05ad47a75869c3ab3e35137f8468b846770587e70d71e11de797d113df", size = 387036, upload-time = "2025-10-06T14:10:22.902Z" }, + { url = "https://files.pythonhosted.org/packages/d9/9a/c5db84ea024f76838220280f732970aa4ee154015d7f5c1bfb60a267af6f/yarl-1.22.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:243dda95d901c733f5b59214d28b0120893d91777cb8aa043e6ef059d3cddfe2", size = 397671, upload-time = "2025-10-06T14:10:24.523Z" }, + { url = "https://files.pythonhosted.org/packages/11/c9/cd8538dc2e7727095e0c1d867bad1e40c98f37763e6d995c1939f5fdc7b1/yarl-1.22.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bec03d0d388060058f5d291a813f21c011041938a441c593374da6077fe21b1b", size = 377059, upload-time = "2025-10-06T14:10:26.406Z" }, + { url = "https://files.pythonhosted.org/packages/a1/b9/ab437b261702ced75122ed78a876a6dec0a1b0f5e17a4ac7a9a2482d8abe/yarl-1.22.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b0748275abb8c1e1e09301ee3cf90c8a99678a4e92e4373705f2a2570d581273", size = 365356, upload-time = "2025-10-06T14:10:28.461Z" }, + { url = "https://files.pythonhosted.org/packages/b2/9d/8e1ae6d1d008a9567877b08f0ce4077a29974c04c062dabdb923ed98e6fe/yarl-1.22.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:47fdb18187e2a4e18fda2c25c05d8251a9e4a521edaed757fef033e7d8498d9a", size = 361331, upload-time = "2025-10-06T14:10:30.541Z" }, + { url = "https://files.pythonhosted.org/packages/ca/5a/09b7be3905962f145b73beb468cdd53db8aa171cf18c80400a54c5b82846/yarl-1.22.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c7044802eec4524fde550afc28edda0dd5784c4c45f0be151a2d3ba017daca7d", size = 382590, upload-time = "2025-10-06T14:10:33.352Z" }, + { url = "https://files.pythonhosted.org/packages/aa/7f/59ec509abf90eda5048b0bc3e2d7b5099dffdb3e6b127019895ab9d5ef44/yarl-1.22.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:139718f35149ff544caba20fce6e8a2f71f1e39b92c700d8438a0b1d2a631a02", size = 385316, upload-time = "2025-10-06T14:10:35.034Z" }, + { url = "https://files.pythonhosted.org/packages/e5/84/891158426bc8036bfdfd862fabd0e0fa25df4176ec793e447f4b85cf1be4/yarl-1.22.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e1b51bebd221006d3d2f95fbe124b22b247136647ae5dcc8c7acafba66e5ee67", size = 374431, upload-time = "2025-10-06T14:10:37.76Z" }, + { url = "https://files.pythonhosted.org/packages/bb/49/03da1580665baa8bef5e8ed34c6df2c2aca0a2f28bf397ed238cc1bbc6f2/yarl-1.22.0-cp313-cp313-win32.whl", hash = "sha256:d3e32536234a95f513bd374e93d717cf6b2231a791758de6c509e3653f234c95", size = 81555, upload-time = "2025-10-06T14:10:39.649Z" }, + { url = "https://files.pythonhosted.org/packages/9a/ee/450914ae11b419eadd067c6183ae08381cfdfcb9798b90b2b713bbebddda/yarl-1.22.0-cp313-cp313-win_amd64.whl", hash = "sha256:47743b82b76d89a1d20b83e60d5c20314cbd5ba2befc9cda8f28300c4a08ed4d", size = 86965, upload-time = "2025-10-06T14:10:41.313Z" }, + { url = "https://files.pythonhosted.org/packages/98/4d/264a01eae03b6cf629ad69bae94e3b0e5344741e929073678e84bf7a3e3b/yarl-1.22.0-cp313-cp313-win_arm64.whl", hash = "sha256:5d0fcda9608875f7d052eff120c7a5da474a6796fe4d83e152e0e4d42f6d1a9b", size = 81205, upload-time = "2025-10-06T14:10:43.167Z" }, + { url = "https://files.pythonhosted.org/packages/88/fc/6908f062a2f77b5f9f6d69cecb1747260831ff206adcbc5b510aff88df91/yarl-1.22.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:719ae08b6972befcba4310e49edb1161a88cdd331e3a694b84466bd938a6ab10", size = 146209, upload-time = "2025-10-06T14:10:44.643Z" }, + { url = "https://files.pythonhosted.org/packages/65/47/76594ae8eab26210b4867be6f49129861ad33da1f1ebdf7051e98492bf62/yarl-1.22.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:47d8a5c446df1c4db9d21b49619ffdba90e77c89ec6e283f453856c74b50b9e3", size = 95966, upload-time = "2025-10-06T14:10:46.554Z" }, + { url = "https://files.pythonhosted.org/packages/ab/ce/05e9828a49271ba6b5b038b15b3934e996980dd78abdfeb52a04cfb9467e/yarl-1.22.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:cfebc0ac8333520d2d0423cbbe43ae43c8838862ddb898f5ca68565e395516e9", size = 97312, upload-time = "2025-10-06T14:10:48.007Z" }, + { url = "https://files.pythonhosted.org/packages/d1/c5/7dffad5e4f2265b29c9d7ec869c369e4223166e4f9206fc2243ee9eea727/yarl-1.22.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4398557cbf484207df000309235979c79c4356518fd5c99158c7d38203c4da4f", size = 361967, upload-time = "2025-10-06T14:10:49.997Z" }, + { url = "https://files.pythonhosted.org/packages/50/b2/375b933c93a54bff7fc041e1a6ad2c0f6f733ffb0c6e642ce56ee3b39970/yarl-1.22.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2ca6fd72a8cd803be290d42f2dec5cdcd5299eeb93c2d929bf060ad9efaf5de0", size = 323949, upload-time = "2025-10-06T14:10:52.004Z" }, + { url = "https://files.pythonhosted.org/packages/66/50/bfc2a29a1d78644c5a7220ce2f304f38248dc94124a326794e677634b6cf/yarl-1.22.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ca1f59c4e1ab6e72f0a23c13fca5430f889634166be85dbf1013683e49e3278e", size = 361818, upload-time = "2025-10-06T14:10:54.078Z" }, + { url = "https://files.pythonhosted.org/packages/46/96/f3941a46af7d5d0f0498f86d71275696800ddcdd20426298e572b19b91ff/yarl-1.22.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6c5010a52015e7c70f86eb967db0f37f3c8bd503a695a49f8d45700144667708", size = 372626, upload-time = "2025-10-06T14:10:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/c1/42/8b27c83bb875cd89448e42cd627e0fb971fa1675c9ec546393d18826cb50/yarl-1.22.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d7672ecf7557476642c88497c2f8d8542f8e36596e928e9bcba0e42e1e7d71f", size = 341129, upload-time = "2025-10-06T14:10:57.985Z" }, + { url = "https://files.pythonhosted.org/packages/49/36/99ca3122201b382a3cf7cc937b95235b0ac944f7e9f2d5331d50821ed352/yarl-1.22.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:3b7c88eeef021579d600e50363e0b6ee4f7f6f728cd3486b9d0f3ee7b946398d", size = 346776, upload-time = "2025-10-06T14:10:59.633Z" }, + { url = "https://files.pythonhosted.org/packages/85/b4/47328bf996acd01a4c16ef9dcd2f59c969f495073616586f78cd5f2efb99/yarl-1.22.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:f4afb5c34f2c6fecdcc182dfcfc6af6cccf1aa923eed4d6a12e9d96904e1a0d8", size = 334879, upload-time = "2025-10-06T14:11:01.454Z" }, + { url = "https://files.pythonhosted.org/packages/c2/ad/b77d7b3f14a4283bffb8e92c6026496f6de49751c2f97d4352242bba3990/yarl-1.22.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:59c189e3e99a59cf8d83cbb31d4db02d66cda5a1a4374e8a012b51255341abf5", size = 350996, upload-time = "2025-10-06T14:11:03.452Z" }, + { url = "https://files.pythonhosted.org/packages/81/c8/06e1d69295792ba54d556f06686cbd6a7ce39c22307100e3fb4a2c0b0a1d/yarl-1.22.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:5a3bf7f62a289fa90f1990422dc8dff5a458469ea71d1624585ec3a4c8d6960f", size = 356047, upload-time = "2025-10-06T14:11:05.115Z" }, + { url = "https://files.pythonhosted.org/packages/4b/b8/4c0e9e9f597074b208d18cef227d83aac36184bfbc6eab204ea55783dbc5/yarl-1.22.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:de6b9a04c606978fdfe72666fa216ffcf2d1a9f6a381058d4378f8d7b1e5de62", size = 342947, upload-time = "2025-10-06T14:11:08.137Z" }, + { url = "https://files.pythonhosted.org/packages/e0/e5/11f140a58bf4c6ad7aca69a892bff0ee638c31bea4206748fc0df4ebcb3a/yarl-1.22.0-cp313-cp313t-win32.whl", hash = "sha256:1834bb90991cc2999f10f97f5f01317f99b143284766d197e43cd5b45eb18d03", size = 86943, upload-time = "2025-10-06T14:11:10.284Z" }, + { url = "https://files.pythonhosted.org/packages/31/74/8b74bae38ed7fe6793d0c15a0c8207bbb819cf287788459e5ed230996cdd/yarl-1.22.0-cp313-cp313t-win_amd64.whl", hash = "sha256:ff86011bd159a9d2dfc89c34cfd8aff12875980e3bd6a39ff097887520e60249", size = 93715, upload-time = "2025-10-06T14:11:11.739Z" }, + { url = "https://files.pythonhosted.org/packages/69/66/991858aa4b5892d57aef7ee1ba6b4d01ec3b7eb3060795d34090a3ca3278/yarl-1.22.0-cp313-cp313t-win_arm64.whl", hash = "sha256:7861058d0582b847bc4e3a4a4c46828a410bca738673f35a29ba3ca5db0b473b", size = 83857, upload-time = "2025-10-06T14:11:13.586Z" }, + { url = "https://files.pythonhosted.org/packages/46/b3/e20ef504049f1a1c54a814b4b9bed96d1ac0e0610c3b4da178f87209db05/yarl-1.22.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:34b36c2c57124530884d89d50ed2c1478697ad7473efd59cfd479945c95650e4", size = 140520, upload-time = "2025-10-06T14:11:15.465Z" }, + { url = "https://files.pythonhosted.org/packages/e4/04/3532d990fdbab02e5ede063676b5c4260e7f3abea2151099c2aa745acc4c/yarl-1.22.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:0dd9a702591ca2e543631c2a017e4a547e38a5c0f29eece37d9097e04a7ac683", size = 93504, upload-time = "2025-10-06T14:11:17.106Z" }, + { url = "https://files.pythonhosted.org/packages/11/63/ff458113c5c2dac9a9719ac68ee7c947cb621432bcf28c9972b1c0e83938/yarl-1.22.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:594fcab1032e2d2cc3321bb2e51271e7cd2b516c7d9aee780ece81b07ff8244b", size = 94282, upload-time = "2025-10-06T14:11:19.064Z" }, + { url = "https://files.pythonhosted.org/packages/a7/bc/315a56aca762d44a6aaaf7ad253f04d996cb6b27bad34410f82d76ea8038/yarl-1.22.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f3d7a87a78d46a2e3d5b72587ac14b4c16952dd0887dbb051451eceac774411e", size = 372080, upload-time = "2025-10-06T14:11:20.996Z" }, + { url = "https://files.pythonhosted.org/packages/3f/3f/08e9b826ec2e099ea6e7c69a61272f4f6da62cb5b1b63590bb80ca2e4a40/yarl-1.22.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:852863707010316c973162e703bddabec35e8757e67fcb8ad58829de1ebc8590", size = 338696, upload-time = "2025-10-06T14:11:22.847Z" }, + { url = "https://files.pythonhosted.org/packages/e3/9f/90360108e3b32bd76789088e99538febfea24a102380ae73827f62073543/yarl-1.22.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:131a085a53bfe839a477c0845acf21efc77457ba2bcf5899618136d64f3303a2", size = 387121, upload-time = "2025-10-06T14:11:24.889Z" }, + { url = "https://files.pythonhosted.org/packages/98/92/ab8d4657bd5b46a38094cfaea498f18bb70ce6b63508fd7e909bd1f93066/yarl-1.22.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:078a8aefd263f4d4f923a9677b942b445a2be970ca24548a8102689a3a8ab8da", size = 394080, upload-time = "2025-10-06T14:11:27.307Z" }, + { url = "https://files.pythonhosted.org/packages/f5/e7/d8c5a7752fef68205296201f8ec2bf718f5c805a7a7e9880576c67600658/yarl-1.22.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bca03b91c323036913993ff5c738d0842fc9c60c4648e5c8d98331526df89784", size = 372661, upload-time = "2025-10-06T14:11:29.387Z" }, + { url = "https://files.pythonhosted.org/packages/b6/2e/f4d26183c8db0bb82d491b072f3127fb8c381a6206a3a56332714b79b751/yarl-1.22.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:68986a61557d37bb90d3051a45b91fa3d5c516d177dfc6dd6f2f436a07ff2b6b", size = 364645, upload-time = "2025-10-06T14:11:31.423Z" }, + { url = "https://files.pythonhosted.org/packages/80/7c/428e5812e6b87cd00ee8e898328a62c95825bf37c7fa87f0b6bb2ad31304/yarl-1.22.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:4792b262d585ff0dff6bcb787f8492e40698443ec982a3568c2096433660c694", size = 355361, upload-time = "2025-10-06T14:11:33.055Z" }, + { url = "https://files.pythonhosted.org/packages/ec/2a/249405fd26776f8b13c067378ef4d7dd49c9098d1b6457cdd152a99e96a9/yarl-1.22.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:ebd4549b108d732dba1d4ace67614b9545b21ece30937a63a65dd34efa19732d", size = 381451, upload-time = "2025-10-06T14:11:35.136Z" }, + { url = "https://files.pythonhosted.org/packages/67/a8/fb6b1adbe98cf1e2dd9fad71003d3a63a1bc22459c6e15f5714eb9323b93/yarl-1.22.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:f87ac53513d22240c7d59203f25cc3beac1e574c6cd681bbfd321987b69f95fd", size = 383814, upload-time = "2025-10-06T14:11:37.094Z" }, + { url = "https://files.pythonhosted.org/packages/d9/f9/3aa2c0e480fb73e872ae2814c43bc1e734740bb0d54e8cb2a95925f98131/yarl-1.22.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:22b029f2881599e2f1b06f8f1db2ee63bd309e2293ba2d566e008ba12778b8da", size = 370799, upload-time = "2025-10-06T14:11:38.83Z" }, + { url = "https://files.pythonhosted.org/packages/50/3c/af9dba3b8b5eeb302f36f16f92791f3ea62e3f47763406abf6d5a4a3333b/yarl-1.22.0-cp314-cp314-win32.whl", hash = "sha256:6a635ea45ba4ea8238463b4f7d0e721bad669f80878b7bfd1f89266e2ae63da2", size = 82990, upload-time = "2025-10-06T14:11:40.624Z" }, + { url = "https://files.pythonhosted.org/packages/ac/30/ac3a0c5bdc1d6efd1b41fa24d4897a4329b3b1e98de9449679dd327af4f0/yarl-1.22.0-cp314-cp314-win_amd64.whl", hash = "sha256:0d6e6885777af0f110b0e5d7e5dda8b704efed3894da26220b7f3d887b839a79", size = 88292, upload-time = "2025-10-06T14:11:42.578Z" }, + { url = "https://files.pythonhosted.org/packages/df/0a/227ab4ff5b998a1b7410abc7b46c9b7a26b0ca9e86c34ba4b8d8bc7c63d5/yarl-1.22.0-cp314-cp314-win_arm64.whl", hash = "sha256:8218f4e98d3c10d683584cb40f0424f4b9fd6e95610232dd75e13743b070ee33", size = 82888, upload-time = "2025-10-06T14:11:44.863Z" }, + { url = "https://files.pythonhosted.org/packages/06/5e/a15eb13db90abd87dfbefb9760c0f3f257ac42a5cac7e75dbc23bed97a9f/yarl-1.22.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:45c2842ff0e0d1b35a6bf1cd6c690939dacb617a70827f715232b2e0494d55d1", size = 146223, upload-time = "2025-10-06T14:11:46.796Z" }, + { url = "https://files.pythonhosted.org/packages/18/82/9665c61910d4d84f41a5bf6837597c89e665fa88aa4941080704645932a9/yarl-1.22.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:d947071e6ebcf2e2bee8fce76e10faca8f7a14808ca36a910263acaacef08eca", size = 95981, upload-time = "2025-10-06T14:11:48.845Z" }, + { url = "https://files.pythonhosted.org/packages/5d/9a/2f65743589809af4d0a6d3aa749343c4b5f4c380cc24a8e94a3c6625a808/yarl-1.22.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:334b8721303e61b00019474cc103bdac3d7b1f65e91f0bfedeec2d56dfe74b53", size = 97303, upload-time = "2025-10-06T14:11:50.897Z" }, + { url = "https://files.pythonhosted.org/packages/b0/ab/5b13d3e157505c43c3b43b5a776cbf7b24a02bc4cccc40314771197e3508/yarl-1.22.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1e7ce67c34138a058fd092f67d07a72b8e31ff0c9236e751957465a24b28910c", size = 361820, upload-time = "2025-10-06T14:11:52.549Z" }, + { url = "https://files.pythonhosted.org/packages/fb/76/242a5ef4677615cf95330cfc1b4610e78184400699bdda0acb897ef5e49a/yarl-1.22.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d77e1b2c6d04711478cb1c4ab90db07f1609ccf06a287d5607fcd90dc9863acf", size = 323203, upload-time = "2025-10-06T14:11:54.225Z" }, + { url = "https://files.pythonhosted.org/packages/8c/96/475509110d3f0153b43d06164cf4195c64d16999e0c7e2d8a099adcd6907/yarl-1.22.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4647674b6150d2cae088fc07de2738a84b8bcedebef29802cf0b0a82ab6face", size = 363173, upload-time = "2025-10-06T14:11:56.069Z" }, + { url = "https://files.pythonhosted.org/packages/c9/66/59db471aecfbd559a1fd48aedd954435558cd98c7d0da8b03cc6c140a32c/yarl-1.22.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:efb07073be061c8f79d03d04139a80ba33cbd390ca8f0297aae9cce6411e4c6b", size = 373562, upload-time = "2025-10-06T14:11:58.783Z" }, + { url = "https://files.pythonhosted.org/packages/03/1f/c5d94abc91557384719da10ff166b916107c1b45e4d0423a88457071dd88/yarl-1.22.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e51ac5435758ba97ad69617e13233da53908beccc6cfcd6c34bbed8dcbede486", size = 339828, upload-time = "2025-10-06T14:12:00.686Z" }, + { url = "https://files.pythonhosted.org/packages/5f/97/aa6a143d3afba17b6465733681c70cf175af89f76ec8d9286e08437a7454/yarl-1.22.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:33e32a0dd0c8205efa8e83d04fc9f19313772b78522d1bdc7d9aed706bfd6138", size = 347551, upload-time = "2025-10-06T14:12:02.628Z" }, + { url = "https://files.pythonhosted.org/packages/43/3c/45a2b6d80195959239a7b2a8810506d4eea5487dce61c2a3393e7fc3c52e/yarl-1.22.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:bf4a21e58b9cde0e401e683ebd00f6ed30a06d14e93f7c8fd059f8b6e8f87b6a", size = 334512, upload-time = "2025-10-06T14:12:04.871Z" }, + { url = "https://files.pythonhosted.org/packages/86/a0/c2ab48d74599c7c84cb104ebd799c5813de252bea0f360ffc29d270c2caa/yarl-1.22.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:e4b582bab49ac33c8deb97e058cd67c2c50dac0dd134874106d9c774fd272529", size = 352400, upload-time = "2025-10-06T14:12:06.624Z" }, + { url = "https://files.pythonhosted.org/packages/32/75/f8919b2eafc929567d3d8411f72bdb1a2109c01caaab4ebfa5f8ffadc15b/yarl-1.22.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:0b5bcc1a9c4839e7e30b7b30dd47fe5e7e44fb7054ec29b5bb8d526aa1041093", size = 357140, upload-time = "2025-10-06T14:12:08.362Z" }, + { url = "https://files.pythonhosted.org/packages/cf/72/6a85bba382f22cf78add705d8c3731748397d986e197e53ecc7835e76de7/yarl-1.22.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c0232bce2170103ec23c454e54a57008a9a72b5d1c3105dc2496750da8cfa47c", size = 341473, upload-time = "2025-10-06T14:12:10.994Z" }, + { url = "https://files.pythonhosted.org/packages/35/18/55e6011f7c044dc80b98893060773cefcfdbf60dfefb8cb2f58b9bacbd83/yarl-1.22.0-cp314-cp314t-win32.whl", hash = "sha256:8009b3173bcd637be650922ac455946197d858b3630b6d8787aa9e5c4564533e", size = 89056, upload-time = "2025-10-06T14:12:13.317Z" }, + { url = "https://files.pythonhosted.org/packages/f9/86/0f0dccb6e59a9e7f122c5afd43568b1d31b8ab7dda5f1b01fb5c7025c9a9/yarl-1.22.0-cp314-cp314t-win_amd64.whl", hash = "sha256:9fb17ea16e972c63d25d4a97f016d235c78dd2344820eb35bc034bc32012ee27", size = 96292, upload-time = "2025-10-06T14:12:15.398Z" }, + { url = "https://files.pythonhosted.org/packages/48/b7/503c98092fb3b344a179579f55814b613c1fbb1c23b3ec14a7b008a66a6e/yarl-1.22.0-cp314-cp314t-win_arm64.whl", hash = "sha256:9f6d73c1436b934e3f01df1e1b21ff765cd1d28c77dfb9ace207f746d4610ee1", size = 85171, upload-time = "2025-10-06T14:12:16.935Z" }, + { url = "https://files.pythonhosted.org/packages/73/ae/b48f95715333080afb75a4504487cbe142cae1268afc482d06692d605ae6/yarl-1.22.0-py3-none-any.whl", hash = "sha256:1380560bdba02b6b6c90de54133c81c9f2a453dee9912fe58c1dcced1edb7cff", size = 46814, upload-time = "2025-10-06T14:12:53.872Z" }, +]